# HG changeset patch # User koda # Date 1361505932 -3600 # Node ID 1dedcc37bfe85412ef9565c066b184d943fb9411 # Parent d5d5e16985547088be4fcb568b8b5c76e00def5d# Parent 24d2bdc6deff7e23007719ddc37b990eb08d989b reopen and update branch diff -r d5d5e1698554 -r 1dedcc37bfe8 .hgignore --- a/.hgignore Sun Nov 18 01:06:01 2012 +0400 +++ b/.hgignore Fri Feb 22 05:05:32 2013 +0100 @@ -14,6 +14,7 @@ glob:config.inc glob:cmake_install.cmake glob:QTfrontend/hwconsts.cpp +glob:QTfrontend/servermessages.h glob:CPackConfig.cmake glob:CPackSourceConfig.cmake glob:tools/cmake_uninstall.cmake @@ -30,6 +31,7 @@ glob:misc/liblua/Xcode/build/ glob:misc/libfreetype/Xcode/build/ glob:misc/libfreetype/Xcode-iOS/build/ +glob:misc/physfs/Xcode/build/ glob:moc_*.cxx_parameters relre:^release\/ glob:*.log @@ -55,4 +57,5 @@ glob:hedgewars-build-desktop-Qt_4_7_4_for_Desktop_-_MinGW_4_4__Qt_SDK__Release glob:*.depends glob:tools/build_windows_koda.bat +glob:share/hedgewars/Data/misc/hwengine.desktop diff -r d5d5e1698554 -r 1dedcc37bfe8 CMakeLists.txt --- a/CMakeLists.txt Sun Nov 18 01:06:01 2012 +0400 +++ b/CMakeLists.txt Fri Feb 22 05:05:32 2013 +0100 @@ -1,43 +1,63 @@ project(hedgewars) - #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() -ENDFOREACH() -set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake_modules) +cmake_minimum_required(VERSION 2.6.0) +foreach(hwpolicy CMP0003 CMP0012 CMP0017) + if(POLICY ${hwpolicy}) + cmake_policy(SET ${hwpolicy} NEW) + endif() +endforeach() +#use available modules, fallback to ours if not present (CMP0017 helps) +set(CMAKE_MODULE_PATH "${CMAKE_ROOT}/Modules" "${CMAKE_CURRENT_SOURCE_DIR}/cmake_modules") + + +#usually this is set at release time +option(NOREVISION "Build Hedgewars without revision information [default: off]" OFF) +#set other default values +option(NOSERVER "Disable gameServer build [default: auto]" OFF) +option(NOPNG "Disable screenshoot compression [default: auto]" OFF) +option(NOVIDEOREC "Disable video recording [default: auto]" OFF) + +option(BUILD_ENGINE_LIBRARY "Enable hwengine library [default: off]" OFF) +option(ANDROID "Enable Android build [default: off]" OFF) +option(NOAUTOUPDATE "Disable OS X Sparkle update checking" OFF) +option(MINIMAL_FLAGS "Respect system flags as much as possible [default: off]" OFF) +set(FPFLAGS "" CACHE STRING "Additional Freepascal flags") +set(GHFLAGS "" CACHE STRING "Additional Haskell flags") +if(UNIX AND NOT APPLE) + set(DATA_INSTALL_DIR "share/hedgewars" CACHE STRING "Resource folder path") +endif() #detect Mercurial revision (if present) -set(version_suffix "-dev") #UNSET THIS VARIABLE AT RELEASE TIME -set(HGCHANGED "") -IF(version_suffix MATCHES "-dev") - set(HW_DEV true) +if(NOT NOREVISION) set(default_build_type "DEBUG") - 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(version_suffix "-development_version") + set(HW_DEV true) + find_program(HGCOMMAND hg) + if(HGCOMMAND AND (EXISTS ${CMAKE_SOURCE_DIR}/.hg)) + execute_process(COMMAND ${HGCOMMAND} identify -in + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} + OUTPUT_VARIABLE internal_version + ERROR_QUIET + ) + #check local repo status + string(REGEX REPLACE "[^+]" "" HGCHANGED ${internal_version}) + + string(REGEX REPLACE "[0-9a-zA-Z]+(.*) ([0-9]+)(.*)" "\\2" revision_number ${internal_version}) + string(REGEX REPLACE "([0-9a-zA-Z]+)(.*) [0-9]+(.*)" "\\1" revision_hash ${internal_version}) + + message(STATUS "Building revision ${revision_number} from hash ${revision_hash} ${HGCHANGED}") + if(HGCHANGED) + MESSAGE(WARNING "Notice: you have uncommitted changes in your repository") + endif() + set(version_suffix "-${revision_number}${HGCHANGED}") + endif() +else(NOT NOREVISION) set(default_build_type "RELEASE") -ENDIF() + set(HWDEV false) + message(STATUS "Building distributable version") +endif(NOT NOREVISION) #versioning @@ -48,30 +68,31 @@ set(HEDGEWARS_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}") -#set some default values -option(NOSERVER "Disable gameServer build [default: auto]" OFF) -option(NOPNG "Disable screenshoot compression [default: auto]" OFF) -option(NOVIDEOREC "Disable video recording [default: auto]" OFF) +set(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin) +set(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin) -option(BUILD_ENGINE_LIBRARY "Enable hwengine library [default: off]" OFF) -option(ANDROID "Enable Android build [default: off]" OFF) -option(NOAUTOUPDATE "Disable OS X Sparkle update checking" OFF) -option(CROSSAPPLE "Enable OSX when not on OSX [default: off]" OFF) -option(MINIMAL_FLAGS "Respect system flags as much as possible [default: off]" OFF) +if(UNIX AND NOT APPLE) + set(target_binary_install_dir "bin") + set(target_library_install_dir "lib") + set(SHAREPATH "${DATA_INSTALL_DIR}/") +else() + set(target_binary_install_dir "./") -#bundle .app setup -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") -else() - set(target_dir "bin") + if(APPLE) + set(CMAKE_INSTALL_PREFIX "Hedgewars.app/Contents/MacOS/") + set(SHAREPATH "../Resources/") + set(target_library_install_dir "../Frameworks/") + else() + if(WIN32) + set(target_library_install_dir "./") + set(SHAREPATH "./") + set(CMAKE_PREFIX_PATH "${CMAKE_SOURCE_DIR}/misc/winutils/") + link_directories("${EXECUTABLE_OUTPUT_PATH}" "${CMAKE_SOURCE_DIR}/misc/winutils/bin") + endif(WIN32) + endif() endif() + if(APPLE) set(CMAKE_FIND_FRAMEWORK "FIRST") @@ -81,12 +102,15 @@ #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) + execute_process(COMMAND ${sw_vers} "-productVersion" + OUTPUT_VARIABLE current_macosx_version + OUTPUT_STRIP_TRAILING_WHITESPACE) string(REGEX REPLACE "([0-9]+.[0-9]+).[0-9]+" "\\1" current_macosx_version ${current_macosx_version}) - else() + else() if(NOT minimum_macosx_version) message(FATAL_ERROR "sw_vers not found! Need explicit MACOSX_DEPLOYMENT_TARGET variable set") else() + message(WARNING "sw_vers not found! Fallback to MACOSX_DEPLOYMENT_TARGET variable") set(current_macosx_version ${minimum_macosx_version}) endif() endif() @@ -96,23 +120,23 @@ set(minimum_macosx_version ${current_macosx_version}) endif() - #lower systems don't have enough processing power anyways - if (minimum_macosx_version LESS "10.4") + #lower systems don't have enough processing power anyway + if (minimum_macosx_version 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") + if(current_macosx_version VERSION_EQUAL "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}) + set(CMAKE_C_FLAGS "${DYLIB_SMPEG} ${DYLIB_MIKMOD}") + list(APPEND pascal_flags "-k${DYLIB_SMPEG}" "-k${DYLIB_MIKMOD}") 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(current_macosx_version VERSION_LESS "10.6") if(${CMAKE_SYSTEM_PROCESSOR} MATCHES "powerpc*") set(CMAKE_OSX_ARCHITECTURES "ppc7400") else() @@ -125,8 +149,8 @@ #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") + if(NOT ${minimum_macosx_version} VERSION_EQUAL ${current_macosx_version}) + if(minimum_macosx_version VERSION_EQUAL "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") @@ -137,12 +161,14 @@ endif() #add user framework directory, other paths can be passed via FPFLAGS - set(pascal_flags "-Ff~/Library/Frameworks" ${pascal_flags}) + list(APPEND pascal_flags "-Ff~/Library/Frameworks") #set deployment target - set(pascal_flags "-k-macosx_version_min" "-k${minimum_macosx_version}" "-XR${CMAKE_OSX_SYSROOT}" ${pascal_flags}) + list(APPEND pascal_flags "-k-macosx_version_min" "-k${minimum_macosx_version}" "-XR${CMAKE_OSX_SYSROOT}") - 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}") + #silly libav that always brings in VideoDecoderAcceleration, avaible only from 10.6.3 + if(NOT NOVIDEOREC AND ${minimum_macosx_version} VERSION_LESS "10.6") + set(WARNING "Video recording support before OS X 10.6 is experimental") + endif() endif(APPLE) @@ -150,7 +176,7 @@ if (CMAKE_BUILD_TYPE) string (TOUPPER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE) if ( NOT( (CMAKE_BUILD_TYPE MATCHES "RELEASE") OR (CMAKE_BUILD_TYPE MATCHES "DEBUG") ) ) - set (CMAKE_BUILD_TYPE ${default_build_type} CACHE STRING "Only 'Debug' or 'Release' options are allowed." FORCE) + set (CMAKE_BUILD_TYPE ${default_build_type} CACHE STRING "Choose the build type, options are: Debug Release." FORCE) message (STATUS "Unknown build type, using default (${default_build_type})") endif () else (CMAKE_BUILD_TYPE) @@ -158,10 +184,10 @@ endif (CMAKE_BUILD_TYPE) #set default flags values for all projects (unless MINIMAL_FLAGS is true) -if(NOT MINIMAL_FLAGS) - set(CMAKE_C_FLAGS "-pipe") - set(CMAKE_C_FLAGS_RELEASE "-w -Os -fomit-frame-pointer") - set(CMAKE_C_FLAGS_DEBUG "-Wall -O0 -g -DDEBUG") +if(NOT ${MINIMAL_FLAGS}) + set(CMAKE_C_FLAGS "-pipe ${CMAKE_C_FLAGS}") + set(CMAKE_C_FLAGS_RELEASE "-w -Os -fomit-frame-pointer ${CMAKE_C_FLAGS_RELEASE}") + set(CMAKE_C_FLAGS_DEBUG "-Wall -O0 -g -DDEBUG ${CMAKE_C_FLAGS_DEBUG}") set(CMAKE_CXX_FLAGS ${CMAKE_C_FLAGS}) set(CMAKE_CXX_FLAGS_RELEASE ${CMAKE_C_FLAGS_RELEASE}) set(CMAKE_CXX_FLAGS_DEBUG ${CMAKE_C_FLAGS_DEBUG}) @@ -175,41 +201,38 @@ #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 when using CMake >= 2.8") + set(cmake_version "${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}") + if(cmake_version VERSION_LESS "2.8") + message(WARNING "FPFLAGS and GHFLAGS are available only when using CMake >= 2.8") else() separate_arguments(fpflags_parsed UNIX_COMMAND ${FPFLAGS}) separate_arguments(ghflags_parsed UNIX_COMMAND ${GHFLAGS}) endif() endif() -set(pascal_flags ${fpflags_parsed} "-vm4079,4080,4081" "-B" "-FE../bin" "-Cs2000000" "-vewnq" "-dDEBUGFILE" ${pascal_flags}) -set(haskell_flags "-O2" ${ghflags_parsed} ${haskell_flags}) +list(APPEND pascal_flags ${fpflags_parsed} # user flags + "-vm4079,4080,4081" # fpc output format + "-B" # compile all units + "-FE${PROJECT_BINARY_DIR}/bin" # fpc output directory + "-Fl${PROJECT_BINARY_DIR}/bin" # fpc linking directory + "-Cs2000000" # stack size + "-vewnq" # fpc output verbosity + "-dDEBUGFILE" # macro for engine output + ) +list(APPEND haskell_flags "-O2" ${ghflags_parsed}) #get BUILD_TYPE and enable/disable optimisation +message(STATUS "Using ${CMAKE_BUILD_TYPE} configuration") if(CMAKE_BUILD_TYPE MATCHES "DEBUG") - message(STATUS "Building Debug flavour") - set(pascal_flags "-O-" "-g" "-gl" "-gv" ${pascal_flags}) - set(haskell_flags "-Wall" "-debug" "-dcore-lint" "-fno-warn-unused-do-bind" ${haskell_flags}) + list(APPEND pascal_flags "-O-" "-g" "-gl" "-gv") + list(APPEND haskell_flags "-Wall" "-debug" "-dcore-lint" "-fno-warn-unused-do-bind") else() - message(STATUS "Building Release flavour") # 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}) + list(APPEND pascal_flags "-Os" "-Xs" "-Si") + list(APPEND haskell_flags "-w" "-fno-warn-unused-do-bind") endif() -#finish setting paths -if(DEFINED DATA_INSTALL_DIR) - set(SHAREPATH ${DATA_INSTALL_DIR}/hedgewars/) -else() - set(SHAREPATH share/hedgewars/) -endif() -set(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin) -set(LIBRARY_OUTPUT_PATH ${EXECUTABLE_OUTPUT_PATH}) - - #server discovery if(NOT NOSERVER) if(GHC) @@ -223,7 +246,7 @@ add_subdirectory(gameServer) message(STATUS "Found GHC: ${ghc_executable}") else() - message(STATUS "Could NOT find GHC, server will not be built") + message(WARNING "Could NOT find GHC, server will not be built") set(HAVE_NETSERVER false) endif() else() @@ -239,18 +262,21 @@ else() message(STATUS "LUA will be provided by the bundled sources") add_subdirectory(misc/liblua) - #linking with liblua.a requires system readline -- this works everywhere, right? - set(pascal_flags "-k${EXECUTABLE_OUTPUT_PATH}/lib${LUA_LIBRARY}.a" "-k-lreadline" ${pascal_flags}) + #linking with liblua.a requires system readline + list(APPEND pascal_flags "-k${EXECUTABLE_OUTPUT_PATH}/lib${LUA_LIBRARY}.a" "-k-lreadline") +endif() + + +#physfs library (static on unix, dll on win32) +add_subdirectory(misc/physfs) +if(NOT WIN32) + list(APPEND pascal_flags "-k${LIBRARY_OUTPUT_PATH}/libphysfs.a") endif() #main engine add_subdirectory(hedgewars) -# physfs library -add_subdirectory(misc/physfs) -add_subdirectory(misc/physfs/extras) - #Android related build scripts if(ANDROID) #run cmake -DANDROID=1 to enable this @@ -258,7 +284,7 @@ endif() #TODO: when ANDROID, BUILD_ENGINE_LIBRARY should be set -if(NOT (BUILD_ENGINE_LIBRARY OR ANDROID)) +if(NOT ANDROID) add_subdirectory(bin) add_subdirectory(QTfrontend) add_subdirectory(share) @@ -282,6 +308,7 @@ 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_NSIS_EXECUTABLES_DIRECTORY "${target_binary_install_dir}") set(CPACK_GENERATOR "ZIP;NSIS") set(CPACK_PACKAGE_INSTALL_REGISTRY_KEY "hedgewars") else(WIN32 AND NOT UNIX) diff -r d5d5e1698554 -r 1dedcc37bfe8 ChangeLog.txt --- a/ChangeLog.txt Sun Nov 18 01:06:01 2012 +0400 +++ b/ChangeLog.txt Fri Feb 22 05:05:32 2013 +0100 @@ -28,7 +28,7 @@ * Fix all knowns bugs which caused network game hang when players close engine or quit * Fix drill strike bug when drill's timer gets ridiculously high value instead of explosion * Fix some crashes, freezes and memory leaks in frontend and engine - + 0.9.16 -> 0.9.17: + New theme, Cave + New voicepack, Hillbilly @@ -401,7 +401,7 @@ + AI updates + Teams now work in fort mode, i.e. 2v2 + Ability to attack whilst jumping/rope swinging - + Some weapons can only be used after a certain number of turns + + Some weapons can only be used after a certain number of turns + Lots of new graphics * Many network/gameplay bug fixes diff -r d5d5e1698554 -r 1dedcc37bfe8 INSTALL --- a/INSTALL Sun Nov 18 01:06:01 2012 +0400 +++ b/INSTALL Fri Feb 22 05:05:32 2013 +0100 @@ -1,13 +1,14 @@ To compile and install you need: - - Qt >= 4.5 - - FreePascal >= 2.2.4 + - CMake >= 2.6.0 + - FreePascal >= 2.2.0 + - Qt >= 4.5.0 - SDL >= 1.2.5 - SDL_net >= 1.2.5 - SDL_mixer >= 1.2 - SDL_image >= 1.2 - SDL_ttf >= 2.0 - - CMake >= 2.6.0 - Lua >= 5.1.0 + - Physfs >= 2.1 For server: - Glasgow Haskell Compiler >= 6.10 - bytestring-show package @@ -16,6 +17,11 @@ For videorecording: - FFmpeg or LibAV - GLUT (when SDL < 2) +For compressed screenshots: + - libpng + +Lua will be automatically built if not found. + 1. Configure: $ cmake . @@ -23,8 +29,12 @@ $ cmake -DCMAKE_BUILD_TYPE="Release" -DCMAKE_INSTALL_PREFIX="install_prefix" \ -DDATA_INSTALL_DIR="data_dir" -DNOSERVER=1 . -add -DNOSERVER=0 to compile net server; if you have Qt installed but it is -not found you can set it up with -DQT_QMAKE_EXECUTABLE="path_to_qmake" +Add -DNOSERVER=0 to compile net server (remember to check out the additional +dependencies with the hedgewars-server.cabal configuration file. If you have +Qt installed but it is not found, you can set it up with +-DQT_QMAKE_EXECUTABLE="path_to_qmake". +To get a glimpse of the main configuration options, you may use this command +`cat CMakeLists.txt | grep option` 2. Compile: $ make @@ -34,3 +44,4 @@ That's all! Enjoy! + diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/AutoUpdater.cpp --- a/QTfrontend/AutoUpdater.cpp Sun Nov 18 01:06:01 2012 +0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,9 +0,0 @@ -/* - * Copyright (C) 2008 Remko Troncon - */ - -#include "AutoUpdater.h" - -AutoUpdater::~AutoUpdater() -{ -} diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/AutoUpdater.h --- a/QTfrontend/AutoUpdater.h Sun Nov 18 01:06:01 2012 +0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,16 +0,0 @@ -/* - * Copyright (C) 2008 Remko Troncon - */ - -#ifndef AUTOUPDATER_H -#define AUTOUPDATER_H - -class AutoUpdater -{ - public: - virtual ~AutoUpdater(); - - virtual void checkForUpdates() = 0; -}; - -#endif diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/CMakeLists.txt --- a/QTfrontend/CMakeLists.txt Sun Nov 18 01:06:01 2012 +0400 +++ b/QTfrontend/CMakeLists.txt Fri Feb 22 05:05:32 2013 +0100 @@ -11,18 +11,41 @@ set(QT_USE_QTMAIN TRUE) find_package(Qt4 REQUIRED) -if (NOT CROSSAPPLE) - include(${QT_USE_FILE}) +include(${QT_USE_FILE}) + +find_package(SDL REQUIRED) #video in SDLInteraction +find_package(SDL_mixer REQUIRED) #audio in SDLInteraction +find_package(SDL_net REQUIRED) #network frontlib +if(NOT NOVIDEOREC) + find_package(FFMPEG) + if(${FFMPEG_FOUND}) + add_definitions(-DVIDEOREC -D__STDC_CONSTANT_MACROS) + endif() endif() -# Configure for SDL -find_package(SDL REQUIRED) -find_package(SDL_mixer REQUIRED) -if(NOT NOVIDEOREC) - find_package(FFMPEG) -endif() +# server messages localization +file(GLOB ServerSources ${CMAKE_SOURCE_DIR}/gameServer/*.hs) +foreach(hsfile ${ServerSources}) + file(READ ${hsfile} hs) + string(REGEX MATCHALL "loc *\"[^\n\"]+\"" locs ${hs}) + foreach(str ${locs}) + string(REGEX REPLACE "loc *\"([^\n\"]+)\"" "QT_TRANSLATE_NOOP(\"server\", \"\\1\")" s ${str}) + list(APPEND serverlocs ${s}) + endforeach(str) +endforeach(hsfile) -include_directories(.) +list(REMOVE_DUPLICATES serverlocs) +list(GET serverlocs 0 firstline) +list(REMOVE_AT serverlocs 0) +set(locsout "const char * serverMessages[] = {\n") +foreach(l ${serverlocs}) + list(APPEND locsout ${l} ",\n") +endforeach(l) +list(APPEND locsout ${firstline} "\n}\\;\n") +file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/servermessages.h ${locsout}) + +include_directories(${CMAKE_CURRENT_BINARY_DIR}) +include_directories(${CMAKE_CURRENT_SOURCE_DIR}) include_directories(${CMAKE_CURRENT_SOURCE_DIR}/model) include_directories(${CMAKE_CURRENT_SOURCE_DIR}/net) include_directories(${CMAKE_CURRENT_SOURCE_DIR}/ui) @@ -30,6 +53,7 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR}/ui/page) include_directories(${CMAKE_CURRENT_SOURCE_DIR}/ui/widget) include_directories(${CMAKE_CURRENT_SOURCE_DIR}/util) +include_directories(${CMAKE_CURRENT_SOURCE_DIR}/util/platform) include_directories(${SDL_INCLUDE_DIR}) include_directories(${SDLMIXER_INCLUDE_DIR}) include_directories(${FFMPEG_INCLUDE_DIR}) @@ -40,24 +64,19 @@ include_directories("/usr/local/include") endif(UNIX) - -if(WIN32 AND NOT UNIX) - set(HEDGEWARS_BINDIR ".") - set(HEDGEWARS_DATADIR "../share/") - add_definitions(-DUSE_XFIRE) +#directory for resources, relative to bindir (on linux an absolute path is always used) +string(SUBSTRING "${SHAREPATH}" 0 1 sharepath_start) +if(APPLE OR WIN32 OR ${sharepath_start} MATCHES "/") + set(HEDGEWARS_DATADIR ${SHAREPATH}) else() - set(HEDGEWARS_BINDIR ${CMAKE_INSTALL_PREFIX}) - if(DEFINED DATA_INSTALL_DIR) - set(HEDGEWARS_DATADIR ${DATA_INSTALL_DIR}) - else() - set(HEDGEWARS_DATADIR ${CMAKE_INSTALL_PREFIX}/share/) - endif() - #only the cocoa version of qt supports building 64 bit apps - if(APPLE AND (CMAKE_OSX_ARCHITECTURES MATCHES "x86_64*") AND (NOT QT_MAC_USE_COCOA)) - message(FATAL_ERROR "Building the 64 bit version of Hedgewars *requires* the Cocoa variant of QT on Mac OS X") - endif() + set(HEDGEWARS_DATADIR ${CMAKE_INSTALL_PREFIX}/${SHAREPATH}) endif() +#only the cocoa version of qt supports building 64 bit apps +if(APPLE AND (CMAKE_OSX_ARCHITECTURES MATCHES "x86_64*") AND (NOT QT_MAC_USE_COCOA)) + message(FATAL_ERROR "Building the 64 bit version of Hedgewars *requires* the Cocoa variant of QT on Mac OS X") +endif() +#endif() configure_file(${CMAKE_CURRENT_SOURCE_DIR}/hwconsts.cpp.in ${CMAKE_CURRENT_BINARY_DIR}/hwconsts.cpp) @@ -66,11 +85,7 @@ file(GLOB_RECURSE UIcpp ui/*.cpp) file(GLOB UtilCpp util/*.cpp) -if(${FFMPEG_FOUND}) - add_definitions(-DVIDEOREC -D__STDC_CONSTANT_MACROS) -endif() - -set(hwfr_src +list(APPEND hwfr_src ${ModelCpp} ${NetCpp} ${UIcpp} @@ -91,18 +106,18 @@ #xfire integration if(WIN32) - set(hwfr_src ${hwfr_src} xfire.cpp ../misc/xfire/xfiregameclient.cpp) + list(APPEND hwfr_src util/platform/xfire.cpp util/platform/xfiregameclient.cpp) endif(WIN32) if(MINGW) # resource compilation for mingw add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/hedgewars_rc.o - COMMAND windres -I ${CMAKE_CURRENT_SOURCE_DIR} - -i ${CMAKE_CURRENT_SOURCE_DIR}/hedgewars.rc - -o ${CMAKE_CURRENT_BINARY_DIR}/hedgewars_rc.o) - set(hwfr_src ${hwfr_src} ${CMAKE_CURRENT_BINARY_DIR}/hedgewars_rc.o) + COMMAND windres -I ${CMAKE_CURRENT_SOURCE_DIR} + -i ${CMAKE_CURRENT_SOURCE_DIR}/hedgewars.rc + -o ${CMAKE_CURRENT_BINARY_DIR}/hedgewars_rc.o) + list(APPEND hwfr_src ${CMAKE_CURRENT_BINARY_DIR}/hedgewars_rc.o) else(MINGW) - set(hwfr_src ${hwfr_src} hedgewars.rc) + list(APPEND hwfr_src hedgewars.rc) endif(MINGW) file(GLOB ModelHdr model/*.h) @@ -134,55 +149,73 @@ hwconsts.h sdlkeys.h campaign.h + ${CMAKE_CURRENT_BINARY_DIR}/servermessages.h ) set(hwfr_rez hedgewars.qrc) +if(${BUILD_ENGINE_LIBRARY}) + add_definitions(-DHWLIBRARY=1) + set(hwlibname "${EXECUTABLE_OUTPUT_PATH}/${CMAKE_SHARED_LIBRARY_PREFIX}hwengine${CMAKE_SHARED_LIBRARY_SUFFIX}") + list(APPEND HW_LINK_LIBS ${hwlibname}) +endif() + qt4_add_resources(hwfr_rez_src ${hwfr_rez}) qt4_wrap_cpp(hwfr_moc_srcs ${hwfr_moc_hdrs}) -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}) - +if(APPLE) + find_library(iokit_framework NAMES IOKit) + list(APPEND HW_LINK_LIBS ${iokit_framework}) + list(APPEND hwfr_src util/platform/CocoaInitializer.mm + util/platform/InstallController.cpp + util/platform/M3Panel.mm + util/platform/M3InstallController.m + util/platform/NSWorkspace_RBAdditions.m + ) if(NOT NOAUTOUPDATE) find_package(Sparkle) if(SPARKLE_FOUND) add_definitions(-DSPARKLE_ENABLED) - set(hwfr_src ${hwfr_src} AutoUpdater.cpp SparkleAutoUpdater.mm) - set(HW_LINK_LIBS ${SPARKLE_LIBRARY} ${HW_LINK_LIBS}) + list(APPEND hwfr_src util/platform/AutoUpdater.cpp + util/platform/SparkleAutoUpdater.mm) + list(APPEND HW_LINK_LIBS ${SPARKLE_LIBRARY}) endif() endif() endif() +#when debugging, always prompt a console to see fronted messages +#TODO: check it doesn't interfere on UNIX +if(CMAKE_BUILD_TYPE MATCHES "RELEASE") + set(console_access "WIN32") +endif(CMAKE_BUILD_TYPE MATCHES "RELEASE") -add_executable(hedgewars WIN32 +add_executable(hedgewars ${console_access} ${hwfr_src} ${hwfr_moc_srcs} ${hwfr_hdrs} ${hwfr_rez_src} ) +if((UNIX AND NOT APPLE) AND ${BUILD_ENGINE_LIBRARY}) + set_target_properties(hedgewars PROPERTIES LINK_FLAGS "-Wl,-rpath,${CMAKE_INSTALL_PREFIX}/${target_library_install_dir}") +endif() -set(HW_LINK_LIBS +list(APPEND HW_LINK_LIBS physfs - physfsrwops ${QT_LIBRARIES} ${SDL_LIBRARY} ${SDLMIXER_LIBRARY} ${FFMPEG_LIBRARIES} - ${HW_LINK_LIBS} ) if(WIN32 AND NOT UNIX) if(NOT SDL_LIBRARY) - set(HW_LINK_LIBS ${HW_LINK_LIBS} SDL) + list(APPEND HW_LINK_LIBS SDL) endif() - set(HW_LINK_LIBS - ${HW_LINK_LIBS} + list(APPEND HW_LINK_LIBS ole32 oleaut32 winspool @@ -190,13 +223,8 @@ ) endif() - -if (CROSSAPPLE) - -else() - target_link_libraries(hedgewars ${HW_LINK_LIBS}) -endif() +target_link_libraries(hedgewars ${HW_LINK_LIBS}) -install(PROGRAMS "${EXECUTABLE_OUTPUT_PATH}/hedgewars${CMAKE_EXECUTABLE_SUFFIX}" DESTINATION ${target_dir}) +install(PROGRAMS "${EXECUTABLE_OUTPUT_PATH}/hedgewars${CMAKE_EXECUTABLE_SUFFIX}" DESTINATION ${target_binary_install_dir}) diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/CocoaInitializer.h --- a/QTfrontend/CocoaInitializer.h Sun Nov 18 01:06:01 2012 +0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,35 +0,0 @@ -/* - * Hedgewars, a free turn based strategy game - * Copyright (c) 2004-2012 Andrey Korotaev - * - * 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 - */ - -// see original example here http://el-tramo.be/blog/mixing-cocoa-and-qt - -#ifndef COCOAINITIALIZER_H -#define COCOAINITIALIZER_H - -class CocoaInitializer -{ - public: - CocoaInitializer(); - ~CocoaInitializer(); - - private: - class Private; - Private* c; -}; - -#endif diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/CocoaInitializer.mm --- a/QTfrontend/CocoaInitializer.mm Sun Nov 18 01:06:01 2012 +0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,44 +0,0 @@ -/* - * Hedgewars, a free turn based strategy game - * Copyright (c) 2004-2012 Andrey Korotaev - * - * 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 - */ - -// see original example here http://el-tramo.be/blog/mixing-cocoa-and-qt - -#include "CocoaInitializer.h" - -#include -#include -#include - -class CocoaInitializer::Private -{ - public: - NSAutoreleasePool* pool; -}; - -CocoaInitializer::CocoaInitializer() -{ - c = new CocoaInitializer::Private(); - NSApplicationLoad(); - c->pool = [[NSAutoreleasePool alloc] init]; -} - -CocoaInitializer::~CocoaInitializer() -{ - [c->pool release]; - delete c; -} diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/InstallController.cpp --- a/QTfrontend/InstallController.cpp Sun Nov 18 01:06:01 2012 +0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,23 +0,0 @@ -/* - * Hedgewars, a free turn based strategy game - * Copyright (c) 2004-2012 Andrey Korotaev - * - * 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 "InstallController.h" - -InstallController::~InstallController() -{ -} diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/InstallController.h --- a/QTfrontend/InstallController.h Sun Nov 18 01:06:01 2012 +0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,30 +0,0 @@ -/* - * Hedgewars, a free turn based strategy game - * Copyright (c) 2004-2012 Andrey Korotaev - * - * 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 - */ - -#ifndef INSTALLCONTROLLER_H -#define INSTALLCONTROLLER_H - -class InstallController -{ - public: - virtual ~InstallController(); - - virtual void showInstallController() = 0; -}; - -#endif diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/M3InstallController.h --- a/QTfrontend/M3InstallController.h Sun Nov 18 01:06:01 2012 +0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,53 +0,0 @@ -/***************************************************************** - M3InstallController.m - - Created by Martin Pilkington on 02/06/2007. - - Copyright (c) 2006-2009 M Cubed Software - - Permission is hereby granted, free of charge, to any person - obtaining a copy of this software and associated documentation - files (the "Software"), to deal in the Software without - restriction, including without limitation the rights to use, - copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the - Software is furnished to do so, subject to the following - conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES - OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT - HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR - OTHER DEALINGS IN THE SOFTWARE. - - *****************************************************************/ - -#import -#import - -//#if MAC_OS_X_VERSION_MIN_REQUIRED < 1050 -#if __LP64__ || NS_BUILD_32_LIKE_64 -typedef long NSInteger; -typedef unsigned long NSUInteger; -#else -typedef int NSInteger; -typedef unsigned int NSUInteger; -#endif -//#endif - - -@interface M3InstallController : -NSObject -{ - NSAlert *alert; -} - -- (void)displayInstaller; -- (void)installApp; -@end diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/M3InstallController.m --- a/QTfrontend/M3InstallController.m Sun Nov 18 01:06:01 2012 +0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,97 +0,0 @@ -/***************************************************************** - M3InstallController.m - - Created by Martin Pilkington on 02/06/2007. - - Copyright (c) 2006-2009 M Cubed Software - - Permission is hereby granted, free of charge, to any person - obtaining a copy of this software and associated documentation - files (the "Software"), to deal in the Software without - restriction, including without limitation the rights to use, - copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the - Software is furnished to do so, subject to the following - conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES - OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT - HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR - OTHER DEALINGS IN THE SOFTWARE. - - *****************************************************************/ - -#import "M3InstallController.h" -#import "NSWorkspace_RBAdditions.h" - -#import - -@implementation M3InstallController - -- (id) init { - if ((self = [super init])) { - NSString *appName = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleName"]; - NSString *title = [NSString stringWithFormat:NSLocalizedString(@"%@ is currently running from a disk image", @"AppName is currently running from a disk image"), appName]; - NSString *body = [NSString stringWithFormat:NSLocalizedString(@"Would you like to install %@ in your applications folder before quitting?", @"Would you like to install App Name in your applications folder before quitting?"), appName]; - alert = [[NSAlert alertWithMessageText:title - defaultButton:NSLocalizedString(@"Install", @"Install") - alternateButton:NSLocalizedString(@"Don't Install", @"Don't Install") - otherButton:nil - informativeTextWithFormat:body] retain]; - //[alert setShowsSuppressionButton:YES]; - } - return self; -} - -- (void)displayInstaller { - NSString *imageFilePath = [[[NSWorkspace sharedWorkspace] propertiesForPath:[[NSBundle mainBundle] bundlePath]] objectForKey:NSWorkspace_RBimagefilepath]; - if (imageFilePath && ![imageFilePath isEqualToString:[NSString stringWithFormat:@"/Users/.%@/%@.sparseimage", NSUserName(), NSUserName()]] && ![[NSUserDefaults standardUserDefaults] boolForKey:@"M3DontAskInstallAgain"]) { - NSInteger returnValue = [alert runModal]; - if (returnValue == NSAlertDefaultReturn) { - [self installApp]; - } - if ([[alert suppressionButton] state] == NSOnState) { - [[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"M3DontAskInstallAgain"]; - } - } -} - -- (void)installApp { - NSString *appsPath = [[NSString stringWithString:@"/Applications"] stringByAppendingPathComponent:[[[NSBundle mainBundle] bundlePath] lastPathComponent]]; - NSString *userAppsPath = [[[NSString stringWithString:@"~/Applications"] stringByAppendingPathComponent:[[[NSBundle mainBundle] bundlePath] lastPathComponent]] stringByExpandingTildeInPath]; - NSString *appName = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleName"]; - - //Delete the app that is installed - if ([[NSFileManager defaultManager] fileExistsAtPath:appsPath]) { - [[NSFileManager defaultManager] removeFileAtPath:appsPath handler:nil]; - } - //Delete the app that is installed - if ([[NSFileManager defaultManager] copyPath:[[NSBundle mainBundle] bundlePath] toPath:appsPath - handler:nil]) { - NSRunAlertPanel([NSString stringWithFormat:NSLocalizedString(@"%@ installed successfully", @"App Name installed successfully"), appName], - [NSString stringWithFormat:NSLocalizedString(@"%@ was installed in /Applications", @"App Name was installed in /Applications"), appName], - NSLocalizedString(@"Quit", @"Quit"), nil, nil); - } else { - if ([[NSFileManager defaultManager] fileExistsAtPath:userAppsPath]) { - [[NSFileManager defaultManager] removeFileAtPath:userAppsPath handler:nil]; - } - if ([[NSFileManager defaultManager] copyPath:[[NSBundle mainBundle] bundlePath] toPath:userAppsPath - handler:nil]) { - NSRunAlertPanel([NSString stringWithFormat:NSLocalizedString(@"%@ installed successfully", @"AppName installed successfully"), appName], - [NSString stringWithFormat:NSLocalizedString(@"%@ was installed in %@", @"App Name was installed in %@"), appName, [[NSString stringWithString:@"~/Applications"] stringByExpandingTildeInPath]], - NSLocalizedString(@"Quit", @"Quit"), nil, nil); - } else { - NSRunAlertPanel([NSString stringWithFormat:NSLocalizedString(@"Could not install %@", @"Could not install App Name"), appName], - NSLocalizedString(@"An error occurred when installing", @"An error occurred when installing"), NSLocalizedString(@"Quit", @"Quit"), nil, nil); - } - } -} - -@end diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/M3Panel.h --- a/QTfrontend/M3Panel.h Sun Nov 18 01:06:01 2012 +0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,37 +0,0 @@ -/* - * Hedgewars, a free turn based strategy game - * Copyright (c) 2004-2012 Andrey Korotaev - * - * 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 - */ - -#ifndef M3PANEL_H -#define M3PANEL_H - -#include "InstallController.h" - -class M3Panel : public InstallController -{ - public: - M3Panel(void); - ~M3Panel(); - - void showInstallController(); - - private: - class Private; - Private* c; -}; - -#endif diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/M3Panel.mm --- a/QTfrontend/M3Panel.mm Sun Nov 18 01:06:01 2012 +0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,47 +0,0 @@ -/* - * Hedgewars, a free turn based strategy game - * Copyright (c) 2004-2012 Andrey Korotaev - * - * 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 "M3Panel.h" -#include "M3InstallController.h" - -#include - -class M3Panel::Private -{ - public: - M3InstallController *install; -}; - -M3Panel::M3Panel(void) -{ - c = new Private; - - c->install = [[M3InstallController alloc] init]; - [c->install retain]; -} - -M3Panel::~M3Panel() -{ - [c->install release]; - delete c; -} - -void M3Panel::showInstallController() -{ - [c->install displayInstaller]; -} diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/NSWorkspace_RBAdditions.h --- a/QTfrontend/NSWorkspace_RBAdditions.h Sun Nov 18 01:06:01 2012 +0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,38 +0,0 @@ -// -// NSWorkspace_RBAdditions.h -// PathProps -// -// Created by Rainer Brockerhoff on 10/04/2007. -// Copyright 2007 Rainer Brockerhoff. All rights reserved. -// - -#import - -extern NSString* NSWorkspace_RBfstypename; -extern NSString* NSWorkspace_RBmntonname; -extern NSString* NSWorkspace_RBmntfromname; -extern NSString* NSWorkspace_RBdeviceinfo; -extern NSString* NSWorkspace_RBimagefilepath; -extern NSString* NSWorkspace_RBconnectiontype; -extern NSString* NSWorkspace_RBpartitionscheme; -extern NSString* NSWorkspace_RBserverURL; - -@interface NSWorkspace (NSWorkspace_RBAdditions) - -// This method will return nil if the input path is invalid. Otherwise, the returned NSDictionary may contain -// the following keys: -//- NSWorkspace_RBfstypename: will always be present.Shows the filesystem type (usually "hfs"), from statfs. -//- NSWorkspace_RBmntonname: will always be present. Shows the volume mount point. -//- NSWorkspace_RBmntfromname: will always be present. Shows the BSD device path for local volumes; info for -// remote volumes depends on the filesystem type. -//- NSWorkspace_RBconnectiontype: should always be present for local volumes. Shows the connection type ("SATA", "USB", etc.). -//- NSWorkspace_RBpartitionscheme: should always be present for local volumes. Shows the partition scheme. -//- NSWorkspace_RBdeviceinfo: should always be present for local volumes. Shows some information about the -// physical device; varies widely. -//- NSWorkspace_RBimagefilepath: should be present for disk images only. Shows the path of the disk image file. -//- NSWorkspace_RBserverURL: should be present for remote volumes only. Shows the server URL. - -- (NSDictionary*)propertiesForPath: -(NSString*)path; - -@end diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/NSWorkspace_RBAdditions.m --- a/QTfrontend/NSWorkspace_RBAdditions.m Sun Nov 18 01:06:01 2012 +0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,263 +0,0 @@ -// -// NSWorkspace_RBAdditions.m -// PathProps -// -// Created by Rainer Brockerhoff on 10/04/2007. -// Copyright 2007 Rainer Brockerhoff. All rights reserved. -// - -#import "NSWorkspace_RBAdditions.h" -#include -#include -#include - -NSString* NSWorkspace_RBfstypename = @"NSWorkspace_RBfstypename"; -NSString* NSWorkspace_RBmntonname = @"NSWorkspace_RBmntonname"; -NSString* NSWorkspace_RBmntfromname = @"NSWorkspace_RBmntfromname"; -NSString* NSWorkspace_RBdeviceinfo = @"NSWorkspace_RBdeviceinfo"; -NSString* NSWorkspace_RBimagefilepath = @"NSWorkspace_RBimagefilepath"; -NSString* NSWorkspace_RBconnectiontype = @"NSWorkspace_RBconnectiontype"; -NSString* NSWorkspace_RBpartitionscheme = @"NSWorkspace_RBpartitionscheme"; -NSString* NSWorkspace_RBserverURL = @"NSWorkspace_RBserverURL"; - -// This static funtion concatenates two strings, but first checks several possibilities... -// like one or the other nil, or one containing the other already. - -static NSString* AddPart(NSString* first,NSString* second) { - if (!second) { - return first; - } - second = [second stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]]; - if (first) { - if ([first rangeOfString:second options:NSCaseInsensitiveSearch].location==NSNotFound) { - if ([second rangeOfString:first options:NSCaseInsensitiveSearch].location==NSNotFound) { - return [NSString stringWithFormat:@"%@; %@",first,second]; - } - return second; - } - return first; - } - return second; -} - -// This static functions recurses "upwards" over the IO registry. Returns strings that are concatenated -// and ultimately end up under the NSWorkspace_RBdeviceinfo key. -// This isn't too robust in that it assumes that objects returned by the objectForKey methods are -// either strings or dictionaries. A "standard" implementations would use either only CoreFoundation and -// IOKit calls for this, or do more robust type checking on the returned objects. -// -// Also notice that this works as determined experimentally in 10.4.9, there's no official docs I could find. -// YMMV, and it may stop working in any new version of Mac OS X. - -static NSString* CheckParents(io_object_t thing,NSString* part,NSMutableDictionary* dict) { - NSString* result = part; - io_iterator_t parentsIterator = 0; - kern_return_t kernResult = IORegistryEntryGetParentIterator(thing,kIOServicePlane,&parentsIterator); - if ((kernResult==KERN_SUCCESS)&&parentsIterator) { - io_object_t nextParent = 0; - while ((nextParent = IOIteratorNext(parentsIterator))) { - NSDictionary* props = nil; - NSString* image = nil; - NSString* partition = nil; - NSString* connection = nil; - kernResult = IORegistryEntryCreateCFProperties(nextParent,(CFMutableDictionaryRef*)&props,kCFAllocatorDefault,0); - if (IOObjectConformsTo(nextParent,"IOApplePartitionScheme")) { - partition = [props objectForKey:@"Content Mask"]; - } else if (IOObjectConformsTo(nextParent,"IOMedia")) { - partition = [props objectForKey:@"Content"]; - } else if (IOObjectConformsTo(nextParent,"IODiskImageBlockStorageDeviceOutKernel")) { - NSData* data = nil; - if ((data = [[props objectForKey:@"Protocol Characteristics"] objectForKey:@"Virtual Interface Location Path"])) { - image = [[[NSString alloc] initWithBytes:[data bytes] length:[data length] encoding:NSUTF8StringEncoding] autorelease]; - } - } else if (IOObjectConformsTo(nextParent,"IOHDIXHDDriveInKernel")) { - image = [props objectForKey:@"KDIURLPath"]; - } - NSDictionary* subdict; - if ((subdict = [props objectForKey:@"Protocol Characteristics"])) { - connection = [subdict objectForKey:@"Physical Interconnect"]; - } else { - connection = [props objectForKey:@"Physical Interconnect"]; - } - if (connection) { - [dict setObject:AddPart([dict objectForKey:NSWorkspace_RBconnectiontype],connection) forKey:NSWorkspace_RBconnectiontype]; - } - if (partition) { - [dict setObject:partition forKey:NSWorkspace_RBpartitionscheme]; - } - if (image) { - [dict setObject:image forKey:NSWorkspace_RBimagefilepath]; - } - NSString* value; - if ((subdict = [props objectForKey:@"Device Characteristics"])) { - if ((value = [subdict objectForKey:@"Product Name"])) { - result = AddPart(result,value); - } - if ((value = [subdict objectForKey:@"Product Revision Level"])) { - result = AddPart(result,value); - } - if ((value = [subdict objectForKey:@"Vendor Name"])) { - result = AddPart(result,value); - } - } - if ((value = [props objectForKey:@"USB Serial Number"])) { - result = AddPart(result,value); - } - if ((value = [props objectForKey:@"USB Vendor Name"])) { - result = AddPart(result,value); - } - NSString* cls = [(NSString*)IOObjectCopyClass(nextParent) autorelease]; - if (![cls isEqualToString:@"IOPCIDevice"]) { - -// Uncomment the following line to have the device tree dumped to the console. -// NSLog(@"=================================> %@:%@\n",cls,props); - - result = CheckParents(nextParent,result,dict); - } - IOObjectRelease(nextParent); - } - } - if (parentsIterator) { - IOObjectRelease(parentsIterator); - } - return result; -} - -// This formats the (partially undocumented) AFPXMountInfo info into a string. - -/* -static NSString* FormatAFPURL(AFPXVolMountInfoPtr mountInfo,NSString** devdesc) { - UInt8* work = ((UInt8*)mountInfo)+mountInfo->serverNameOffset; - if (devdesc) { - *devdesc = [[[NSString alloc] initWithBytes:&work[1] length:work[0] encoding:NSUTF8StringEncoding] autorelease]; - } - work = ((UInt8*)mountInfo)+mountInfo->volNameOffset; - NSString* volname = [[[NSString alloc] initWithBytes:&work[1] length:work[0] encoding:NSUTF8StringEncoding] autorelease]; - work = ((UInt8*)mountInfo)+mountInfo->alternateAddressOffset; - AFPAlternateAddress* afpa = (AFPAlternateAddress*)work; - AFPTagData* afpta = (AFPTagData*)(&afpa->fAddressList); - NSString* ip = nil; - NSString* dns = nil; - int i = afpa->fAddressCount; - while ((i-->0)) { - switch (afpta->fType) { - case kAFPTagTypeIP: - if (!ip) { - ip = [[[NSString alloc] initWithBytes:&afpta->fData[0] length:afpta->fLength-2 encoding:NSUTF8StringEncoding] autorelease]; - } - break; - case kAFPTagTypeIPPort: - ip = [NSString stringWithFormat:@"%u.%u.%u.%u:%u",afpta->fData[0],afpta->fData[1],afpta->fData[2],afpta->fData[3],OSSwapBigToHostInt16(*(UInt16*)&afpta->fData[4])]; - break; - case kAFPTagTypeDNS: - dns = [[[NSString alloc] initWithBytes:&afpta->fData[0] length:afpta->fLength-2 encoding:NSUTF8StringEncoding] autorelease]; - break; - case 0x07: - ip = [NSString stringWithFormat:@"[%x:%x:%x:%x:%x:%x:%x:%x]",OSSwapBigToHostInt16(*(UInt16*)&afpta->fData[0]), - OSSwapBigToHostInt16(*(UInt16*)&afpta->fData[2]),OSSwapBigToHostInt16(*(UInt16*)&afpta->fData[4]), - OSSwapBigToHostInt16(*(UInt16*)&afpta->fData[6]),OSSwapBigToHostInt16(*(UInt16*)&afpta->fData[8]), - OSSwapBigToHostInt16(*(UInt16*)&afpta->fData[10]),OSSwapBigToHostInt16(*(UInt16*)&afpta->fData[12]), - OSSwapBigToHostInt16(*(UInt16*)&afpta->fData[14])]; - break; - } - afpta = (AFPTagData*)((char*)afpta+afpta->fLength); - } - return [NSString stringWithFormat:@"afp://%@/%@",dns?:(ip?:@""),volname]; -} -*/ - -@implementation NSWorkspace (NSWorkspace_RBAdditions) - -// Returns a NSDictionary with properties for the path. See details in the .h file. -// This assumes that the length of path is less than PATH_MAX (currently 1024 characters). - -- (NSDictionary*)propertiesForPath:(NSString*)path { - const char* ccpath = (const char*)[path fileSystemRepresentation]; - NSMutableDictionary* result = nil; - struct statfs fs; - if (!statfs(ccpath,&fs)) { - NSString* from = [NSString stringWithUTF8String:fs.f_mntfromname]; - result = [NSMutableDictionary dictionaryWithObjectsAndKeys: - [NSString stringWithUTF8String:fs.f_fstypename],NSWorkspace_RBfstypename, - [NSString stringWithUTF8String:fs.f_mntonname],NSWorkspace_RBmntonname, - nil]; - if (strncmp(fs.f_mntfromname,"/dev/",5)==0) { -// For a local volume,get the IO registry tree and search it for further info. - mach_port_t masterPort = 0; - io_iterator_t mediaIterator = 0; - kern_return_t kernResult = IOMasterPort(bootstrap_port,&masterPort); - if (kernResult==KERN_SUCCESS) { - CFMutableDictionaryRef classesToMatch = IOBSDNameMatching(masterPort,0,&fs.f_mntfromname[5]); - if (classesToMatch) { - kernResult = IOServiceGetMatchingServices(masterPort,classesToMatch,&mediaIterator); - if ((kernResult==KERN_SUCCESS)&&mediaIterator) { - io_object_t firstMedia = 0; - while ((firstMedia = IOIteratorNext(mediaIterator))) { - NSString* stuff = CheckParents(firstMedia,nil,result); - if (stuff) { - [result setObject:stuff forKey:NSWorkspace_RBdeviceinfo]; - } - IOObjectRelease(firstMedia); - } - } - } - } - if (mediaIterator) { - IOObjectRelease(mediaIterator); - } - if (masterPort) { - mach_port_deallocate(mach_task_self(),masterPort); - } - } - //Don't need this for disk images, gets around warnings for some deprecated functions - - /* else { -// For a network volume, get the volume reference number and use to get the server URL. - FSRef ref; - if (FSPathMakeRef((const UInt8*)ccpath,&ref,NULL)==noErr) { - FSCatalogInfo info; - if (FSGetCatalogInfo(&ref,kFSCatInfoVolume,&info,NULL,NULL,NULL)==noErr) { - ParamBlockRec pb; - UInt16 vmisize = 0; - VolumeMountInfoHeaderPtr mountInfo = NULL; - pb.ioParam.ioCompletion = NULL; - pb.ioParam.ioNamePtr = NULL; - pb.ioParam.ioVRefNum = info.volume; - pb.ioParam.ioBuffer = (Ptr)&vmisize; - pb.ioParam.ioReqCount = sizeof(vmisize); - if ((PBGetVolMountInfoSize(&pb)==noErr)&&vmisize) { - mountInfo = (VolumeMountInfoHeaderPtr)malloc(vmisize); - if (mountInfo) { - pb.ioParam.ioBuffer = (Ptr)mountInfo; - pb.ioParam.ioReqCount = vmisize; - if (PBGetVolMountInfo(&pb)==noErr) { - NSString* url = nil; - switch (mountInfo->media) { - case AppleShareMediaType: - url = FormatAFPURL((AFPXVolMountInfoPtr)mountInfo,&from); - break; - case 'http': - url = from; - break; - case 'crbm': - case 'nfs_': - case 'cifs': - url = [NSString stringWithUTF8String:(char*)mountInfo+sizeof(VolumeMountInfoHeader)+sizeof(OSType)]; - break; - } - if (url) { - [result setObject:url forKey:NSWorkspace_RBserverURL]; - } - } - } - free(mountInfo); - } - } - } - }*/ - [result setObject:from forKey:NSWorkspace_RBmntfromname]; - } - return result; -} - -@end diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/SparkleAutoUpdater.h --- a/QTfrontend/SparkleAutoUpdater.h Sun Nov 18 01:06:01 2012 +0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,26 +0,0 @@ -/* - * Copyright (C) 2008 Remko Troncon - */ - -#ifndef SPARKLEAUTOUPDATER_H -#define SPARKLEAUTOUPDATER_H - -#include - -#include "AutoUpdater.h" - -class SparkleAutoUpdater : public AutoUpdater -{ - public: - SparkleAutoUpdater(); - ~SparkleAutoUpdater(); - - void checkForUpdates(); - void checkForUpdatesNow(); - - private: - class Private; - Private* d; -}; - -#endif diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/SparkleAutoUpdater.mm --- a/QTfrontend/SparkleAutoUpdater.mm Sun Nov 18 01:06:01 2012 +0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,54 +0,0 @@ -/* - * Hedgewars, a free turn based strategy game - * Copyright (c) 2004-2012 Andrey Korotaev - * - * 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 - */ - -// see original example here http://el-tramo.be/blog/mixing-cocoa-and-qt - -#include "SparkleAutoUpdater.h" - -#include -#include - -class SparkleAutoUpdater::Private -{ - public: - SUUpdater* updater; -}; - -SparkleAutoUpdater::SparkleAutoUpdater() -{ - d = new Private; - - d->updater = [SUUpdater sharedUpdater]; - [d->updater retain]; -} - -SparkleAutoUpdater::~SparkleAutoUpdater() -{ - [d->updater release]; - delete d; -} - -void SparkleAutoUpdater::checkForUpdates() -{ - [d->updater checkForUpdatesInBackground]; -} - -void SparkleAutoUpdater::checkForUpdatesNow() -{ - [d->updater checkForUpdates:NULL]; -} diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/binds.cpp --- a/QTfrontend/binds.cpp Sun Nov 18 01:06:01 2012 +0400 +++ b/QTfrontend/binds.cpp Fri Feb 22 05:05:32 2013 +0100 @@ -20,17 +20,15 @@ const BindAction cbinds[BINDS_NUMBER] = { - {"+up", "up", QT_TRANSLATE_NOOP("binds", "up"), QT_TRANSLATE_NOOP("binds (categories)", "Basic controls"), QT_TRANSLATE_NOOP("binds (descriptions)", "Move your hogs and aim:")}, + {"+up", "up", QT_TRANSLATE_NOOP("binds", "up"), QT_TRANSLATE_NOOP("binds (categories)", "Movement"), QT_TRANSLATE_NOOP("binds (descriptions)", "Hedgehog movement")}, {"+left", "left", QT_TRANSLATE_NOOP("binds", "left"), NULL, NULL}, {"+right", "right", QT_TRANSLATE_NOOP("binds", "right"), NULL, NULL}, {"+down", "down", QT_TRANSLATE_NOOP("binds", "down"), NULL, NULL}, {"+precise", "left_shift", QT_TRANSLATE_NOOP("binds", "precise aim"), NULL, NULL}, {"ljump", "return", QT_TRANSLATE_NOOP("binds", "long jump"), NULL, QT_TRANSLATE_NOOP("binds (descriptions)", "Traverse gaps and obstacles by jumping:")}, {"hjump", "backspace", QT_TRANSLATE_NOOP("binds", "high jump"), NULL, NULL}, - {"+attack", "space", QT_TRANSLATE_NOOP("binds", "attack"), NULL, QT_TRANSLATE_NOOP("binds (descriptions)", "Fire your selected weapon or trigger an utility item:")}, - {"put", "mousel", QT_TRANSLATE_NOOP("binds", "put"), NULL, QT_TRANSLATE_NOOP("binds (descriptions)", "Pick a weapon or a target location under the cursor:")}, {"switch", "tab", QT_TRANSLATE_NOOP("binds", "switch"), NULL, QT_TRANSLATE_NOOP("binds (descriptions)", "Switch your currently active hog (if possible):")}, - {"ammomenu", "mouser", QT_TRANSLATE_NOOP("binds", "ammo menu"), QT_TRANSLATE_NOOP("binds (categories)", "Weapon controls"), QT_TRANSLATE_NOOP("binds (descriptions)", "Pick a weapon or utility item:")}, + {"ammomenu", "mouser", QT_TRANSLATE_NOOP("binds", "ammo menu"), QT_TRANSLATE_NOOP("binds (categories)", "Weapons"), QT_TRANSLATE_NOOP("binds (descriptions)", "Pick a weapon or utility item:")}, {"slot 1", "f1", QT_TRANSLATE_NOOP("binds", "slot 1"), NULL, NULL}, {"slot 2", "f2", QT_TRANSLATE_NOOP("binds", "slot 2"), NULL, NULL}, {"slot 3", "f3", QT_TRANSLATE_NOOP("binds", "slot 3"), NULL, NULL}, @@ -46,7 +44,9 @@ {"timer 3", "3", QT_TRANSLATE_NOOP("binds", "timer 3 sec"), NULL, NULL}, {"timer 4", "4", QT_TRANSLATE_NOOP("binds", "timer 4 sec"), NULL, NULL}, {"timer 5", "5", QT_TRANSLATE_NOOP("binds", "timer 5 sec"), NULL, NULL}, - {"findhh", "h", QT_TRANSLATE_NOOP("binds", "find hedgehog"), QT_TRANSLATE_NOOP("binds (categories)", "Camera and cursor controls"), QT_TRANSLATE_NOOP("binds (descriptions)", "Move the camera to the active hog:")}, + {"+attack", "space", QT_TRANSLATE_NOOP("binds", "attack"), NULL, QT_TRANSLATE_NOOP("binds (descriptions)", "Fire your selected weapon or trigger an utility item:")}, + {"put", "mousel", QT_TRANSLATE_NOOP("binds", "put"), NULL, QT_TRANSLATE_NOOP("binds (descriptions)", "Pick a weapon or a target location under the cursor:")}, + {"findhh", "h", QT_TRANSLATE_NOOP("binds", "find hedgehog"), QT_TRANSLATE_NOOP("binds (categories)", "Camera"), QT_TRANSLATE_NOOP("binds (descriptions)", "Move the camera to the active hog:")}, {"+cur_u", "[8]", QT_TRANSLATE_NOOP("binds", "up"), NULL, QT_TRANSLATE_NOOP("binds (descriptions)", "Move the cursor or camera without using the mouse:")}, {"+cur_l", "[4]", QT_TRANSLATE_NOOP("binds", "left"), NULL, NULL}, {"+cur_r", "[6]", QT_TRANSLATE_NOOP("binds", "right"), NULL, NULL}, @@ -55,7 +55,7 @@ {"zoomin", "wheelup", QT_TRANSLATE_NOOP("binds", "zoom in"), NULL, QT_TRANSLATE_NOOP("binds (descriptions)", "Modify the camera's zoom level:")}, {"zoomout", "wheeldown", QT_TRANSLATE_NOOP("binds", "zoom out"), NULL, NULL}, {"zoomreset", "mousem", QT_TRANSLATE_NOOP("binds", "reset zoom"), NULL, NULL}, - {"chat", "t", QT_TRANSLATE_NOOP("binds", "chat"), QT_TRANSLATE_NOOP("binds (categories)", "Other"), QT_TRANSLATE_NOOP("binds (descriptions)", "Talk to your team or all participants:")}, + {"chat", "t", QT_TRANSLATE_NOOP("binds", "chat"), QT_TRANSLATE_NOOP("binds (categories)", "Miscellaneous"), QT_TRANSLATE_NOOP("binds (descriptions)", "Talk to your team or all participants:")}, {"history", "`", QT_TRANSLATE_NOOP("binds", "chat history"), NULL, NULL}, {"pause", "p", QT_TRANSLATE_NOOP("binds", "pause"), NULL, QT_TRANSLATE_NOOP("binds (descriptions)", "Pause, continue or leave your game:")}, {"quit", "escape", QT_TRANSLATE_NOOP("binds", "quit"), NULL, NULL}, @@ -65,6 +65,8 @@ {"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:")}, + {"rotmask", "delete", QT_TRANSLATE_NOOP("binds", "hedgehog info"), NULL, QT_TRANSLATE_NOOP("binds (descriptions)", "Toggle labels above hedgehogs:")}, +#ifdef VIDEOREC {"record", "r", QT_TRANSLATE_NOOP("binds", "record"), NULL, QT_TRANSLATE_NOOP("binds (descriptions)", "Record video:")} +#endif }; diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/binds.h --- a/QTfrontend/binds.h Sun Nov 18 01:06:01 2012 +0400 +++ b/QTfrontend/binds.h Fri Feb 22 05:05:32 2013 +0100 @@ -21,7 +21,11 @@ #include +#ifdef VIDEOREC #define BINDS_NUMBER 46 +#else +#define BINDS_NUMBER 45 +#endif struct BindAction { diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/campaign.cpp --- a/QTfrontend/campaign.cpp Sun Nov 18 01:06:01 2012 +0400 +++ b/QTfrontend/campaign.cpp Fri Feb 22 05:05:32 2013 +0100 @@ -59,7 +59,7 @@ QSettings campfile("physfs://Missions/Campaign/" + campaign + "/campaign.ini", QSettings::IniFormat, 0); campfile.setIniCodec("UTF-8"); unsigned int mNum = campfile.value("MissionNum", 0).toInt(); - + QStringList missionList; for (unsigned int i = 0; i < mNum; i++) { @@ -67,7 +67,7 @@ } return missionList; } - + unsigned int getCampProgress(QString & teamName, QString & campName) { QSettings teamfile(cfgdir->absolutePath() + "/Teams/" + teamName + ".hwt", QSettings::IniFormat, 0); @@ -81,10 +81,3 @@ campfile.setIniCodec("UTF-8"); return campfile.value(QString("Mission %1/Script").arg(mNum)).toString(); } - - - - - - - diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/game.cpp --- a/QTfrontend/game.cpp Sun Nov 18 01:06:01 2012 +0400 +++ b/QTfrontend/game.cpp Fri Feb 22 05:05:32 2013 +0100 @@ -22,13 +22,17 @@ #include #include #include +#include +#include "hwform.h" +#include "ui/page/pageoptions.h" #include "game.h" #include "hwconsts.h" #include "gameuiconfig.h" #include "gamecfgwidget.h" #include "teamselect.h" #include "proto.h" +#include "binds.h" #include "campaign.h" #include @@ -37,7 +41,7 @@ QString training, campaign, campaignScript, campaignTeam; // TODO: Cleaner solution? HWGame::HWGame(GameUIConfig * config, GameCFGWidget * gamecfg, QString ammo, TeamSelWidget* pTeamSelWidget) : - TCPBase(true), + TCPBase(true, 0), ammostr(ammo), m_pTeamSelWidget(pTeamSelWidget) { @@ -56,7 +60,7 @@ switch (gameType) { case gtDemo: - // for video recording we need demo anyway + // for video recording we need demo anyway emit HaveRecord(rtNeither, demo); break; case gtNet: @@ -73,6 +77,18 @@ SetGameState(gsStopped); } +void HWGame::addKeyBindings(QByteArray * buf) +{ + for(int i = 0; i < BINDS_NUMBER; i++) + { + QString value = config->value(QString("Binds/%1").arg(cbinds[i].action), cbinds[i].strbind).toString(); + if (value.isEmpty() || value == "default") continue; + + QString bind = QString("edbind " + value + " " + cbinds[i].action); + HWProto::addStringToBuffer(*buf, bind); + } +} + void HWGame::commonConfig() { QByteArray buf; @@ -90,6 +106,8 @@ } HWProto::addStringToBuffer(buf, gt); + addKeyBindings(&buf); + buf += gamecfg->getFullConfig(); if (m_pTeamSelWidget) @@ -102,10 +120,11 @@ HWProto::addStringToBuffer(buf, QString("eammreinf %1").arg(ammostr.mid(3 * cAmmoNumber, cAmmoNumber))); if(gamecfg->schemeData(15).toBool() || !gamecfg->schemeData(21).toBool()) HWProto::addStringToBuffer(buf, QString("eammstore")); HWProto::addStringListToBuffer(buf, - team.teamGameConfig(gamecfg->getInitHealth())); + team.teamGameConfig(gamecfg->getInitHealth(), config)); ; } } + RawSendIPC(buf); } @@ -119,6 +138,8 @@ QByteArray teamscfg; ThemeModel * themeModel = DataManager::instance().themeModel(); + addKeyBindings(&teamscfg); + HWProto::addStringToBuffer(teamscfg, "TL"); HWProto::addStringToBuffer(teamscfg, QString("etheme %1") .arg((themeModel->rowCount() > 0) ? themeModel->index(rand() % themeModel->rowCount()).data().toString() : "steel")); @@ -132,7 +153,7 @@ team1.setNumHedgehogs(4); HWNamegen::teamRandomNames(team1,true); HWProto::addStringListToBuffer(teamscfg, - team1.teamGameConfig(100)); + team1.teamGameConfig(100, config)); HWTeam team2; team2.setDifficulty(4); @@ -142,7 +163,7 @@ HWNamegen::teamRandomNames(team2,true); while(!team2.name().compare(team1.name()) || !team2.hedgehog(0).Hat.compare(team1.hedgehog(0).Hat)); HWProto::addStringListToBuffer(teamscfg, - team2.teamGameConfig(100)); + team2.teamGameConfig(100, config)); HWProto::addStringToBuffer(teamscfg, QString("eammloadt %1").arg(cDefaultAmmoStore->mid(0, cAmmoNumber))); HWProto::addStringToBuffer(teamscfg, QString("eammprob %1").arg(cDefaultAmmoStore->mid(cAmmoNumber, cAmmoNumber))); @@ -150,6 +171,7 @@ HWProto::addStringToBuffer(teamscfg, QString("eammreinf %1").arg(cDefaultAmmoStore->mid(3 * cAmmoNumber, cAmmoNumber))); HWProto::addStringToBuffer(teamscfg, QString("eammstore")); HWProto::addStringToBuffer(teamscfg, QString("eammstore")); + RawSendIPC(teamscfg); } @@ -160,6 +182,8 @@ HWProto::addStringToBuffer(traincfg, "eseed " + QUuid::createUuid().toString()); HWProto::addStringToBuffer(traincfg, "escript " + training); + addKeyBindings(&traincfg); + RawSendIPC(traincfg); } @@ -171,6 +195,8 @@ HWProto::addStringToBuffer(campaigncfg, "escript " + campaignScript); + addKeyBindings(&campaigncfg); + RawSendIPC(campaigncfg); } @@ -274,12 +300,21 @@ writeCampaignVar(msg.right(msg.size() - 3)); break; } + case 'W': + { + // fetch new window resolution via IPC and save it in the settings + int size = msg.size(); + QString newResolution = QString().append(msg.mid(2)).left(size - 4); + QStringList wh = newResolution.split('x'); + config->Form->ui.pageOptions->windowWidthEdit->setText(wh[0]); + config->Form->ui.pageOptions->windowHeightEdit->setText(wh[1]); + break; + } default: { if (gameType == gtNet && !netSuspend) - { - emit SendNet(msg); - } + m_netSendBuffer.append(msg); + demo.append(msg); } } @@ -308,29 +343,64 @@ readbuffer.remove(0, msglen + 1); ParseMessage(msg); } + + flushNetBuffer(); +} + +void HWGame::flushNetBuffer() +{ + if(m_netSendBuffer.size()) + { + emit SendNet(m_netSendBuffer); + m_netSendBuffer.clear(); + } } QStringList HWGame::getArguments() { QStringList arguments; - QRect resolution = config->vid_Resolution(); - arguments << cfgdir->absolutePath(); - arguments << QString::number(resolution.width()); - arguments << QString::number(resolution.height()); - arguments << QString::number(config->bitDepth()); // bpp + std::pair resolutions = config->vid_ResolutionPair(); + QString nick = config->netNick().toUtf8().toBase64(); + + arguments << "--internal"; //Must be passed as first argument + arguments << "--port"; arguments << QString("%1").arg(ipc_port); - arguments << (config->vid_Fullscreen() ? "1" : "0"); - arguments << (config->isSoundEnabled() ? "1" : "0"); - arguments << (config->isMusicEnabled() ? "1" : "0"); - arguments << QString::number(config->volume()); // sound volume - arguments << QString::number(config->timerInterval()); + arguments << "--prefix"; arguments << datadir->absolutePath(); - arguments << (config->isShowFPSEnabled() ? "1" : "0"); - arguments << (config->isAltDamageEnabled() ? "1" : "0"); - arguments << config->netNick().toUtf8().toBase64(); + arguments << "--user-prefix"; + arguments << cfgdir->absolutePath(); + arguments << "--locale"; + arguments << tr("en.txt"); + arguments << "--frame-interval"; + arguments << QString::number(config->timerInterval()); + arguments << "--volume"; + arguments << QString::number(config->volume()); + arguments << "--fullscreen-width"; + arguments << QString::number(resolutions.first.width()); + arguments << "--fullscreen-height"; + arguments << QString::number(resolutions.first.height()); + arguments << "--width"; + arguments << QString::number(resolutions.second.width()); + arguments << "--height"; + arguments << QString::number(resolutions.second.height()); + arguments << "--raw-quality"; arguments << QString::number(config->translateQuality()); + arguments << "--stereo"; arguments << QString::number(config->stereoMode()); - arguments << tr("en.txt"); + if (config->vid_Fullscreen()) + arguments << "--fullscreen"; + if (config->isShowFPSEnabled()) + arguments << "--showfps"; + if (config->isAltDamageEnabled()) + arguments << "--altdmg"; + if (!config->isSoundEnabled()) + arguments << "--nosound"; + if (!config->isMusicEnabled()) + arguments << "--nomusic"; + if (!nick.isEmpty()) { + arguments << "--nick"; + arguments << nick; + } return arguments; } @@ -350,7 +420,7 @@ // run engine demo.clear(); - Start(); + Start(false); SetGameState(gsStarted); } @@ -358,7 +428,7 @@ { gameType = gtNet; demo.clear(); - Start(); + Start(false); SetGameState(gsStarted); } @@ -366,7 +436,7 @@ { gameType = gtLocal; demo.clear(); - Start(); + Start(false); SetGameState(gsStarted); } @@ -374,7 +444,7 @@ { gameType = gtQLocal; demo.clear(); - Start(); + Start(false); SetGameState(gsStarted); } @@ -383,7 +453,7 @@ gameType = gtTraining; training = "Missions/Training/" + file + ".lua"; demo.clear(); - Start(); + Start(false); SetGameState(gsStarted); } @@ -394,7 +464,7 @@ campaignScript = "Missions/Campaign/" + camp + "/" + campScript; campaignTeam = campTeam; demo.clear(); - Start(); + Start(false); SetGameState(gsStarted); } diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/game.h --- a/QTfrontend/game.h Sun Nov 18 01:06:01 2012 +0400 +++ b/QTfrontend/game.h Fri Feb 22 05:05:32 2013 +0100 @@ -102,7 +102,9 @@ GameCFGWidget * gamecfg; TeamSelWidget* m_pTeamSelWidget; GameType gameType; + QByteArray m_netSendBuffer; + void addKeyBindings(QByteArray * buf); void commonConfig(); void SendConfig(); void SendQuickConfig(); @@ -113,6 +115,7 @@ void SetGameState(GameState state); void sendCampaignVar(const QByteArray & varToSend); void writeCampaignVar(const QByteArray &varVal); + void flushNetBuffer(); }; #endif diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/gameuiconfig.cpp --- a/QTfrontend/gameuiconfig.cpp Sun Nov 18 01:06:01 2012 +0400 +++ b/QTfrontend/gameuiconfig.cpp Fri Feb 22 05:05:32 2013 +0100 @@ -24,6 +24,7 @@ #include #include #include +#include #include "gameuiconfig.h" #include "hwform.h" @@ -34,6 +35,7 @@ #include "fpsedit.h" #include "HWApplication.h" #include "DataManager.h" +#include "SDL.h" const QNetworkProxy::ProxyType proxyTypesMap[] = { @@ -44,24 +46,35 @@ GameUIConfig::GameUIConfig(HWForm * FormWidgets, const QString & fileName) - : QSettings(fileName, QSettings::IniFormat) + : QSettings(fileName, QSettings::IniFormat, FormWidgets) { Form = FormWidgets; - connect(Form->ui.pageOptions->CBEnableFrontendMusic, SIGNAL(toggled(bool)), Form, SLOT(Music(bool))); + setIniCodec("UTF-8"); + + connect(Form->ui.pageOptions->CBFrontendMusic, SIGNAL(toggled(bool)), Form, SLOT(Music(bool))); + + for(int i = 0; i < BINDS_NUMBER; i++) + { + m_binds.append(BindAction()); + m_binds[i].action = cbinds[i].action; + m_binds[i].strbind = cbinds[i].strbind; + } //Form->resize(value("frontend/width", 640).toUInt(), value("frontend/height", 450).toUInt()); resizeToConfigValues(); reloadValues(); +#ifdef VIDEOREC reloadVideosValues(); +#endif } void GameUIConfig::reloadValues(void) { Form->ui.pageOptions->WeaponTooltip->setChecked(value("misc/weaponTooltips", true).toBool()); - int t = Form->ui.pageOptions->CBResolution->findText(value("video/resolution").toString()); + int t = Form->ui.pageOptions->CBResolution->findText(value("video/fullscreenResolution").toString()); if (t < 0) { if (Form->ui.pageOptions->CBResolution->count() > 1) @@ -70,6 +83,20 @@ Form->ui.pageOptions->CBResolution->setCurrentIndex(0); } else Form->ui.pageOptions->CBResolution->setCurrentIndex(t); + + // Default the windowed resolution to 5/6 of the screen size + int screenWidth = SDL_GetVideoInfo()->current_w * 5 / 6; + int screenHeight = SDL_GetVideoInfo()->current_h * 5 / 6; + QString widthStr; widthStr.setNum(screenWidth); + QString heightStr; heightStr.setNum(screenHeight); + QString wWidth = value("video/windowedWidth", widthStr).toString(); + QString wHeight = value("video/windowedHeight", heightStr).toString(); + // If left blank reset the resolution to the default + wWidth = (wWidth == "" ? widthStr : wWidth); + wHeight = (wHeight == "" ? heightStr : wHeight); + Form->ui.pageOptions->windowWidthEdit->setText(wWidth); + Form->ui.pageOptions->windowHeightEdit->setText(wHeight); + Form->ui.pageOptions->CBResolution->setCurrentIndex((t < 0) ? 1 : t); Form->ui.pageOptions->CBFullscreen->setChecked(value("video/fullscreen", false).toBool()); bool ffscr=value("frontend/fullscreen", false).toBool(); @@ -77,12 +104,12 @@ Form->ui.pageOptions->SLQuality->setValue(value("video/quality", 5).toUInt()); Form->ui.pageOptions->CBStereoMode->setCurrentIndex(value("video/stereo", 0).toUInt()); - Form->ui.pageOptions->CBEnableFrontendSound->setChecked(value("frontend/effects", true).toBool()); - Form->ui.pageOptions->CBEnableSound->setChecked(value("audio/sound", true).toBool()); - Form->ui.pageOptions->CBEnableFrontendSound->setChecked(value("frontend/sound", true).toBool()); - Form->ui.pageOptions->CBEnableMusic->setChecked(value("audio/music", true).toBool()); - Form->ui.pageOptions->CBEnableFrontendMusic->setChecked(value("frontend/music", true).toBool()); - Form->ui.pageOptions->volumeBox->setValue(value("audio/volume", 100).toUInt()); + Form->ui.pageOptions->CBFrontendEffects->setChecked(value("frontend/effects", true).toBool()); + Form->ui.pageOptions->CBSound->setChecked(value("audio/sound", true).toBool()); + Form->ui.pageOptions->CBFrontendSound->setChecked(value("frontend/sound", true).toBool()); + Form->ui.pageOptions->CBMusic->setChecked(value("audio/music", true).toBool()); + Form->ui.pageOptions->CBFrontendMusic->setChecked(value("frontend/music", true).toBool()); + Form->ui.pageOptions->SLVolume->setValue(value("audio/volume", 100).toUInt()); QString netNick = value("net/nick", "").toString(); Form->ui.pageOptions->editNetNick->setText(netNick); @@ -92,11 +119,13 @@ Form->ui.pageOptions->editNetPassword->installEventFilter(this); int passLength = value("net/passwordlength", 0).toInt(); - setNetPasswordLength(passLength); - if (savePwd == false) { - Form->ui.pageOptions->editNetPassword->setEnabled(savePwd); + if (!savePwd) { + Form->ui.pageOptions->editNetPassword->setEnabled(false); Form->ui.pageOptions->editNetPassword->setText(""); - setNetPasswordLength(0); + setNetPasswordLength(0); + } else + { + setNetPasswordLength(passLength); } delete netHost; @@ -124,39 +153,51 @@ Form->ui.pageOptions->leProxyLogin->setText(value("proxy/login", "").toString()); Form->ui.pageOptions->leProxyPassword->setText(value("proxy/password", "").toString()); - depth = HWApplication::desktop()->depth(); - if (depth < 16) depth = 16; - else if (depth > 16) depth = 32; - { // load colors QStandardItemModel * model = DataManager::instance().colorsModel(); for(int i = model->rowCount() - 1; i >= 0; --i) - model->item(i)->setData(QColor(value(QString("colors/color%1").arg(i), model->item(i)->data().value()).value())); + model->item(i)->setData(value(QString("colors/color%1").arg(i), model->item(i)->data())); + } + + { // load binds + for(int i = 0; i < BINDS_NUMBER; i++) + { + m_binds[i].strbind = value(QString("Binds/%1").arg(m_binds[i].action), cbinds[i].strbind).toString(); + if (m_binds[i].strbind.isEmpty() || m_binds[i].strbind == "default") m_binds[i].strbind = cbinds[i].strbind; + } } } void GameUIConfig::reloadVideosValues(void) { - Form->ui.pageVideos->framerateBox->setValue(value("videorec/fps",25).toUInt()); - Form->ui.pageVideos->bitrateBox->setValue(value("videorec/bitrate",400).toUInt()); - bool useGameRes = value("videorec/usegameres",true).toBool(); + // one pass with default values + Form->ui.pageOptions->setDefaultOptions(); + + // then load user configuration + Form->ui.pageOptions->framerateBox->setCurrentIndex( + Form->ui.pageOptions->framerateBox->findData( + value("videorec/framerate", rec_Framerate()).toString() + " fps", + Qt::MatchExactly) ); + Form->ui.pageOptions->bitrateBox->setValue(value("videorec/bitrate", rec_Bitrate()).toUInt()); + bool useGameRes = value("videorec/usegameres",Form->ui.pageOptions->checkUseGameRes->isChecked()).toBool(); if (useGameRes) { QRect res = vid_Resolution(); - Form->ui.pageVideos->widthEdit->setText(QString::number(res.width())); - Form->ui.pageVideos->heightEdit->setText(QString::number(res.height())); + Form->ui.pageOptions->widthEdit->setText(QString::number(res.width())); + Form->ui.pageOptions->heightEdit->setText(QString::number(res.height())); } else { - Form->ui.pageVideos->widthEdit->setText(value("videorec/width","800").toString()); - Form->ui.pageVideos->heightEdit->setText(value("videorec/height","600").toString()); + Form->ui.pageOptions->widthEdit->setText(value("videorec/width","800").toString()); + Form->ui.pageOptions->heightEdit->setText(value("videorec/height","600").toString()); } - Form->ui.pageVideos->checkUseGameRes->setChecked(useGameRes); - Form->ui.pageVideos->checkRecordAudio->setChecked(value("videorec/audio",true).toBool()); - if (!Form->ui.pageVideos->tryCodecs(value("videorec/format","no").toString(), + Form->ui.pageOptions->checkUseGameRes->setChecked(useGameRes); + Form->ui.pageOptions->checkRecordAudio->setChecked( + value("videorec/audio",Form->ui.pageOptions->checkRecordAudio->isChecked()).toBool() ); + if (!Form->ui.pageOptions->tryCodecs(value("videorec/format","no").toString(), value("videorec/videocodec","no").toString(), value("videorec/audiocodec","no").toString())) - Form->ui.pageVideos->setDefaultCodecs(); + Form->ui.pageOptions->setDefaultCodecs(); } QStringList GameUIConfig::GetTeamsList() @@ -175,12 +216,23 @@ void GameUIConfig::resizeToConfigValues() { - Form->resize(value("frontend/width", 800).toUInt(), value("frontend/height", 600).toUInt()); + // fill 2/3 of the screen desktop + const QRect deskSize = QApplication::desktop()->screenGeometry(-1); + Form->resize(value("frontend/width", qMin(qMax(deskSize.width()*2/3,800),deskSize.width())).toUInt(), + value("frontend/height", qMin(qMax(deskSize.height()*2/3,600),deskSize.height())).toUInt()); + + // move the window to the center of the screen + QPoint center = QApplication::desktop()->availableGeometry(-1).center(); + center.setX(center.x() - (Form->width()/2)); + center.setY(center.y() - (Form->height()/2)); + Form->move(center); } void GameUIConfig::SaveOptions() { - setValue("video/resolution", Form->ui.pageOptions->CBResolution->currentText()); + setValue("video/fullscreenResolution", Form->ui.pageOptions->CBResolution->currentText()); + setValue("video/windowedWidth", Form->ui.pageOptions->windowWidthEdit->text()); + setValue("video/windowedHeight", Form->ui.pageOptions->windowHeightEdit->text()); setValue("video/fullscreen", vid_Fullscreen()); setValue("video/quality", Form->ui.pageOptions->SLQuality->value()); @@ -207,14 +259,16 @@ setValue("frontend/sound", isFrontendSoundEnabled()); setValue("audio/music", isMusicEnabled()); setValue("frontend/music", isFrontendMusicEnabled()); - setValue("audio/volume", Form->ui.pageOptions->volumeBox->value()); + setValue("audio/volume", Form->ui.pageOptions->SLVolume->value()); setValue("net/nick", netNick()); - if (netPasswordIsValid() && Form->ui.pageOptions->CBSavePassword->isChecked()) - { - setValue("net/passwordhash", netPasswordHash()); - setValue("net/passwordlength", netPasswordLength()); + if (netPasswordIsValid() && Form->ui.pageOptions->CBSavePassword->isChecked()) { + setPasswordHash(netPasswordHash()); } + else if(!Form->ui.pageOptions->CBSavePassword->isChecked()) { + clearPasswordHash(); + } + setValue("net/savepassword", Form->ui.pageOptions->CBSavePassword->isChecked()); setValue("net/ip", *netHost); setValue("net/port", netPort); @@ -268,7 +322,7 @@ setValue(QString("colors/color%1").arg(i), model->item(i)->data()); } - Form->gameSettings->sync(); + sync(); } void GameUIConfig::SaveVideosOptions() @@ -277,14 +331,20 @@ setValue("videorec/format", AVFormat()); setValue("videorec/videocodec", videoCodec()); setValue("videorec/audiocodec", audioCodec()); - setValue("videorec/fps", rec_Framerate()); + setValue("videorec/framerate", rec_Framerate()); setValue("videorec/bitrate", rec_Bitrate()); setValue("videorec/width", res.width()); setValue("videorec/height", res.height()); - setValue("videorec/usegameres", Form->ui.pageVideos->checkUseGameRes->isChecked()); + setValue("videorec/usegameres", Form->ui.pageOptions->checkUseGameRes->isChecked()); setValue("videorec/audio", recordAudio()); - Form->gameSettings->sync(); + sync(); +} + +void GameUIConfig::setValue(const QString &key, const QVariant &value) +{ + //qDebug() << "[settings]" << key << value; + QSettings::setValue(key, value); } QString GameUIConfig::language() @@ -292,16 +352,28 @@ return Form->ui.pageOptions->CBLanguage->itemData(Form->ui.pageOptions->CBLanguage->currentIndex()).toString(); } -QRect GameUIConfig::vid_Resolution() -{ - QRect result(0, 0, 640, 480); +std::pair GameUIConfig::vid_ResolutionPair() { + // returns a pair of both the fullscreen and the windowed resolution + QRect full(0, 0, 640, 480); + QRect windowed(0, 0, 640, 480); QStringList wh = Form->ui.pageOptions->CBResolution->currentText().split('x'); if (wh.size() == 2) { - result.setWidth(wh[0].toInt()); - result.setHeight(wh[1].toInt()); + full.setWidth(wh[0].toInt()); + full.setHeight(wh[1].toInt()); } - return result; + windowed.setWidth(Form->ui.pageOptions->windowWidthEdit->text().toInt()); + windowed.setHeight(Form->ui.pageOptions->windowHeightEdit->text().toInt()); + return std::make_pair(full, windowed); +} + +QRect GameUIConfig::vid_Resolution() +{ + std::pair result = vid_ResolutionPair(); + if(Form->ui.pageOptions->CBFullscreen->isChecked()) + return result.first; + else + return result.second; } bool GameUIConfig::vid_Fullscreen() @@ -370,20 +442,20 @@ bool GameUIConfig::isSoundEnabled() { - return Form->ui.pageOptions->CBEnableSound->isChecked(); + return Form->ui.pageOptions->CBSound->isChecked(); } bool GameUIConfig::isFrontendSoundEnabled() { - return Form->ui.pageOptions->CBEnableFrontendSound->isChecked(); + return Form->ui.pageOptions->CBFrontendSound->isChecked(); } bool GameUIConfig::isMusicEnabled() { - return Form->ui.pageOptions->CBEnableMusic->isChecked(); + return Form->ui.pageOptions->CBMusic->isChecked(); } bool GameUIConfig::isFrontendMusicEnabled() { - return Form->ui.pageOptions->CBEnableFrontendMusic->isChecked(); + return Form->ui.pageOptions->CBFrontendMusic->isChecked(); } bool GameUIConfig::isShowFPSEnabled() @@ -418,11 +490,6 @@ return 35 - Form->ui.pageOptions->fpsedit->value(); } -quint8 GameUIConfig::bitDepth() -{ - return depth; -} - QString GameUIConfig::netNick() { return Form->ui.pageOptions->editNetNick->text(); @@ -445,7 +512,41 @@ bool GameUIConfig::netPasswordIsValid() { - return (netPasswordLength() == 0 || Form->ui.pageOptions->editNetPassword->text() != QString(netPasswordLength(), '\0')); + return (netPasswordLength() == 0 || Form->ui.pageOptions->editNetPassword->text() != QString(netPasswordLength(), '*')); +} + +void GameUIConfig::clearPasswordHash() +{ + setValue("net/passwordhash", QString()); + setValue("net/passwordlength", 0); + setValue("net/savepassword", false); //changes the savepassword value to false in order to not let the user save an empty password in PAGE_SETUP + reloadValues(); //reloads the values of PAGE_SETUP +} + +void GameUIConfig::setPasswordHash(const QString & passwordhash) +{ + setValue("net/passwordhash", passwordhash); + setValue("net/passwordlength", passwordhash.size()/4); + setNetPasswordLength(passwordhash.size()/4); //the hash.size() is divided by 4 let PAGE_SETUP use a reasonable number of stars to display the PW +} + +QString GameUIConfig::passwordHash() +{ + return value("net/passwordhash").toString(); +} + +void GameUIConfig::clearTempHash() +{ + setTempHash(QString()); +} + +void GameUIConfig::setTempHash(const QString & temphash) +{ + this->temphash = temphash; +} + +QString GameUIConfig::tempHash() { + return this->temphash; } // When hedgewars launches, the password field is set with null characters. If the user tries to edit the field and there are such characters, then clear the field @@ -470,7 +571,7 @@ { if (passwordLength > 0) { - Form->ui.pageOptions->editNetPassword->setText(QString(passwordLength, '\0')); + Form->ui.pageOptions->editNetPassword->setText(QString(passwordLength, '*')); } else { @@ -480,45 +581,61 @@ quint8 GameUIConfig::volume() { - return Form->ui.pageOptions->volumeBox->value() * 128 / 100; + return Form->ui.pageOptions->SLVolume->value() * 128 / 100; } QString GameUIConfig::AVFormat() { - return Form->ui.pageVideos->format(); + return Form->ui.pageOptions->format(); } QString GameUIConfig::videoCodec() { - return Form->ui.pageVideos->videoCodec(); + return Form->ui.pageOptions->videoCodec(); } QString GameUIConfig::audioCodec() { - return Form->ui.pageVideos->audioCodec(); + return Form->ui.pageOptions->audioCodec(); } QRect GameUIConfig::rec_Resolution() { - if (Form->ui.pageVideos->checkUseGameRes->isChecked()) + if (Form->ui.pageOptions->checkUseGameRes->isChecked()) return vid_Resolution(); QRect res(0,0,0,0); - res.setWidth(Form->ui.pageVideos->widthEdit->text().toUInt()); - res.setHeight(Form->ui.pageVideos->heightEdit->text().toUInt()); + res.setWidth(Form->ui.pageOptions->widthEdit->text().toUInt()); + res.setHeight(Form->ui.pageOptions->heightEdit->text().toUInt()); return res; } int GameUIConfig::rec_Framerate() { - return Form->ui.pageVideos->framerateBox->value(); + // remove the "fps" label + QString fpsText = Form->ui.pageOptions->framerateBox->currentText(); + QStringList fpsList = fpsText.split(" "); + return fpsList.first().toInt(); } int GameUIConfig::rec_Bitrate() { - return Form->ui.pageVideos->bitrateBox->value(); + return Form->ui.pageOptions->bitrateBox->value(); } bool GameUIConfig::recordAudio() { - return Form->ui.pageVideos->checkRecordAudio->isChecked(); + return Form->ui.pageOptions->checkRecordAudio->isChecked(); +} + +// Gets a bind for a bindID +QString GameUIConfig::bind(int bindID) +{ + return m_binds[bindID].strbind; } + +// Sets a bind for a bindID and saves it +void GameUIConfig::setBind(int bindID, QString & strbind) +{ + m_binds[bindID].strbind = strbind; + setValue(QString("Binds/%1").arg(m_binds[bindID].action), strbind); +} diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/gameuiconfig.h --- a/QTfrontend/gameuiconfig.h Sun Nov 18 01:06:01 2012 +0400 +++ b/QTfrontend/gameuiconfig.h Fri Feb 22 05:05:32 2013 +0100 @@ -23,6 +23,9 @@ #include #include #include +#include +#include +#include "binds.h" class HWForm; class QSettings; @@ -36,6 +39,7 @@ GameUIConfig(HWForm * FormWidgets, const QString & fileName); QStringList GetTeamsList(); QRect vid_Resolution(); + std::pair vid_ResolutionPair(); bool vid_Fullscreen(); quint32 translateQuality(); bool isSoundEnabled(); @@ -48,16 +52,24 @@ bool appendDateTimeToRecordName(); quint8 volume(); quint8 timerInterval(); - quint8 bitDepth(); QString netNick(); QByteArray netPasswordHash(); int netPasswordLength(); + void clearPasswordHash(); + void setPasswordHash(const QString & passwordhash); + QString passwordHash(); + void clearTempHash(); + void setTempHash(const QString & temphash); + QString tempHash(); void setNetPasswordLength(int passwordLength); bool isReducedQuality() const; bool isFrontendEffects() const; bool isFrontendFullscreen() const; void resizeToConfigValues(); quint32 stereoMode() const; + void setValue(const QString & key, const QVariant & value); + QString bind(int bindID); + void setBind(int bindID, QString & strbind); QString AVFormat(); QString videoCodec(); @@ -85,7 +97,8 @@ private: bool netPasswordIsValid(); bool eventFilter(QObject *object, QEvent *event); - quint8 depth; + QString temphash; + QList m_binds; }; #endif diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/hedgewars.qrc --- a/QTfrontend/hedgewars.qrc Sun Nov 18 01:06:01 2012 +0400 +++ b/QTfrontend/hedgewars.qrc Fri Feb 22 05:05:32 2013 +0100 @@ -44,6 +44,9 @@ res/HedgewarsTitle.png res/LocalPlay.png res/NetworkPlay.png + res/NetworkPlayDisabled.png + res/audio.png + res/camera.png res/Settings.png res/dropdown.png res/new.png @@ -102,6 +105,7 @@ res/iconRope.png res/dice.png res/Star.png + res/inverse-corner-bl.png res/Flake.png res/Egg.png res/Confetti.png @@ -129,6 +133,7 @@ res/StatsMostSelfDamage.png res/StatsSelfKilled.png res/StatsSkipped.png + res/Start.png res/mapRandom.png res/mapMaze.png res/mapMissing.png @@ -145,5 +150,8 @@ res/chat/serveradmin_gray.png res/chat/lamp_off.png res/chat/ingame.png + res/splash.png + res/html/about.html + res/xml/tips.xml diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/hwconsts.cpp.in --- a/QTfrontend/hwconsts.cpp.in Sun Nov 18 01:06:01 2012 +0400 +++ b/QTfrontend/hwconsts.cpp.in Fri Feb 22 05:05:32 2013 +0100 @@ -22,10 +22,9 @@ QString * cProtoVer = new QString("${HEDGEWARS_PROTO_VER}"); QString * cDataDir = new QString("${HEDGEWARS_DATADIR}"); -QString * cConfigDir = new QString(""); -QString * cVersionString = new QString("${HEDGEWARS_VERSION}${HGCHANGED}"); +QString * cVersionString = new QString("${HEDGEWARS_VERSION}"); -QDir * bindir = new QDir("${HEDGEWARS_BINDIR}"); +QDir * bindir = new QDir(); QDir * cfgdir = new QDir(); QDir * datadir = new QDir(); diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/hwconsts.h --- a/QTfrontend/hwconsts.h Sun Nov 18 01:06:01 2012 +0400 +++ b/QTfrontend/hwconsts.h Fri Feb 22 05:05:32 2013 +0100 @@ -26,7 +26,6 @@ extern QString * cProtoVer; extern QString * cVersionString; extern QString * cDataDir; -extern QString * cConfigDir; extern QDir * bindir; extern QDir * cfgdir; @@ -63,40 +62,40 @@ #define HEDGEHOGS_PER_TEAM 8 -#define AMMOLINE_DEFAULT_QT "93919294221991210322351110012010000002111101010111110101" -#define AMMOLINE_DEFAULT_PROB "04050405416006555465544647765766666661555101011154110101" -#define AMMOLINE_DEFAULT_DELAY "00000000000002055000000400070040000000002200000006000000" -#define AMMOLINE_DEFAULT_CRATE "13111103121111111231141111111111111112111111011111110101" +#define AMMOLINE_DEFAULT_QT "9391929422199121032235111001201000000211110101011111101" +#define AMMOLINE_DEFAULT_PROB "0405040541600655546554464776576666666155510101115411101" +#define AMMOLINE_DEFAULT_DELAY "0000000000000205500000040007004000000000220000000600000" +#define AMMOLINE_DEFAULT_CRATE "1311110312111111123114111111111111111211111101111111101" -#define AMMOLINE_CRAZY_QT "99999999999999999929999999999999992999999999099999920909" -#define AMMOLINE_CRAZY_PROB "11111101111111111111111111111111111111111111011111110101" -#define AMMOLINE_CRAZY_DELAY "00000000000000000000000000000000000000000000000000000000" -#define AMMOLINE_CRAZY_CRATE "13111103121111111231141111111111111112111101011111110101" +#define AMMOLINE_CRAZY_QT "9999999999999999992999999999999999299999999909999992909" +#define AMMOLINE_CRAZY_PROB "1111110111111111111111111111111111111111111101111111101" +#define AMMOLINE_CRAZY_DELAY "0000000000000000000000000000000000000000000000000000000" +#define AMMOLINE_CRAZY_CRATE "1311110312111111123114111111111111111211110101111111101" -#define AMMOLINE_PROMODE_QT "90900090000000000000090000000000000000000000000000000000" -#define AMMOLINE_PROMODE_PROB "00000000000000000000000000000000000000000000000000000000" -#define AMMOLINE_PROMODE_DELAY "00000000000002055000000400070040000000002000000000000002" -#define AMMOLINE_PROMODE_CRATE "11111111111111111111111111111111111111111001011111110101" +#define AMMOLINE_PROMODE_QT "9090009000000000000009000000000000000000000000000000000" +#define AMMOLINE_PROMODE_PROB "0000000000000000000000000000000000000000000000000000000" +#define AMMOLINE_PROMODE_DELAY "0000000000000205500000040007004000000000200000000000002" +#define AMMOLINE_PROMODE_CRATE "1111111111111111111111111111111111111111100101111111101" -#define AMMOLINE_SHOPPA_QT "00000099000000000000000000000000000000000000000000000000" -#define AMMOLINE_SHOPPA_PROB "44444100442444022101121212224220000000020004000100110001" -#define AMMOLINE_SHOPPA_DELAY "00000000000000000000000000000000000000000000000000000000" -#define AMMOLINE_SHOPPA_CRATE "11111111111111111111111111111111111111111011011111110001" +#define AMMOLINE_SHOPPA_QT "0000009900000000000000000000000000000000000000000000000" +#define AMMOLINE_SHOPPA_PROB "4444410044244402210112121222422000000002000400010011001" +#define AMMOLINE_SHOPPA_DELAY "0000000000000000000000000000000000000000000000000000000" +#define AMMOLINE_SHOPPA_CRATE "1111111111111111111111111111111111111111101101111111001" -#define AMMOLINE_CLEAN_QT "10100090000100000110000000000000000000000000000010000000" -#define AMMOLINE_CLEAN_PROB "04050405416006555465544647765766666661555101011154110101" -#define AMMOLINE_CLEAN_DELAY "00000000000000000000000000000000000000000000000000000000" -#define AMMOLINE_CLEAN_CRATE "13111103121111111231141111111111111112111111011111110101" +#define AMMOLINE_CLEAN_QT "1010009000010000011000000000000000000000000000001000000" +#define AMMOLINE_CLEAN_PROB "0405040541600655546554464776576666666155510101115411101" +#define AMMOLINE_CLEAN_DELAY "0000000000000000000000000000000000000000000000000000000" +#define AMMOLINE_CLEAN_CRATE "1311110312111111123114111111111111111211111101111111101" -#define AMMOLINE_MINES_QT "00000099000900000003000000000000000000000000000000000000" -#define AMMOLINE_MINES_PROB "00000000000000000000000000000000000000000000000000000000" -#define AMMOLINE_MINES_DELAY "00000000000002055000000400070040000000002000000006000000" -#define AMMOLINE_MINES_CRATE "11111111111111111111111111111111111111111111011111110101" +#define AMMOLINE_MINES_QT "0000009900090000000300000000000000000000000000000000000" +#define AMMOLINE_MINES_PROB "0000000000000000000000000000000000000000000000000000000" +#define AMMOLINE_MINES_DELAY "0000000000000205500000040007004000000000200000000600000" +#define AMMOLINE_MINES_CRATE "1111111111111111111111111111111111111111111101111111101" -#define AMMOLINE_PORTALS_QT "90000090020000000021000000000000001100000900000000000000" -#define AMMOLINE_PORTALS_PROB "04050405416006555465544647765766666661555101011154110101" -#define AMMOLINE_PORTALS_DELAY "00000000000002055000000400070040000000002000000006000000" -#define AMMOLINE_PORTALS_CRATE "13111103121111111231141111111111111112111111011111110101" +#define AMMOLINE_PORTALS_QT "9000009002000000002100000000000000110000090000000000000" +#define AMMOLINE_PORTALS_PROB "0405040541600655546554464776576666666155510101115411101" +#define AMMOLINE_PORTALS_DELAY "0000000000000205500000040007004000000000200000000600000" +#define AMMOLINE_PORTALS_CRATE "1311110312111111123114111111111111111211111101111111101" //Different seasons; assigned to season (int) #define SEASON_NONE 0 diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/hwform.cpp --- a/QTfrontend/hwform.cpp Sun Nov 18 01:06:01 2012 +0400 +++ b/QTfrontend/hwform.cpp Fri Feb 22 05:05:32 2013 +0100 @@ -21,6 +21,7 @@ #include #include #include +#include #include #include #include @@ -39,6 +40,8 @@ #include #include #include +#include +#include #include #include #include @@ -70,10 +73,8 @@ #include "pagemultiplayer.h" #include "pagenet.h" #include "pagemain.h" -#include "pagefeedback.h" #include "pagenetserver.h" #include "pagedrawmap.h" -#include "pagenettype.h" #include "pagegamestats.h" #include "pageplayrecord.h" #include "pagedata.h" @@ -94,8 +95,23 @@ #include "roomslistmodel.h" #include "recorder.h" #include "playerslistmodel.h" +#include "feedbackdialog.h" +#include "MessageDialog.h" #include "DataManager.h" +#include "AutoUpdater.h" + +#ifdef Q_WS_WIN +#define WINVER 0x0500 +#include +#else +#include +#include +#endif + +#ifdef Q_WS_MAC +#include +#endif #ifdef __APPLE__ #include "M3Panel.h" @@ -111,7 +127,6 @@ QString playerHash; GameUIConfig* HWForm::config = NULL; -QSettings* HWForm::gameSettings = NULL; HWForm::HWForm(QWidget *parent, QString styleSheet) : QMainWindow(parent) @@ -127,10 +142,6 @@ #ifdef USE_XFIRE xfire_init(); #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().toUtf8(), QCryptographicHash::Md5).toHex()); - this->setStyleSheet(styleSheet); ui.setupUi(this); setMinimumSize(760, 580); @@ -139,21 +150,39 @@ ui.pageOptions->CBResolution->addItems(SDLInteraction::instance().getResolutions()); - config = new GameUIConfig(this, cfgdir->absolutePath() + "/hedgewars.ini"); + config = new GameUIConfig(this, "physfs://hedgewars.ini"); + frontendEffects = config->value("frontend/effects", true).toBool(); + playerHash = QString(QCryptographicHash::hash(config->value("net/nick","").toString().toUtf8(), QCryptographicHash::Md5).toHex()); + + ui.pageRoomsList->setSettings(config); + ui.pageNetGame->setSettings(config); + ui.pageNetGame->chatWidget->setSettings(config); + ui.pageRoomsList->chatWidget->setSettings(config); + ui.pageOptions->setConfig(config); +#ifdef VIDEOREC + ui.pageVideos->init(config); +#endif - ui.pageVideos->init(config); +#ifdef __APPLE__ + AutoUpdater* updater = NULL; + if (config->isAutoUpdateEnabled()) + { +#ifdef __APPLE__ +#ifdef SPARKLE_ENABLED + updater = new SparkleAutoUpdater(); +#endif +#endif + if (updater) + { + updater->checkForUpdates(); + delete updater; + } + } +#endif #ifdef __APPLE__ panel = new M3Panel; -#ifdef SPARKLE_ENABLED - AutoUpdater* updater; - - updater = new SparkleAutoUpdater(); - if (updater && config->isAutoUpdateEnabled()) - updater->checkForUpdates(); -#endif - QShortcut *hideFrontend = new QShortcut(QKeySequence("Ctrl+M"), this); connect (hideFrontend, SIGNAL(activated()), this, SLOT(showMinimized())); #else @@ -187,13 +216,7 @@ connect(ui.pageMain->BtnSetup, SIGNAL(clicked()), pageSwitchMapper, SLOT(map())); pageSwitchMapper->setMapping(ui.pageMain->BtnSetup, ID_PAGE_SETUP); -#if 0 - connect(ui.pageMain->BtnFeedback, SIGNAL(clicked()), pageSwitchMapper, SLOT(map())); - pageSwitchMapper->setMapping(ui.pageMain->BtnFeedback, ID_PAGE_FEEDBACK); -#endif - - connect(ui.pageMain->BtnNet, SIGNAL(clicked()), pageSwitchMapper, SLOT(map())); - pageSwitchMapper->setMapping(ui.pageMain->BtnNet, ID_PAGE_NETTYPE); + connect(ui.pageMain->BtnFeedback, SIGNAL(clicked()), this, SLOT(showFeedbackDialog())); connect(ui.pageMain->BtnInfo, SIGNAL(clicked()), pageSwitchMapper, SLOT(map())); pageSwitchMapper->setMapping(ui.pageMain->BtnInfo, ID_PAGE_INFO); @@ -210,8 +233,6 @@ //connect(ui.pageMain->BtnExit, SIGNAL(pressed()), this, SLOT(btnExitPressed())); //connect(ui.pageMain->BtnExit, SIGNAL(clicked()), this, SLOT(btnExitClicked())); - connect(ui.pageFeedback->BtnSend, SIGNAL(clicked()), this, SLOT(SendFeedback())); - connect(ui.pageEditTeam, SIGNAL(goBack()), this, SLOT(AfterTeamEdit())); connect(ui.pageMultiplayer->BtnStartMPGame, SIGNAL(clicked()), this, SLOT(StartMPGame())); @@ -293,8 +314,8 @@ // this, SLOT(GoBack())); // executed third - connect(ui.pageNetType->BtnLAN, SIGNAL(clicked()), this, SLOT(GoToNet())); - connect(ui.pageNetType->BtnOfficialServer, SIGNAL(clicked()), this, SLOT(NetConnectOfficialServer())); + connect(ui.pageMain->BtnNetLocal, SIGNAL(clicked()), this, SLOT(GoToNet())); + connect(ui.pageMain->BtnNetOfficial, SIGNAL(clicked()), this, SLOT(NetConnectOfficialServer())); connect(ui.pageConnecting, SIGNAL(cancelConnection()), this, SLOT(GoBack())); @@ -330,6 +351,7 @@ } PagesStack.push(ID_PAGE_MAIN); + ((AbstractPage*)ui.Pages->widget(ID_PAGE_MAIN))->triggerPageEnter(); GoBack(); } @@ -441,23 +463,27 @@ } } -void HWForm::UpdateTeamsLists(const QStringList* editable_teams) +void HWForm::UpdateTeamsLists() { - QStringList teamslist; - if(editable_teams) - { - teamslist =* editable_teams; - } - else - { - teamslist = config->GetTeamsList(); - } + QStringList teamslist = config->GetTeamsList(); if(teamslist.empty()) { - HWTeam defaultTeam(tr("DefaultTeam")); + QString currentNickName = config->value("net/nick","").toString().toUtf8(); + QString teamName; + + if (currentNickName.isEmpty()) + { + teamName = tr("DefaultTeam"); + } + else + { + teamName = tr("%1's Team").arg(currentNickName); + } + + HWTeam defaultTeam(teamName); defaultTeam.saveToFile(); - teamslist.push_back(tr("DefaultTeam")); + teamslist.push_back(teamName); } ui.pageOptions->CBTeamName->clear(); @@ -528,11 +554,52 @@ GoToPage(ID_PAGE_VIDEOS); } +//TODO: maybe find a better place for this? +QString HWForm::stringifyPageId(quint32 id) +{ + QString pageName; + switch (id) + { + case ID_PAGE_SETUP_TEAM : pageName = "PAGE_SETUP_TEAM"; break; + case ID_PAGE_SETUP : pageName = "PAGE_SETUP"; break; + case ID_PAGE_MULTIPLAYER : pageName = "PAGE_MULTIPLAYER"; break; + case ID_PAGE_DEMOS : pageName = "PAGE_DEMOS"; break; + case ID_PAGE_NET : pageName = "PAGE_NET"; break; + case ID_PAGE_NETGAME : pageName = "PAGE_NETGAME"; break; + case ID_PAGE_INFO : pageName = "PAGE_INFO"; break; + case ID_PAGE_MAIN : pageName = "PAGE_MAIN"; break; + case ID_PAGE_GAMESTATS : pageName = "PAGE_GAMESTATS"; break; + case ID_PAGE_SINGLEPLAYER : pageName = "PAGE_SINGLEPLAYER"; break; + case ID_PAGE_TRAINING : pageName = "PAGE_TRAINING"; break; + case ID_PAGE_SELECTWEAPON : pageName = "PAGE_SELECTWEAPON"; break; + case ID_PAGE_NETSERVER : pageName = "PAGE_NETSERVER"; break; + case ID_PAGE_INGAME : pageName = "PAGE_INGAME"; break; + case ID_PAGE_ROOMSLIST : pageName = "PAGE_ROOMSLIST"; break; + case ID_PAGE_CONNECTING : pageName = "PAGE_CONNECTING"; break; + case ID_PAGE_SCHEME : pageName = "PAGE_SCHEME"; break; + case ID_PAGE_ADMIN : pageName = "PAGE_ADMIN"; break; + case ID_PAGE_CAMPAIGN : pageName = "PAGE_CAMPAIGN"; break; + case ID_PAGE_DRAWMAP : pageName = "PAGE_DRAWMAP"; break; + case ID_PAGE_DATADOWNLOAD : pageName = "PAGE_DATADOWNLOAD"; break; + case ID_PAGE_VIDEOS : pageName = "PAGE_VIDEOS"; break; + case MAX_PAGE : pageName = "MAX_PAGE"; break; + default : pageName = "UNKNOWN_PAGE"; break; + } + return pageName; +} + void HWForm::OnPageShown(quint8 id, quint8 lastid) { #ifdef USE_XFIRE updateXfire(); #endif + + qDebug("Leaving %s, entering %s", qPrintable(stringifyPageId(lastid)), qPrintable(stringifyPageId(id))); + + // pageEnter and pageLeave events + ((AbstractPage*)ui.Pages->widget(lastid))->triggerPageLeave(); + ((AbstractPage*)ui.Pages->widget(id))->triggerPageEnter(); + if (id == ID_PAGE_DATADOWNLOAD) { ui.pageDataDownload->fetchList(); @@ -604,25 +671,11 @@ curTeamSelWidget->resetPlayingTeams(teamsList); } } - else if (id == ID_PAGE_GAMESTATS) - { - ui.pageGameStats->renderStats(); - } if (id == ID_PAGE_MAIN) { ui.pageOptions->setTeamOptionsEnabled(true); } - - if (id == ID_PAGE_SETUP) - { - config->reloadValues(); - } - - if (id == ID_PAGE_VIDEOS ) - { - config->reloadVideosValues(); - } } void HWForm::GoToPage(int id) @@ -638,10 +691,11 @@ /* if (id == ID_PAGE_DRAWMAP || id == ID_PAGE_GAMESTATS) stopAnim = true; - This were disabled due to broken flake animations. I believe the more general problems w/ opacity that forced its disable makes blocking these - unnecessary. + This were disabled due to broken flake animations. I believe the more general problems w/ opacity that forced its disable makes blocking these + unnecessary. */ + #if (QT_VERSION >= 0x040600) if (!stopAnim) { @@ -697,8 +751,8 @@ animationOldSlide->start(QAbstractAnimation::DeleteWhenStopped); animationNewSlide->start(QAbstractAnimation::DeleteWhenStopped); - /* this is for the situation when the animation below is interrupted by a new animation. For some reason, finished is not being fired */ - for(int i=0;iwidget(i)->hide(); + /* this is for the situation when the animation below is interrupted by a new animation. For some reason, finished is not being fired */ + for(int i=0;iwidget(i)->hide(); } #endif } @@ -709,6 +763,7 @@ int curid = ui.Pages->currentIndex(); if (curid == ID_PAGE_MAIN) { + ((AbstractPage*)ui.Pages->widget(ID_PAGE_MAIN))->triggerPageLeave(); if (!ui.pageVideos->tryQuit(this)) return; stopAnim = true; @@ -894,18 +949,8 @@ void HWForm::DeleteTeam(const QString & teamName) { - QMessageBox reallyDeleteMsg(this); - reallyDeleteMsg.setIcon(QMessageBox::Question); - reallyDeleteMsg.setWindowTitle(QMessageBox::tr("Teams - Are you sure?")); - reallyDeleteMsg.setText(QMessageBox::tr("Do you really want to delete the team '%1'?").arg(teamName)); - reallyDeleteMsg.setWindowModality(Qt::WindowModal); - reallyDeleteMsg.setStandardButtons(QMessageBox::Ok | QMessageBox::Cancel); - - if (reallyDeleteMsg.exec() == QMessageBox::Ok) - { - ui.pageEditTeam->deleteTeam(teamName); - UpdateTeamsLists(); - } + ui.pageEditTeam->deleteTeam(teamName); + UpdateTeamsLists(); } void HWForm::DeleteScheme() @@ -913,7 +958,7 @@ ui.pageScheme->selectScheme->setCurrentIndex(ui.pageOptions->SchemesName->currentIndex()); if (ui.pageOptions->SchemesName->currentIndex() < ammoSchemeModel->numberOfDefaultSchemes) { - ShowErrorMessage(QMessageBox::tr("Cannot delete default scheme '%1'!").arg(ui.pageOptions->SchemesName->currentText())); + MessageDialog::ShowErrorMessage(QMessageBox::tr("Cannot delete default scheme '%1'!").arg(ui.pageOptions->SchemesName->currentText()), this); } else { @@ -939,7 +984,7 @@ QListWidgetItem * curritem = ui.pagePlayDemo->DemosList->currentItem(); if (!curritem) { - ShowErrorMessage(QMessageBox::tr("Please select a record from the list")); + MessageDialog::ShowErrorMessage(QMessageBox::tr("Please select a record from the list"), this); return; } CreateGame(0, 0, 0); @@ -967,37 +1012,81 @@ void HWForm::NetPassword(const QString & nick) { - int passLength = config->value("net/passwordlength", 0).toInt(); - QString hash = config->value("net/passwordhash", "").toString(); + Q_UNUSED(nick); + //Get hashes + QString hash = config->passwordHash(); + QString temphash = config->tempHash(); + + //Check them - // If the password is blank, ask the user to enter one in - if (passLength == 0) - { - HWPasswordDialog * hpd = new HWPasswordDialog(this, tr("Your nickname %1 is\nregistered on Hedgewars.org\nPlease provide your password below\nor pick another nickname in game config:").arg(nick)); - hpd->cbSave->setChecked(config->value("net/savepassword", true).toBool()); - if (hpd->exec() != QDialog::Accepted) - { - ForcedDisconnect(tr("No password supplied.")); - delete hpd; - return; - } - - QString password = hpd->lePassword->text(); - hash = QCryptographicHash::hash(password.toUtf8(), QCryptographicHash::Md5).toHex(); - - bool save = hpd->cbSave->isChecked(); - config->setValue("net/savepassword", save); - if (save) // user wants to save password - { - config->setValue("net/passwordhash", hash); - config->setValue("net/passwordlength", password.size()); - config->setNetPasswordLength(password.size()); - } - - delete hpd; + if (temphash.isEmpty() && hash.isEmpty()) { //If the user enters a registered nick with no password, sends a bogus hash + hwnet->SendPasswordHash("THISISNOHASH"); + } + else if (temphash.isEmpty()) { //Send saved hash as default + hwnet->SendPasswordHash(hash); + } + else { //Send the hash + hwnet->SendPasswordHash(temphash); } - hwnet->SendPasswordHash(hash); + //Remove temporary hash from config + config->clearTempHash(); +} + +void HWForm::NetNickRegistered(const QString & nick) +{ + //Get hashes + QString hash = config->passwordHash(); + QString temphash = config->tempHash(); + + if (hash.isEmpty()) { + if (temphash.isEmpty()) { //If the user enters a registered nick with no password + QString suppliedpass; + while (suppliedpass.isEmpty()) { + QInputDialog nickRegedDialog(this); + nickRegedDialog.setWindowModality(Qt::WindowModal); + nickRegedDialog.setInputMode(QInputDialog::TextInput); + nickRegedDialog.setWindowTitle(tr("Hedgewars - Nick registered")); + nickRegedDialog.setLabelText(tr("This nick is registered, and you haven't specified a password.\n\nIf this nick isn't yours, please register your own nick at www.hedgewars.org\n\nPassword:")); + nickRegedDialog.setTextEchoMode(QLineEdit::Password); + nickRegedDialog.exec(); + + suppliedpass = nickRegedDialog.textValue(); + + if (nickRegedDialog.result() == QDialog::Rejected) { + config->clearPasswordHash(); + config->clearTempHash(); + GoBack(); + return; + } + temphash = QCryptographicHash::hash(suppliedpass.toUtf8(), QCryptographicHash::Md5).toHex(); + config->setTempHash(temphash); + } + } + } + NetPassword(nick); +} + +void HWForm::NetNickNotRegistered(const QString & nick) +{ + Q_UNUSED(nick); + + QMessageBox noRegMsg(this); + noRegMsg.setIcon(QMessageBox::Information); + noRegMsg.setWindowTitle(QMessageBox::tr("Hedgewars - Nick not registered")); + noRegMsg.setWindowModality(Qt::WindowModal); + noRegMsg.setText(tr("Your nickname is not registered.\nTo prevent someone else from using it,\nplease register it at www.hedgewars.org")); + + if (!config->passwordHash().isEmpty()) + { + config->clearPasswordHash(); + noRegMsg.setText(noRegMsg.text()+tr("\n\nYour password wasn't saved either.")); + } + if (!config->tempHash().isEmpty()) + { + config->clearTempHash(); + } + noRegMsg.exec(); } void HWForm::NetNickTaken(const QString & nick) @@ -1007,7 +1096,12 @@ if (!ok || newNick.isEmpty()) { - ForcedDisconnect(tr("No nickname supplied.")); + //ForcedDisconnect(tr("No nickname supplied.")); + bool retry = RetryDialog(tr("Hedgewars - Empty nickname"), tr("No nickname supplied.")); + GoBack(); + if (retry) { + NetConnectOfficialServer(); + } return; } @@ -1022,8 +1116,39 @@ void HWForm::NetAuthFailed() { // Set the password blank if case the user tries to join and enter his password again - config->setValue("net/passwordlength", 0); - config->setNetPasswordLength(0); + config->clearTempHash(); + + //Try to login again + bool retry = RetryDialog(tr("Hedgewars - Wrong password"), tr("You entered a wrong password.")); + GoBack(); + + config->clearPasswordHash(); + config->clearTempHash(); + if (retry) { + NetConnectOfficialServer(); + } +} + +bool HWForm::RetryDialog(const QString & title, const QString & label) +{ + QMessageBox retryMsg(this); + retryMsg.setIcon(QMessageBox::Warning); + retryMsg.setWindowTitle(title); + retryMsg.setText(label); + retryMsg.setWindowModality(Qt::WindowModal); + + retryMsg.addButton(QMessageBox::Cancel); + + QPushButton *retryButton = retryMsg.addButton(QMessageBox::Ok); + retryButton->setText(tr("Try Again")); + retryButton->setFocus(); + + retryMsg.exec(); + + if (retryMsg.clickedButton() == retryButton) { + return true; + } + return false; } void HWForm::NetTeamAccepted(const QString & team) @@ -1036,7 +1161,7 @@ switch (ui.Pages->currentIndex()) { case ID_PAGE_INGAME: - ShowErrorMessage(errmsg); + MessageDialog::ShowErrorMessage(errmsg, this); // no break case ID_PAGE_NETGAME: ui.pageNetGame->displayError(errmsg); @@ -1056,6 +1181,8 @@ void HWForm::_NetConnect(const QString & hostName, quint16 port, QString nick) { + Q_UNUSED(nick); + if(hwnet) { hwnet->Disconnect(); @@ -1067,7 +1194,7 @@ GoToPage(ID_PAGE_CONNECTING); - connect(hwnet, SIGNAL(AskForRunGame()), this, SLOT(CreateNetGame())); + connect(hwnet, SIGNAL(AskForRunGame()), this, SLOT(CreateNetGame()), Qt::QueuedConnection); connect(hwnet, SIGNAL(connected()), this, SLOT(NetConnected()), Qt::QueuedConnection); connect(hwnet, SIGNAL(Error(const QString&)), this, SLOT(NetError(const QString&)), Qt::QueuedConnection); connect(hwnet, SIGNAL(Warning(const QString&)), this, SLOT(NetWarning(const QString&)), Qt::QueuedConnection); @@ -1076,13 +1203,14 @@ connect(hwnet, SIGNAL(AddNetTeam(const HWTeam&)), this, SLOT(AddNetTeam(const HWTeam&)), Qt::QueuedConnection); connect(hwnet, SIGNAL(RemoveNetTeam(const HWTeam&)), this, SLOT(RemoveNetTeam(const HWTeam&)), Qt::QueuedConnection); connect(hwnet, SIGNAL(TeamAccepted(const QString&)), this, SLOT(NetTeamAccepted(const QString&)), Qt::QueuedConnection); - connect(hwnet, SIGNAL(AskForPassword(const QString&)), this, SLOT(NetPassword(const QString&)), Qt::QueuedConnection); + connect(hwnet, SIGNAL(NickRegistered(const QString&)), this, SLOT(NetNickRegistered(const QString&)), Qt::QueuedConnection); + connect(hwnet, SIGNAL(NickNotRegistered(const QString&)), this, SLOT(NetNickNotRegistered(const QString&)), Qt::QueuedConnection); connect(hwnet, SIGNAL(NickTaken(const QString&)), this, SLOT(NetNickTaken(const QString&)), Qt::QueuedConnection); connect(hwnet, SIGNAL(AuthFailed()), this, SLOT(NetAuthFailed()), Qt::QueuedConnection); //connect(ui.pageNetGame->BtnBack, SIGNAL(clicked()), hwnet, SLOT(partRoom())); ui.pageRoomsList->chatWidget->setUsersModel(hwnet->lobbyPlayersModel()); - ui.pageNetGame->pChatWidget->setUsersModel(hwnet->roomPlayersModel()); + ui.pageNetGame->chatWidget->setUsersModel(hwnet->roomPlayersModel()); // rooms list page stuff ui.pageRoomsList->setModel(hwnet->roomsListModel()); @@ -1106,32 +1234,37 @@ hwnet, SLOT(askRoomsList())); // room status stuff +// not queued because creates new signal/slot connection connect(hwnet, SIGNAL(roomMaster(bool)), - this, SLOT(NetGameChangeStatus(bool)), Qt::QueuedConnection); + this, SLOT(NetGameChangeStatus(bool))); // net page stuff + connect(hwnet, SIGNAL(roomNameUpdated(const QString &)), + ui.pageNetGame, SLOT(setRoomName(const QString &))); connect(hwnet, SIGNAL(chatStringFromNet(const QString&)), - ui.pageNetGame->pChatWidget, SLOT(onChatString(const QString&)), Qt::QueuedConnection); + ui.pageNetGame->chatWidget, SLOT(onChatString(const QString&)), Qt::QueuedConnection); connect(hwnet, SIGNAL(chatStringFromMe(const QString&)), - ui.pageNetGame->pChatWidget, SLOT(onChatString(const QString&)), Qt::QueuedConnection); + ui.pageNetGame->chatWidget, SLOT(onChatString(const QString&)), Qt::QueuedConnection); connect(hwnet, SIGNAL(roomMaster(bool)), - ui.pageNetGame->pChatWidget, SLOT(adminAccess(bool)), Qt::QueuedConnection); - connect(ui.pageNetGame->pChatWidget, SIGNAL(chatLine(const QString&)), + ui.pageNetGame->chatWidget, SLOT(adminAccess(bool)), Qt::QueuedConnection); + connect(ui.pageNetGame->chatWidget, SIGNAL(chatLine(const QString&)), hwnet, SLOT(chatLineToNet(const QString&))); connect(ui.pageNetGame->BtnGo, SIGNAL(clicked()), hwnet, SLOT(ToggleReady())); connect(hwnet, SIGNAL(setMyReadyStatus(bool)), ui.pageNetGame, SLOT(setReadyStatus(bool)), Qt::QueuedConnection); // chat widget actions - connect(ui.pageNetGame->pChatWidget, SIGNAL(kick(const QString&)), + connect(ui.pageNetGame->chatWidget, SIGNAL(kick(const QString&)), hwnet, SLOT(kickPlayer(const QString&))); - connect(ui.pageNetGame->pChatWidget, SIGNAL(ban(const QString&)), + connect(ui.pageNetGame->chatWidget, SIGNAL(ban(const QString&)), hwnet, SLOT(banPlayer(const QString&))); - connect(ui.pageNetGame->pChatWidget, SIGNAL(info(const QString&)), + connect(ui.pageNetGame->chatWidget, SIGNAL(info(const QString&)), hwnet, SLOT(infoPlayer(const QString&))); - connect(ui.pageNetGame->pChatWidget, SIGNAL(follow(const QString&)), + connect(ui.pageNetGame->chatWidget, SIGNAL(follow(const QString&)), hwnet, SLOT(followPlayer(const QString&))); + connect(ui.pageNetGame->chatWidget, SIGNAL(consoleCommand(const QString&)), + hwnet, SLOT(consoleCommand(const QString&))); connect(ui.pageRoomsList->chatWidget, SIGNAL(kick(const QString&)), hwnet, SLOT(kickPlayer(const QString&))); connect(ui.pageRoomsList->chatWidget, SIGNAL(ban(const QString&)), @@ -1140,6 +1273,8 @@ hwnet, SLOT(infoPlayer(const QString&))); connect(ui.pageRoomsList->chatWidget, SIGNAL(follow(const QString&)), hwnet, SLOT(followPlayer(const QString&))); + connect(ui.pageRoomsList->chatWidget, SIGNAL(consoleCommand(const QString&)), + hwnet, SLOT(consoleCommand(const QString&))); // chatting connect(ui.pageRoomsList->chatWidget, SIGNAL(chatLine(const QString&)), @@ -1147,15 +1282,15 @@ connect(hwnet, SIGNAL(chatStringLobby(const QString&)), ui.pageRoomsList->chatWidget, SLOT(onChatString(const QString&)), Qt::QueuedConnection); connect(hwnet, SIGNAL(chatStringLobby(const QString&, const QString&)), - ui.pageRoomsList->chatWidget, SLOT(onChatString(const QString&, const QString&))); + ui.pageRoomsList->chatWidget, SLOT(onChatString(const QString&, const QString&)), Qt::QueuedConnection); connect(hwnet, SIGNAL(chatStringFromMeLobby(const QString&)), ui.pageRoomsList->chatWidget, SLOT(onChatString(const QString&)), Qt::QueuedConnection); // nick list stuff connect(hwnet, SIGNAL(nickAdded(const QString&, bool)), - ui.pageNetGame->pChatWidget, SLOT(nickAdded(const QString&, bool)), Qt::QueuedConnection); + ui.pageNetGame->chatWidget, SLOT(nickAdded(const QString&, bool)), Qt::QueuedConnection); connect(hwnet, SIGNAL(nickRemoved(const QString&)), - ui.pageNetGame->pChatWidget, SLOT(nickRemoved(const QString&)), Qt::QueuedConnection); + ui.pageNetGame->chatWidget, SLOT(nickRemoved(const QString&)), Qt::QueuedConnection); connect(hwnet, SIGNAL(nickAddedLobby(const QString&, bool)), ui.pageRoomsList->chatWidget, SLOT(nickAdded(const QString&, bool)), Qt::QueuedConnection); connect(hwnet, SIGNAL(nickRemovedLobby(const QString&)), @@ -1178,11 +1313,16 @@ connect(hwnet, SIGNAL(serverMessageNew(const QString&)), ui.pageAdmin, SLOT(serverMessageNew(const QString &))); connect(hwnet, SIGNAL(serverMessageOld(const QString&)), ui.pageAdmin, SLOT(serverMessageOld(const QString &))); connect(hwnet, SIGNAL(latestProtocolVar(int)), ui.pageAdmin, SLOT(protocol(int))); + connect(hwnet, SIGNAL(bansList(const QStringList &)), ui.pageAdmin, SLOT(setBansList(const QStringList &))); connect(ui.pageAdmin, SIGNAL(setServerMessageNew(const QString&)), hwnet, SLOT(setServerMessageNew(const QString &))); connect(ui.pageAdmin, SIGNAL(setServerMessageOld(const QString&)), hwnet, SLOT(setServerMessageOld(const QString &))); connect(ui.pageAdmin, SIGNAL(setProtocol(int)), hwnet, SLOT(setLatestProtocolVar(int))); connect(ui.pageAdmin, SIGNAL(askServerVars()), hwnet, SLOT(askServerVars())); connect(ui.pageAdmin, SIGNAL(clearAccountsCache()), hwnet, SLOT(clearAccountsCache())); + connect(ui.pageAdmin, SIGNAL(bansListRequest()), hwnet, SLOT(getBanList())); + connect(ui.pageAdmin, SIGNAL(removeBan(QString)), hwnet, SLOT(removeBan(QString))); + connect(ui.pageAdmin, SIGNAL(banIP(QString,QString,int)), hwnet, SLOT(banIP(QString,QString,int))); + connect(ui.pageAdmin, SIGNAL(banNick(QString,QString,int)), hwnet, SLOT(banNick(QString,QString,int))); // disconnect connect(hwnet, SIGNAL(disconnected(const QString&)), this, SLOT(ForcedDisconnect(const QString&)), Qt::QueuedConnection); @@ -1192,23 +1332,99 @@ connect(ui.pageNetGame->pGameCFG, SIGNAL(paramChanged(const QString &, const QStringList &)), hwnet, SLOT(onParamChanged(const QString &, const QStringList &))); connect(hwnet, SIGNAL(configAsked()), ui.pageNetGame->pGameCFG, SLOT(fullNetConfig())); - while (nick.isEmpty()) +//nick and pass stuff + + //remove temppasswordhash just in case + config->clearTempHash(); + + //initialize + QString hash = config->passwordHash(); + QString temphash = config->tempHash(); + QString nickname = config->value("net/nick", "").toString(); + QString password; + + //if something from login is missing, start dialog loop + if (nickname.isEmpty() || hash.isEmpty()) { - nick = QInputDialog::getText(this, - QObject::tr("Nickname"), - QObject::tr("Please enter your nickname"), - QLineEdit::Normal, - QDir::home().dirName()); - config->setValue("net/nick",nick); - config->updNetNick(); + while (nickname.isEmpty() || (hash.isEmpty() && temphash.isEmpty())) //while a nickname, or both hashes are missing + { + //open dialog + HWPasswordDialog * pwDialog = new HWPasswordDialog(this); + // make the "new account" button dialog open a browser with the registration page + connect(pwDialog->pbNewAccount, SIGNAL(clicked()), this, SLOT(openRegistrationPage())); + pwDialog->cbSave->setChecked(config->value("net/savepassword", true).toBool()); + + //if nickname is present, put it into the field + if (!nickname.isEmpty()) { + pwDialog->leNickname->setText(nickname); + pwDialog->lePassword->setFocus(); + } + + //if dialog close, create an error message + if (pwDialog->exec() != QDialog::Accepted) { + delete pwDialog; + GoBack(); + return; + } + + //set nick and pass from the dialog + nickname = pwDialog->leNickname->text(); + password = pwDialog->lePassword->text(); + + //check the nickname variable + if (nickname.isEmpty()) { + int retry = RetryDialog(tr("Hedgewars - Empty nickname"), tr("No nickname supplied.")); + GoBack(); + delete pwDialog; + if (retry) { + NetConnectOfficialServer(); + } + return; + } + + if (!password.isEmpty()) { + //calculate temphash and set it into config + temphash = QCryptographicHash::hash(password.toUtf8(), QCryptographicHash::Md5).toHex(); + config->setTempHash(temphash); + + //if user wants to save password + bool save = pwDialog->cbSave->isChecked(); + config->setValue("net/savepassword", save); + if (save) // user wants to save password + { + ui.pageOptions->CBSavePassword->setChecked(true); + config->setPasswordHash(temphash); + } + } + else { + delete pwDialog; + config->setValue("net/nick", nickname); + config->updNetNick(); + config->clearPasswordHash(); + break; + } + + delete pwDialog; + + //update nickname + config->setValue("net/nick", nickname); + config->updNetNick(); + + //and all the variables + hash = config->passwordHash(); + temphash = config->tempHash(); + nickname = config->value("net/nick", "").toString(); + } } - ui.pageRoomsList->setUser(nick); - ui.pageNetGame->setUser(nick); + ui.pageRoomsList->setUser(nickname); + ui.pageNetGame->setUser(nickname); - hwnet->Connect(hostName, port, nick); + hwnet->Connect(hostName, port, nickname); } + + void HWForm::NetConnect() { HWHostPortDialog * hpd = new HWHostPortDialog(this); @@ -1233,7 +1449,7 @@ pnetserver = new HWNetServer; if (!pnetserver->StartServer(ui.pageNetServer->sbPort->value())) { - ShowErrorMessage(QMessageBox::tr("Unable to start server")); + MessageDialog::ShowErrorMessage(QMessageBox::tr("Unable to start server"), this); delete pnetserver; pnetserver = 0; @@ -1273,16 +1489,29 @@ void HWForm::ForcedDisconnect(const QString & reason) { + if (reason == "Reconnected too fast") { //TODO: this is a hack, which should be remade + bool retry = RetryDialog(tr("Hedgewars - Connection error"), tr("You reconnected too fast.\nPlease wait a few seconds and try again.")); + if (retry) { + NetConnectOfficialServer(); + } + else { + while (ui.Pages->currentIndex() != ID_PAGE_NET + && ui.Pages->currentIndex() != ID_PAGE_MAIN) + { + GoBack(); + } + } + return; + } if (pnetserver) return; // we have server - let it care of all things if (hwnet) { QString errorStr = QMessageBox::tr("Connection to server is lost") + (reason.isEmpty()?"":("\n\n" + HWNewNet::tr("Quit reason: ") + '"' + reason +'"')); - ShowErrorMessage(errorStr); + MessageDialog::ShowErrorMessage(errorStr, this); } while (ui.Pages->currentIndex() != ID_PAGE_NET - && ui.Pages->currentIndex() != ID_PAGE_NETTYPE && ui.Pages->currentIndex() != ID_PAGE_MAIN) { GoBack(); @@ -1296,7 +1525,7 @@ void HWForm::NetGameEnter() { - ui.pageNetGame->pChatWidget->clear(); + ui.pageNetGame->chatWidget->clear(); GoToPage(ID_PAGE_NETGAME); } @@ -1347,7 +1576,7 @@ //setVisible(true); setFocusPolicy(Qt::StrongFocus); if (id == ID_PAGE_INGAME) GoBack(); - Music(ui.pageOptions->CBEnableFrontendMusic->isChecked()); + Music(ui.pageOptions->CBFrontendMusic->isChecked()); if (wBackground) wBackground->startAnimation(); GoToPage(ID_PAGE_GAMESTATS); if (hwnet && (!game || !game->netSuspend)) hwnet->gameFinished(true); @@ -1365,7 +1594,7 @@ (gameState == gsInterrupted || gameState == gsStopped || gameState == gsDestroyed || gameState == gsHalted))) { if (id == ID_PAGE_INGAME) GoBack(); - Music(ui.pageOptions->CBEnableFrontendMusic->isChecked()); + Music(ui.pageOptions->CBFrontendMusic->isChecked()); if (wBackground) wBackground->startAnimation(); if (hwnet) hwnet->gameFinished(false); } @@ -1385,16 +1614,6 @@ m_lastDemo = QByteArray(); } -void HWForm::ShowErrorMessage(const QString & msg) -{ - QMessageBox msgMsg(this); - msgMsg.setIcon(QMessageBox::Warning); - msgMsg.setWindowTitle(QMessageBox::tr("Hedgewars - Error")); - msgMsg.setText(msg); - msgMsg.setWindowModality(Qt::WindowModal); - msgMsg.exec(); -} - void HWForm::GetRecord(RecordType type, const QByteArray & record) { if (type != rtNeither) @@ -1427,7 +1646,7 @@ QFile demofile(filename); if (!demofile.open(QIODevice::WriteOnly)) - ShowErrorMessage(tr("Cannot save record to file %1").arg(filename)); + MessageDialog::ShowErrorMessage(tr("Cannot save record to file %1").arg(filename), this); else { demofile.write(demo); @@ -1482,7 +1701,9 @@ xfire_free(); #endif config->SaveOptions(); +#if VIDEOREC config->SaveVideosOptions(); +#endif event->accept(); } @@ -1496,7 +1717,7 @@ void HWForm::NetGameChangeStatus(bool isMaster) { - ui.pageNetGame->pGameCFG->setEnabled(isMaster); + ui.pageNetGame->pGameCFG->setMaster(isMaster); ui.pageNetGame->pNetTeamsWidget->setInteractivity(isMaster); if (isMaster) @@ -1511,21 +1732,22 @@ ui.pageNetGame->restrictJoins->setChecked(false); ui.pageNetGame->restrictTeamAdds->setChecked(false); ui.pageNetGame->pGameCFG->GameSchemes->setModel(ammoSchemeModel); - ui.pageNetGame->pGameCFG->setEnabled(true); + ui.pageNetGame->pGameCFG->setMaster(true); ui.pageNetGame->pNetTeamsWidget->setInteractivity(true); if (hwnet) { // disconnect connections first to ensure their inexistance and not to connect twice - ui.pageNetGame->BtnStart->disconnect(hwnet); + ui.pageNetGame->BtnStart->disconnect(this); ui.pageNetGame->BtnUpdate->disconnect(hwnet); + ui.pageNetGame->leRoomName->disconnect(hwnet); ui.pageNetGame->restrictJoins->disconnect(hwnet); ui.pageNetGame->restrictTeamAdds->disconnect(hwnet); ui.pageNetGame->disconnect(hwnet, SLOT(updateRoomName(const QString&))); ui.pageNetGame->setRoomName(hwnet->getRoom()); - connect(ui.pageNetGame->BtnStart, SIGNAL(clicked()), hwnet, SLOT(startGame())); + connect(ui.pageNetGame->BtnStart, SIGNAL(clicked()), this, SLOT(startGame())); connect(ui.pageNetGame, SIGNAL(askForUpdateRoomName(const QString &)), hwnet, SLOT(updateRoomName(const QString &))); connect(ui.pageNetGame->restrictJoins, SIGNAL(triggered()), hwnet, SLOT(toggleRestrictJoins())); connect(ui.pageNetGame->restrictTeamAdds, SIGNAL(triggered()), hwnet, SLOT(toggleRestrictTeamAdds())); @@ -1539,7 +1761,7 @@ void HWForm::NetGameSlave() { - ui.pageNetGame->pGameCFG->setEnabled(false); + ui.pageNetGame->pGameCFG->setMaster(false); ui.pageNetGame->pNetTeamsWidget->setInteractivity(false); if (hwnet) @@ -1548,6 +1770,8 @@ connect(hwnet, SIGNAL(netSchemeConfig(QStringList &)), netAmmo, SLOT(setNetSchemeConfig(QStringList &))); ui.pageNetGame->pGameCFG->GameSchemes->setModel(netAmmo); + ui.pageNetGame->setRoomName(hwnet->getRoom()); + ui.pageNetGame->pGameCFG->GameSchemes->view()->disconnect(hwnet); connect(hwnet, SIGNAL(netSchemeConfig(QStringList &)), this, SLOT(selectFirstNetScheme())); @@ -1634,19 +1858,30 @@ // used for --set-everything [screen width] [screen height] [color dept] [volume] [enable music] [enable sounds] [language file] [full screen] [show FPS] [alternate damage] [timer value] [reduced quality] QString HWForm::getDemoArguments() { - QRect resolution = config->vid_Resolution(); - return QString(QString::number(resolution.width()) + " " - + QString::number(resolution.height()) + " " - + QString::number(config->bitDepth()) + " " // bpp - + QString::number(config->volume()) + " " // sound volume - + (config->isMusicEnabled() ? "1" : "0") + " " - + (config->isSoundEnabled() ? "1" : "0") + " " - + config->language() + ".txt " - + (config->vid_Fullscreen() ? "1" : "0") + " " - + (config->isShowFPSEnabled() ? "1" : "0") + " " - + (config->isAltDamageEnabled() ? "1" : "0") + " " - + QString::number(config->timerInterval()) + " " - + QString::number(config->translateQuality())); + + QString prefix = datadir->absolutePath(); + QString userPrefix = cfgdir->absolutePath(); +#ifdef Q_WS_WIN + prefix = prefix.replace("/","\\"); + userPrefix = userPrefix.replace("/","\\"); +#endif + + std::pair resolutions = config->vid_ResolutionPair(); + return QString("--prefix " + prefix + + " --user-prefix " + userPrefix + + " --fullscreen-width " + QString::number(resolutions.first.width()) + + " --fullscreen-height " + QString::number(resolutions.first.height()) + + " --width " + QString::number(resolutions.second.width()) + + " --height " + QString::number(resolutions.second.height()) + + " --volume " + QString::number(config->volume()) + + (config->isMusicEnabled() ? "" : " --nomusic") + + (config->isSoundEnabled() ? "" : " --nosound") + + " --locale " + config->language() + ".txt" + + (config->vid_Fullscreen() ? " --fullscreen" : "") + + (config->isShowFPSEnabled() ? " --showfps" : "") + + (config->isAltDamageEnabled() ? " --altdmg" : "") + + " --frame-interval " + QString::number(config->timerInterval()) + + " --raw-quality " + QString::number(config->translateQuality())); } void HWForm::AssociateFiles() @@ -1661,8 +1896,8 @@ registry_hkcr.setValue("Hedgewars.Save/Default", tr("Hedgewars Save File", "File Types")); registry_hkcr.setValue("Hedgewars.Demo/DefaultIcon/Default", "\"" + bindir->absolutePath().replace("/", "\\") + "\\hwdfile.ico\",0"); registry_hkcr.setValue("Hedgewars.Save/DefaultIcon/Default", "\"" + bindir->absolutePath().replace("/", "\\") + "\\hwsfile.ico\",0"); - registry_hkcr.setValue("Hedgewars.Demo/Shell/Open/Command/Default", "\"" + bindir->absolutePath().replace("/", "\\") + "\\hwengine.exe\" \"" + cfgdir->absolutePath().replace("/","\\") + "\" \"" + datadir->absolutePath().replace("/", "\\") + "\" \"%1\" --set-everything "+arguments); - registry_hkcr.setValue("Hedgewars.Save/Shell/Open/Command/Default", "\"" + bindir->absolutePath().replace("/", "\\") + "\\hwengine.exe\" \"" + cfgdir->absolutePath().replace("/","\\") + "\" \"" + datadir->absolutePath().replace("/", "\\") + "\" \"%1\" --set-everything "+arguments); + registry_hkcr.setValue("Hedgewars.Demo/Shell/Open/Command/Default", "\"" + bindir->absolutePath().replace("/", "\\") + "\\hwengine.exe\" \"%1\" "+arguments); + registry_hkcr.setValue("Hedgewars.Save/Shell/Open/Command/Default", "\"" + bindir->absolutePath().replace("/", "\\") + "\\hwengine.exe\" \"%1\" "+arguments); #elif defined __APPLE__ // only useful when other apps have taken precedence over our file extensions and you want to reset it system("defaults write com.apple.LaunchServices LSHandlers -array-add 'LSHandlerContentTaghwdLSHandlerContentTagClasspublic.filename-extensionLSHandlerRoleAllorg.hedgewars.desktop'"); @@ -1683,7 +1918,7 @@ if (success) success = system("xdg-mime default hwengine.desktop application/x-hedgewars-demo")==0; if (success) success = system("xdg-mime default hwengine.desktop application/x-hedgewars-save")==0; // hack to add user's settings to hwengine. might be better at this point to read in the file, append it, and write it out to its new home. This assumes no spaces in the data dir path - if (success) success = system(("sed -i 's/^\\(Exec=.*\\) \\([^ ]* %f\\)/\\1 "+cfgdir->absolutePath().replace(" ","\\\\ ").replace("/","\\/")+" \\2 --set-everything "+arguments+"/' "+QDir::home().absolutePath()+"/.local/share/applications/hwengine.desktop").toLocal8Bit().constData())==0; + if (success) success = system(("sed -i 's/^\\(Exec=.*\\) \\([^ ]* %f\\)/\\1 \\2 "+arguments+"/' "+QDir::home().absolutePath()+"/.local/share/applications/hwengine.desktop").toLocal8Bit().constData())==0; #endif if (success) { @@ -1695,7 +1930,12 @@ infoMsg.exec(); } else - ShowErrorMessage(QMessageBox::tr("File association failed.")); + MessageDialog::ShowErrorMessage(QMessageBox::tr("File association failed."), this); +} + +void HWForm::openRegistrationPage() +{ + QDesktopServices::openUrl(QUrl("http://www.hedgewars.org/user/register")); } void HWForm::saveDemoWithCustomName() @@ -1714,7 +1954,7 @@ QFile demofile(filePath); ok = demofile.open(QIODevice::WriteOnly); if (!ok) - ShowErrorMessage(tr("Cannot save record to file %1").arg(filePath)); + MessageDialog::ShowErrorMessage(tr("Cannot save record to file %1").arg(filePath), this); else { ok = -1 != demofile.write(m_lastDemo); @@ -1726,107 +1966,28 @@ } } -void HWForm::SendFeedback() + +void HWForm::ShowErrorMessage(const QString & msg) { - //Create Xml representation of google code issue first - if (!CreateIssueXml()) - { - ShowErrorMessage(QMessageBox::tr("Please fill out all fields")); - return; - } - - //Google login using fake account (feedback.hedgewars@gmail.com) - nam = new QNetworkAccessManager(this); - connect(nam, SIGNAL(finished(QNetworkReply*)), - this, SLOT(finishedSlot(QNetworkReply*))); - - QUrl url(QString("https://www.google.com/accounts/ClientLogin?" - "accountType=GOOGLE&Email=feedback.hedgewars@gmail.com&Passwd=hwfeedback&service=code&source=HedgewarsFoundation-Hedgewars-") - + (cVersionString?(*cVersionString):QString(""))); - nam->get(QNetworkRequest(url)); - + MessageDialog::ShowErrorMessage(msg, this); } -bool HWForm::CreateIssueXml() +void HWForm::showFeedbackDialog() { - QString summary = ui.pageFeedback->summary->text(); - QString description = ui.pageFeedback->description->toPlainText(); - - //Check if all necessary information is entered - if (summary.isEmpty() || description.isEmpty()) - return false; - - issueXml = - "" - "" - ""; - issueXml.append(summary); - issueXml.append(""); - issueXml.append(description); - issueXml.append("feedback.hedgewars"); - - return true; + FeedbackDialog dialog(this); + dialog.exec(); } -void HWForm::finishedSlot(QNetworkReply* reply) +void HWForm::startGame() { - if (reply && reply->error() == QNetworkReply::NoError) - { - QByteArray array = reply->readAll(); - QString str(array); - - if (authToken.length() != 0) - { - - QMessageBox infoMsg(this); - infoMsg.setIcon(QMessageBox::Information); - infoMsg.setWindowTitle(QMessageBox::tr("Hedgewars - Success")); - infoMsg.setText(QMessageBox::tr("Successfully posted the issue on hedgewars.googlecode.com")); - infoMsg.setWindowModality(Qt::WindowModal); - infoMsg.exec(); - - ui.pageFeedback->summary->clear(); - ui.pageFeedback->description->clear(); - authToken = ""; - return; - } - - if (!getAuthToken(str)) - { - ShowErrorMessage(QMessageBox::tr("Error during authentication at google.com")); - return; - } + QMessageBox questionMsg(this); + questionMsg.setIcon(QMessageBox::Question); + questionMsg.setWindowTitle(QMessageBox::tr("Not all players are ready")); + questionMsg.setText(QMessageBox::tr("Are you sure you want to start this game?\nNot all players are ready.")); + questionMsg.setWindowModality(Qt::WindowModal); + questionMsg.addButton(QMessageBox::Yes); + questionMsg.addButton(QMessageBox::Cancel); - QByteArray body(issueXml.toUtf8()); - QNetworkRequest header(QUrl("https://code.google.com/feeds/issues/p/hedgewars/issues/full")); - header.setRawHeader("Content-Length", QString::number(issueXml.length()).toAscii()); - header.setRawHeader("Content-Type", "application/atom+xml"); - header.setRawHeader("Authorization", QString("GoogleLogin auth=%1").arg(authToken).toUtf8()); - nam->post(header, body); - - } - else if (authToken.length() == 0) - ShowErrorMessage(QMessageBox::tr("Error during authentication at google.com")); - else - { - ShowErrorMessage(QMessageBox::tr("Error reporting the issue, please try again later (or visit hedgewars.googlecode.com directly)")); - authToken = ""; - } - + if (hwnet->allPlayersReady() || questionMsg.exec() == QMessageBox::Yes) + hwnet->startGame(); } - -bool HWForm::getAuthToken(QString str) -{ - QRegExp ex("Auth=(.+)"); - - if (-1 == ex.indexIn(str)) - return false; - - authToken = ex.cap(1); - authToken.remove(QChar('\n')); - - return true; -} - - - diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/hwform.h --- a/QTfrontend/hwform.h Sun Nov 18 01:06:01 2012 +0400 +++ b/QTfrontend/hwform.h Fri Feb 22 05:05:32 2013 +0100 @@ -61,7 +61,6 @@ HWForm(QWidget *parent = 0, QString styleSheet = ""); Ui_HWForm ui; static GameUIConfig * config; - static QSettings * gameSettings; // Same file GameUIConfig points to but without the baggage. Needs sync() calls if you want to get GameUIConfig changes though void updateXfire(); void PlayDemoQuick(const QString & demofilename); void exit(); @@ -106,8 +105,11 @@ void NetWarning(const QString & wrnmsg); void NetGameEnter(); void NetPassword(const QString & nick); + void NetNickRegistered(const QString & nick); + void NetNickNotRegistered(const QString & nick); void NetNickTaken(const QString & nick); void NetAuthFailed(); + bool RetryDialog(const QString & title, const QString & label); void NetTeamAccepted(const QString& team); void AddNetTeam(const HWTeam& team); void RemoveNetTeam(const HWTeam& team); @@ -124,15 +126,7 @@ void UpdateCampaignPage(int index); void UpdateCampaignPageProgress(int index); void InitCampaignPage(); - //Starts the transmission process for the feedback - void SendFeedback(); - //Make a xml representation of the issue to be created - bool CreateIssueXml(); - //Called the first time when receiving authorization token from google, - //second time when receiving the response after posting the issue - void finishedSlot(QNetworkReply* reply); - //Filter the auth token from the reply from google - bool getAuthToken(QString str); + void showFeedbackDialog(); void NetGameChangeStatus(bool isMaster); void NetGameMaster(); @@ -143,14 +137,18 @@ void selectFirstNetScheme(); void saveDemoWithCustomName(); + void openRegistrationPage(); + + void startGame(); private: void _NetConnect(const QString & hostName, quint16 port, QString nick); - void UpdateTeamsLists(const QStringList* editable_teams=0); + void UpdateTeamsLists(); void CreateGame(GameCFGWidget * gamecfg, TeamSelWidget* pTeamSelWidget, QString ammo); void closeEvent(QCloseEvent *event); void CustomizePalettes(); void resizeEvent(QResizeEvent * event); + QString stringifyPageId(quint32 id); //void keyReleaseEvent(QKeyEvent *event); enum PageIDs @@ -173,13 +171,11 @@ ID_PAGE_CONNECTING , ID_PAGE_SCHEME , ID_PAGE_ADMIN , - ID_PAGE_NETTYPE , ID_PAGE_CAMPAIGN , ID_PAGE_DRAWMAP , ID_PAGE_DATADOWNLOAD , - ID_PAGE_FEEDBACK , - ID_PAGE_VIDEOS, - MAX_PAGE + ID_PAGE_VIDEOS , + MAX_PAGE }; QPointer game; QPointer pnetserver; @@ -193,9 +189,6 @@ BGWidget * wBackground; QSignalMapper * pageSwitchMapper; QByteArray m_lastDemo; - QNetworkAccessManager * nam; - QString issueXml; - QString authToken; QPropertyAnimation *animationNewSlide; QPropertyAnimation *animationOldSlide; diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/main.cpp --- a/QTfrontend/main.cpp Sun Nov 18 01:06:01 2012 +0400 +++ b/QTfrontend/main.cpp Fri Feb 22 05:05:32 2013 +0100 @@ -27,6 +27,8 @@ #include #include #include +#include +#include #include "hwform.h" #include "hwconsts.h" @@ -37,11 +39,18 @@ #ifdef _WIN32 #include -#endif -#ifdef __APPLE__ +#elif defined __APPLE__ #include "CocoaInitializer.h" #endif +#ifndef _WIN32 +#include +#endif +// Program resources +#ifdef __APPLE__ +static CocoaInitializer * cocoaInit = NULL; +#endif +static FileEngineHandler * engine = NULL; //Determines the day of easter in year //from http://aa.usno.navy.mil/faq/docs/easter.php,adapted to C/C++ @@ -85,12 +94,20 @@ else season = SEASON_NONE; } +#ifndef _WIN32 +void terminateFrontend(int signal) +{ + Q_UNUSED(signal); + + QCoreApplication::exit(0); +} +#endif bool checkForDir(const QString & dir) { - QDir tmpdir; - if (!tmpdir.exists(dir)) - if (!tmpdir.mkdir(dir)) + QDir tmpdir(dir); + if (!tmpdir.exists()) + if (!tmpdir.mkpath(dir)) { QMessageBox directoryMsg(QApplication::activeWindow()); directoryMsg.setIcon(QMessageBox::Warning); @@ -103,11 +120,53 @@ return true; } +// Guaranteed to be the last thing ran in the application's life time. +// Closes resources that need to exist as long as possible. +void closeResources(void) +{ +#ifdef __APPLE__ + if (cocoaInit != NULL) + { + delete cocoaInit; + cocoaInit = NULL; + } +#endif + if (engine != NULL) + { + delete engine; + engine = NULL; + } +} + int main(int argc, char *argv[]) { + // Since we're calling this first, closeResources() will be the last thing called after main() returns. + atexit(closeResources); + +#ifdef __APPLE__ + cocoaInit = new CocoaInitializer(); // Creates the autoreleasepool preventing cocoa object leaks on OS X. +#endif + +#ifndef _WIN32 + signal(SIGINT, &terminateFrontend); +#endif + HWApplication app(argc, argv); - FileEngineHandler engine(argv[0]); + QLabel *splash = NULL; +#if defined Q_WS_WIN + QPixmap pixmap(":res/splash.png"); + splash = new QLabel(0, Qt::FramelessWindowHint|Qt::WindowStaysOnTopHint); + splash->setAttribute(Qt::WA_TranslucentBackground); + const QRect deskSize = QApplication::desktop()->screenGeometry(-1); + QPoint splashCenter = QPoint( (deskSize.width() - pixmap.width())/2, + (deskSize.height() - pixmap.height())/2 ); + splash->move(splashCenter); + splash->setPixmap(pixmap); + splash->show(); +#endif + + engine = new FileEngineHandler(argv[0]); app.setAttribute(Qt::AA_DontShowIconsInMenus,false); @@ -146,9 +205,14 @@ if(parsedArgs.contains("config-dir")) { QFileInfo f(parsedArgs["config-dir"]); - *cConfigDir = f.absoluteFilePath(); + cfgdir->setPath(f.absoluteFilePath()); custom_config = true; } + else + { + cfgdir->setPath(QDir::homePath()); + custom_config = false; + } app.setStyle(new QPlastiqueStyle()); @@ -160,14 +224,9 @@ qRegisterMetaType("HWTeam"); - bindir->cd("bin"); // workaround over NSIS installer + bindir->cd(QCoreApplication::applicationDirPath()); - if(cConfigDir->length() == 0) - cfgdir->setPath(cfgdir->homePath()); - else - cfgdir->setPath(*cConfigDir); - - if(cConfigDir->length() == 0) + if(custom_config == false) { #ifdef __APPLE__ checkForDir(cfgdir->absolutePath() + "/Library/Application Support/Hedgewars"); @@ -208,29 +267,31 @@ datadir->cd(bindir->absolutePath()); datadir->cd(*cDataDir); - if(!datadir->cd("hedgewars/Data")) + if(!datadir->cd("Data")) { QMessageBox missingMsg(QApplication::activeWindow()); missingMsg.setIcon(QMessageBox::Critical); missingMsg.setWindowTitle(QMessageBox::tr("Main - Error")); missingMsg.setText(QMessageBox::tr("Failed to open data directory:\n%1\n\n" "Please check your installation!"). - arg(datadir->absolutePath()+"/hedgewars/Data")); + arg(datadir->absolutePath()+"/Data")); missingMsg.setWindowModality(Qt::WindowModal); missingMsg.exec(); return 1; } // setup PhysFS - engine.mount(datadir->absolutePath()); - engine.mount(cfgdir->absolutePath() + "/Data"); - engine.mount(cfgdir->absolutePath(), "/config"); - engine.setWriteDir(cfgdir->absolutePath()); - engine.mountPacks(); + engine->mount(datadir->absolutePath()); + engine->mount(cfgdir->absolutePath() + "/Data"); + engine->mount(cfgdir->absolutePath()); + engine->setWriteDir(cfgdir->absolutePath()); + engine->mountPacks(); + + DataManager::ensureFileExists("physfs://hedgewars.ini"); QTranslator Translator; { - QSettings settings("physfs://config/hedgewars.ini", QSettings::IniFormat); + QSettings settings("physfs://hedgewars.ini", QSettings::IniFormat); QString cc = settings.value("misc/locale", QString()).toString(); if(cc.isEmpty()) cc = QLocale::system().name(); @@ -250,10 +311,6 @@ registry_hklm.setValue("Software/Hedgewars/Path", bindir->absolutePath().replace("/", "\\")); } #endif -#ifdef __APPLE__ - // this creates the autoreleasepool that prevents leaking - CocoaInitializer initializer; -#endif QString style = ""; QString fname; @@ -276,6 +333,7 @@ break; default : fname = "qt.css"; + break; } // load external stylesheet if there is any @@ -290,5 +348,7 @@ app.form = new HWForm(NULL, style); app.form->show(); + if(splash) + splash->close(); return app.exec(); } diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/model/GameStyleModel.cpp --- a/QTfrontend/model/GameStyleModel.cpp Sun Nov 18 01:06:01 2012 +0400 +++ b/QTfrontend/model/GameStyleModel.cpp Fri Feb 22 05:05:32 2013 +0100 @@ -23,14 +23,15 @@ #include +#include "physfs.h" #include "GameStyleModel.h" +#include "hwconsts.h" void GameStyleModel::loadGameStyles() { beginResetModel(); - // empty list, so that we can (re)fill it QStandardItemModel::clear(); @@ -77,11 +78,16 @@ weapons.replace("_", " "); } - QStandardItem * item = new QStandardItem(name); + // detect if script is dlc + QString scriptPath = PHYSFS_getRealDir(QString("Scripts/Multiplayer/%1.lua").arg(script).toLocal8Bit().data()); + bool isDLC = !scriptPath.startsWith(datadir->absolutePath()); + + QStandardItem * item = new QStandardItem((isDLC ? "*" : "") + name); item->setData(script, ScriptRole); item->setData(scheme, SchemeRole); item->setData(weapons, WeaponsRole); + item->setData(isDLC, IsDlcRole); items.append(item); } diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/model/GameStyleModel.h --- a/QTfrontend/model/GameStyleModel.h Sun Nov 18 01:06:01 2012 +0400 +++ b/QTfrontend/model/GameStyleModel.h Fri Feb 22 05:05:32 2013 +0100 @@ -38,7 +38,7 @@ Q_OBJECT public: - enum DataRoles { ScriptRole = Qt::UserRole+1, SchemeRole, WeaponsRole }; + enum DataRoles { ScriptRole = Qt::UserRole+1, SchemeRole, WeaponsRole, IsDlcRole }; public slots: /// reloads the themes from the DataManager diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/model/HatModel.cpp --- a/QTfrontend/model/HatModel.cpp Sun Nov 18 01:06:01 2012 +0400 +++ b/QTfrontend/model/HatModel.cpp Fri Feb 22 05:05:32 2013 +0100 @@ -26,26 +26,28 @@ #include #include #include +#include #include "hwform.h" // player hash #include "DataManager.h" HatModel::HatModel(QObject* parent) : - QAbstractListModel(parent) -{ - hats = QVector >(); -} + QStandardItemModel(parent) +{} void HatModel::loadHats() { // this method resets the contents of this model (important to know for views). - beginResetModel(); + QStandardItemModel::beginResetModel(); + QStandardItemModel::clear(); - // prepare hats Vector - hats.clear(); + // New hats to add to model + QList hats; + // we'll need the DataManager a few times, so let's get a reference to it DataManager & dataMgr = DataManager::instance(); + // Default hat icon QPixmap hhpix = QPixmap("physfs://Graphics/Hedgehog/Idle.png").copy(0, 0, 32, 32); // my reserved hats @@ -54,7 +56,6 @@ QDir::Files, QStringList(playerHash+"*.png") ); - int nReserved = hatsList.size(); // regular hats @@ -64,19 +65,20 @@ QStringList("*.png") ) ); - - int nHats = hatsList.size(); + // Add each hat for (int i = 0; i < nHats; i++) { bool isReserved = (i < nReserved); + if (isReserved) continue; // For some reason, reserved hats were added in 9.19-dev, so this will hide them. Uncomment to show them. + QString str = hatsList.at(i); str = str.remove(QRegExp("\\.png$")); - QPixmap pix( + QPixmap pix( "physfs://Graphics/Hats/" + QString(isReserved?"Reserved/":"") + str + - ".png" + ".png" ); // rename properly @@ -94,51 +96,11 @@ painter.end(); if (str == "NoHat") - hats.prepend(qMakePair(str, QIcon(tmppix))); + hats.prepend(new QStandardItem(QIcon(tmppix), str)); else - hats.append(qMakePair(str, QIcon(tmppix))); + hats.append(new QStandardItem(QIcon(tmppix), str)); } - - endResetModel(); -} - -QVariant HatModel::headerData(int section, - Qt::Orientation orientation, int role) const -{ - Q_UNUSED(section); - Q_UNUSED(orientation); - Q_UNUSED(role); - - return QVariant(); -} - -int HatModel::rowCount(const QModelIndex &parent) const -{ - if (parent.isValid()) - return 0; - else - return hats.size(); + QStandardItemModel::appendColumn(hats); + QStandardItemModel::endResetModel(); } - -/*int HatModel::columnCount(const QModelIndex & parent) const -{ - if (parent.isValid()) - return 0; - else - return 2; -} -*/ -QVariant HatModel::data(const QModelIndex &index, - int role) const -{ - if (!index.isValid() || index.row() < 0 - || index.row() >= hats.size() - || (role != Qt::DisplayRole && role != Qt::DecorationRole)) - return QVariant(); - - if (role == Qt::DisplayRole) - return hats.at(index.row()).first; - else // role == Qt::DecorationRole - return hats.at(index.row()).second; -} diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/model/HatModel.h --- a/QTfrontend/model/HatModel.h Sun Nov 18 01:06:01 2012 +0400 +++ b/QTfrontend/model/HatModel.h Fri Feb 22 05:05:32 2013 +0100 @@ -24,30 +24,22 @@ #ifndef HEDGEWARS_HATMODEL_H #define HEDGEWARS_HATMODEL_H -#include +#include #include #include #include #include -class HatModel : public QAbstractListModel +class HatModel : public QStandardItemModel { Q_OBJECT public: HatModel(QObject *parent = 0); - QVariant headerData(int section, Qt::Orientation orientation, int role) const; - int rowCount(const QModelIndex & parent) const; - //int columnCount(const QModelIndex & parent) const; - public slots: /// Reloads hats using the DataManager. void loadHats(); - - QVariant data(const QModelIndex &index, int role) const; - protected: - QVector > hats; }; #endif // HEDGEWARS_HATMODEL_H diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/model/MapModel.cpp --- a/QTfrontend/model/MapModel.cpp Sun Nov 18 01:06:01 2012 +0400 +++ b/QTfrontend/model/MapModel.cpp Fri Feb 22 05:05:32 2013 +0100 @@ -21,10 +21,18 @@ * @brief MapModel class implementation */ -#include "MapModel.h" +#include +#include "physfs.h" +#include "MapModel.h" +#include "HWApplication.h" +#include "hwconsts.h" -void MapModel::loadMaps() +MapModel::MapInfo MapModel::MapInfoRandom = {MapModel::GeneratedMap, "+rnd+", "", 0, "", "", ""}; +MapModel::MapInfo MapModel::MapInfoMaze = {MapModel::GeneratedMaze, "+maze+", "", 0, "", "", ""}; +MapModel::MapInfo MapModel::MapInfoDrawn = {MapModel::HandDrawnMap, "+drawn+", "", 0, "", "", ""}; + +void MapModel::loadMaps(MapType maptype) { // this method resets the contents of this model (important to know for views). beginResetModel(); @@ -39,32 +47,18 @@ // empty list, so that we can (re)fill it QStandardItemModel::clear(); - QList genMaps; - QList missionMaps; - QList staticMaps; - - // add generated/handdrawn maps to list - // TODO: icons for these - - genMaps.append( - infoToItem(QIcon(), QComboBox::tr("generated map..."), GeneratedMap, "+rnd+")); - genMaps.append( - infoToItem(QIcon(), QComboBox::tr("generated maze..."), GeneratedMaze, "+maze+")); - genMaps.append( - infoToItem(QIcon(), QComboBox::tr("hand drawn map..."), HandDrawnMap, "+drawn+")); - - // only 2 map relate files are relevant: - // - the cfg file that contains the settings/info of the map - // - the lua file - if it exists it's a mission, otherwise it isn't - QFile mapLuaFile; - QFile mapCfgFile; + //QList staticMaps; + //QList missionMaps; + QList mapList; // add mission/static maps to lists foreach (QString map, maps) { - mapCfgFile.setFileName(QString("physfs://Maps/%1/map.cfg").arg(map)); - mapLuaFile.setFileName(QString("physfs://Maps/%1/map.lua").arg(map)); - + // only 2 map relate files are relevant: + // - the cfg file that contains the settings/info of the map + // - the lua file - if it exists it's a mission, otherwise it isn't + QFile mapLuaFile(QString("physfs://Maps/%1/map.lua").arg(map)); + QFile mapCfgFile(QString("physfs://Maps/%1/map.cfg").arg(map)); if (mapCfgFile.open(QFile::ReadOnly)) { @@ -73,25 +67,43 @@ quint32 limit = 0; QString scheme; QString weapons; + QString desc; + bool dlc; + // if there is a lua file for this map, then it's a mission bool isMission = mapLuaFile.exists(); - MapType type = isMission?MissionMap:StaticMap; + MapType type = isMission ? MissionMap : StaticMap; + + // if we're supposed to ignore this type, continue + if (type != maptype) continue; // load map info from file QTextStream input(&mapCfgFile); - input >> theme; - input >> limit; + theme = input.readLine(); + limit = input.readLine().toInt(); if (isMission) { // scheme and weapons are only relevant for missions - input >> scheme; - input >> weapons; + scheme = input.readLine(); + weapons = input.readLine(); } mapCfgFile.close(); + // load description (if applicable) + if (isMission) + { + QString locale = HWApplication::keyboardInputLocale().name(); + + QSettings descSettings(QString("physfs://Maps/%1/desc.txt").arg(map), QSettings::IniFormat); + desc = descSettings.value(locale, QString()).toString().replace("|", "\n").replace("\\,", ","); + } + + // detect if map is dlc + QString mapDir = PHYSFS_getRealDir(QString("Maps/%1/map.cfg").arg(map).toLocal8Bit().data()); + dlc = !mapDir.startsWith(datadir->absolutePath()); + // let's use some semi-sane hedgehog limit, rather than none if (limit == 0) limit = 18; - // the default scheme/weaponset for missions. // if empty we assume the map sets these internally -> locked if (isMission) @@ -107,97 +119,54 @@ weapons.replace("_", " "); } - // add a mission caption prefix to missions - if (isMission) - { - // TODO: icon - caption = QComboBox::tr("Mission") + ": " + map; - } - else - caption = map; + // caption + caption = map; // we know everything there is about the map, let's get am item for it - QStandardItem * item = infoToItem( - QIcon(), caption, type, map, theme, limit, scheme, weapons); + QStandardItem * item = MapModel::infoToItem( + QIcon(), caption, type, map, theme, limit, scheme, weapons, desc, dlc); // append item to the list - if (isMission) - missionMaps.append(item); - else - staticMaps.append(item); - + mapList.append(item); } } - - // define a separator item - QStandardItem separator("---"); - separator.setData(QLatin1String("separator"), Qt::AccessibleDescriptionRole); - separator.setFlags(separator.flags() & ~( Qt::ItemIsEnabled | Qt::ItemIsSelectable ) ); - - // create list: - // generated+handdrawn maps, 2 saperators, missions, 1 separator, static maps - QList items; - items.append(genMaps); - items.append(separator.clone()); - items.append(separator.clone()); - items.append(missionMaps); - items.append(separator.clone()); - items.append(staticMaps); - - - // create row-index lookup table + // Create column-index lookup table m_mapIndexes.clear(); - int count = items.size(); + int count = mapList.size(); for (int i = 0; i < count; i++) { - QStandardItem * si = items.at(i); + QStandardItem * si = mapList.at(i); QVariant v = si->data(Qt::UserRole + 1); if (v.canConvert()) m_mapIndexes.insert(v.value().name, i); } - - // store start-index and count of relevant types - - m_typeLoc.insert(GeneratedMap, QPair(0, 1)); - m_typeLoc.insert(GeneratedMaze, QPair(1, 1)); - m_typeLoc.insert(HandDrawnMap, QPair(2, 1)); - // mission maps - int startIdx = genMaps.size() + 2; // start after genMaps and 2 separators - count = missionMaps.size(); - m_typeLoc.insert(MissionMap, QPair(startIdx, count)); - // static maps - startIdx += count + 1; // start after missions and 2 separators - count = staticMaps.size(); - m_typeLoc.insert(StaticMap, QPair(startIdx, count)); - - // store list contents in the item model - QStandardItemModel::appendColumn(items); - + QStandardItemModel::appendColumn(mapList); endResetModel(); } - -int MapModel::randomMap(MapType type) const +bool MapModel::mapExists(const QString & map) const { - // return a random index for this type or -1 if none available - QPair loc = m_typeLoc.value(type, QPair(-1,0)); - - int startIdx = loc.first; - int count = loc.second; - - if (count < 1) - return -1; - else - return startIdx + (rand() % count); + return findMap(map) >= 0; } +int MapModel::findMap(const QString & map) const +{ + return m_mapIndexes.value(map, -1); +} + +QStandardItem * MapModel::getMap(const QString & map) +{ + int loc = findMap(map); + if (loc < 0) return NULL; + return item(loc); +} QStandardItem * MapModel::infoToItem( const QIcon & icon, @@ -207,10 +176,11 @@ QString theme, quint32 limit, QString scheme, - QString weapons) -const + QString weapons, + QString desc, + bool dlc) { - QStandardItem * item = new QStandardItem(icon, caption); + QStandardItem * item = new QStandardItem(icon, (dlc ? "*" : "") + caption); MapInfo mapInfo; QVariant qvar(QVariant::UserType); @@ -220,17 +190,11 @@ mapInfo.limit = limit; mapInfo.scheme = scheme; mapInfo.weapons = weapons; - + mapInfo.desc = desc.isEmpty() ? tr("No description available.") : desc; + mapInfo.dlc = dlc; qvar.setValue(mapInfo); item->setData(qvar, Qt::UserRole + 1); return item; } - - -int MapModel::indexOf(const QString & map) const -{ - return m_mapIndexes.value(map, -1); -} - diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/model/MapModel.h --- a/QTfrontend/model/MapModel.h Sun Nov 18 01:06:01 2012 +0400 +++ b/QTfrontend/model/MapModel.h Fri Feb 22 05:05:32 2013 +0100 @@ -63,32 +63,50 @@ quint32 limit; ///< The maximum allowed number of hedgehogs. QString scheme; ///< Default scheme name or "locked", for mission-maps. QString weapons; ///< Default weaponset name or "locked", for missions-maps. + QString desc; ///< The brief 1-2 sentence description of the mission, for mission-maps. + bool dlc; ///< True if this map was not packaged with the game }; /** - * @brief Returns the row-index of the given map. - * @param map map of which to get the row-index of. - * @return row-index of map or -1 if not available. + * @brief Searches maps in model to find out if one exists + * @param map map of which to check existence + * @return true if it exists */ - int indexOf(const QString & map) const; + bool mapExists(const QString & map) const; + + /** + * @brief Finds a map index (column, row) for a map name + * @param map map of which to find index+column + * @return QPair with column, index, or (-1, -1) if map not found + */ + //QPair findMap(const QString & map) const; /** - * @brief Returns the row-index of a random map with a specified type. - * @param type desired type of map. - * @return row-index of a map with the desired type, -1 if none found. + * @brief Finds a map index for a map name + * @param map map of which to find index + * @return int of index, or -1 if map not found */ - int randomMap(MapType type) const; + int findMap(const QString & map) const; + + /** + * @brief Finds and returns a map item for a map name + * @param map map + * @return QStandardItem of map, or NULL if map not found + */ + QStandardItem * getMap(const QString & map); + + // Static MapInfos for drawn and generated maps + static MapInfo MapInfoRandom, MapInfoMaze, MapInfoDrawn; public slots: /// Reloads the maps using the DataManager. - void loadMaps(); + /// Accepts two map types: StaticMap or MissionMap. + void loadMaps(MapType maptype); private: - /// start-index and map count for each map-type. - QMap > m_typeLoc; - - /// map index lookup table + /// map index lookup table. QPair contains: + //QHash > m_mapIndexes; QHash m_mapIndexes; /** @@ -102,9 +120,10 @@ * @param limit the hedgehog limit of the map. * @param scheme mission map: default scheme name or "locked". * @param weapons mission map: default weaponset name or "locked". + * @param desc mission map: description of mission. * @return pointer to item representing the map info: at Qt::UserRole + 1. */ - QStandardItem * infoToItem( + static QStandardItem * infoToItem( const QIcon & icon, const QString caption, MapType type = Invalid, @@ -112,7 +131,9 @@ QString theme = "", quint32 limit = 0, QString scheme = "", - QString weapons = "") const; + QString weapons = "", + QString desc = "", + bool dlc = false); }; Q_DECLARE_METATYPE(MapModel::MapInfo) diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/model/ThemeModel.cpp --- a/QTfrontend/model/ThemeModel.cpp Sun Nov 18 01:06:01 2012 +0400 +++ b/QTfrontend/model/ThemeModel.cpp Fri Feb 22 05:05:32 2013 +0100 @@ -21,7 +21,9 @@ * @brief ThemeModel class implementation */ +#include "physfs.h" #include "ThemeModel.h" +#include "hwconsts.h" ThemeModel::ThemeModel(QObject *parent) : QAbstractListModel(parent) @@ -51,7 +53,6 @@ { beginResetModel(); - DataManager & datamgr = DataManager::instance(); QStringList themes = @@ -73,17 +74,23 @@ QMap dataset; - // set name - dataset.insert(Qt::DisplayRole, theme); + // detect if theme is dlc + QString themeDir = PHYSFS_getRealDir(QString("Themes/%1/icon.png").arg(theme).toLocal8Bit().data()); + bool isDLC = !themeDir.startsWith(datadir->absolutePath()); + dataset.insert(IsDlcRole, isDLC); - // load and set icon - QIcon icon(iconpath); + // set icon path + dataset.insert(IconPathRole, iconpath); - dataset.insert(Qt::DecorationRole, icon); + // set name + dataset.insert(ActualNameRole, theme); + + // set displayed name + dataset.insert(Qt::DisplayRole, (isDLC ? "*" : "") + theme); // load and set preview icon QIcon preview(QString("physfs://Themes/%1/icon@2x.png").arg(theme)); - dataset.insert(Qt::UserRole, preview); + dataset.insert(Qt::DecorationRole, preview); m_data.append(dataset); } @@ -91,7 +98,3 @@ endResetModel(); } - - - - diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/model/ThemeModel.h --- a/QTfrontend/model/ThemeModel.h Sun Nov 18 01:06:01 2012 +0400 +++ b/QTfrontend/model/ThemeModel.h Fri Feb 22 05:05:32 2013 +0100 @@ -39,6 +39,7 @@ Q_OBJECT public: + enum Roles { ActualNameRole = Qt::UserRole, IsDlcRole, IconPathRole }; explicit ThemeModel(QObject *parent = 0); int rowCount(const QModelIndex &parent = QModelIndex()) const; diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/model/roomslistmodel.cpp --- a/QTfrontend/model/roomslistmodel.cpp Sun Nov 18 01:06:01 2012 +0400 +++ b/QTfrontend/model/roomslistmodel.cpp Fri Feb 22 05:05:32 2013 +0100 @@ -43,7 +43,8 @@ << tr("Rules") << tr("Weapons"); - m_mapModel = DataManager::instance().mapModel(); + m_staticMapModel = DataManager::instance().staticMapModel(); + m_missionMapModel = DataManager::instance().missionMapModel(); } @@ -134,7 +135,8 @@ } // prefix ? if map not available - if ((m_mapModel->indexOf(content) < 0)) + if (!m_staticMapModel->mapExists(content) && + !m_missionMapModel->mapExists(content)) return QString ("? %1").arg(content); } @@ -144,10 +146,14 @@ // dye map names red if map not available if (role == Qt::ForegroundRole) { - if ((m_mapModel->indexOf(content) < 0)) + if (content == "+rnd+" || + content == "+maze+" || + content == "+drawn+" || + m_staticMapModel->mapExists(content) || + m_missionMapModel->mapExists(content)) + return QVariant(); + else return QBrush(QColor("darkred")); - else - return QVariant(); } if (role == Qt::TextAlignmentRole) diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/model/roomslistmodel.h --- a/QTfrontend/model/roomslistmodel.h Sun Nov 18 01:06:01 2012 +0400 +++ b/QTfrontend/model/roomslistmodel.h Fri Feb 22 05:05:32 2013 +0100 @@ -64,7 +64,8 @@ const int c_nColumns; QList m_data; QStringList m_headerData; - MapModel * m_mapModel; + MapModel * m_staticMapModel; + MapModel * m_missionMapModel; QStringList roomInfo2RoomRecord(const QStringList & info); }; diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/net/hwmap.cpp --- a/QTfrontend/net/hwmap.cpp Sun Nov 18 01:06:01 2012 +0400 +++ b/QTfrontend/net/hwmap.cpp Fri Feb 22 05:05:32 2013 +0100 @@ -20,8 +20,8 @@ #include "hwconsts.h" #include "hwmap.h" -HWMap::HWMap() : - TCPBase(false) +HWMap::HWMap(QObject * parent) : + TCPBase(false, parent) { } @@ -29,6 +29,11 @@ { } +bool HWMap::couldBeRemoved() +{ + return !m_hasStarted; +} + void HWMap::getImage(const QString & seed, int filter, MapGenerator mapgen, int maze_size, const QByteArray & drawMapData) { m_seed = seed; @@ -36,15 +41,18 @@ m_mapgen = mapgen; m_maze_size = maze_size; if(mapgen == MAPGEN_DRAWN) m_drawMapData = drawMapData; - Start(); + Start(true); } QStringList HWMap::getArguments() { QStringList arguments; - arguments << cfgdir->absolutePath(); + arguments << "--internal"; + arguments << "--port"; arguments << QString("%1").arg(ipc_port); - arguments << "landpreview"; + arguments << "--user-prefix"; + arguments << cfgdir->absolutePath(); + arguments << "--landpreview"; return arguments; } diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/net/hwmap.h --- a/QTfrontend/net/hwmap.h Sun Nov 18 01:06:01 2012 +0400 +++ b/QTfrontend/net/hwmap.h Fri Feb 22 05:05:32 2013 +0100 @@ -39,9 +39,10 @@ Q_OBJECT public: - HWMap(); + HWMap(QObject *parent = 0); virtual ~HWMap(); void getImage(const QString & seed, int templateFilter, MapGenerator mapgen, int maze_size, const QByteArray & drawMapData); + bool couldBeRemoved(); protected: virtual QStringList getArguments(); diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/net/newnetclient.cpp --- a/QTfrontend/net/newnetclient.cpp Sun Nov 18 01:06:01 2012 +0400 +++ b/QTfrontend/net/newnetclient.cpp Fri Feb 22 05:05:32 2013 +0100 @@ -28,6 +28,8 @@ #include "game.h" #include "roomslistmodel.h" #include "playerslistmodel.h" +#include "servermessages.h" +#include "HWApplication.h" char delimeter='\n'; @@ -241,6 +243,7 @@ { mynick = lst[1]; m_playersModel->setNickname(mynick); + m_nick_registered = false; return ; } @@ -250,7 +253,7 @@ if (lst[0] == "ERROR") { if (lst.size() == 2) - emit Error(lst[1]); + emit Error(HWApplication::translate("server", lst[1].toAscii().constData())); else emit Error("Unknown error"); return; @@ -259,7 +262,7 @@ if (lst[0] == "WARNING") { if (lst.size() == 2) - emit Warning(lst[1]); + emit Warning(HWApplication::translate("server", lst[1].toAscii().constData())); else emit Warning("Unknown warning"); return; @@ -304,6 +307,10 @@ QStringList tmp = lst; tmp.removeFirst(); m_roomsListModel->setRoomsList(tmp); + if (m_nick_registered == false) + { + emit NickNotRegistered(mynick); + } return; } @@ -364,6 +371,14 @@ return; } + if (lst[0] == "BANLIST") + { + QStringList tmp = lst; + tmp.removeFirst(); + emit bansList(tmp); + return; + } + if (lst[0] == "CLIENT_FLAGS") { if(lst.size() < 3 || lst[1].size() < 2) @@ -380,11 +395,13 @@ { flags.remove(0, 1); char c = flags[0].toAscii(); + bool inRoom = (netClientState == InRoom || netClientState == InGame); switch(c) { // flag indicating if a player is ready to start a game case 'r': + if(inRoom) foreach (const QString & nick, nicks) { if (nick == mynick) @@ -401,14 +418,16 @@ foreach(const QString & nick, nicks) m_playersModel->setFlag(nick, PlayersListModel::Registered, setFlag); break; - + // flag indicating if a player has engine running case 'g': + if(inRoom) foreach(const QString & nick, nicks) m_playersModel->setFlag(nick, PlayersListModel::InGame, setFlag); break; // flag indicating if a player is the host/master of the room case 'h': + if(inRoom) foreach (const QString & nick, nicks) { if (nick == mynick) @@ -493,9 +512,12 @@ QString roomName = tmp.takeFirst(); m_roomsListModel->updateRoom(roomName, tmp); - // keep track of room name so correct name is displayed when you become room admin + // keep track of room name so correct name is displayed if(myroom == roomName) + { myroom = tmp[1]; + emit roomNameUpdated(myroom); + } return; } @@ -526,7 +548,8 @@ if (lst[0] == "ASKPASSWORD") { - emit AskForPassword(mynick); + emit NickRegistered(mynick); + m_nick_registered = true; return; } @@ -561,10 +584,14 @@ if (lst[1] == "Authentication failed") { emit AuthFailed(); + m_game_connected = false; + Disconnect(); + //omitted 'emit disconnected()', we don't want the error message + return; } m_game_connected = false; Disconnect(); - emit disconnected(lst[1]); + emit disconnected(HWApplication::translate("server", lst[1].toAscii().constData())); return; } @@ -574,6 +601,18 @@ return; } + if(lst[0] == "JOINING") + { + if(lst.size() < 2) + { + qWarning("Net: Bad JOINING message"); + return; + } + + myroom = lst[1]; + emit roomNameUpdated(myroom); + } + if(netClientState == InLobby && lst[0] == "JOINED") { if(lst.size() < 2 || lst[1] != mynick) @@ -617,6 +656,12 @@ return; } + if (lst[0] == "ROUND_FINISHED") + { + emit FromNet(QByteArray("\x01o")); + return; + } + if (lst[0] == "ADD_TEAM") { if(lst.size() != 24) @@ -859,6 +904,26 @@ RawSendNet(QString("BAN%1%2").arg(delimeter).arg(nick)); } +void HWNewNet::banIP(const QString & ip, const QString & reason, int seconds) +{ + RawSendNet(QString("BANIP%1%2%1%3%1%4").arg(delimeter).arg(ip).arg(reason).arg(seconds)); +} + +void HWNewNet::banNick(const QString & nick, const QString & reason, int seconds) +{ + RawSendNet(QString("BANNICK%1%2%1%3%1%4").arg(delimeter).arg(nick).arg(reason).arg(seconds)); +} + +void HWNewNet::getBanList() +{ + RawSendNet(QByteArray("BANLIST")); +} + +void HWNewNet::removeBan(const QString & b) +{ + RawSendNet(QString("UNBAN%1%2").arg(delimeter).arg(b)); +} + void HWNewNet::kickPlayer(const QString & nick) { RawSendNet(QString("KICK%1%2").arg(delimeter).arg(nick)); @@ -878,6 +943,20 @@ } } +void HWNewNet::consoleCommand(const QString & cmd) +{ + RawSendNet(QString("CMD%1%2").arg(delimeter).arg(cmd)); +} + +bool HWNewNet::allPlayersReady() +{ + int ready = 0; + for (int i = 0; i < m_roomPlayersModel->rowCount(); i++) + if (m_roomPlayersModel->index(i, 0).data(PlayersListModel::Ready).toBool()) ready++; + + return (ready == m_roomPlayersModel->rowCount()); +} + void HWNewNet::startGame() { RawSendNet(QString("START_GAME")); diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/net/newnetclient.h --- a/QTfrontend/net/newnetclient.h Sun Nov 18 01:06:01 2012 +0400 +++ b/QTfrontend/net/newnetclient.h Fri Feb 22 05:05:32 2013 +0100 @@ -60,6 +60,7 @@ RoomsListModel * roomsListModel(); QAbstractItemModel * lobbyPlayersModel(); QAbstractItemModel * roomPlayersModel(); + bool allPlayersReady(); private: bool isChief; @@ -69,6 +70,7 @@ QTcpSocket NetSocket; QString seed; bool m_game_connected; + bool m_nick_registered; RoomsListModel * m_roomsListModel; PlayersListModel * m_playersModel; QSortFilterProxyModel * m_lobbyPlayersModel; @@ -90,7 +92,8 @@ void disconnected(const QString & reason); void Error(const QString & errmsg); void Warning(const QString & wrnmsg); - void AskForPassword(const QString & nick); + void NickRegistered(const QString & nick); + void NickNotRegistered(const QString & nick); void NickTaken(const QString & nick); void AuthFailed(); void EnteredGame(); @@ -102,6 +105,7 @@ void FromNet(const QByteArray & buf); void adminAccess(bool); void roomMaster(bool); + void roomNameUpdated(const QString & name); void netSchemeConfig(QStringList &); void paramChanged(const QString & param, const QStringList & value); @@ -123,6 +127,7 @@ void serverMessageNew(const QString &); void serverMessageOld(const QString &); void latestProtocolVar(int); + void bansList(const QStringList &); void setMyReadyStatus(bool isReady); @@ -152,11 +157,16 @@ void kickPlayer(const QString &); void infoPlayer(const QString &); void followPlayer(const QString &); + void consoleCommand(const QString &); void startGame(); void toggleRestrictJoins(); void toggleRestrictTeamAdds(); void partRoom(); void clearAccountsCache(); + void getBanList(); + void removeBan(const QString &); + void banIP(const QString & ip, const QString & reason, int seconds); + void banNick(const QString & nick, const QString & reason, int seconds); private slots: void ClientRead(); diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/net/recorder.cpp --- a/QTfrontend/net/recorder.cpp Sun Nov 18 01:06:01 2012 +0400 +++ b/QTfrontend/net/recorder.cpp Fri Feb 22 05:05:32 2013 +0100 @@ -47,7 +47,7 @@ if (queue.empty()) numRecorders--; else - queue.takeFirst()->Start(); + queue.takeFirst()->Start(false); } void HWRecorder::onClientDisconnect() @@ -89,7 +89,7 @@ if (numRecorders < maxRecorders) { numRecorders++; - Start(); // run engine + Start(false); // run engine } else queue.push_back(this); @@ -99,29 +99,44 @@ { QStringList arguments; QRect resolution = config->rec_Resolution(); - arguments << cfgdir->absolutePath(); - arguments << QString::number(resolution.width()); - arguments << QString::number(resolution.height()); - arguments << "32"; // bpp + QString nick = config->netNick().toUtf8().toBase64(); + + arguments << "--internal"; + arguments << "--port"; arguments << QString("%1").arg(ipc_port); - arguments << "0"; // fullscreen - arguments << "0"; // sound - arguments << "0"; // music - arguments << "0"; // sound volume + arguments << "--prefix"; + arguments << datadir->absolutePath(); + arguments << "--user-prefix"; + arguments << cfgdir->absolutePath(); + arguments << "--locale"; + arguments << HWGame::tr("en.txt"); + arguments << "--frame-interval"; arguments << QString::number(config->timerInterval()); - arguments << datadir->absolutePath(); - arguments << "0"; // fps - arguments << (config->isAltDamageEnabled() ? "1" : "0"); - arguments << config->netNick().toUtf8().toBase64(); + arguments << "--width"; + arguments << QString::number(resolution.width()); + arguments << "--height"; + arguments << QString::number(resolution.height()); + arguments << "--nosound"; + arguments << "--raw-quality"; arguments << QString::number(config->translateQuality()); + arguments << "--stereo"; arguments << QString::number(config->stereoMode()); - arguments << HWGame::tr("en.txt"); - arguments << QString::number(config->rec_Framerate()); // framerate numerator - arguments << "1"; // framerate denominator + arguments << "--nomusic"; + arguments << "--volume"; + arguments << "0"; + if (config->isAltDamageEnabled()) + arguments << "--altdmg"; + if (!nick.isEmpty()) { + arguments << "--nick"; + arguments << nick; + } + arguments << "--recorder"; + arguments << QString::number(config->rec_Framerate()); //cVideoFramerateNum + arguments << "1"; //cVideoFramerateDen arguments << prefix; arguments << config->AVFormat(); arguments << config->videoCodec(); -// Could use a field to use quality instead. maybe quality could override bitrate - or just pass (and set) both. +// Could use a field to use quality instead. maybe quality could override bitrate - or just pass (and set) both. // The library does support using both at once after all. arguments << QString::number(config->rec_Bitrate()*1024); arguments << (config->recordAudio() ? config->audioCodec() : "no"); diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/net/tcpBase.cpp --- a/QTfrontend/net/tcpBase.cpp Sun Nov 18 01:06:01 2012 +0400 +++ b/QTfrontend/net/tcpBase.cpp Fri Feb 22 05:05:32 2013 +0100 @@ -23,19 +23,63 @@ #include #include #include +#include #include "hwconsts.h" +#ifdef HWLIBRARY +extern "C" void Game(char**arguments); +extern "C" void GenLandPreview(int port); + + +EngineInstance::EngineInstance(QObject *parent) + : QObject(parent) +{ + port = 0; +} + +EngineInstance::~EngineInstance() +{ +} + +void EngineInstance::start() +{ +#if 0 + char *args[11]; + args[0] = "65000"; //ipcPort + args[1] = "1024"; //cScreenWidth + args[2] = "768"; //cScreenHeight + args[3] = "0"; //cReducedQuality + args[4] = "en.txt"; //cLocaleFName + args[5] = "koda"; //UserNick + args[6] = "1"; //SetSound + args[7] = "1"; //SetMusic + args[8] = "0"; //cAltDamage + args[9]= datadir->absolutePath().toAscii().data(); //cPathPrefix + args[10]= NULL; //recordFileName + Game(args); +#endif + GenLandPreview(port); +} + +#endif + QList srvsList; QPointer TCPBase::IPCServer(0); TCPBase::~TCPBase() { + // make sure this object is not in the server list anymore + srvsList.removeOne(this); + if (IPCSocket) IPCSocket->deleteLater(); + } -TCPBase::TCPBase(bool demoMode) : +TCPBase::TCPBase(bool demoMode, QObject *parent) : + QObject(parent), + m_hasStarted(false), m_isDemoMode(demoMode), IPCSocket(0) { @@ -55,6 +99,7 @@ exit(0); // FIXME - should be graceful exit here (lower Critical -> Warning above when implemented) } } + ipc_port=IPCServer->serverPort(); } @@ -71,9 +116,6 @@ connect(IPCSocket, SIGNAL(disconnected()), this, SLOT(ClientDisconnect())); connect(IPCSocket, SIGNAL(readyRead()), this, SLOT(ClientRead())); SendToClientFirst(); - - if(srvsList.size()==1) srvsList.pop_front(); - emit isReadyNow(); } void TCPBase::RealStart() @@ -81,15 +123,31 @@ connect(IPCServer, SIGNAL(newConnection()), this, SLOT(NewConnection())); IPCSocket = 0; +#ifdef HWLIBRARY + QThread *thread = new QThread; + EngineInstance *instance = new EngineInstance; + instance->port = IPCServer->serverPort(); + + instance->moveToThread(thread); + + connect(thread, SIGNAL(started()), instance, SLOT(start(void))); + connect(instance, SIGNAL(finished()), thread, SLOT(quit())); + connect(instance, SIGNAL(finished()), instance, SLOT(deleteLater())); + connect(instance, SIGNAL(finished()), thread, SLOT(deleteLater())); + thread->start(); +#else QProcess * process; - process = new QProcess; + process = new QProcess(); connect(process, SIGNAL(error(QProcess::ProcessError)), this, SLOT(StartProcessError(QProcess::ProcessError))); QStringList arguments=getArguments(); // redirect everything written on stdout/stderr if(isDevBuild) process->setProcessChannelMode(QProcess::ForwardedChannels); + process->start(bindir->absolutePath() + "/hwengine", arguments); +#endif + m_hasStarted = true; } void TCPBase::ClientDisconnect() @@ -97,13 +155,9 @@ disconnect(IPCSocket, SIGNAL(readyRead()), this, SLOT(ClientRead())); onClientDisconnect(); - /* if(srvsList.size()==1) srvsList.pop_front(); - emit isReadyNow();*/ + emit isReadyNow(); IPCSocket->deleteLater(); - // make sure this object is not in the server list anymore - srvsList.removeOne(this); - deleteLater(); } @@ -130,25 +184,34 @@ void TCPBase::tcpServerReady() { - disconnect(srvsList.takeFirst(), SIGNAL(isReadyNow()), this, SLOT(tcpServerReady())); + disconnect(srvsList.first(), SIGNAL(isReadyNow()), this, SLOT(tcpServerReady())); RealStart(); } -void TCPBase::Start() +void TCPBase::Start(bool couldCancelPreviousRequest) { if(srvsList.isEmpty()) { srvsList.push_back(this); + RealStart(); } else { - connect(srvsList.back(), SIGNAL(isReadyNow()), this, SLOT(tcpServerReady())); - srvsList.push_back(this); - return; + TCPBase * last = srvsList.last(); + if(couldCancelPreviousRequest + && last->couldBeRemoved() + && (last->parent() == parent())) + { + srvsList.removeLast(); + last->deleteLater(); + Start(couldCancelPreviousRequest); + } else + { + connect(srvsList.last(), SIGNAL(isReadyNow()), this, SLOT(tcpServerReady())); + srvsList.push_back(this); + } } - - RealStart(); } void TCPBase::onClientRead() @@ -191,3 +254,8 @@ } } } + +bool TCPBase::couldBeRemoved() +{ + return false; +} diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/net/tcpBase.h --- a/QTfrontend/net/tcpBase.h Sun Nov 18 01:06:01 2012 +0400 +++ b/QTfrontend/net/tcpBase.h Fri Feb 22 05:05:32 2013 +0100 @@ -38,16 +38,19 @@ Q_OBJECT public: - TCPBase(bool demoMode); + TCPBase(bool demoMode, QObject * parent = 0); virtual ~TCPBase(); + virtual bool couldBeRemoved(); + signals: void isReadyNow(); protected: + bool m_hasStarted; quint16 ipc_port; - void Start(); + void Start(bool couldCancelPreviousRequest); QByteArray readbuffer; @@ -78,4 +81,21 @@ void tcpServerReady(); }; +#ifdef HWLIBRARY +class EngineInstance : public QObject +{ + Q_OBJECT +public: + EngineInstance(QObject *parent = 0); + ~EngineInstance(); + + int port; +public slots: + void start(void); +signals: + void finished(void); +private: +}; +#endif + #endif // _TCPBASE_INCLUDED diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/res/NetworkPlayDisabled.png Binary file QTfrontend/res/NetworkPlayDisabled.png has changed diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/res/Start.png Binary file QTfrontend/res/Start.png has changed diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/res/audio.png Binary file QTfrontend/res/audio.png has changed diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/res/camera.png Binary file QTfrontend/res/camera.png has changed diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/res/css/christmas.css --- a/QTfrontend/res/css/christmas.css Sun Nov 18 01:06:01 2012 +0400 +++ b/QTfrontend/res/css/christmas.css Fri Feb 22 05:05:32 2013 +0100 @@ -21,7 +21,7 @@ background-image: url(":/res/BackgroundChristmas.png"); background-position: bottom center; background-repeat: repeat-x; -background-color: #141250; +background-color: #0c0f28; } * { diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/res/css/qt.css --- a/QTfrontend/res/css/qt.css Sun Nov 18 01:06:01 2012 +0400 +++ b/QTfrontend/res/css/qt.css Fri Feb 22 05:05:32 2013 +0100 @@ -33,7 +33,7 @@ a { color:#c8c8ff; } QLineEdit, QListWidget, QListView, QTableView, QTextBrowser, QSpinBox, QComboBox, -QComboBox QAbstractItemView, QPlainTextEdit, QMenu::item { +QComboBox QAbstractItemView, QPlainTextEdit, QMenu::item, #labelLikeLineEdit { background-color: rgba(13, 5, 68, 70%); } @@ -44,8 +44,8 @@ QPushButton, QListWidget, QListView, QTableView, QLineEdit, QHeaderView, QTextBrowser, QSpinBox, QToolBox, QComboBox, QPlainTextEdit, QComboBox QAbstractItemView, IconedGroupBox, -.QGroupBox, GameCFGWidget, TeamSelWidget, SelWeaponWidget, -QTabWidget::pane, QTabBar::tab { +.QGroupBox, #gameStackContainer, TeamSelWidget, SelWeaponWidget, +QTabWidget::pane, QTabBar::tab, #mapPreview, #labelLikeLineEdit { border: solid; border-width: 3px; border-color: #ffcc00; @@ -56,14 +56,30 @@ border-color: yellow; } +QToolButton { +background-color: #11084A; +} + +QToolButton:hover { +background-color: #150A61; +} + +QToolButton:pressed { +background-color: #100744; +} + QLineEdit, QListWidget, QListView, QTableView, QTextBrowser, -QSpinBox, QToolBox, QPlainTextEdit { +QSpinBox, QToolBox, QPlainTextEdit, QToolButton, #mapPreview, #labelLikeLineEdit { border-radius: 10px; } +#mapPreview { +background-color: #0d0544; +} + QLineEdit, QLabel, QHeaderView, QListWidget, QListView, QTableView, QSpinBox, QToolBox::tab, QComboBox, QComboBox QAbstractItemView, -IconedGroupBox, .QGroupBox, GameCFGWidget, TeamSelWidget, +IconedGroupBox, .QGroupBox, #gameStackContainer, TeamSelWidget, SelWeaponWidget, QCheckBox, QRadioButton, QPushButton, QPlainTextEdit { font: bold 13px; } @@ -72,7 +88,7 @@ background-repeat: repeat-x; background-color: #000000; } -.QGroupBox,GameCFGWidget,TeamSelWidget,SelWeaponWidget { +.QGroupBox, #gameStackContainer, TeamSelWidget, SelWeaponWidget { background-position: bottom center; background-repeat: repeat-x; border-radius: 16px; @@ -89,6 +105,18 @@ background-color: #130f2c; } +QTabWidget::pane { +border-radius: 8px; +border-top-left-radius: 0px; +} + +QLineEdit:disabled, QSpinBox:disabled { +border-color: gray; +} + +GameCFGWidget { +border: none; +} QPushButton { border-radius: 8px; @@ -97,7 +125,7 @@ background-color: rgba(18, 42, 5, 70%); } -QPushButton:pressed{ +QPushButton:pressed, QToolButton:pressed { border-color: white; } @@ -105,7 +133,6 @@ outline: none; } - QHeaderView { border-radius: 0; border-width: 0; @@ -241,9 +268,62 @@ QSlider::handle::horizontal { border: 0px; -margin: -2px 0px; +margin: -8px 0px; +background-color: #ffcc00; +width: 12px; +height: 6px; border-radius: 3px; -background-color: #ffcc00; -width: 8px; +} + +HatButton, ThemeButton { +text-align: left; +} + +#hatList, #hatList:hover, #themeList, #themeList:hover { +border-color: #F6CB1C; +} + +#hatList QScrollBar, #themeList QScrollBar { +background-color: #130F2A; +border-top-right-radius: 10px; +border-bottom-right-radius: 10px; +} + +#hatList, #themeList { +border-color: #F6CB1C; +border-width: 3px; +border-style: solid; +border-radius: 10px; +border-top-left-radius: 0px; } +#hatList::item, #themeList::item { +background-color: #11084A; +padding: 4px; +border-radius: 10px; +color: #ffcc00 !important; +font: 8px; +border-width: 2px; +border-color: #11084A; +} + +#hatList::item:hover, #themeList::item:hover { +background-color: #150A61; +} + +#hatList::item:selected, #themeList::item:selected { +background-color: #150A61; +} + +QDialogButtonBox QPushButton { +padding: 3px 5px; +} + +#gameCfgWidgetTabs { +border-radius: 16px; +border-top-left-radius: 0px; +} + +TeamSelWidget, #gameStackContainer, #GBoxOptions { +border-radius: 10px; +} \ No newline at end of file diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/res/html/about.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/QTfrontend/res/html/about.html Fri Feb 22 05:05:32 2013 +0100 @@ -0,0 +1,98 @@ + + + +Hedgewars - Authors + + + + +

Developers:

+

+ Engine, frontend, net server: Andrey Korotaev <unC0Rr@gmail.com>
+ Many frontend improvements: Igor Ulyanov <disinbox@gmail.com>
+ Many engine and frontend improvements: Derek Pomery <nemo@m8y.org>
+ Drill rocket, Ballgun, RC Plane weapons: Martin Boze <afffect@gmail.com>
+ Mine number and time game settings: David A. Cuadrado <krawek@gmail.com>
+ Frontend improvements: Martin Minarik <ttsmj@pokec.sk>
+ Frontend improvements: Kristian Lehmann <email@thexception.net>
+ Mac OS X/iPhone port, OpenGL-ES conversion: Vittorio Giovara <vittorio.giovara@gmail.com>
+ Many engine and frontend improvements (and bugs): Richard Karolyi <sheepluva@ercatec.net>
+ Gamepad and Lua integration: Mario Liebisch <mario.liebisch@gmail.com>
+ Many engine improvements and graphics: Carlos Vives <mail@carlosvives.es>
+ Maze maps: Henning Kühn <prg@cooco.de>
+ Engine and frontend improvements: Henrik Rostedt <henrik.rostedt@gmail.com>
+ Lua game modes and missions: John Lambert <redgrinner@gmail.com>
+ Frontend improvements: Mayur Pawashe <zorgiepoo@gmail.com>
+ Android port: Richard Deurwaarder <xeli@xelification.com>
+ Android netplay, portability abstraction: Simeon Maxein <smaxein@googlemail.com>
+ WebGL port, some pas2c and GLES2 work: Meng Xiangyun <xymengxy@gmail.com>
+ Video recording: Stepan Podoskin <stepik-777@mail.ru>
+ Campaign support, first campaign: Szabolcs Orbàn <szabibibi@gmail.com>
+ Keybinds, feedback, maps and hats interfaces: Drew Gottlieb <gottlieb.drew@gmail.com>
+ Login dialogs, frontend improvements: Ondrej Skopek <skopekondrej@gmail.com>
+

+ +

Art:

+

John Dum <fizzy@gmail.com> +
+ Joshua Frese <joshfrese@gmail.com> +
+ Stanko Tadić <stanko@mfhinc.net> +
+ Julien Koesten <julienkoesten@aol.com> +
+ Joshua O'Sullivan <coheedftw@hotmail.co.uk> +
+ Nils Lück <nils.luck.design@gmail.com> +
+ Guillaume Englert <genglert@hybird.org> +
+ Hats: Trey Perry <tx.perry.j@gmail.com> +

+ +

Sounds:

+

+ Hedgehogs voice: Stephen Alexander <ArmagonNo1@gmail.com> +
+ John Dum <fizzy@gmail.com> +
+ Jonatan Nilsson <jonatanfan@gmail.com> +
+ Daniel Martin <elhombresinremedio@gmail.com> +

+ +

Translations:

+ Brazilian Portuguese: Romulo Fernandes Machado <abra185@gmail.com>
+ Bulgarian: Svetoslav Stefanov
+ Czech: Petr Řezáček <rezacek@gmail.com>
+ Chinese: Jie Luo <lililjlj@gmail.com>
+ English: Andrey Korotaev <unC0Rr@gmail.com>
+ Finnish: Nina Kuisma <ninnnu@gmail.com>
+ French: Antoine Turmel <geekshadow@gmail.com>, Clement Woitrain <sphrixclement@gmail.com>
+ German: Peter Hüwe <PeterHuewe@gmx.de>, Mario Liebisch <mario.liebisch@gmail.com>, Richard Karolyi <sheepluva@ercatec.net>
+ Greek: <talos_kriti@yahoo.gr>
+ Italian: Luca Bonora <bonora.luca@gmail.com>, Marco Bresciani
+ Japanese: ADAM Etienne <etienne.adam@gmail.com>
+ Korean: Anthony Bellew <anthonyreflected@gmail.com>
+ Lithuanian: Lukas Urbonas <lukasu08@gmail.com>
+ Polish: Maciej Mroziński <mynick2@o2.pl>, Wojciech Latkowski <magik17l@gmail.com>, Piotr Mitana, Maciej Górny
+ Portuguese: Fábio Canário <inufabie@gmail.com>
+ Russian: Andrey Korotaev <unC0Rr@gmail.com>
+ Slovak: Jose Riha
+ Spanish: Carlos Vives <mail@carlosvives.es>
+ Swedish: Niklas Grahn <raewolusjoon@yaoo.com>, Henrik Rostedt <henrik.rostedt@gmail.com>
+ Ukrainian: Eugene V. Lyubimkin <jackyf.devel@gmail.com>, Igor Paliychuk <mansonigor@gmail.com>, Eugene Sakara <eresid@gmail.com> +

+ +

Special thanks:

+ Aleksey Andreev <blaknayabr@gmail.com>
+ Aleksander Rudalev <alexv@pomorsu.ru>
+ Natasha Korotaeva <layout@pisem.net>
+ Adam Higerd (aka ahigerd at FreeNode) +

+ + diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/res/inverse-corner-bl.png Binary file QTfrontend/res/inverse-corner-bl.png has changed diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/res/splash.png Binary file QTfrontend/res/splash.png has changed diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/res/xml/tips.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/QTfrontend/res/xml/tips.xml Fri Feb 22 05:05:32 2013 +0100 @@ -0,0 +1,61 @@ +# This is not xml actually, but it looks and behaves like it. +# Including an xml library would need too much resources. +# Tips between the platform specific tags are shown only on those platforms. +# Do not escape characters or use the CDATA tag. + + Simply pick the same color as a friend to play together as a team. Each of you will still control his or her own hedgehogs but they'll win or lose together. + Some weapons might do only low damage but they can be a lot more devastating in the right situation. Try to use the Desert Eagle to knock multiple hedgehogs into the water. + If you're unsure what to do and don't want to waste ammo, skip one round. But don't let too much time pass as there will be Sudden Death! + Want to save ropes? Release the rope in mid air and then shoot again. As long as you don't touch the ground or miss a shot you'll reuse your rope without wasting ammo! + If you'd like to keep others from using your preferred nickname on the official server, register an account at http://www.hedgewars.org/. + You're bored of default gameplay? Try one of the missions - they'll offer different gameplay depending on the one you picked. + By default the game will always record the last game played as a demo. Select 'Local Game' and pick the 'Demos' button on the lower right corner to play or manage them. + Hedgewars is free software (Open Source) we create in our spare time. If you've got problems, ask on our forums or visit our IRC room! + Hedgewars is free software (Open Source) we create in our spare time. If you like it, help us with a small donation or contribute your own work! + Hedgewars is free software (Open Source) we create in our spare time. Share it with your family and friends as you like! + Hedgewars is free software (Open Source) we create in our spare time, just for fun! Meet the devs in #hedgewars! + From time to time there will be official tournaments. Upcoming events will be announced at http://www.hedgewars.org/ some days in advance. + Hedgewars is available in many languages. If the translation in your language seems to be missing or outdated, feel free to contact us! + Hedgewars can be run on lots of different operating systems including Microsoft Windows, Mac OS X and GNU/Linux. + Always remember you're able to set up your own games in local and network/online play. You're not restricted to the 'Simple Game' option. + Connect one or more gamepads before starting the game to be able to assign their controls to your teams. + Create an account on http://www.hedgewars.org/ to keep others from using your most favourite nickname while playing on the official server. + While playing you should give yourself a short break at least once an hour. + If your graphics card isn't able to provide hardware accelerated OpenGL, try to enable the low quality mode to improve performance. + If your graphics card isn't able to provide hardware accelerated OpenGL, try to update the associated drivers. + We're open to suggestions and constructive feedback. If you don't like something or got a great idea, let us know! + Especially while playing online be polite and always remember there might be some minors playing with or against you as well! + Special game modes such as 'Vampirism' or 'Karma' allow you to develop completely new tactics. Try them in a custom game! + You should never install Hedgewars on computers you don't own (school, university, work, etc.). Please ask the responsible person instead! + Hedgewars can be perfect for short games during breaks. Just ensure you don't add too many hedgehogs or use an huge map. Reducing time and health might help as well. + No hedgehogs were harmed in making this game. + There are three different jumps available. Tap [high jump] twice to do a very high/backwards jump. + Afraid of falling off a cliff? Hold down [precise] to turn [left] or [right] without actually moving. + Some weapons require special strategies or just lots of training, so don't give up on a particular tool if you miss an enemy once. + Most weapons won't work once they touch the water. The Homing Bee as well as the Cake are exceptions to this. + The Old Limbuger only causes a small explosion. However the wind affected smelly cloud can poison lots of hogs at once. + The Piano Strike is the most damaging air strike. You'll lose the hedgehog performing it, so there's a huge downside as well. + The Homing Bee can be tricky to use. Its turn radius depends on its velocity, so try to not use full power. + Sticky Mines are a perfect tool to create small chain reactions knocking enemy hedgehogs into dire situations ... or water. + The Hammer is most effective when used on bridges or girders. Hit hogs will just break through the ground. + If you're stuck behind an enemy hedgehog, use the Hammer to free yourself without getting damaged by an explosion. + The Cake's maximum walking distance depends on the ground it has to pass. Use [attack] to detonate it early. + The Flame Thrower is a weapon but it can be used for tunnel digging as well. + Use the Molotov or Flame Thrower to temporary keep hedgehogs from passing terrain such as tunnels or platforms. + Want to know who's behind the game? Click on the Hedgewars logo in the main menu to see the credits. + Like Hedgewars? Become a fan on Facebook or follow us on Twitter + Feel free to draw your own graves, hats, flags or even maps and themes! But note that you'll have to share them somewhere to use them online. + Keep your video card drivers up to date to avoid issues playing the game. + You're able to associate Hedgewars related files (savegames and demo recordings) with the game to launch them right from your favorite file or internet browser. + + The version of Hedgewars supports Xfire. Make sure to add Hedgewars to its game list so your friends can see you playing. + You can find your Hedgewars configuration files under "My Documents\Hedgewars". Create backups or take the files with you, but don't edit them by hand. + + + You can find your Hedgewars configuration files under "Library/Application Support/Hedgewars" in your home directory. Create backups or take the files with you, but don't edit them by hand. + + + lintip + You can find your Hedgewars configuration files under ".hedgewars" in your home directory. Create backups or take the files with you, but don't edit them by hand. + + diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/team.cpp --- a/QTfrontend/team.cpp Sun Nov 18 01:06:01 2012 +0400 +++ b/QTfrontend/team.cpp Fri Feb 22 05:05:32 2013 +0100 @@ -23,10 +23,12 @@ #include #include #include +#include #include "team.h" #include "hwform.h" #include "DataManager.h" +#include "gameuiconfig.h" HWTeam::HWTeam(const QString & teamname) : QObject(0) @@ -50,7 +52,7 @@ { m_binds.append(BindAction()); m_binds[i].action = cbinds[i].action; - m_binds[i].strbind = cbinds[i].strbind; + m_binds[i].strbind = QString(); } m_rounds = 0; m_wins = 0; @@ -110,7 +112,7 @@ { m_binds.append(BindAction()); m_binds[i].action = cbinds[i].action; - m_binds[i].strbind = cbinds[i].strbind; + m_binds[i].strbind = QString(); } m_rounds = 0; m_wins = 0; @@ -169,7 +171,7 @@ bool HWTeam::loadFromFile() { - QSettings teamfile(QString("physfs://config/Teams/%1.hwt").arg(m_name), QSettings::IniFormat, 0); + QSettings teamfile(QString("physfs://Teams/%1.hwt").arg(m_name), QSettings::IniFormat, 0); teamfile.setIniCodec("UTF-8"); m_name = teamfile.value("Team/Name", m_name).toString(); m_grave = teamfile.value("Team/Grave", "Statue").toString(); @@ -191,7 +193,7 @@ m_hedgehogs[i].Suicides = teamfile.value(hh + "Suicides", 0).toInt(); } for(int i = 0; i < BINDS_NUMBER; i++) - m_binds[i].strbind = teamfile.value(QString("Binds/%1").arg(m_binds[i].action), cbinds[i].strbind).toString(); + m_binds[i].strbind = teamfile.value(QString("Binds/%1").arg(m_binds[i].action), QString()).toString(); for(int i = 0; i < MAX_ACHIEVEMENTS; i++) if(achievements[i][0][0]) AchievementProgress[i] = teamfile.value(QString("Achievements/%1").arg(achievements[i][0]), 0).toUInt(); @@ -202,7 +204,7 @@ bool HWTeam::fileExists() { - QFile f(QString("physfs://config/Teams/%1.hwt").arg(m_name)); + QFile f(QString("physfs://Teams/%1.hwt").arg(m_name)); return f.exists(); } @@ -210,7 +212,7 @@ { if(m_isNetTeam) return false; - QFile cfgfile(QString("physfs://config/Teams/%1.hwt").arg(m_name)); + QFile cfgfile(QString("physfs://Teams/%1.hwt").arg(m_name)); cfgfile.remove(); return true; } @@ -219,11 +221,14 @@ { if (OldTeamName != m_name) { - QFile cfgfile(QString("physfs://config/Teams/%1.hwt").arg(OldTeamName)); + QFile cfgfile(QString("physfs://Teams/%1.hwt").arg(OldTeamName)); cfgfile.remove(); OldTeamName = m_name; } - QSettings teamfile(QString("physfs://config/Teams/%1.hwt").arg(m_name), QSettings::IniFormat, 0); + + QString fileName = QString("physfs://Teams/%1.hwt").arg(m_name); + DataManager::ensureFileExists(fileName); + QSettings teamfile(fileName, QSettings::IniFormat, 0); teamfile.setIniCodec("UTF-8"); teamfile.setValue("Team/Name", m_name); teamfile.setValue("Team/Grave", m_grave); @@ -234,6 +239,7 @@ teamfile.setValue("Team/Rounds", m_rounds); teamfile.setValue("Team/Wins", m_wins); teamfile.setValue("Team/CampaignProgress", m_campaignProgress); + for(int i = 0; i < HEDGEHOGS_PER_TEAM; i++) { QString hh = QString("Hedgehog%1/").arg(i); @@ -251,10 +257,11 @@ teamfile.setValue(QString("Achievements/%1").arg(achievements[i][0]), AchievementProgress[i]); else break; + return true; } -QStringList HWTeam::teamGameConfig(quint32 InitHealth) const +QStringList HWTeam::teamGameConfig(quint32 InitHealth, GameUIConfig * config) const { QStringList sl; if (m_isNetTeam) @@ -270,9 +277,15 @@ sl.push_back(QString("eflag " + m_flag)); if (!m_isNetTeam) + { for(int i = 0; i < BINDS_NUMBER; i++) - if(!m_binds[i].strbind.isEmpty()) + { + if(m_binds[i].strbind.isEmpty() || m_binds[i].strbind == "default") + sl.push_back(QString("ebind " + config->bind(i) + " " + m_binds[i].action)); + else sl.push_back(QString("ebind " + m_binds[i].strbind + " " + m_binds[i].action)); + } + } for (int t = 0; t < m_numHedgehogs; t++) { diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/team.h --- a/QTfrontend/team.h Sun Nov 18 01:06:01 2012 +0400 +++ b/QTfrontend/team.h Fri Feb 22 05:05:32 2013 +0100 @@ -93,7 +93,7 @@ void incWins(); // convert team info into strings for further computation - QStringList teamGameConfig(quint32 InitHealth) const; + QStringList teamGameConfig(quint32 InitHealth, GameUIConfig * config) const; // comparison operators bool operator == (const HWTeam& t1) const; diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/ui/dialog/bandialog.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/QTfrontend/ui/dialog/bandialog.cpp Fri Feb 22 05:05:32 2013 +0100 @@ -0,0 +1,89 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include "HWApplication.h" + +#include "bandialog.h" + +BanDialog::BanDialog(QWidget *parent) : + QDialog(parent) +{ + QFormLayout * formLayout = new QFormLayout(this); + + rbIP = new QRadioButton(this); + rbIP->setChecked(true); + rbNick = new QRadioButton(this); + leId = new QLineEdit(this); + leReason = new QLineEdit(this); + cbTime = new QComboBox(this); + + cbTime->addItem(HWApplication::tr("%1 minutes", 0, 10).arg("10"), 5 * 60); + cbTime->addItem(HWApplication::tr("%1 minutes", 0, 30).arg("30"), 10 * 60); + cbTime->addItem(HWApplication::tr("%1 hour", 0, 10).arg("10"), 60 * 60); + cbTime->addItem(HWApplication::tr("%1 hours", 0, 3).arg("3"), 3 * 60 * 60); + cbTime->addItem(HWApplication::tr("%1 hours", 0, 5).arg("5"), 5 * 60 * 60); + cbTime->addItem(HWApplication::tr("%1 hours", 0, 12).arg("12"), 12 * 60 * 60); + cbTime->addItem(HWApplication::tr("%1 day", 0, 1).arg("1"), 24 * 60 * 60); + cbTime->addItem(HWApplication::tr("%1 days", 0, 3).arg("3"), 72 * 60 * 60); + cbTime->addItem(HWApplication::tr("%1 days", 0, 7).arg("7"), 168 * 60 * 60); + cbTime->addItem(HWApplication::tr("%1 days", 0, 14).arg("14"), 336 * 60 * 60); + cbTime->addItem(tr("permanent"), 3650 * 24 * 60 * 60); + cbTime->setCurrentIndex(0); + + formLayout->addRow(tr("IP"), rbIP); + formLayout->addRow(tr("Nick"), rbNick); + formLayout->addRow(tr("IP/Nick"), leId); + formLayout->addRow(tr("Reason"), leReason); + formLayout->addRow(tr("Duration"), cbTime); + + formLayout->setLabelAlignment(Qt::AlignRight); + + QHBoxLayout * hbox = new QHBoxLayout(); + formLayout->addRow(hbox); + QPushButton * btnOk = new QPushButton(tr("Ok"), this); + QPushButton * btnCancel = new QPushButton(tr("Cancel"), this); + hbox->addStretch(); + hbox->addWidget(btnOk); + hbox->addWidget(btnCancel); + + connect(btnOk, SIGNAL(clicked()), this, SLOT(okClicked())); + connect(btnCancel, SIGNAL(clicked()), this, SLOT(reject())); + + this->setWindowModality(Qt::WindowModal); +} + +bool BanDialog::byIP() +{ + return rbIP->isChecked(); +} + +int BanDialog::duration() +{ + return cbTime->itemData(cbTime->currentIndex()).toInt(); +} + +QString BanDialog::banId() +{ + return leId->text(); +} + +QString BanDialog::reason() +{ + return leReason->text().isEmpty() ? tr("you know why") : leReason->text(); +} + +void BanDialog::okClicked() +{ + if(leId->text().isEmpty()) + { + QMessageBox::warning(this, tr("Warning"), tr("Please, specify %1").arg(byIP() ? tr("IP") : tr("nickname"))); + return; + } + + accept(); +} diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/ui/dialog/bandialog.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/QTfrontend/ui/dialog/bandialog.h Fri Feb 22 05:05:32 2013 +0100 @@ -0,0 +1,32 @@ +#ifndef BANDIALOG_H +#define BANDIALOG_H + +#include + +class QComboBox; +class QRadioButton; +class QLineEdit; + +class BanDialog : public QDialog +{ + Q_OBJECT +public: + explicit BanDialog(QWidget *parent = 0); + + bool byIP(); + int duration(); + QString banId(); + QString reason(); + +private: + QRadioButton * rbIP; + QRadioButton * rbNick; + QLineEdit * leId; + QLineEdit * leReason; + QComboBox * cbTime; + +private slots: + void okClicked(); +}; + +#endif // BANDIALOG_H diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/ui/dialog/input_password.cpp --- a/QTfrontend/ui/dialog/input_password.cpp Sun Nov 18 01:06:01 2012 +0400 +++ b/QTfrontend/ui/dialog/input_password.cpp Fri Feb 22 05:05:32 2013 +0100 @@ -25,28 +25,45 @@ #include "input_password.h" -HWPasswordDialog::HWPasswordDialog(QWidget* parent, const QString & label) : QDialog(parent) +HWPasswordDialog::HWPasswordDialog(QWidget* parent) : QDialog(parent) { - setWindowTitle(tr("Password")); + setWindowTitle(tr("Login")); + + QString titleLabelText = "To connect to the server, please log in.\n\nIf you don't have an account on www.hedgewars.org,\njust enter your nickname."; + QString nickLabelText = "Nickname:"; + QString passLabelText = "Password:"; QGridLayout * layout = new QGridLayout(this); - QLabel * lbLabel = new QLabel(this); - lbLabel->setText(label); - layout->addWidget(lbLabel, 0, 0); + QLabel * titleLabel = new QLabel(this); + titleLabel->setText(titleLabelText); + layout->addWidget(titleLabel, 0, 0); + + QLabel * nickLabel = new QLabel(this); + nickLabel->setText(nickLabelText); + layout->addWidget(nickLabel, 1, 0); + + leNickname = new QLineEdit(this); + leNickname->setEchoMode(QLineEdit::Normal); + layout->addWidget(leNickname, 2, 0); + + QLabel * passLabel = new QLabel(this); + passLabel->setText(passLabelText); + layout->addWidget(passLabel, 3, 0); lePassword = new QLineEdit(this); lePassword->setEchoMode(QLineEdit::Password); - layout->addWidget(lePassword, 1, 0); + layout->addWidget(lePassword, 4, 0); cbSave = new QCheckBox(this); cbSave->setText(QCheckBox::tr("Save password")); - layout->addWidget(cbSave, 2, 0); + layout->addWidget(cbSave, 5, 0); QDialogButtonBox* dbbButtons = new QDialogButtonBox(this); + pbNewAccount = dbbButtons->addButton(QString("New Account"), QDialogButtonBox::ActionRole); QPushButton * pbOK = dbbButtons->addButton(QDialogButtonBox::Ok); QPushButton * pbCancel = dbbButtons->addButton(QDialogButtonBox::Cancel); - layout->addWidget(dbbButtons, 3, 0); + layout->addWidget(dbbButtons, 6, 0); connect(pbOK, SIGNAL(clicked()), this, SLOT(accept())); connect(pbCancel, SIGNAL(clicked()), this, SLOT(reject())); diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/ui/dialog/input_password.h --- a/QTfrontend/ui/dialog/input_password.h Sun Nov 18 01:06:01 2012 +0400 +++ b/QTfrontend/ui/dialog/input_password.h Fri Feb 22 05:05:32 2013 +0100 @@ -23,15 +23,18 @@ class QLineEdit; class QCheckBox; +class QPushButton; class HWPasswordDialog : public QDialog { Q_OBJECT public: - HWPasswordDialog(QWidget* parent, const QString & label); + HWPasswordDialog(QWidget* parent); QLineEdit* lePassword; + QLineEdit* leNickname; QCheckBox* cbSave; + QPushButton * pbNewAccount; }; diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/ui/mouseoverfilter.cpp --- a/QTfrontend/ui/mouseoverfilter.cpp Sun Nov 18 01:06:01 2012 +0400 +++ b/QTfrontend/ui/mouseoverfilter.cpp Fri Feb 22 05:05:32 2013 +0100 @@ -39,7 +39,7 @@ QComboBox * droplist = dynamic_cast(dist); QSlider * slider = dynamic_cast(dist); QTabWidget * tab = dynamic_cast(dist); - if (HWForm::config->isFrontendSoundEnabled() && (button || textfield || checkbox || droplist || slider || tab)) + if (button || textfield || checkbox || droplist || slider || tab) { SDLInteraction::instance().playSoundFile("/Sounds/steps.ogg"); } diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/ui/page/AbstractPage.cpp --- a/QTfrontend/ui/page/AbstractPage.cpp Sun Nov 18 01:06:01 2012 +0400 +++ b/QTfrontend/ui/page/AbstractPage.cpp Fri Feb 22 05:05:32 2013 +0100 @@ -25,6 +25,7 @@ #include #include #include +#include #include "qpushbuttonwithsound.h" @@ -39,27 +40,36 @@ void AbstractPage::initPage() { QGridLayout * pageLayout = new QGridLayout(this); + QHBoxLayout * bottomLeftLayout = new QHBoxLayout(); + pageLayout->addLayout(bottomLeftLayout, 1, 0); // stretch grid space for body and footer - pageLayout->setColumnStretch(0,0); - pageLayout->setColumnStretch(1,1); + pageLayout->setColumnStretch(0,1); + pageLayout->setColumnStretch(1,2); + pageLayout->setColumnStretch(2,1); pageLayout->setRowStretch(0,1); pageLayout->setRowStretch(1,0); // add back/exit button btnBack = formattedButton(":/res/Exit.png", true); btnBack->setWhatsThis(tr("Go back")); - pageLayout->addWidget(btnBack, 1, 0, 1, 1, Qt::AlignLeft | Qt::AlignBottom); + bottomLeftLayout->addWidget(btnBack, 0); // add body layout as defined by the subclass pageLayout->addLayout(bodyLayoutDefinition(), 0, 0, 1, 3); + // add left footer layout + QLayout * flld = footerLayoutLeftDefinition(); + if (flld != NULL) + bottomLeftLayout->addLayout(flld, 0); + descLabel = new QLabel(); descLabel->setAlignment(Qt::AlignCenter); descLabel->setWordWrap(true); descLabel->setOpenExternalLinks(true); descLabel->setFixedHeight(50); descLabel->setStyleSheet("font-size: 16px"); + bottomLeftLayout->addWidget(descLabel); pageLayout->addWidget(descLabel, 1, 1); // add footer layout @@ -67,6 +77,8 @@ if (fld != NULL) pageLayout->addLayout(fld, 1, 2); + bottomLeftLayout->addStretch(1); + // connect signals connect(btnBack, SIGNAL(clicked()), this, SIGNAL(goBack())); connectSignals(); @@ -156,3 +168,13 @@ { return defautDesc; } + +void AbstractPage::triggerPageEnter() +{ + emit pageEnter(); +} + +void AbstractPage::triggerPageLeave() +{ + emit pageLeave(); +} diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/ui/page/AbstractPage.h --- a/QTfrontend/ui/page/AbstractPage.h Sun Nov 18 01:06:01 2012 +0400 +++ b/QTfrontend/ui/page/AbstractPage.h Fri Feb 22 05:05:32 2013 +0100 @@ -78,12 +78,35 @@ QString * getDefautDescription(); signals: + /** * @brief This signal is emitted when going back to the previous is * requested - e.g. when the back-button is clicked. */ void goBack(); + /** + * @brief This signal is emitted when the page is displayed + */ + void pageEnter(); + + /** + * @brief This signal is emitted when this page is left + */ + void pageLeave(); + + public slots: + + /** + * @brief This slot is called to trigger this page's pageEnter signal + */ + void triggerPageEnter(); + + /** + * @brief This slot is called to trigger this page's pageLeave signal + */ + void triggerPageLeave(); + protected: /** * @brief Class constructor @@ -121,6 +144,17 @@ * @brief Used during page construction. * You can implement this method in your subclass. * + * Use it to define layout (not behavior) of the page's footer to the left of the help text. + */ + virtual QLayout * footerLayoutLeftDefinition() + { + return NULL; + }; + + /** + * @brief Used during page construction. + * You can implement this method in your subclass. + * * This is a good place to connect signals within your page in order * to get the desired page behavior.
* Keep in mind not to expose twidgets as public! diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/ui/page/pageadmin.cpp --- a/QTfrontend/ui/page/pageadmin.cpp Sun Nov 18 01:06:01 2012 +0400 +++ b/QTfrontend/ui/page/pageadmin.cpp Fri Feb 22 05:05:32 2013 +0100 @@ -22,56 +22,98 @@ #include #include #include +#include +#include #include "pageadmin.h" #include "chatwidget.h" +#include "bandialog.h" QLayout * PageAdmin::bodyLayoutDefinition() { - QGridLayout * pageLayout = new QGridLayout(); - - // 0 - pbAsk = addButton(tr("Fetch data"), pageLayout, 0, 0, 1, 3); + QVBoxLayout * pageLayout = new QVBoxLayout(); - // 1 - QLabel * lblSMN = new QLabel(this); - lblSMN->setText(tr("Server message for latest version:")); - pageLayout->addWidget(lblSMN, 1, 0); + QTabWidget * tabs = new QTabWidget(this); + pageLayout->addWidget(tabs); + QWidget * page1 = new QWidget(this); + QWidget * page2 = new QWidget(this); + tabs->addTab(page1, tr("General")); + tabs->addTab(page2, tr("Bans")); + + // page 1 + { + QGridLayout * tab1Layout = new QGridLayout(page1); + + // 0 + pbAsk = addButton(tr("Fetch data"), tab1Layout, 0, 0, 1, 3); - leServerMessageNew = new QLineEdit(this); - pageLayout->addWidget(leServerMessageNew, 1, 1); + // 1 + QLabel * lblSMN = new QLabel(this); + lblSMN->setText(tr("Server message for latest version:")); + tab1Layout->addWidget(lblSMN, 1, 0); + + leServerMessageNew = new QLineEdit(this); + tab1Layout->addWidget(leServerMessageNew, 1, 1); - // 2 - QLabel * lblSMO = new QLabel(this); - lblSMO->setText(tr("Server message for previous versions:")); - pageLayout->addWidget(lblSMO, 2, 0); + // 2 + QLabel * lblSMO = new QLabel(this); + lblSMO->setText(tr("Server message for previous versions:")); + tab1Layout->addWidget(lblSMO, 2, 0); + + leServerMessageOld = new QLineEdit(this); + tab1Layout->addWidget(leServerMessageOld, 2, 1); - leServerMessageOld = new QLineEdit(this); - pageLayout->addWidget(leServerMessageOld, 2, 1); + // 3 + QLabel * lblP = new QLabel(this); + lblP->setText(tr("Latest version protocol number:")); + tab1Layout->addWidget(lblP, 3, 0); + + sbProtocol = new QSpinBox(this); + tab1Layout->addWidget(sbProtocol, 3, 1); - // 3 - QLabel * lblP = new QLabel(this); - lblP->setText(tr("Latest version protocol number:")); - pageLayout->addWidget(lblP, 3, 0); + // 4 + QLabel * lblPreview = new QLabel(this); + lblPreview->setText(tr("MOTD preview:")); + tab1Layout->addWidget(lblPreview, 4, 0); - sbProtocol = new QSpinBox(this); - pageLayout->addWidget(sbProtocol, 3, 1); + tb = new QTextBrowser(this); + tb->setOpenExternalLinks(true); + tb->document()->setDefaultStyleSheet(HWChatWidget::styleSheet()); + tab1Layout->addWidget(tb, 4, 1, 1, 2); + + // 5 + pbClearAccountsCache = addButton(tr("Clear Accounts Cache"), tab1Layout, 5, 0); + + // 6 + pbSetSM = addButton(tr("Set data"), tab1Layout, 6, 0, 1, 3); + } - // 4 - QLabel * lblPreview = new QLabel(this); - lblPreview->setText(tr("MOTD preview:")); - pageLayout->addWidget(lblPreview, 4, 0); + // page 2 + { + QGridLayout * tab2Layout = new QGridLayout(page2); + twBans = new QTableWidget(this); + twBans->setColumnCount(3); + twBans->setHorizontalHeaderLabels(QStringList() + << tr("IP/Nick") + << tr("Expiration") + << tr("Reason") + ); + twBans->horizontalHeader()->setResizeMode(2, QHeaderView::Stretch); + twBans->setEditTriggers(QAbstractItemView::NoEditTriggers); + twBans->setSelectionBehavior(QAbstractItemView::SelectRows); + twBans->setSelectionMode(QAbstractItemView::SingleSelection); + twBans->setAlternatingRowColors(true); + tab2Layout->addWidget(twBans, 0, 1, 4, 1); - tb = new QTextBrowser(this); - tb->setOpenExternalLinks(true); - tb->document()->setDefaultStyleSheet(HWChatWidget::styleSheet()); - pageLayout->addWidget(tb, 4, 1, 1, 2); + QPushButton * btnRefresh = addButton(tr("Refresh"), tab2Layout, 0, 0); + QPushButton * btnAdd = addButton(tr("Add"), tab2Layout, 1, 0); + QPushButton * btnRemove = addButton(tr("Remove"), tab2Layout, 2, 0); - // 5 - pbClearAccountsCache = addButton(tr("Clear Accounts Cache"), pageLayout, 5, 0); - - // 6 - pbSetSM = addButton(tr("Set data"), pageLayout, 6, 0, 1, 3); + connect(btnRefresh, SIGNAL(clicked()), this, SIGNAL(bansListRequest())); + connect(btnRefresh, SIGNAL(clicked()), this, SLOT(onRefreshClicked())); + connect(btnAdd, SIGNAL(clicked()), this, SLOT(onAddClicked())); + connect(btnRemove, SIGNAL(clicked()), this, SLOT(onRemoveClicked())); + } return pageLayout; } @@ -106,7 +148,64 @@ { leServerMessageOld->setText(str); } + void PageAdmin::protocol(int proto) { sbProtocol->setValue(proto); } + +void PageAdmin::onAddClicked() +{ + BanDialog dialog(this); + + if(dialog.exec()) + { + if(dialog.byIP()) + { + emit banIP(dialog.banId(), dialog.reason(), dialog.duration()); + } else + { + emit banNick(dialog.banId(), dialog.reason(), dialog.duration()); + } + + emit bansListRequest(); + } +} + +void PageAdmin::onRemoveClicked() +{ + QList sel = twBans->selectedItems(); + + if(sel.size()) + { + emit removeBan(twBans->item(sel[0]->row(), 0)->data(Qt::DisplayRole).toString()); + emit bansListRequest(); + } +} + +void PageAdmin::setBansList(const QStringList & bans) +{ + if(bans.size() % 4) + return; + + twBans->setRowCount(bans.size() / 4); + + for(int i = 0; i < bans.size(); i += 4) + { + if(!twBans->item(i / 4, 0)) + { + twBans->setItem(i / 4, 0, new QTableWidgetItem()); + twBans->setItem(i / 4, 1, new QTableWidgetItem()); + twBans->setItem(i / 4, 2, new QTableWidgetItem()); + } + + twBans->item(i / 4, 0)->setData(Qt::DisplayRole, bans[i + 1]); + twBans->item(i / 4, 1)->setData(Qt::DisplayRole, bans[i + 3]); + twBans->item(i / 4, 2)->setData(Qt::DisplayRole, bans[i + 2]); + } +} + +void PageAdmin::onRefreshClicked() +{ + twBans->setRowCount(0); +} diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/ui/page/pageadmin.h --- a/QTfrontend/ui/page/pageadmin.h Sun Nov 18 01:06:01 2012 +0400 +++ b/QTfrontend/ui/page/pageadmin.h Fri Feb 22 05:05:32 2013 +0100 @@ -21,6 +21,8 @@ #include "AbstractPage.h" +class QTableWidget; + class PageAdmin : public AbstractPage { Q_OBJECT @@ -32,6 +34,7 @@ void serverMessageNew(const QString & str); void serverMessageOld(const QString & str); void protocol(int proto); + void setBansList(const QStringList & bans); signals: void setServerMessageNew(const QString & str); @@ -39,6 +42,10 @@ void setProtocol(int proto); void askServerVars(); void clearAccountsCache(); + void bansListRequest(); + void removeBan(const QString &); + void banIP(const QString & ip, const QString & reason, int seconds); + void banNick(const QString & nick, const QString & reason, int seconds); protected: QLayout * bodyLayoutDefinition(); @@ -52,9 +59,13 @@ QSpinBox * sbProtocol; QTextBrowser * tb; QPushButton * pbClearAccountsCache; + QTableWidget * twBans; private slots: void smChanged(); + void onAddClicked(); + void onRemoveClicked(); + void onRefreshClicked(); }; #endif diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/ui/page/pagedata.cpp --- a/QTfrontend/ui/page/pagedata.cpp Sun Nov 18 01:06:01 2012 +0400 +++ b/QTfrontend/ui/page/pagedata.cpp Fri Feb 22 05:05:32 2013 +0100 @@ -72,7 +72,7 @@ else finalUrl = url; - if(url.path().endsWith(".hwp")) + if(url.path().endsWith(".hwp") || url.path().endsWith(".zip")) { qWarning() << "Download Request" << url.toString(); QString fileName = QFileInfo(url.toString()).fileName(); @@ -138,6 +138,8 @@ extractDir.cd("Data"); QString fileName = extractDir.filePath(QFileInfo(reply->url().path()).fileName()); + if(fileName.endsWith(".zip")) + fileName = fileName.left(fileName.length() - 4) + ".hwp"; QFile out(fileName); if(!out.open(QFile::WriteOnly)) diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/ui/page/pageeditteam.cpp --- a/QTfrontend/ui/page/pageeditteam.cpp Sun Nov 18 01:06:01 2012 +0400 +++ b/QTfrontend/ui/page/pageeditteam.cpp Fri Feb 22 05:05:32 2013 +0100 @@ -30,25 +30,26 @@ #include #include "SquareLabel.h" #include "HWApplication.h" +#include "keybinder.h" #include "DataManager.h" -#include "HatModel.h" +#include "hatbutton.h" #include "pageeditteam.h" QLayout * PageEditTeam::bodyLayoutDefinition() { QGridLayout * pageLayout = new QGridLayout(); - QTabWidget * tbw = new QTabWidget(); + tbw = new QTabWidget(); QWidget * page1 = new QWidget(this); - QWidget * page2 = new QWidget(this); + binder = new KeyBinder(this, tr("Select an action to choose a custom key bind for this team"), tr("Use my default"), tr("Reset all binds")); + connect(binder, SIGNAL(resetAllBinds()), this, SLOT(resetAllBinds())); tbw->addTab(page1, tr("General")); - tbw->addTab(page2, tr("Advanced")); + tbw->addTab(binder, tr("Custom Controls")); pageLayout->addWidget(tbw, 0, 0, 1, 3); QHBoxLayout * page1Layout = new QHBoxLayout(page1); page1Layout->setAlignment(Qt::AlignTop); - QGridLayout * page2Layout = new QGridLayout(page2); // ====== Page 1 ====== QVBoxLayout * vbox1 = new QVBoxLayout(); @@ -61,27 +62,33 @@ GBoxHedgehogs->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); QGridLayout * GBHLayout = new QGridLayout(GBoxHedgehogs); - HatModel * hatModel = DataManager::instance().hatModel(); + + GBHLayout->addWidget(new QLabel(tr("Hat")), 0, 0); + GBHLayout->addWidget(new QLabel(tr("Name")), 0, 1); for(int i = 0; i < HEDGEHOGS_PER_TEAM; i++) { - HHHats[i] = new QComboBox(GBoxHedgehogs); - HHHats[i]->setModel(hatModel); - HHHats[i]->setIconSize(QSize(32, 37)); - //HHHats[i]->setSizeAdjustPolicy(QComboBox::AdjustToContents); - //HHHats[i]->setModelColumn(1); - //HHHats[i]->setMinimumWidth(132); - GBHLayout->addWidget(HHHats[i], i, 0); + HHHats[i] = new HatButton(GBoxHedgehogs); + GBHLayout->addWidget(HHHats[i], i + 1, 0); HHNameEdit[i] = new QLineEdit(GBoxHedgehogs); HHNameEdit[i]->setMaxLength(64); HHNameEdit[i]->setMinimumWidth(120); - GBHLayout->addWidget(HHNameEdit[i], i, 1); + HHNameEdit[i]->setFixedHeight(36); + HHNameEdit[i]->setWhatsThis(tr("This hedgehog's name")); + HHNameEdit[i]->setStyleSheet("padding: 6px;"); + GBHLayout->addWidget(HHNameEdit[i], i + 1, 1); - btnRandomHogName[i] = addButton(":/res/dice.png", GBHLayout, i, 3, 1, 1, true); + btnRandomHogName[i] = addButton(":/res/dice.png", GBHLayout, i + 1, 3, 1, 1, true); + btnRandomHogName[i]->setFixedHeight(HHNameEdit[i]->height()); + btnRandomHogName[i]->setWhatsThis(tr("Randomize this hedgehog's name")); } - btnRandomTeam = addButton(QPushButton::tr("Random Team"), GBHLayout, 9, 0); + btnRandomTeam = new QPushButton(); + btnRandomTeam->setText(tr("Random Team")); + btnRandomTeam->setStyleSheet("padding: 6px 10px;"); + GBHLayout->addWidget(btnRandomTeam, 9, 0, 1, 4, Qt::AlignCenter); + btnRandomTeam->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); vbox1->addWidget(GBoxHedgehogs); @@ -157,52 +164,6 @@ vbox1->addStretch(); vbox2->addStretch(); -// ====== Page 2 ====== - GBoxBinds = new QGroupBox(this); - GBoxBinds->setTitle(QGroupBox::tr("Key binds")); - QGridLayout * GBBLayout = new QGridLayout(GBoxBinds); - BindsBox = new QToolBox(GBoxBinds); - BindsBox->setLineWidth(0); - GBBLayout->addWidget(BindsBox); - page2Layout->addWidget(GBoxBinds, 0, 0); - - quint16 i = 0; - quint16 num = 0; - QWidget * curW = NULL; - QGridLayout * pagelayout = NULL; - QLabel* l = NULL; - while (i < BINDS_NUMBER) - { - if(cbinds[i].category != NULL) - { - if(curW != NULL) - { - l = new QLabel(curW); - l->setText(""); - pagelayout->addWidget(l, num++, 0, 1, 2); - } - curW = new QWidget(this); - BindsBox->addItem(curW, HWApplication::translate("binds (categories)", cbinds[i].category)); - pagelayout = new QGridLayout(curW); - num = 0; - } - if(cbinds[i].description != NULL) - { - l = new QLabel(curW); - l->setText((num > 0 ? QString("\n") : QString("")) + HWApplication::translate("binds (descriptions)", cbinds[i].description)); - pagelayout->addWidget(l, num++, 0, 1, 2); - } - - l = new QLabel(curW); - l->setText(HWApplication::translate("binds", cbinds[i].name)); - l->setAlignment(Qt::AlignRight); - pagelayout->addWidget(l, num, 0); - - CBBind[i] = new QComboBox(curW); - CBBind[i]->setModel(DataManager::instance().bindsModel()); - pagelayout->addWidget(CBBind[i++], num++, 1); - } - return pageLayout; } @@ -213,7 +174,7 @@ void PageEditTeam::connectSignals() { - connect(this, SIGNAL(goBack()), this, SLOT(saveTeam())); + connect(this, SIGNAL(pageLeave()), this, SLOT(saveTeam())); signalMapper1 = new QSignalMapper(this); signalMapper2 = new QSignalMapper(this); @@ -407,6 +368,9 @@ void PageEditTeam::loadTeam(const HWTeam & team) { + tbw->setCurrentIndex(0); + binder->resetInterface(); + TeamNameEdit->setText(team.name()); CBTeamLvl->setCurrentIndex(team.difficulty()); @@ -419,7 +383,7 @@ if (hh.Hat.startsWith("Reserved")) hh.Hat = "Reserved "+hh.Hat.remove(0,40); - HHHats[i]->setCurrentIndex(HHHats[i]->findData(hh.Hat, Qt::DisplayRole)); + HHHats[i]->setCurrentHat(hh.Hat); } CBGrave->setCurrentIndex(CBGrave->findText(team.grave())); @@ -431,10 +395,12 @@ QStandardItemModel * binds = DataManager::instance().bindsModel(); for(int i = 0; i < BINDS_NUMBER; i++) { + if (team.keyBind(i).isEmpty()) continue; + 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()); + binder->setBindIndex(i, mdl[0].row()); else qDebug() << "Binds: cannot find" << team.keyBind(i); } @@ -449,7 +415,7 @@ { HWHog hh; hh.Name = HHNameEdit[i]->text(); - hh.Hat = HHHats[i]->currentText(); + hh.Hat = HHHats[i]->currentHat(); if (hh.Hat.startsWith("Reserved")) hh.Hat = "Reserved"+m_playerHash+hh.Hat.remove(0,9); @@ -465,7 +431,7 @@ QStandardItemModel * binds = DataManager::instance().bindsModel(); for(int i = 0; i < BINDS_NUMBER; i++) { - team.bindKey(i, binds->index(CBBind[i]->currentIndex(), 0).data(Qt::UserRole + 1).toString()); + team.bindKey(i, binds->index(binder->bindIndex(i), 0).data(Qt::UserRole + 1).toString()); } return team; @@ -475,3 +441,10 @@ { data().saveToFile(); } + +// When the "Use default for all binds" is pressed... +void PageEditTeam::resetAllBinds() +{ + for (int i = 0; i < BINDS_NUMBER; i++) + binder->setBindIndex(i, 0); +} diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/ui/page/pageeditteam.h --- a/QTfrontend/ui/page/pageeditteam.h Sun Nov 18 01:06:01 2012 +0400 +++ b/QTfrontend/ui/page/pageeditteam.h Fri Feb 22 05:05:32 2013 +0100 @@ -28,6 +28,8 @@ #include "team.h" class SquareLabel; +class KeyBinder; +class HatButton; class PageEditTeam : public AbstractPage { @@ -44,6 +46,7 @@ void CBFort_activated(const QString & gravename); private: + QTabWidget * tbw; QSignalMapper* signalMapper1; QSignalMapper* signalMapper2; QGroupBox *GBoxHedgehogs; @@ -59,10 +62,10 @@ QToolBox *BindsBox; QLineEdit * TeamNameEdit; QLineEdit * HHNameEdit[HEDGEHOGS_PER_TEAM]; - QComboBox * HHHats[HEDGEHOGS_PER_TEAM]; - QComboBox * CBBind[BINDS_NUMBER]; + HatButton * HHHats[HEDGEHOGS_PER_TEAM]; HWTeam data(); QString m_playerHash; + KeyBinder * binder; QLayout * bodyLayoutDefinition(); QLayout * footerLayoutDefinition(); @@ -85,6 +88,7 @@ void testSound(); void fixHHname(int idx); + void resetAllBinds(); }; #endif diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/ui/page/pagefeedback.cpp --- a/QTfrontend/ui/page/pagefeedback.cpp Sun Nov 18 01:06:01 2012 +0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,82 +0,0 @@ -/* - * Hedgewars, a free turn based strategy game - * Copyright (c) 2004-2012 Andrey Korotaev - * - * 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 -#include -#include -#include - -#include "pagefeedback.h" -#include "hwconsts.h" - -QLayout * PageFeedback::bodyLayoutDefinition() -{ - QVBoxLayout * pageLayout = new QVBoxLayout(); - QHBoxLayout * summaryLayout = new QHBoxLayout(); - - info = new QLabel(); - info->setText( - "" - "

Please give us a feedback!

" - "

We are always happy about suggestions, ideas or bug reports.

" - "

The feedback will be posted as a new issue on our Google Code page.

" - "

" - ); - pageLayout->addWidget(info); - - label_summary = new QLabel(); - label_summary->setText(QLabel::tr("Summary ")); - summaryLayout->addWidget(label_summary); - summary = new QLineEdit(); - summaryLayout->addWidget(summary); - pageLayout->addLayout(summaryLayout); - - label_description = new QLabel(); - label_description->setText(QLabel::tr("Description")); - pageLayout->addWidget(label_description, 0, Qt::AlignHCenter); - description = new QTextBrowser(); - description->setReadOnly(false); - pageLayout->addWidget(description); - - return pageLayout; -} - -QLayout * PageFeedback::footerLayoutDefinition() -{ - QHBoxLayout * bottomLayout = new QHBoxLayout(); - - bottomLayout->setStretch(0,1); - //TODO: create logo for send button - BtnSend = addButton("Send", bottomLayout, 0, false); - bottomLayout->insertStretch(0); - - return bottomLayout; -} - -void PageFeedback::connectSignals() -{ - //TODO -} - -PageFeedback::PageFeedback(QWidget* parent) : AbstractPage(parent) -{ - initPage(); - -} diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/ui/page/pagefeedback.h --- a/QTfrontend/ui/page/pagefeedback.h Sun Nov 18 01:06:01 2012 +0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,44 +0,0 @@ -/* - * Hedgewars, a free turn based strategy game - * Copyright (c) 2004-2012 Andrey Korotaev - * - * 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 - */ - -#ifndef PAGE_FEEDBACK_H -#define PAGE_FEEDBACK_H - -#include "AbstractPage.h" - -class PageFeedback : public AbstractPage -{ - Q_OBJECT - - public: - PageFeedback(QWidget * parent = 0); - - QPushButton * BtnSend; - QLineEdit * summary; - QTextBrowser * description; - QLabel * info; - QLabel * label_summary; - QLabel * label_description; - - private: - QLayout * bodyLayoutDefinition(); - QLayout * footerLayoutDefinition(); - void connectSignals(); -}; - -#endif diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/ui/page/pagegamestats.cpp --- a/QTfrontend/ui/page/pagegamestats.cpp Sun Nov 18 01:06:01 2012 +0400 +++ b/QTfrontend/ui/page/pagegamestats.cpp Fri Feb 22 05:05:32 2013 +0100 @@ -110,6 +110,7 @@ void PageGameStats::connectSignals() { + connect(this, SIGNAL(pageEnter()), this, SLOT(renderStats())); connect(btnSave, SIGNAL(clicked()), this, SIGNAL(saveDemoRequested())); } diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/ui/page/pagemain.cpp --- a/QTfrontend/ui/page/pagemain.cpp Sun Nov 18 01:06:01 2012 +0400 +++ b/QTfrontend/ui/page/pagemain.cpp Fri Feb 22 05:05:32 2013 +0100 @@ -42,30 +42,48 @@ pageLayout->setRowStretch(4, 1); BtnSinglePlayer = addButton(":/res/LocalPlay.png", pageLayout, 2, 0, 1, 2, true); - BtnSinglePlayer->setToolTip(tr("Local Game")); BtnSinglePlayer->setWhatsThis(tr("Play a game on a single computer")); pageLayout->setAlignment(BtnSinglePlayer, Qt::AlignHCenter); + //BtnNet = addButton(":/res/NetworkPlay.png", (QBoxLayout*)netLayout, 1, true); BtnNet = addButton(":/res/NetworkPlay.png", pageLayout, 2, 2, 1, 2, true); - BtnNet->setToolTip(tr("Network Game")); BtnNet->setWhatsThis(tr("Play a game across a network")); pageLayout->setAlignment(BtnNet, Qt::AlignHCenter); + originalNetworkIcon = BtnNet->icon(); + disabledNetworkIcon = QIcon(":/res/NetworkPlayDisabled.png"); + + //QWidget *netLayoutWidget = new QWidget(); + QVBoxLayout *netLayout = new QVBoxLayout(BtnNet); + //pageLayout->addWidget(netLayoutWidget, 2, 2, 1, 2); + //netLayoutWidget->setStyleSheet("background: green;"); + //netLayoutWidget->setFixedSize(314, 260); + netLayout->setSpacing(20); + netLayout->setAlignment(Qt::AlignHCenter); + + BtnNetLocal = addButton("Play local network game", (QBoxLayout*)netLayout, 0, false); + BtnNetLocal->setWhatsThis(tr("Play a game across a local area network")); + BtnNetLocal->setFixedSize(BtnNet->width() - 50, 60); + BtnNetLocal->setVisible(false); + + BtnNetOfficial = addButton("Play official network game", (QBoxLayout*)netLayout, 0, false); + BtnNetOfficial->setWhatsThis(tr("Play a game on an official server")); + BtnNetOfficial->setFixedSize(BtnNet->width() - 50, 60); + BtnNetOfficial->setVisible(false); + // button order matters for overlapping (what's on top and what isn't) BtnInfo = addButton(":/res/HedgewarsTitle.png", pageLayout, 0, 0, 1, 4, true); BtnInfo->setStyleSheet("border: transparent;background: transparent;"); - //BtnInfo->setToolTip(tr("Credits")); //tooltip looks horrible with transparent background buttons BtnInfo->setWhatsThis(tr("Read about who is behind the Hedgewars Project")); pageLayout->setAlignment(BtnInfo, Qt::AlignHCenter); -#if 0 BtnFeedback = addButton("Feedback", pageLayout, 4, 0, 1, 4, false); + BtnFeedback->setFixedSize(86, 27); BtnFeedback->setWhatsThis(tr("Leave a feedback here reporting issues, suggesting features or just saying how you like Hedgewars")); pageLayout->setAlignment(BtnFeedback, Qt::AlignHCenter); -#endif BtnDataDownload = addButton(tr("Downloadable Content"), pageLayout, 5, 0, 1, 4, false); - //BtnDataDownload->setToolTip(tr(Downloadable Content")); + BtnDataDownload->setFixedSize(176, 27); BtnDataDownload->setWhatsThis(tr("Access the user created content downloadable from our website")); pageLayout->setAlignment(BtnDataDownload, Qt::AlignHCenter); @@ -101,7 +119,8 @@ void PageMain::connectSignals() { - //TODO + connect(BtnNet, SIGNAL(clicked()), this, SLOT(toggleNetworkChoice())); + // TODO: add signal-forwarding required by (currently missing) encapsulation } PageMain::PageMain(QWidget* parent) : AbstractPage(parent) @@ -117,70 +136,56 @@ } else { - setDefautDescription(QLabel::tr("This development build is 'work in progress' and may not be compatible with other versions of the game. Some features might be broken or incomplete. Use at your own risk!")); + setDefautDescription(QLabel::tr("This development build is 'work in progress' and may not be compatible with other versions of the game, while some features might be broken or incomplete!")); } } QString PageMain::randomTip() const { +#ifdef _WIN32 + int platform = 1; +#elif defined __APPLE__ + int platform = 2; +#else + int platform = 3; +#endif QStringList Tips; - Tips << tr("Simply pick the same color as a friend to play together as a team. Each of you will still control his or her own hedgehogs but they'll win or lose together.", "Tips"); - Tips << tr("Some weapons might do only low damage but they can be a lot more devastating in the right situation. Try to use the Desert Eagle to knock multiple hedgehogs into the water.", "Tips"); - Tips << tr("If you're unsure what to do and don't want to waste ammo, skip one round. But don't let too much time pass as there will be Sudden Death!", "Tips"); - Tips << tr("Want to save ropes? Release the rope in mid air and then shoot again. As long as you don't touch the ground you'll reuse your rope without wasting ammo!", "Tips"); - Tips << tr("If you'd like to keep others from using your preferred nickname on the official server, register an account at http://www.hedgewars.org/.", "Tips"); - Tips << tr("You're bored of default gameplay? Try one of the missions - they'll offer different gameplay depending on the one you picked.", "Tips"); - Tips << tr("By default the game will always record the last game played as a demo. Select 'Local Game' and pick the 'Demos' button on the lower right corner to play or manage them.", "Tips"); - Tips << tr("Hedgewars is Open Source and Freeware we create in our spare time. If you've got problems, ask on our forums but please don't expect 24/7 support!", "Tips"); - Tips << tr("Hedgewars is Open Source and Freeware we create in our spare time. If you like it, help us with a small donation or contribute your own work!", "Tips"); - Tips << tr("Hedgewars is Open Source and Freeware we create in our spare time. Share it with your family and friends as you like!", "Tips"); - Tips << tr("Hedgewars is Open Source and Freeware we create in our spare time. If someone sold you the game, you should try get a refund!", "Tips"); - Tips << tr("From time to time there will be official tournaments. Upcoming events will be announced at http://www.hedgewars.org/ some days in advance.", "Tips"); - Tips << tr("Hedgewars is available in many languages. If the translation in your language seems to be missing or outdated, feel free to contact us!", "Tips"); - Tips << tr("Hedgewars can be run on lots of different operating systems including Microsoft Windows, Mac OS X and Linux.", "Tips"); - Tips << tr("Always remember you're able to set up your own games in local and network/online play. You're not restricted to the 'Simple Game' option.", "Tips"); - Tips << tr("Connect one or more gamepads before starting the game to be able to assign their controls to your teams.", "Tips"); - Tips << tr("Create an account on %1 to keep others from using your most favourite nickname while playing on the official server.", "Tips").arg("http://www.hedgewars.org/"); - Tips << tr("While playing you should give yourself a short break at least once an hour.", "Tips"); - Tips << tr("If your graphics card isn't able to provide hardware accelerated OpenGL, try to enable the low quality mode to improve performance.", "Tips"); - Tips << tr("If your graphics card isn't able to provide hardware accelerated OpenGL, try to update the associated drivers.", "Tips"); - Tips << tr("We're open to suggestions and constructive feedback. If you don't like something or got a great idea, let us know!", "Tips"); - Tips << tr("Especially while playing online be polite and always remember there might be some minors playing with or against you as well!", "Tips"); - Tips << tr("Special game modes such as 'Vampirism' or 'Karma' allow you to develop completely new tactics. Try them in a custom game!", "Tips"); - Tips << tr("The Windows version of Hedgewars supports Xfire. Make sure to add Hedgewars to its game list so your friends can see you playing.", "Tips"); - Tips << tr("You should never install Hedgewars on computers you don't own (school, university, work, etc.). Please ask the responsible person instead!", "Tips"); - Tips << tr("Hedgewars can be perfect for short games during breaks. Just ensure you don't add too many hedgehogs or use an huge map. Reducing time and health might help as well.", "Tips"); - Tips << tr("No hedgehogs were harmed in making this game.", "Tips"); - Tips << tr("There are three different jumps available. Tap [high jump] twice to do a very high/backwards jump.", "Tips"); - Tips << tr("Afraid of falling off a cliff? Hold down [precise] to turn [left] or [right] without actually moving.", "Tips"); - Tips << tr("Some weapons require special strategies or just lots of training, so don't give up on a particular tool if you miss an enemy once.", "Tips"); - Tips << tr("Most weapons won't work once they touch the water. The Homing Bee as well as the Cake are exceptions to this.", "Tips"); - Tips << tr("The Old Limbuger only causes a small explosion. However the wind affected smelly cloud can poison lots of hogs at once.", "Tips"); - Tips << tr("The Piano Strike is the most damaging air strike. You'll lose the hedgehog performing it, so there's a huge downside as well.", "Tips"); - Tips << tr("The Homing Bee can be tricky to use. Its turn radius depends on its velocity, so try to not use full power.", "Tips"); - Tips << tr("Sticky Mines are a perfect tool to create small chain reactions knocking enemy hedgehogs into dire situations ... or water.", "Tips"); - Tips << tr("The Hammer is most effective when used on bridges or girders. Hit hogs will just break through the ground.", "Tips"); - Tips << tr("If you're stuck behind an enemy hedgehog, use the Hammer to free yourself without getting damaged by an explosion.", "Tips"); - Tips << tr("The Cake's maximum walking distance depends on the ground it has to pass. Use [attack] to detonate it early.", "Tips"); - Tips << tr("The Flame Thrower is a weapon but it can be used for tunnel digging as well.", "Tips"); - Tips << tr("Use the Molotov or Flame Thrower to temporary keep hedgehogs from passing terrain such as tunnels or platforms.", "Tips"); - Tips << tr("Want to know who's behind the game? Click on the Hedgewars logo in the main menu to see the credits.", "Tips"); - Tips << tr("Like Hedgewars? Become a fan on %1 or follow us on %2!", "Tips").arg("Facebook").arg("Twitter"); - Tips << tr("Feel free to draw your own graves, hats, flags or even maps and themes! But note that you'll have to share them somewhere to use them online.", "Tips"); - Tips << tr("Really want to wear a specific hat? Donate to us and receive an exclusive hat of your choice!", "Tips"); + QFile file(":/res/xml/tips.xml"); + file.open(QIODevice::ReadOnly); + QTextStream in(&file); + QString line = in.readLine(); + int tip_platform = 0; + while (!line.isNull()) { + if(line.contains("", Qt::CaseSensitive)) + tip_platform = 1; + if(line.contains("", Qt::CaseSensitive)) + tip_platform = 2; + if(line.contains("", Qt::CaseSensitive)) + tip_platform = 3; + if(line.contains("", Qt::CaseSensitive) || + line.contains("", Qt::CaseSensitive) || + line.contains("", Qt::CaseSensitive)) { + tip_platform = 0; + } + QStringList split_string = line.split(QRegExp("")); + if((tip_platform == platform || tip_platform == 0) && split_string.size() != 1) + Tips << tr(split_string[1].toLatin1().data(), "Tips"); + line = in.readLine(); + } // The following tip will require links to app store entries first. //Tips << tr("Want to play Hedgewars any time? Grab the Mobile version for %1 and %2.", "Tips").arg("").arg(""); // the ios version is located here: http://itunes.apple.com/us/app/hedgewars/id391234866 - Tips << tr("Keep your video card drivers up to date to avoid issues playing the game.", "Tips"); - Tips << tr("You're able to associate Hedgewars related files (savegames and demo recordings) with the game to launch them right from your favorite file or internet browser.", "Tips"); -#ifdef _WIN32 - Tips << tr("You can find your Hedgewars configuration files under \"My Documents\\Hedgewars\". Create backups or take the files with you, but don't edit them by hand.", "Tips"); -#elif defined __APPLE__ - Tips << tr("You can find your Hedgewars configuration files under \"Library/Application Support/Hedgewars\" in your home directory. Create backups or take the files with you, but don't edit them by hand.", "Tips"); -#else - Tips << tr("You can find your Hedgewars configuration files under \".hedgewars\" in your home directory. Create backups or take the files with you, but don't edit them by hand.", "Tips"); -#endif + file.close(); return Tips[QTime(0, 0, 0).secsTo(QTime::currentTime()) % Tips.length()]; } + +void PageMain::toggleNetworkChoice() +{ + bool visible = BtnNetLocal->isVisible(); + BtnNetLocal->setVisible(!visible); + BtnNetOfficial->setVisible(!visible); + if (visible) BtnNet->setIcon(originalNetworkIcon); + else BtnNet->setIcon(disabledNetworkIcon); +} diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/ui/page/pagemain.h --- a/QTfrontend/ui/page/pagemain.h Sun Nov 18 01:06:01 2012 +0400 +++ b/QTfrontend/ui/page/pagemain.h Fri Feb 22 05:05:32 2013 +0100 @@ -21,15 +21,19 @@ #include "AbstractPage.h" +class QIcon; + class PageMain : public AbstractPage { - Q_OBJECT + Q_OBJECT public: PageMain(QWidget * parent = 0); QPushButton * BtnSinglePlayer; QPushButton * BtnNet; + QPushButton * BtnNetLocal; + QPushButton * BtnNetOfficial; QPushButton * BtnSetup; QPushButton * BtnFeedback; QPushButton * BtnInfo; @@ -41,8 +45,12 @@ QLayout * bodyLayoutDefinition(); QLayout * footerLayoutDefinition(); void connectSignals(); + QIcon originalNetworkIcon, disabledNetworkIcon; QString randomTip() const; + + private slots: + void toggleNetworkChoice(); }; #endif diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/ui/page/pagemultiplayer.cpp --- a/QTfrontend/ui/page/pagemultiplayer.cpp Sun Nov 18 01:06:01 2012 +0400 +++ b/QTfrontend/ui/page/pagemultiplayer.cpp Fri Feb 22 05:05:32 2013 +0100 @@ -36,10 +36,6 @@ gameCFG = new GameCFGWidget(this); pageLayout->addWidget(gameCFG, 0, 0, 1, 2); - btnSetup = new QPushButton(this); - btnSetup->setText(QPushButton::tr("Setup")); - pageLayout->addWidget(btnSetup, 1, 0, 1, 2); - pageLayout->setRowStretch(2, 1); teamsSelect = new TeamSelWidget(this); @@ -48,12 +44,30 @@ return pageLayout; } +QLayout * PageMultiplayer::footerLayoutLeftDefinition() +{ + QHBoxLayout * bottomLeftLayout = new QHBoxLayout(); + + btnSetup = addButton(":/res/Settings.png", bottomLeftLayout, 0, true); + btnSetup->setWhatsThis(tr("Edit game preferences")); + + return bottomLeftLayout; +} + QLayout * PageMultiplayer::footerLayoutDefinition() { QHBoxLayout * footerLayout = new QHBoxLayout(); - BtnStartMPGame = formattedButton(tr("Start")); - BtnStartMPGame->setMinimumWidth(180); + const QIcon& lp = QIcon(":/res/Start.png"); + QSize sz = lp.actualSize(QSize(65535, 65535)); + BtnStartMPGame = new QPushButton(); + BtnStartMPGame->setText(tr("Start")); + BtnStartMPGame->setMinimumWidth(sz.width() + 60); + BtnStartMPGame->setIcon(lp); + BtnStartMPGame->setFixedHeight(50); + BtnStartMPGame->setIconSize(sz); + BtnStartMPGame->setFlat(true); + BtnStartMPGame->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); footerLayout->addStretch(); footerLayout->addWidget(BtnStartMPGame); diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/ui/page/pagemultiplayer.h --- a/QTfrontend/ui/page/pagemultiplayer.h Sun Nov 18 01:06:01 2012 +0400 +++ b/QTfrontend/ui/page/pagemultiplayer.h Fri Feb 22 05:05:32 2013 +0100 @@ -41,6 +41,7 @@ private: QLayout * bodyLayoutDefinition(); QLayout * footerLayoutDefinition(); + QLayout * footerLayoutLeftDefinition(); void connectSignals(); QPushButton * btnSetup; diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/ui/page/pagenetgame.cpp --- a/QTfrontend/ui/page/pagenetgame.cpp Sun Nov 18 01:06:01 2012 +0400 +++ b/QTfrontend/ui/page/pagenetgame.cpp Fri Feb 22 05:05:32 2013 +0100 @@ -22,69 +22,130 @@ #include #include #include +#include #include "pagenetgame.h" #include "gamecfgwidget.h" #include "teamselect.h" #include "chatwidget.h" +const int cutoffHeight = 688; /* Don't make this number below 605, or else it'll + let the GameCFGWidget shrink too much before switching to tabbed mode. */ + QLayout * PageNetGame::bodyLayoutDefinition() { QGridLayout * pageLayout = new QGridLayout(); pageLayout->setSizeConstraint(QLayout::SetMinimumSize); - //pageLayout->setSpacing(1); - pageLayout->setColumnStretch(0, 50); - pageLayout->setColumnStretch(1, 50); + pageLayout->setColumnStretch(0, 1); + pageLayout->setColumnStretch(1, 1); + pageLayout->setRowStretch(0, 0); + pageLayout->setRowStretch(1, 0); + pageLayout->setRowStretch(2, 1); + + // Room config + + QHBoxLayout * roomConfigLayout = new QHBoxLayout(); + pageLayout->addLayout(roomConfigLayout, 0, 0, 1, 2); + roomConfigLayout->setSpacing(0); + + leRoomName = new HistoryLineEdit(this, 10); + leRoomName->setMaxLength(60); + leRoomName->setMinimumWidth(400); + leRoomName->setMaximumWidth(600); + leRoomName->setFixedHeight(30); + leRoomName->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); + leRoomName->setStyleSheet("border-right: 0; padding-left: 4px; border-top-right-radius: 0px; border-bottom-right-radius: 0px;"); + roomConfigLayout->addWidget(leRoomName, 100); - // chatwidget - pChatWidget = new HWChatWidget(this, m_gameSettings, true); - pChatWidget->setShowFollow(false); // don't show follow in nicks' context menus - pChatWidget->setIgnoreListKick(true); // kick ignored players automatically - pageLayout->addWidget(pChatWidget, 2, 0, 1, 2); - pageLayout->setRowStretch(1, 100); - pageLayout->setRowStretch(2, 100); + BtnUpdate = new QPushButton(); + BtnUpdate->setEnabled(false); + BtnUpdate->setText(tr("Update")); + BtnUpdate->setFixedHeight(leRoomName->height() - 0); + BtnUpdate->setStyleSheet("border-top-left-radius: 0px; border-bottom-left-radius: 0px; padding: auto 4px;"); + roomConfigLayout->addWidget(BtnUpdate, 0); + + lblRoomNameReadOnly = new QLabel(); + lblRoomNameReadOnly->setMinimumWidth(400); + lblRoomNameReadOnly->setMaximumWidth(600); + lblRoomNameReadOnly->setFixedHeight(30); + lblRoomNameReadOnly->setObjectName("labelLikeLineEdit"); + lblRoomNameReadOnly->setStyleSheet("font: 12px;"); + lblRoomNameReadOnly->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); + lblRoomNameReadOnly->setVisible(false); + roomConfigLayout->addWidget(lblRoomNameReadOnly, 100); + + roomConfigLayout->addSpacing(10); + + BtnMaster = new QPushButton(); + BtnMaster->setText(tr("Room controls")); + BtnMaster->setFixedHeight(leRoomName->height() - 0); + BtnMaster->setStyleSheet("QPushButton { padding: auto 4px; } QPushButton:pressed { background-color: #ffcc00; border-color: #ffcc00; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; color: #11084A; }"); + roomConfigLayout->addWidget(BtnMaster, 0); + + roomConfigLayout->addStretch(1); + + // Game config pGameCFG = new GameCFGWidget(this); - pageLayout->addWidget(pGameCFG, 0, 0); + pageLayout->addWidget(pGameCFG, 1, 0); - btnSetup = new QPushButton(this); - btnSetup->setText(QPushButton::tr("Setup")); - pageLayout->addWidget(btnSetup, 1, 0); + // Teams pNetTeamsWidget = new TeamSelWidget(this); pNetTeamsWidget->setAcceptOuter(true); - pageLayout->addWidget(pNetTeamsWidget, 0, 1, 2, 1); + pNetTeamsWidget->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); + pageLayout->addWidget(pNetTeamsWidget, 1, 1); + + // Chat + + chatWidget = new HWChatWidget(this, true); + chatWidget->setShowFollow(false); // don't show follow in nicks' context menus + chatWidget->setIgnoreListKick(true); // kick ignored players automatically + chatWidget->setMinimumHeight(50); + chatWidget->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Minimum); + pageLayout->addWidget(chatWidget, 2, 0, 1, 2); return pageLayout; } +QLayout * PageNetGame::footerLayoutLeftDefinition() +{ + QHBoxLayout * bottomLeftLayout = new QHBoxLayout(); + + btnSetup = addButton(":/res/Settings.png", bottomLeftLayout, 0, true); + btnSetup->setWhatsThis(tr("Edit game preferences")); + + return bottomLeftLayout; +} + QLayout * PageNetGame::footerLayoutDefinition() { QHBoxLayout * bottomLayout = new QHBoxLayout; - leRoomName = new HistoryLineEdit(this,10); - leRoomName->setMaxLength(60); - leRoomName->setMinimumWidth(200); - leRoomName->setMaximumWidth(400); + // Ready button - //Button to signify whether the player is ready to start playing BtnGo = new QPushButton(this); - BtnGo->setToolTip(QPushButton::tr("Ready")); BtnGo->setIcon(QIcon(":/res/lightbulb_off.png")); BtnGo->setIconSize(QSize(25, 34)); BtnGo->setMinimumWidth(50); BtnGo->setMinimumHeight(50); - bottomLayout->addWidget(leRoomName); - BtnUpdate = addButton(QAction::tr("Update"), bottomLayout, 1); - bottomLayout->addStretch(); bottomLayout->addWidget(BtnGo); - BtnMaster = addButton(tr("Control"), bottomLayout, 3); - bottomLayout->insertStretch(3, 100); + // Start button - BtnStart = addButton(QAction::tr("Start"), bottomLayout, 3); + const QIcon& lp = QIcon(":/res/Start.png"); + QSize sz = lp.actualSize(QSize(65535, 65535)); + BtnStart = new QPushButton(); + BtnStart->setText(tr("Start")); + BtnStart->setMinimumWidth(sz.width() + 60); + BtnStart->setIcon(lp); + BtnStart->setFixedHeight(50); + BtnStart->setIconSize(sz); + BtnStart->setFlat(true); + BtnStart->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); + bottomLayout->addWidget(BtnStart); return bottomLayout; } @@ -94,12 +155,13 @@ connect(btnSetup, SIGNAL(clicked()), this, SIGNAL(SetupClicked())); connect(BtnUpdate, SIGNAL(clicked()), this, SLOT(onUpdateClick())); + connect(leRoomName, SIGNAL(returnPressed()), this, SLOT(onUpdateClick())); + + connect(leRoomName, SIGNAL(textChanged(const QString &)), this, SLOT(onRoomNameEdited())); } -PageNetGame::PageNetGame(QWidget* parent, QSettings * gameSettings) : AbstractPage(parent) +PageNetGame::PageNetGame(QWidget* parent) : AbstractPage(parent) { - m_gameSettings = gameSettings; - initPage(); QMenu * menu = new QMenu(BtnMaster); @@ -108,29 +170,44 @@ restrictJoins->setCheckable(true); restrictTeamAdds = new QAction(QAction::tr("Restrict Team Additions"), menu); restrictTeamAdds->setCheckable(true); - //menu->addAction(startGame); menu->addAction(restrictJoins); menu->addAction(restrictTeamAdds); BtnMaster->setMenu(menu); + if (height() < cutoffHeight) + pGameCFG->setTabbed(true); } +void PageNetGame::resizeEvent(QResizeEvent * event) +{ + int oldHeight = event->oldSize().height(); + int newHeight = event->size().height(); + + if (newHeight < cutoffHeight && oldHeight >= cutoffHeight) + { + pGameCFG->setTabbed(true); + } + else if (newHeight >= cutoffHeight && oldHeight < cutoffHeight) + { + pGameCFG->setTabbed(false); + } +} void PageNetGame::displayError(const QString & message) { - pChatWidget->displayError(message); + chatWidget->displayError(message); } void PageNetGame::displayNotice(const QString & message) { - pChatWidget->displayNotice(message); + chatWidget->displayNotice(message); } void PageNetGame::displayWarning(const QString & message) { - pChatWidget->displayWarning(message); + chatWidget->displayWarning(message); } @@ -142,12 +219,19 @@ BtnGo->setIcon(QIcon(":/res/lightbulb_off.png")); } +void PageNetGame::onRoomNameEdited() +{ + BtnUpdate->setEnabled(true); +} + void PageNetGame::onUpdateClick() { if (!leRoomName->text().trimmed().isEmpty()) { + m_gameSettings->setValue("frontend/lastroomname", leRoomName->text()); + leRoomName->rememberCurrentText(); + BtnUpdate->setEnabled(false); emit askForUpdateRoomName(leRoomName->text()); - leRoomName->rememberCurrentText(); } else { @@ -158,6 +242,7 @@ roomMsg.setText(QMessageBox::tr("Please enter room name")); roomMsg.setWindowModality(Qt::WindowModal); roomMsg.exec(); + leRoomName->setFocus(); } } @@ -166,6 +251,8 @@ { leRoomName->setText(roomName); leRoomName->rememberCurrentText(); + lblRoomNameReadOnly->setText(roomName); + BtnUpdate->setEnabled(false); } void PageNetGame::setMasterMode(bool isMaster) @@ -174,9 +261,17 @@ BtnStart->setVisible(isMaster); BtnUpdate->setVisible(isMaster); leRoomName->setVisible(isMaster); + lblRoomNameReadOnly->setVisible(!isMaster); + pGameCFG->setMaster(isMaster); + repaint(); } void PageNetGame::setUser(const QString & nickname) { - pChatWidget->setUser(nickname); + chatWidget->setUser(nickname); } + +void PageNetGame::setSettings(QSettings *settings) +{ + m_gameSettings = settings; +} diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/ui/page/pagenetgame.h --- a/QTfrontend/ui/page/pagenetgame.h Sun Nov 18 01:06:01 2012 +0400 +++ b/QTfrontend/ui/page/pagenetgame.h Fri Feb 22 05:05:32 2013 +0100 @@ -26,19 +26,16 @@ class HWChatWidget; class TeamSelWidget; class GameCFGWidget; +class QSettings; class PageNetGame : public AbstractPage { Q_OBJECT public: - PageNetGame(QWidget* parent, QSettings * gameSettings); + PageNetGame(QWidget* parent); - /** - * Sets the room name to display. - * @param roomName room name to be displayed. - */ - void setRoomName(const QString & roomName); + void setSettings(QSettings * settings); void displayError(const QString & message); void displayNotice(const QString & message); @@ -48,34 +45,42 @@ QPushButton *BtnMaster; QPushButton *BtnStart; QPushButton *BtnUpdate; + HistoryLineEdit *leRoomName; QAction * restrictJoins; QAction * restrictTeamAdds; - HWChatWidget* pChatWidget; + HWChatWidget* chatWidget; TeamSelWidget* pNetTeamsWidget; GameCFGWidget* pGameCFG; public slots: + void setRoomName(const QString & roomName); void setReadyStatus(bool isReady); void setUser(const QString & nickname); void onUpdateClick(); void setMasterMode(bool isMaster); + private slots: + void onRoomNameEdited(); + signals: void SetupClicked(); void askForUpdateRoomName(const QString &); + protected: + void resizeEvent(QResizeEvent * event); + private: QLayout * bodyLayoutDefinition(); QLayout * footerLayoutDefinition(); + QLayout * footerLayoutLeftDefinition(); void connectSignals(); QSettings * m_gameSettings; - - HistoryLineEdit * leRoomName; QPushButton * btnSetup; + QLabel * lblRoomNameReadOnly; }; #endif diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/ui/page/pagenettype.cpp --- a/QTfrontend/ui/page/pagenettype.cpp Sun Nov 18 01:06:01 2012 +0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,49 +0,0 @@ -/* - * Hedgewars, a free turn based strategy game - * Copyright (c) 2004-2012 Andrey Korotaev - * - * 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 -#include - -#include "pagenettype.h" - - -QLayout * PageNetType::bodyLayoutDefinition() -{ - QGridLayout * pageLayout = new QGridLayout(); - pageLayout->setRowStretch(0, 10); - pageLayout->setRowStretch(3, 10); - - pageLayout->setColumnStretch(1, 10); - pageLayout->setColumnStretch(2, 20); - pageLayout->setColumnStretch(3, 10); - - BtnLAN = addButton(tr("LAN game"), pageLayout, 1, 2); - BtnLAN->setWhatsThis(tr("Join or host your own game server in a Local Area Network.")); - BtnOfficialServer = addButton(tr("Official server"), pageLayout, 2, 2); - BtnOfficialServer->setWhatsThis(tr("Join hundreds of players online!")); - - // hack: temporary deactivated - requires server modifications that aren't backward compatible (yet) - //BtnOfficialServer->setEnabled(false); - - return pageLayout; -} - -PageNetType::PageNetType(QWidget* parent) : AbstractPage(parent) -{ - initPage(); -} diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/ui/page/pagenettype.h --- a/QTfrontend/ui/page/pagenettype.h Sun Nov 18 01:06:01 2012 +0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,38 +0,0 @@ -/* - * Hedgewars, a free turn based strategy game - * Copyright (c) 2004-2012 Andrey Korotaev - * - * 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 - */ - -#ifndef PAGE_NETTYPE_H -#define PAGE_NETTYPE_H - -#include "AbstractPage.h" - -class PageNetType : public AbstractPage -{ - Q_OBJECT - - public: - PageNetType(QWidget* parent = 0); - - QPushButton * BtnLAN; - QPushButton * BtnOfficialServer; - - protected: - QLayout * bodyLayoutDefinition(); -}; - -#endif diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/ui/page/pageoptions.cpp --- a/QTfrontend/ui/page/pageoptions.cpp Sun Nov 18 01:06:01 2012 +0400 +++ b/QTfrontend/ui/page/pageoptions.cpp Fri Feb 22 05:05:32 2013 +0100 @@ -23,20 +23,62 @@ #include #include #include +#include #include #include #include -#include +#include +#include #include #include #include #include +#include #include "pageoptions.h" +#include "gameuiconfig.h" #include "hwconsts.h" #include "fpsedit.h" -#include "igbox.h" #include "DataManager.h" +#include "LibavInteraction.h" +#include "AutoUpdater.h" +#include "HWApplication.h" +#include "keybinder.h" + +#ifdef __APPLE__ +#ifdef SPARKLE_ENABLED +#include "SparkleAutoUpdater.h" +#endif +#endif + +const int OPTION_BOX_SPACING = 10; + +OptionGroupBox::OptionGroupBox(const QString & iconName, + const QString & title, + QWidget * parent) : IconedGroupBox(parent) +{ + setIcon(QIcon(iconName)); + setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); + setTitle(title); + setMinimumWidth(300); + m_layout = new QGridLayout(this); + m_layout->setColumnStretch(0, 0); + m_layout->setColumnStretch(1, 1); +} + +QGridLayout * OptionGroupBox::layout() +{ + return m_layout; +} + +void OptionGroupBox::addDivider() +{ + QFrame * hr = new QFrame(this); + hr->setFrameStyle(QFrame::HLine); + hr->setLineWidth(3); + hr->setFixedHeight(10); + m_layout->addWidget(hr, m_layout->rowCount(), 0, 1, m_layout->columnCount()); +} // TODO cleanup QLayout * PageOptions::bodyLayoutDefinition() @@ -45,270 +87,227 @@ QTabWidget * tabs = new QTabWidget(this); pageLayout->addWidget(tabs); - QWidget * page1 = new QWidget(this); - QWidget * page2 = new QWidget(this); - tabs->addTab(page1, tr("General")); - tabs->addTab(page2, tr("Advanced")); + + binder = new KeyBinder(this, tr("Select an action to change what key controls it"), tr("Reset to default"), tr("Reset all binds")); + connect(binder, SIGNAL(bindUpdate(int)), this, SLOT(bindUpdated(int))); + connect(binder, SIGNAL(resetAllBinds()), this, SLOT(resetAllBinds())); + + QWidget * pageGame = new QWidget(this); + tabs->addTab(pageGame, tr("Game")); + + QWidget * pageGraphics = new QWidget(this); + tabs->addTab(pageGraphics, tr("Graphics")); - { // page 1 - QGridLayout * page1Layout = new QGridLayout(page1); - //gbTBLayout->setMargin(0); - page1Layout->setSpacing(0); - page1Layout->setAlignment(Qt::AlignTop | Qt::AlignLeft); + QWidget * pageAudio = new QWidget(this); + tabs->addTab(pageAudio, tr("Audio")); + + binderTab = tabs->addTab(binder, tr("Controls")); - QPixmap pmNew(":/res/new.png"); - QPixmap pmEdit(":/res/edit.png"); - QPixmap pmDelete(":/res/delete.png"); +#ifdef VIDEOREC + QWidget * pageVideoRec = new QWidget(this); + tabs->addTab(pageVideoRec, tr("Video Recording")); +#endif + + QWidget * pageNetwork = new QWidget(this); + tabs->addTab(pageNetwork, tr("Network")); - { - teamsBox = new IconedGroupBox(this); - //teamsBox->setContentTopPadding(0); - //teamsBox->setAttribute(Qt::WA_PaintOnScreen, true); - teamsBox->setIcon(QIcon(":/res/teamicon.png")); - teamsBox->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); - teamsBox->setTitle(QGroupBox::tr("Teams")); + QWidget * pageAdvanced = new QWidget(this); + tabs->addTab(pageAdvanced, tr("Advanced")); + + connect(tabs, SIGNAL(currentChanged(int)), this, SLOT(tabIndexChanged(int))); + + QPixmap pmNew(":/res/new.png"); + QPixmap pmEdit(":/res/edit.png"); + QPixmap pmDelete(":/res/delete.png"); + + { // game page + QVBoxLayout * leftColumn, * rightColumn; + setupTabPage(pageGame, &leftColumn, &rightColumn); - QGridLayout * GBTlayout = new QGridLayout(teamsBox); + { // group: Teams + OptionGroupBox * groupTeams = new OptionGroupBox(":/res/teamicon.png", tr("Teams"), this); + groupTeams->setMinimumWidth(400); + rightColumn->addWidget(groupTeams); - CBTeamName = new QComboBox(teamsBox); - GBTlayout->addWidget(CBTeamName, 0, 0); + groupTeams->layout()->setColumnStretch(0, 1); - BtnNewTeam = new QPushButton(teamsBox); - BtnNewTeam->setToolTip(tr("New team")); + CBTeamName = new QComboBox(groupTeams); + groupTeams->layout()->addWidget(CBTeamName, 0, 0); + + BtnNewTeam = new QPushButton(groupTeams); + BtnNewTeam->setWhatsThis(tr("New team")); BtnNewTeam->setIconSize(pmNew.size()); BtnNewTeam->setIcon(pmNew); BtnNewTeam->setMaximumWidth(pmNew.width() + 6); connect(BtnNewTeam, SIGNAL(clicked()), this, SIGNAL(newTeamRequested())); - GBTlayout->addWidget(BtnNewTeam, 0, 1); + groupTeams->layout()->addWidget(BtnNewTeam, 0, 1); - BtnEditTeam = new QPushButton(teamsBox); - BtnEditTeam->setToolTip(tr("Edit team")); + BtnEditTeam = new QPushButton(groupTeams); + BtnEditTeam->setWhatsThis(tr("Edit team")); BtnEditTeam->setIconSize(pmEdit.size()); BtnEditTeam->setIcon(pmEdit); BtnEditTeam->setMaximumWidth(pmEdit.width() + 6); connect(BtnEditTeam, SIGNAL(clicked()), this, SLOT(requestEditSelectedTeam())); - GBTlayout->addWidget(BtnEditTeam, 0, 2); + groupTeams->layout()->addWidget(BtnEditTeam, 0, 2); - BtnDeleteTeam = new QPushButton(teamsBox); - BtnDeleteTeam->setToolTip(tr("Delete team")); + BtnDeleteTeam = new QPushButton(groupTeams); + BtnDeleteTeam->setWhatsThis(tr("Delete team")); BtnDeleteTeam->setIconSize(pmDelete.size()); BtnDeleteTeam->setIcon(pmDelete); BtnDeleteTeam->setMaximumWidth(pmDelete.width() + 6); connect(BtnDeleteTeam, SIGNAL(clicked()), this, SLOT(requestDeleteSelectedTeam())); - GBTlayout->addWidget(BtnDeleteTeam, 0, 3); + groupTeams->layout()->addWidget(BtnDeleteTeam, 0, 3); - LblNoEditTeam = new QLabel(teamsBox); + LblNoEditTeam = new QLabel(groupTeams); LblNoEditTeam->setText(tr("You can't edit teams from team selection. Go back to main menu to add, edit or delete teams.")); LblNoEditTeam->setWordWrap(true); LblNoEditTeam->setVisible(false); - GBTlayout->addWidget(LblNoEditTeam, 0, 0); - - page1Layout->addWidget(teamsBox, 0, 0); + groupTeams->layout()->addWidget(LblNoEditTeam, 1, 0, 1, 4); } - { - IconedGroupBox* groupWeapons = new IconedGroupBox(this); + { // group: schemes + OptionGroupBox * groupSchemes = new OptionGroupBox(":/res/weaponsicon.png", tr("Schemes"), this); + leftColumn->addWidget(groupSchemes); - //groupWeapons->setContentTopPadding(0); - //groupWeapons->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); - groupWeapons->setIcon(QIcon(":/res/weaponsicon.png")); - groupWeapons->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); - groupWeapons->setTitle(QGroupBox::tr("Schemes and Weapons")); - QGridLayout * WeaponsLayout = new QGridLayout(groupWeapons); + groupSchemes->layout()->setColumnStretch(0, 1); - QLabel* SchemeLabel = new QLabel(groupWeapons); - SchemeLabel->setText(QLabel::tr("Game scheme")); - WeaponsLayout->addWidget(SchemeLabel, 1, 0); + SchemesName = new QComboBox(groupSchemes); + groupSchemes->layout()->addWidget(SchemesName, 0, 0); - SchemesName = new QComboBox(groupWeapons); - WeaponsLayout->addWidget(SchemesName, 1, 1); - - SchemeNew = new QPushButton(groupWeapons); + SchemeNew = new QPushButton(groupSchemes); SchemeNew->setWhatsThis(tr("New scheme")); SchemeNew->setIconSize(pmNew.size()); SchemeNew->setIcon(pmNew); SchemeNew->setMaximumWidth(pmNew.width() + 6); - WeaponsLayout->addWidget(SchemeNew, 1, 2); + groupSchemes->layout()->addWidget(SchemeNew, 0, 1); - SchemeEdit = new QPushButton(groupWeapons); + SchemeEdit = new QPushButton(groupSchemes); SchemeEdit->setWhatsThis(tr("Edit scheme")); SchemeEdit->setIconSize(pmEdit.size()); SchemeEdit->setIcon(pmEdit); SchemeEdit->setMaximumWidth(pmEdit.width() + 6); - WeaponsLayout->addWidget(SchemeEdit, 1, 3); + groupSchemes->layout()->addWidget(SchemeEdit, 0, 2); - SchemeDelete = new QPushButton(groupWeapons); + SchemeDelete = new QPushButton(groupSchemes); SchemeDelete->setWhatsThis(tr("Delete scheme")); SchemeDelete->setIconSize(pmDelete.size()); SchemeDelete->setIcon(pmDelete); SchemeDelete->setMaximumWidth(pmDelete.width() + 6); - WeaponsLayout->addWidget(SchemeDelete, 1, 4); + groupSchemes->layout()->addWidget(SchemeDelete, 0, 3); + } - QLabel* WeaponLabel = new QLabel(groupWeapons); - WeaponLabel->setText(QLabel::tr("Weapons")); - WeaponsLayout->addWidget(WeaponLabel, 2, 0); + { // group: weapons + OptionGroupBox * groupWeapons = new OptionGroupBox(":/res/weaponsicon.png", tr("Weapons"), this); + leftColumn->addWidget(groupWeapons); + + groupWeapons->layout()->setColumnStretch(0, 1); WeaponsName = new QComboBox(groupWeapons); - WeaponsLayout->addWidget(WeaponsName, 2, 1); + groupWeapons->layout()->addWidget(WeaponsName, 0, 0); WeaponNew = new QPushButton(groupWeapons); WeaponNew->setWhatsThis(tr("New weapon set")); WeaponNew->setIconSize(pmNew.size()); WeaponNew->setIcon(pmNew); WeaponNew->setMaximumWidth(pmNew.width() + 6); - WeaponsLayout->addWidget(WeaponNew, 2, 2); + groupWeapons->layout()->addWidget(WeaponNew, 0, 1); WeaponEdit = new QPushButton(groupWeapons); WeaponEdit->setWhatsThis(tr("Edit weapon set")); WeaponEdit->setIconSize(pmEdit.size()); WeaponEdit->setIcon(pmEdit); WeaponEdit->setMaximumWidth(pmEdit.width() + 6); - WeaponsLayout->addWidget(WeaponEdit, 2, 3); + groupWeapons->layout()->addWidget(WeaponEdit, 0, 2); WeaponDelete = new QPushButton(groupWeapons); WeaponDelete->setWhatsThis(tr("Delete weapon set")); WeaponDelete->setIconSize(pmDelete.size()); WeaponDelete->setIcon(pmDelete); WeaponDelete->setMaximumWidth(pmDelete.width() + 6); - WeaponsLayout->addWidget(WeaponDelete, 2, 4); - - page1Layout->addWidget(groupWeapons, 1, 0); + groupWeapons->layout()->addWidget(WeaponDelete, 0, 3); } - { - IconedGroupBox* groupMisc = new IconedGroupBox(this); - //groupMisc->setContentTopPadding(0); - //groupMisc->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::MinimumExpanding); - groupMisc->setIcon(QIcon(":/res/miscicon.png")); - //groupMisc->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); - groupMisc->setTitle(QGroupBox::tr("Misc")); - QGridLayout * MiscLayout = new QGridLayout(groupMisc); + leftColumn->addStretch(1); + rightColumn->addStretch(1); + } - // Label for "Language" - QLabel *labelLanguage = new QLabel(groupMisc); - labelLanguage->setText(QLabel::tr("Locale") + " *"); - MiscLayout->addWidget(labelLanguage, 0, 0); + { // graphics page + QVBoxLayout * leftColumn, * rightColumn; + setupTabPage(pageGraphics, &leftColumn, &rightColumn); - // List of installed languages - CBLanguage = new QComboBox(groupMisc); - QDir tmpdir; - tmpdir.cd(cfgdir->absolutePath()); - tmpdir.cd("Data/Locale"); - tmpdir.setFilter(QDir::Files); - QStringList locs = tmpdir.entryList(QStringList("hedgewars_*.qm")); - CBLanguage->addItem(QComboBox::tr("(System default)"), QString("")); - for(int i = 0; i < locs.count(); i++) - { - QLocale loc(locs[i].replace(QRegExp("hedgewars_(.*)\\.qm"), "\\1")); - CBLanguage->addItem(QLocale::languageToString(loc.language()) + " (" + QLocale::countryToString(loc.country()) + ")", loc.name()); - } + { // group: game + OptionGroupBox * groupGame = new OptionGroupBox(":/res/graphicsicon.png", tr("Game"), this); + leftColumn->addWidget(groupGame); + + groupGame->layout()->setColumnStretch(0, 0); + groupGame->layout()->setColumnStretch(1, 0); + groupGame->layout()->setColumnStretch(2, 1); - tmpdir.cd(datadir->absolutePath()); - tmpdir.cd("Locale"); - tmpdir.setFilter(QDir::Files); - QStringList tmplist = tmpdir.entryList(QStringList("hedgewars_*.qm")); - for(int i = 0; i < tmplist.count(); i++) - { - if (locs.contains(tmplist[i])) continue; - QLocale loc(tmplist[i].replace(QRegExp("hedgewars_(.*)\\.qm"), "\\1")); - CBLanguage->addItem(QLocale::languageToString(loc.language()) + " (" + QLocale::countryToString(loc.country()) + ")", loc.name()); - } + // Fullscreen - MiscLayout->addWidget(CBLanguage, 0, 1); + CBFullscreen = new QCheckBox(groupGame); + groupGame->layout()->addWidget(CBFullscreen, 0, 0, 1, 2); + CBFullscreen->setText(QLabel::tr("Fullscreen")); + + // Fullscreen resolution - // Label and field for net nick - labelNN = new QLabel(groupMisc); - labelNN->setText(QLabel::tr("Nickname")); - MiscLayout->addWidget(labelNN, 1, 0); + lblFullScreenRes = new QLabel(groupGame); + lblFullScreenRes->setText(QLabel::tr("Fullscreen Resolution")); + groupGame->layout()->addWidget(lblFullScreenRes, 1, 0); - editNetNick = new QLineEdit(groupMisc); - editNetNick->setMaxLength(20); - editNetNick->setText(QLineEdit::tr("anonymous")); - MiscLayout->addWidget(editNetNick, 1, 1); + CBResolution = new QComboBox(groupGame); + CBResolution->setFixedWidth(200); + groupGame->layout()->addWidget(CBResolution, 1, 1, Qt::AlignLeft); - // checkbox and field for password - CBSavePassword = new QCheckBox(groupMisc); - CBSavePassword->setText(QCheckBox::tr("Save password")); - MiscLayout->addWidget(CBSavePassword, 2, 0); - - editNetPassword = new QLineEdit(groupMisc); - editNetPassword->setEchoMode(QLineEdit::Password); - MiscLayout->addWidget(editNetPassword, 2, 1); + // Windowed resolution - #ifdef __APPLE__ - #ifdef SPARKLE_ENABLED - CBAutoUpdate = new QCheckBox(groupMisc); - CBAutoUpdate->setText(QCheckBox::tr("Check for updates at startup")); - MiscLayout->addWidget(CBAutoUpdate, 7, 0, 1, 3); - #endif - #endif - page1Layout->addWidget(groupMisc, 2, 0); - } + lblWinScreenRes = new QLabel(groupGame); + lblWinScreenRes->setText(QLabel::tr("Windowed Resolution")); + groupGame->layout()->addWidget(lblWinScreenRes, 2, 0); - { - AGGroupBox = new IconedGroupBox(this); - //AGGroupBox->setContentTopPadding(0); - AGGroupBox->setIcon(QIcon(":/res/graphicsicon.png")); - //AGGroupBox->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed); - AGGroupBox->setTitle(QGroupBox::tr("Audio/Graphic options")); + winResContainer = new QWidget(); + QHBoxLayout * winResLayout = new QHBoxLayout(winResContainer); + winResLayout->setSpacing(0); + groupGame->layout()->addWidget(winResContainer, 2, 1); - QVBoxLayout * GBAlayout = new QVBoxLayout(AGGroupBox); - QHBoxLayout * GBAreslayout = new QHBoxLayout(0); - QHBoxLayout * GBAstereolayout = new QHBoxLayout(0); - QHBoxLayout * GBAqualayout = new QHBoxLayout(0); - - CBFrontendFullscreen = new QCheckBox(AGGroupBox); - CBFrontendFullscreen->setText(QCheckBox::tr("Frontend fullscreen")); - GBAlayout->addWidget(CBFrontendFullscreen); - - CBFrontendEffects = new QCheckBox(AGGroupBox); - CBFrontendEffects->setText(QCheckBox::tr("Frontend effects")); - GBAlayout->addWidget(CBFrontendEffects); + QLabel *winLabelX = new QLabel(groupGame); + winLabelX->setText("x"); // decorational x + winLabelX->setFixedWidth(40); + winLabelX->setAlignment(Qt::AlignCenter); - CBEnableFrontendSound = new QCheckBox(AGGroupBox); - CBEnableFrontendSound->setText(QCheckBox::tr("Enable frontend sounds")); - GBAlayout->addWidget(CBEnableFrontendSound); - - CBEnableFrontendMusic = new QCheckBox(AGGroupBox); - CBEnableFrontendMusic->setText(QCheckBox::tr("Enable frontend music")); - GBAlayout->addWidget(CBEnableFrontendMusic); - - QFrame * hr = new QFrame(AGGroupBox); - hr->setFrameStyle(QFrame::HLine); - hr->setLineWidth(3); - hr->setFixedHeight(10); - GBAlayout->addWidget(hr); + windowWidthEdit = new QLineEdit(groupGame); + windowWidthEdit->setValidator(new QIntValidator(this)); + windowWidthEdit->setFixedSize(55, CBResolution->height()); + windowHeightEdit = new QLineEdit(groupGame); + windowHeightEdit->setValidator(new QIntValidator(this)); + windowHeightEdit->setFixedSize(55, CBResolution->height()); - QLabel * resolution = new QLabel(AGGroupBox); - resolution->setText(QLabel::tr("Resolution")); - GBAreslayout->addWidget(resolution); + winResLayout->addWidget(windowWidthEdit, 0); + winResLayout->addWidget(winLabelX, 0); + winResLayout->addWidget(windowHeightEdit, 0); + winResLayout->addStretch(1); - CBResolution = new QComboBox(AGGroupBox); - GBAreslayout->addWidget(CBResolution); - GBAlayout->addLayout(GBAreslayout); + // Quality - CBFullscreen = new QCheckBox(AGGroupBox); - CBFullscreen->setText(QCheckBox::tr("Fullscreen")); - GBAreslayout->addWidget(CBFullscreen); + QLabel * lblQuality = new QLabel(groupGame); + lblQuality->setText(QLabel::tr("Quality")); + lblQuality->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); + groupGame->layout()->addWidget(lblQuality, 3, 0); - QLabel * quality = new QLabel(AGGroupBox); - quality->setText(QLabel::tr("Quality")); - quality->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); - GBAqualayout->addWidget(quality); - - SLQuality = new QSlider(Qt::Horizontal, AGGroupBox); + SLQuality = new QSlider(Qt::Horizontal, groupGame); SLQuality->setTickPosition(QSlider::TicksBelow); SLQuality->setMaximum(5); SLQuality->setMinimum(0); SLQuality->setFixedWidth(150); - GBAqualayout->addWidget(SLQuality); - GBAlayout->addLayout(GBAqualayout); + groupGame->layout()->addWidget(SLQuality, 3, 1, Qt::AlignLeft); + + // Stereo spacing - QLabel * stereo = new QLabel(AGGroupBox); - stereo->setText(QLabel::tr("Stereo rendering")); - GBAstereolayout->addWidget(stereo); + QLabel * lblStereo = new QLabel(groupGame); + lblStereo->setText(QLabel::tr("Stereo rendering")); + groupGame->layout()->addWidget(lblStereo, 4, 0); - CBStereoMode = new QComboBox(AGGroupBox); + CBStereoMode = new QComboBox(groupGame); CBStereoMode->addItem(QComboBox::tr("Disabled")); CBStereoMode->addItem(QComboBox::tr("Red/Cyan")); CBStereoMode->addItem(QComboBox::tr("Cyan/Red")); @@ -316,74 +315,84 @@ CBStereoMode->addItem(QComboBox::tr("Blue/Red")); CBStereoMode->addItem(QComboBox::tr("Red/Green")); CBStereoMode->addItem(QComboBox::tr("Green/Red")); - CBStereoMode->addItem(QComboBox::tr("Side-by-side")); - CBStereoMode->addItem(QComboBox::tr("Top-Bottom")); - CBStereoMode->addItem(QComboBox::tr("Wiggle")); CBStereoMode->addItem(QComboBox::tr("Red/Cyan grayscale")); CBStereoMode->addItem(QComboBox::tr("Cyan/Red grayscale")); CBStereoMode->addItem(QComboBox::tr("Red/Blue grayscale")); CBStereoMode->addItem(QComboBox::tr("Blue/Red grayscale")); CBStereoMode->addItem(QComboBox::tr("Red/Green grayscale")); CBStereoMode->addItem(QComboBox::tr("Green/Red grayscale")); - - GBAstereolayout->addWidget(CBStereoMode); - GBAlayout->addLayout(GBAstereolayout); + CBStereoMode->addItem(QComboBox::tr("Side-by-side")); + CBStereoMode->addItem(QComboBox::tr("Top-Bottom")); + CBStereoMode->setFixedWidth(CBResolution->width()); + groupGame->layout()->addWidget(CBStereoMode, 4, 1); - hr = new QFrame(AGGroupBox); - hr->setFrameStyle(QFrame::HLine); - hr->setLineWidth(3); - hr->setFixedHeight(10); - GBAlayout->addWidget(hr); + // Divider + + groupGame->addDivider(); // row 5 - QGridLayout * GBAvollayout = new QGridLayout(); - QLabel * vol = new QLabel(AGGroupBox); - vol->setText(QLabel::tr("Initial sound volume")); - GBAvollayout->addWidget(vol, 0, 0, 1, 2); - GBAlayout->addLayout(GBAvollayout); - volumeBox = new QSpinBox(AGGroupBox); - volumeBox->setRange(0, 100); - volumeBox->setSingleStep(5); - GBAvollayout->addWidget(volumeBox, 0, 2); + // FPS limit + + QHBoxLayout * fpsLayout = new QHBoxLayout(); + groupGame->layout()->addLayout(fpsLayout, 6, 0, 1, 2); + QLabel * maxfps = new QLabel(groupGame); + maxfps->setText(QLabel::tr("FPS limit")); + fpsLayout->addWidget(maxfps); + fpsLayout->addSpacing(30); + fpsedit = new FPSEdit(groupGame); + fpsLayout->addWidget(fpsedit); - CBEnableSound = new QCheckBox(AGGroupBox); - CBEnableSound->setText(QCheckBox::tr("Enable sound")); - GBAvollayout->addWidget(CBEnableSound, 1, 0, 1, 1); + // Show FPS - CBEnableMusic = new QCheckBox(AGGroupBox); - CBEnableMusic->setText(QCheckBox::tr("Enable music")); - GBAvollayout->addWidget(CBEnableMusic, 1, 1, 1, 2); + CBShowFPS = new QCheckBox(groupGame); + CBShowFPS->setText(QCheckBox::tr("Show FPS")); + fpsLayout->addWidget(CBShowFPS); + fpsLayout->addStretch(1); - GBAvollayout->setSizeConstraint(QLayout::SetMinimumSize); + // Divider + + groupGame->addDivider(); // row 7 - hr = new QFrame(AGGroupBox); - hr->setFrameStyle(QFrame::HLine); - hr->setLineWidth(3); - hr->setFixedHeight(10); - GBAlayout->addWidget(hr); + // Alternative damage show + + CBAltDamage = new QCheckBox(groupGame); + CBAltDamage->setText(QCheckBox::tr("Alternative damage show")); + groupGame->layout()->addWidget(CBAltDamage, 8, 0, 1, 2); - CBAltDamage = new QCheckBox(AGGroupBox); - CBAltDamage->setText(QCheckBox::tr("Alternative damage show")); - GBAlayout->addWidget(CBAltDamage); + // Show ammo menu tooltips - page1Layout->addWidget(AGGroupBox, 0, 1, 3, 1); + WeaponTooltip = new QCheckBox(groupGame); + WeaponTooltip->setText(QCheckBox::tr("Show ammo menu tooltips")); + groupGame->layout()->addWidget(WeaponTooltip, 9, 0, 1, 2); } - page1Layout->addWidget(new QWidget(this), 3, 0); + { // group: frontend + OptionGroupBox * groupFrontend = new OptionGroupBox(":/res/graphicsicon.png", tr("Frontend"), this); + rightColumn->addWidget(groupFrontend); + + // Fullscreen - } + CBFrontendFullscreen = new QCheckBox(groupFrontend); + CBFrontendFullscreen->setText(QCheckBox::tr("Fullscreen")); + groupFrontend->layout()->addWidget(CBFrontendFullscreen, 0, 0); - { // page 2 - QGridLayout * page2Layout = new QGridLayout(page2); + // Visual effects - { - IconedGroupBox * gbColors = new IconedGroupBox(this); - gbColors->setIcon(QIcon(":/res/lightbulb_on.png")); - gbColors->setTitle(QGroupBox::tr("Custom colors")); - page2Layout->addWidget(gbColors, 0, 0); - QGridLayout * gbCLayout = new QGridLayout(gbColors); + CBFrontendEffects = new QCheckBox(groupFrontend); + CBFrontendEffects->setText(QCheckBox::tr("Visual effects")); + groupFrontend->layout()->addWidget(CBFrontendEffects, 1, 0); + } + + { // group: colors + OptionGroupBox * groupColors = new OptionGroupBox(":/res/lightbulb_on.png", tr("Custom colors"), this); + rightColumn->addWidget(groupColors); + + groupColors->layout()->setColumnStretch(0, 1); + groupColors->layout()->setColumnStretch(1, 1); + groupColors->layout()->setColumnStretch(2, 1); + + // Color buttons QSignalMapper * mapper = new QSignalMapper(this); - QStandardItemModel * model = DataManager::instance().colorsModel(); connect(model, SIGNAL(dataChanged(QModelIndex,QModelIndex)), this, SLOT(onColorModelDataChanged(QModelIndex,QModelIndex))); @@ -391,7 +400,7 @@ { QPushButton * btn = new QPushButton(this); btn->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum); - gbCLayout->addWidget(btn, i / 3, i % 3); + groupColors->layout()->addWidget(btn, i / 3, i % 3); btn->setStyleSheet(QString("background: %1").arg(model->item(i)->data().value().name())); m_colorButtons.append(btn); connect(btn, SIGNAL(clicked()), mapper, SLOT(map())); @@ -400,103 +409,373 @@ connect(mapper, SIGNAL(mapped(int)), this, SLOT(colorButtonClicked(int))); + // Reset default colors + QPushButton * btn = new QPushButton(this); - gbCLayout->addWidget(btn, (model->rowCount() - 1) / 3 + 1, 0, 1, 3); + groupColors->layout()->addWidget(btn, (model->rowCount() - 1) / 3 + 1, 0, 1, 3); btn->setText(tr("Reset to default colors")); connect(btn, SIGNAL(clicked()), &DataManager::instance(), SLOT(resetColors())); } - { - IconedGroupBox * gbMisc = new IconedGroupBox(this); - gbMisc->setIcon(QIcon(":/res/Settings.png")); - gbMisc->setTitle(QGroupBox::tr("Miscellaneous")); - page2Layout->addWidget(gbMisc, 0, 1); - QVBoxLayout * gbCLayout = new QVBoxLayout(gbMisc); + leftColumn->addStretch(1); + rightColumn->addStretch(1); + } + + { // audio page + QVBoxLayout * leftColumn, * rightColumn; + setupTabPage(pageAudio, &leftColumn, &rightColumn); - QHBoxLayout * GBAfpslayout = new QHBoxLayout(0); - QLabel * maxfps = new QLabel(AGGroupBox); - maxfps->setText(QLabel::tr("FPS limit")); - GBAfpslayout->addWidget(maxfps); - fpsedit = new FPSEdit(AGGroupBox); - GBAfpslayout->addWidget(fpsedit); + { // group: game + OptionGroupBox * groupGame = new OptionGroupBox(":/res/audio.png", tr("Game audio"), this); + leftColumn->addWidget(groupGame); + groupGame->layout()->setColumnStretch(1, 0); + groupGame->layout()->setColumnStretch(2, 1); + + // Initial sound volume + + QLabel * vol = new QLabel(groupGame); + vol->setText(QLabel::tr("Initial sound volume")); + groupGame->layout()->addWidget(vol, 0, 0); - CBShowFPS = new QCheckBox(AGGroupBox); - CBShowFPS->setText(QCheckBox::tr("Show FPS")); - GBAfpslayout->addWidget(CBShowFPS); + SLVolume = new QSlider(Qt::Horizontal, groupGame); + SLVolume->setTickPosition(QSlider::TicksBelow); + SLVolume->setMaximum(100); + SLVolume->setMinimum(0); + SLVolume->setFixedWidth(150); + groupGame->layout()->addWidget(SLVolume, 0, 1, 1, 2); - gbCLayout->addLayout(GBAfpslayout); - + lblVolumeLevel = new QLabel(groupGame); + lblVolumeLevel->setFixedWidth(40); + groupGame->layout()->addWidget(lblVolumeLevel, 0, 3); - WeaponTooltip = new QCheckBox(this); - WeaponTooltip->setText(QCheckBox::tr("Show ammo menu tooltips")); - gbCLayout->addWidget(WeaponTooltip); + // Sound + CBSound = new QCheckBox(groupGame); + CBSound->setText(QCheckBox::tr("Sound")); + CBSound->setWhatsThis(QCheckBox::tr("In-game sound effects")); + groupGame->layout()->addWidget(CBSound, 1, 1); - CBNameWithDate = new QCheckBox(this); - CBNameWithDate->setText(QCheckBox::tr("Append date and time to record file name")); - gbCLayout->addWidget(CBNameWithDate); + // Music - BtnAssociateFiles = new QPushButton(this); - BtnAssociateFiles->setText(QPushButton::tr("Associate file extensions")); - BtnAssociateFiles->setVisible(!custom_data && !custom_config); - gbCLayout->addWidget(BtnAssociateFiles); + CBMusic = new QCheckBox(groupGame); + CBMusic->setText(QCheckBox::tr("Music")); + CBMusic->setWhatsThis(QCheckBox::tr("In-game music")); + groupGame->layout()->addWidget(CBMusic, 1, 2, 1, 2, Qt::AlignLeft); } - { - IconedGroupBox * gbProxy = new IconedGroupBox(this); - gbProxy->setIcon(QIcon(":/res/Settings.png")); - gbProxy->setTitle(QGroupBox::tr("Proxy settings")); - page2Layout->addWidget(gbProxy, 1, 0); - QGridLayout * gbLayout = new QGridLayout(gbProxy); + { // group: frontend + OptionGroupBox * groupFrontend = new OptionGroupBox(":/res/audio.png", tr("Frontend audio"), this); + rightColumn->addWidget(groupFrontend); + + CBFrontendSound = new QCheckBox(groupFrontend); + CBFrontendSound->setText(QCheckBox::tr("Sound")); + CBFrontendSound->setWhatsThis(QCheckBox::tr("Frontend sound effects")); + groupFrontend->layout()->addWidget(CBFrontendSound, 0, 0); + + CBFrontendMusic = new QCheckBox(groupFrontend); + CBFrontendMusic->setText(QCheckBox::tr("Music")); + CBFrontendMusic->setWhatsThis(QCheckBox::tr("Frontend music")); + groupFrontend->layout()->addWidget(CBFrontendMusic, 0, 1); + } + + leftColumn->addStretch(1); + rightColumn->addStretch(1); + } + + { // network page + QVBoxLayout * leftColumn, * rightColumn; + setupTabPage(pageNetwork, &leftColumn, &rightColumn); + + { // group: account + OptionGroupBox * groupAccount = new OptionGroupBox(":/res/teamicon.png", tr("Account"), this); + leftColumn->addWidget(groupAccount); + + // Label and field for net nick + + labelNN = new QLabel(groupAccount); + labelNN->setText(QLabel::tr("Nickname")); + groupAccount->layout()->addWidget(labelNN, 0, 0); + + editNetNick = new QLineEdit(groupAccount); + editNetNick->setMaxLength(20); + editNetNick->setText(QLineEdit::tr("anonymous")); + groupAccount->layout()->addWidget(editNetNick, 0, 1); + + // Checkbox and field for password + + CBSavePassword = new QCheckBox(groupAccount); + CBSavePassword->setText(QCheckBox::tr("Save password")); + groupAccount->layout()->addWidget(CBSavePassword, 1, 0); + + editNetPassword = new QLineEdit(groupAccount); + editNetPassword->setEchoMode(QLineEdit::Password); + groupAccount->layout()->addWidget(editNetPassword, 1, 1); + } + + { // group: proxy + OptionGroupBox * groupProxy = new OptionGroupBox(":/res/net.png", tr("Proxy settings"), this); + rightColumn->addWidget(groupProxy); + + // Labels QStringList sl; - sl - << tr("Proxy host") - << tr("Proxy port") - << tr("Proxy login") - << tr("Proxy password") - ; + sl << tr("Proxy host") + << tr("Proxy port") + << tr("Proxy login") + << tr("Proxy password"); + for(int i = 0; i < sl.size(); ++i) { - QLabel * l = new QLabel(gbProxy); + QLabel * l = new QLabel(groupProxy); l->setText(sl[i]); - gbLayout->addWidget(l, i + 1, 0); + groupProxy->layout()->addWidget(l, i + 1, 0); } - cbProxyType = new QComboBox(gbProxy); + // Proxy type + + cbProxyType = new QComboBox(groupProxy); cbProxyType->addItems(QStringList() << tr("No proxy") << tr("System proxy settings") << tr("Socks5 proxy") << tr("HTTP proxy")); - gbLayout->addWidget(cbProxyType, 0, 1); + groupProxy->layout()->addWidget(cbProxyType, 0, 0, 1, 2); + + // Proxy - leProxy = new QLineEdit(gbProxy); - gbLayout->addWidget(leProxy, 1, 1); + leProxy = new QLineEdit(groupProxy); + groupProxy->layout()->addWidget(leProxy, 1, 1); - sbProxyPort = new QSpinBox(gbProxy); + // Proxy + + sbProxyPort = new QSpinBox(groupProxy); sbProxyPort->setMaximum(65535); - gbLayout->addWidget(sbProxyPort, 2, 1); + groupProxy->layout()->addWidget(sbProxyPort, 2, 1); - leProxyLogin = new QLineEdit(gbProxy); - gbLayout->addWidget(leProxyLogin, 3, 1); + leProxyLogin = new QLineEdit(groupProxy); + groupProxy->layout()->addWidget(leProxyLogin, 3, 1); - leProxyPassword = new QLineEdit(gbProxy); + leProxyPassword = new QLineEdit(groupProxy); leProxyPassword->setEchoMode(QLineEdit::Password); - gbLayout->addWidget(leProxyPassword, 4, 1); + groupProxy->layout()->addWidget(leProxyPassword, 4, 1); connect(cbProxyType, SIGNAL(currentIndexChanged(int)), this, SLOT(onProxyTypeChanged())); onProxyTypeChanged(); } - page2Layout->addWidget(new QWidget(this), 2, 0); + leftColumn->addStretch(1); + rightColumn->addStretch(1); + } + + { // advanced page + QVBoxLayout * leftColumn, * rightColumn; + setupTabPage(pageAdvanced, &leftColumn, &rightColumn); + + { // group: miscellaneous + OptionGroupBox * groupMisc = new OptionGroupBox(":/res/Settings.png", tr("Miscellaneous"), this); + leftColumn->addWidget(groupMisc); + + // Language + + QLabel *labelLanguage = new QLabel(groupMisc); + labelLanguage->setText(QLabel::tr("Locale")); + groupMisc->layout()->addWidget(labelLanguage, 0, 0); + + CBLanguage = new QComboBox(groupMisc); + groupMisc->layout()->addWidget(CBLanguage, 0, 1); + QStringList locs = DataManager::instance().entryList("Locale", QDir::Files, QStringList("hedgewars_*.qm")); + CBLanguage->addItem(QComboBox::tr("(System default)"), QString("")); + for(int i = 0; i < locs.count(); i++) + { + QLocale loc(locs[i].replace(QRegExp("hedgewars_(.*)\\.qm"), "\\1")); + CBLanguage->addItem(QLocale::languageToString(loc.language()) + " (" + QLocale::countryToString(loc.country()) + ")", loc.name()); + } + + // Divider + + groupMisc->addDivider(); // row 1 + + // Append date and time to record file name + + CBNameWithDate = new QCheckBox(groupMisc); + CBNameWithDate->setText(QCheckBox::tr("Append date and time to record file name")); + groupMisc->layout()->addWidget(CBNameWithDate, 2, 0, 1, 2); + + // Associate file extensions + + BtnAssociateFiles = new QPushButton(groupMisc); + BtnAssociateFiles->setText(QPushButton::tr("Associate file extensions")); + BtnAssociateFiles->setVisible(!custom_data && !custom_config); + groupMisc->layout()->addWidget(BtnAssociateFiles, 3, 0, 1, 2); + } + +#ifdef __APPLE__ +#ifdef SPARKLE_ENABLED + { // group: updates + OptionGroupBox * groupUpdates = new OptionGroupBox(":/res/net.png", tr("Updates"), this); + rightColumn->addWidget(groupUpdates); + + // Check for updates at startup + + CBAutoUpdate = new QCheckBox(groupUpdates); + CBAutoUpdate->setText(QCheckBox::tr("Check for updates at startup")); + groupUpdates->layout()->addWidget(CBAutoUpdate, 0, 0); + + // Check for updates now + + btnUpdateNow = new QPushButton(groupUpdates); + connect(btnUpdateNow, SIGNAL(clicked()), this, SLOT(checkForUpdates())); + btnUpdateNow->setWhatsThis(tr("Check for updates")); + btnUpdateNow->setText("Check now"); + btnUpdateNow->setFixedSize(130, 30); + groupUpdates->layout()->addWidget(btnUpdateNow, 0, 1); + } +#endif +#endif + + leftColumn->addStretch(1); + rightColumn->addStretch(1); } +#ifdef VIDEOREC + { // video recording page + OptionGroupBox * groupVideoRec = new OptionGroupBox(":/res/camera.png", tr("Video recording options"), this); + groupVideoRec->setMinimumWidth(500); + groupVideoRec->setMaximumWidth(650); + QHBoxLayout * layoutVideoRec = new QHBoxLayout(pageVideoRec); + layoutVideoRec->addWidget(groupVideoRec, 1, Qt::AlignTop | Qt::AlignHCenter); + + // label for format + + QLabel *labelFormat = new QLabel(groupVideoRec); + labelFormat->setText(QLabel::tr("Format")); + groupVideoRec->layout()->addWidget(labelFormat, 0, 0); + + // list of supported formats + + comboAVFormats = new QComboBox(groupVideoRec); + groupVideoRec->layout()->addWidget(comboAVFormats, 0, 1, 1, 4); + LibavInteraction::instance().fillFormats(comboAVFormats); + + // separator + + QFrame * hr = new QFrame(groupVideoRec); + hr->setFrameStyle(QFrame::HLine); + hr->setLineWidth(3); + hr->setFixedHeight(10); + groupVideoRec->layout()->addWidget(hr, 1, 0, 1, 5); + + // label for audio codec + + QLabel *labelACodec = new QLabel(groupVideoRec); + labelACodec->setText(QLabel::tr("Audio codec")); + groupVideoRec->layout()->addWidget(labelACodec, 2, 0); + + // list of supported audio codecs + + comboAudioCodecs = new QComboBox(groupVideoRec); + groupVideoRec->layout()->addWidget(comboAudioCodecs, 2, 1, 1, 3); + + // checkbox 'record audio' + + checkRecordAudio = new QCheckBox(groupVideoRec); + checkRecordAudio->setText(QCheckBox::tr("Record audio")); + groupVideoRec->layout()->addWidget(checkRecordAudio, 2, 4); + + // separator + + hr = new QFrame(groupVideoRec); + hr->setFrameStyle(QFrame::HLine); + hr->setLineWidth(3); + hr->setFixedHeight(10); + groupVideoRec->layout()->addWidget(hr, 3, 0, 1, 5); + + // label for video codec + + QLabel *labelVCodec = new QLabel(groupVideoRec); + labelVCodec->setText(QLabel::tr("Video codec")); + groupVideoRec->layout()->addWidget(labelVCodec, 4, 0); + + // list of supported video codecs + + comboVideoCodecs = new QComboBox(groupVideoRec); + groupVideoRec->layout()->addWidget(comboVideoCodecs, 4, 1, 1, 4); + + // label for resolution + + QLabel *labelRes = new QLabel(groupVideoRec); + labelRes->setText(QLabel::tr("Resolution")); + groupVideoRec->layout()->addWidget(labelRes, 5, 0); + + // width + + widthEdit = new QLineEdit(groupVideoRec); + widthEdit->setValidator(new QIntValidator(this)); + groupVideoRec->layout()->addWidget(widthEdit, 5, 1); + + // x + + QLabel *labelX = new QLabel(groupVideoRec); + labelX->setText("X"); + groupVideoRec->layout()->addWidget(labelX, 5, 2); + + // height + + heightEdit = new QLineEdit(groupVideoRec); + heightEdit->setValidator(new QIntValidator(groupVideoRec)); + groupVideoRec->layout()->addWidget(heightEdit, 5, 3); + + // checkbox 'use game resolution' + + checkUseGameRes = new QCheckBox(groupVideoRec); + checkUseGameRes->setText(QCheckBox::tr("Use game resolution")); + groupVideoRec->layout()->addWidget(checkUseGameRes, 5, 4); + + // label for framerate + + QLabel *labelFramerate = new QLabel(groupVideoRec); + labelFramerate->setText(QLabel::tr("Framerate")); + groupVideoRec->layout()->addWidget(labelFramerate, 6, 0); + + framerateBox = new QComboBox(groupVideoRec); + framerateBox->addItem("24 fps", 24); + framerateBox->addItem("25 fps", 25); + framerateBox->addItem("30 fps", 30); + framerateBox->addItem("50 fps", 50); + framerateBox->addItem("60 fps", 60); + groupVideoRec->layout()->addWidget(framerateBox, 6, 1); + + // label for Bitrate + + QLabel *labelBitrate = new QLabel(groupVideoRec); + labelBitrate->setText(QLabel::tr("Bitrate (Kbps)")); + groupVideoRec->layout()->addWidget(labelBitrate, 6, 2); + + // bitrate + + bitrateBox = new QSpinBox(groupVideoRec); + bitrateBox->setRange(100, 5000); + bitrateBox->setSingleStep(100); + groupVideoRec->layout()->addWidget(bitrateBox, 6, 3); + + // button 'set default options' + + btnDefaults = new QPushButton(groupVideoRec); + btnDefaults->setText(QPushButton::tr("Set default options")); + btnDefaults->setWhatsThis(QPushButton::tr("Restore default coding parameters")); + groupVideoRec->layout()->addWidget(btnDefaults, 7, 0, 1, 5); + } +#endif + previousQuality = this->SLQuality->value(); previousResolutionIndex = this->CBResolution->currentIndex(); previousFullscreenValue = this->CBFullscreen->isChecked(); + setFullscreen(CBFullscreen->isChecked()); + setVolume(SLVolume->value()); + + // mutually exclude window and fullscreen resolution return pageLayout; } @@ -507,6 +786,14 @@ void PageOptions::connectSignals() { +#ifdef VIDEOREC + connect(checkUseGameRes, SIGNAL(stateChanged(int)), this, SLOT(changeUseGameRes(int))); + connect(checkRecordAudio, SIGNAL(stateChanged(int)), this, SLOT(changeRecordAudio(int))); + connect(comboAVFormats, SIGNAL(currentIndexChanged(int)), this, SLOT(changeAVFormat(int))); + connect(btnDefaults, SIGNAL(clicked()), this, SLOT(setDefaultOptions())); +#endif + //connect(this, SIGNAL(pageEnter()), this, SLOT(setTeamOptionsEnabled())); + connect(SLVolume, SIGNAL(valueChanged(int)), this, SLOT(setVolume(int))); connect(SLQuality, SIGNAL(valueChanged(int)), this, SLOT(setQuality(int))); connect(CBResolution, SIGNAL(currentIndexChanged(int)), this, SLOT(setResolution(int))); connect(CBFullscreen, SIGNAL(stateChanged(int)), this, SLOT(setFullscreen(int))); @@ -515,7 +802,27 @@ connect(CBSavePassword, SIGNAL(stateChanged(int)), this, SLOT(savePwdChanged(int))); } -PageOptions::PageOptions(QWidget* parent) : AbstractPage(parent) +void PageOptions::setVolume(int volume) +{ + lblVolumeLevel->setText(QString("%1\%").arg(volume)); +} + +void PageOptions::setupTabPage(QWidget * tabpage, QVBoxLayout ** leftColumn, QVBoxLayout ** rightColumn) +{ + QHBoxLayout * twoColumns = new QHBoxLayout(tabpage); + twoColumns->setSpacing(0); + *leftColumn = new QVBoxLayout(); + *rightColumn = new QVBoxLayout(); + (*leftColumn)->setSpacing(OPTION_BOX_SPACING); + (*rightColumn)->setSpacing(OPTION_BOX_SPACING); + twoColumns->addStretch(4); + twoColumns->addLayout(*leftColumn, 0); + twoColumns->addStretch(1); + twoColumns->addLayout(*rightColumn, 0); + twoColumns->addStretch(4); +} + +PageOptions::PageOptions(QWidget* parent) : AbstractPage(parent), config(0) { initPage(); } @@ -528,16 +835,16 @@ { this->SLQuality->setValue(this->SLQuality->maximum()); this->SLQuality->setEnabled(false); - this->CBFullscreen->setEnabled(!forced); this->CBFullscreen->setChecked(forced ? true : previousFullscreenValue); + setFullscreen(forced ? true : previousFullscreenValue); this->CBResolution->setCurrentIndex(forced ? 0 : previousResolutionIndex); } else { this->SLQuality->setEnabled(true); - this->CBFullscreen->setEnabled(true); this->SLQuality->setValue(previousQuality); this->CBFullscreen->setChecked(previousFullscreenValue); + setFullscreen(previousFullscreenValue); this->CBResolution->setCurrentIndex(previousResolutionIndex); } } @@ -555,6 +862,11 @@ { Q_UNUSED(state); + lblFullScreenRes->setVisible(state); + CBResolution->setVisible(state); + lblWinScreenRes->setVisible(!state); + winResContainer->setVisible(!state); + int index = this->CBStereoMode->currentIndex(); if (index != 7 && index != 8 && index != 9) previousFullscreenValue = this->CBFullscreen->isChecked(); @@ -634,3 +946,199 @@ leProxyLogin->setEnabled(b); leProxyPassword->setEnabled(b); } + +// Video Recording + +void PageOptions::setConfig(GameUIConfig * config) +{ + this->config = config; +} + +// user changed file format, we need to update list of codecs +void PageOptions::changeAVFormat(int index) +{ + // remember selected codecs + QString prevVCodec = videoCodec(); + QString prevACodec = audioCodec(); + + // clear lists of codecs + comboVideoCodecs->clear(); + comboAudioCodecs->clear(); + + // get list of codecs for specified format + LibavInteraction::instance().fillCodecs(comboAVFormats->itemData(index).toString(), comboVideoCodecs, comboAudioCodecs); + + // disable audio if there is no audio codec + if (comboAudioCodecs->count() == 0) + { + checkRecordAudio->setChecked(false); + checkRecordAudio->setEnabled(false); + } + else + checkRecordAudio->setEnabled(true); + + // restore selected codecs if possible + int iVCodec = comboVideoCodecs->findData(prevVCodec); + if (iVCodec != -1) + comboVideoCodecs->setCurrentIndex(iVCodec); + int iACodec = comboAudioCodecs->findData(prevACodec); + if (iACodec != -1) + comboAudioCodecs->setCurrentIndex(iACodec); +} + +// user switched checkbox 'use game resolution' +void PageOptions::changeUseGameRes(int state) +{ + if (state && config) + { + // set resolution to game resolution + QRect resolution = config->vid_Resolution(); + widthEdit->setText(QString::number(resolution.width())); + heightEdit->setText(QString::number(resolution.height())); + } + widthEdit->setEnabled(!state); + heightEdit->setEnabled(!state); +} + +// user switched checkbox 'record audio' +void PageOptions::changeRecordAudio(int state) +{ + comboAudioCodecs->setEnabled(!!state); +} + +void PageOptions::setDefaultCodecs() +{ + // VLC should be able to handle any of these configurations + // Quicktime X only opens the first one + // Windows Media Player TODO + if (tryCodecs("mp4", "libx264", "aac")) + return; + if (tryCodecs("mp4", "libx264", "libfaac")) + return; + if (tryCodecs("mp4", "libx264", "libmp3lame")) + return; + if (tryCodecs("mp4", "libx264", "mp2")) + return; + if (tryCodecs("avi", "libxvid", "libmp3lame")) + return; + if (tryCodecs("avi", "libxvid", "ac3_fixed")) + return; + if (tryCodecs("avi", "libxvid", "mp2")) + return; + if (tryCodecs("avi", "mpeg4", "libmp3lame")) + return; + if (tryCodecs("avi", "mpeg4", "ac3_fixed")) + return; + if (tryCodecs("avi", "mpeg4", "mp2")) + return; + + // this shouldn't happen, just in case + if (tryCodecs("ogg", "libtheora", "libvorbis")) + return; + tryCodecs("ogg", "libtheora", "flac"); +} + +void PageOptions::setDefaultOptions() +{ + framerateBox->setCurrentIndex(2); + bitrateBox->setValue(1000); + checkRecordAudio->setChecked(true); + checkUseGameRes->setChecked(true); + setDefaultCodecs(); +} + +void PageOptions::checkForUpdates() +{ + AutoUpdater *updater = NULL; + +#ifdef __APPLE__ +#ifdef SPARKLE_ENABLED + updater = new SparkleAutoUpdater(); +#endif +#endif + + if (updater) + { + updater->checkForUpdatesNow(); + delete updater; + } +} + +bool PageOptions::tryCodecs(const QString & format, const QString & vcodec, const QString & acodec) +{ + // first we should change format + int iFormat = comboAVFormats->findData(format); + if (iFormat == -1) + return false; + comboAVFormats->setCurrentIndex(iFormat); + // format was changed, so lists of codecs were automatically updated to codecs supported by this format + + // try to find video codec + int iVCodec = comboVideoCodecs->findData(vcodec); + if (iVCodec == -1) + return false; + comboVideoCodecs->setCurrentIndex(iVCodec); + + // try to find audio codec + int iACodec = comboAudioCodecs->findData(acodec); + if (iACodec == -1 && checkRecordAudio->isChecked()) + return false; + if (iACodec != -1) + comboAudioCodecs->setCurrentIndex(iACodec); + + return true; +} + +// When the current tab is switched +void PageOptions::tabIndexChanged(int index) +{ + if (index == binderTab) // Switched to bind tab + { + binder->resetInterface(); + + if (!config) return; + + QStandardItemModel * binds = DataManager::instance().bindsModel(); + for(int i = 0; i < BINDS_NUMBER; i++) + { + QString value = config->bind(i); + QModelIndexList mdl = binds->match(binds->index(0, 0), Qt::UserRole + 1, value, 1, Qt::MatchExactly); + if(mdl.size() == 1) binder->setBindIndex(i, mdl[0].row()); + } + } + + currentTab = index; +} + +// When a key bind combobox is changed +void PageOptions::bindUpdated(int bindID) +{ + int bindIndex = binder->bindIndex(bindID); + + if (bindIndex == 0) bindIndex = resetBindToDefault(bindID); + + // Save bind + QStandardItemModel * binds = DataManager::instance().bindsModel(); + QString strbind = binds->index(binder->bindIndex(bindID), 0).data(Qt::UserRole + 1).toString(); + config->setBind(bindID, strbind); +} + +// Changes a key bind (bindID) to its default value. This updates the bind's combo-box in the UI. +// Returns: The bind model index of the default. +int PageOptions::resetBindToDefault(int bindID) +{ + QStandardItemModel * binds = DataManager::instance().bindsModel(); + QModelIndexList mdl = binds->match(binds->index(0, 0), Qt::UserRole + 1, cbinds[bindID].strbind, 1, Qt::MatchExactly); + if(mdl.size() == 1) binder->setBindIndex(bindID, mdl[0].row()); + return mdl[0].row(); +} + +// Called when "reset all binds" button is pressed +void PageOptions::resetAllBinds() +{ + for (int i = 0; i < BINDS_NUMBER; i++) + { + resetBindToDefault(i); + bindUpdated(i); + } +} diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/ui/page/pageoptions.h --- a/QTfrontend/ui/page/pageoptions.h Sun Nov 18 01:06:01 2012 +0400 +++ b/QTfrontend/ui/page/pageoptions.h Fri Feb 22 05:05:32 2013 +0100 @@ -19,11 +19,32 @@ #ifndef PAGE_OPTIONS_H #define PAGE_OPTIONS_H +#include "igbox.h" #include "AbstractPage.h" +#include + +class GameUIConfig; class FPSEdit; -class IconedGroupBox; class QSignalMapper; +class KeyBinder; +class QGridLayout; + +// Let's stay D-R-Y +class OptionGroupBox : public IconedGroupBox +{ + Q_OBJECT + + public: + OptionGroupBox(const QString & iconName, + const QString & title, + QWidget * parent = 0); + QGridLayout * layout(); + void addDivider(); + + private: + QGridLayout * m_layout; +}; class PageOptions : public AbstractPage { @@ -56,11 +77,13 @@ QComboBox *CBTeamName; IconedGroupBox *AGGroupBox; QComboBox *CBResolution; + QLineEdit *windowWidthEdit; + QLineEdit *windowHeightEdit; QComboBox *CBStereoMode; - QCheckBox *CBEnableSound; - QCheckBox *CBEnableFrontendSound; - QCheckBox *CBEnableMusic; - QCheckBox *CBEnableFrontendMusic; + QCheckBox *CBFrontendSound; + QCheckBox *CBFrontendMusic; + QCheckBox *CBSound; + QCheckBox *CBMusic; QCheckBox *CBFullscreen; QCheckBox *CBFrontendFullscreen; QCheckBox *CBShowFPS; @@ -69,11 +92,13 @@ QCheckBox *CBNameWithDate; #ifdef __APPLE__ QCheckBox *CBAutoUpdate; + QPushButton *BtnUpdateNow; #endif FPSEdit *fpsedit; QLabel *labelNN; - QSpinBox * volumeBox; + QSlider *SLVolume; + QLabel *lblVolumeLevel; QLineEdit *editNetNick; QLineEdit *editNetPassword; QSlider *SLQuality; @@ -84,6 +109,26 @@ QLineEdit * leProxyLogin; QLineEdit * leProxyPassword; + QComboBox *framerateBox; + QSpinBox *bitrateBox; + QLineEdit *widthEdit; + QLineEdit *heightEdit; + QCheckBox *checkUseGameRes; + QCheckBox *checkRecordAudio; + + QString format() + { return comboAVFormats->itemData(comboAVFormats->currentIndex()).toString(); } + + QString videoCodec() + { return comboVideoCodecs->itemData(comboVideoCodecs->currentIndex()).toString(); } + + QString audioCodec() + { return comboAudioCodecs->itemData(comboAudioCodecs->currentIndex()).toString(); } + + void setDefaultCodecs(); + bool tryCodecs(const QString & format, const QString & vcodec, const QString & acodec); + void setConfig(GameUIConfig * config); + void setTeamOptionsEnabled(bool enabled); signals: @@ -96,6 +141,8 @@ QLayout * bodyLayoutDefinition(); QLayout * footerLayoutDefinition(); void connectSignals(); + int resetBindToDefault(int bindID); + void setupTabPage(QWidget * tabpage, QVBoxLayout ** leftColumn, QVBoxLayout ** rightColumn); bool previousFullscreenValue; int previousResolutionIndex; @@ -106,6 +153,20 @@ QPushButton *BtnDeleteTeam; QList m_colorButtons; + QComboBox *comboAVFormats; + QComboBox *comboVideoCodecs; + QComboBox *comboAudioCodecs; + QPushButton *btnDefaults; + QPushButton *btnUpdateNow; + GameUIConfig * config; + KeyBinder * binder; + int currentTab; + int binderTab; + + QLabel * lblFullScreenRes; + QLabel * lblWinScreenRes; + QWidget * winResContainer; + private slots: void forceFullscreen(int index); void setFullscreen(int state); @@ -118,6 +179,17 @@ void colorButtonClicked(int i); void onColorModelDataChanged(const QModelIndex & topLeft, const QModelIndex & bottomRight); void onProxyTypeChanged(); + void changeAVFormat(int index); + void changeUseGameRes(int state); + void changeRecordAudio(int state); + void checkForUpdates(); + void tabIndexChanged(int); + void bindUpdated(int bindID); + void resetAllBinds(); + void setVolume(int); + + public slots: + void setDefaultOptions(); }; #endif diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/ui/page/pageroomslist.cpp --- a/QTfrontend/ui/page/pageroomslist.cpp Sun Nov 18 01:06:01 2012 +0400 +++ b/QTfrontend/ui/page/pageroomslist.cpp Fri Feb 22 05:05:32 2013 +0100 @@ -16,102 +16,177 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ +#include +#include #include -#include #include #include #include #include #include #include -#include +#include +#include +#include #include #include "roomslistmodel.h" #include "ammoSchemeModel.h" -#include "pageroomslist.h" #include "hwconsts.h" #include "chatwidget.h" +#include "roomnameprompt.h" +#include "lineeditcursor.h" +#include "pageroomslist.h" QLayout * PageRoomsList::bodyLayoutDefinition() { - QGridLayout * pageLayout = new QGridLayout(); + QVBoxLayout * pageLayout = new QVBoxLayout(); + pageLayout->setSpacing(0); + + QGridLayout * topLayout = new QGridLayout(); + topLayout->setSpacing(0); + pageLayout->addLayout(topLayout, 0); + + // Help/prompt message at top + QLabel * lblDesc = new QLabel(tr("Search for a room:")); + lblDesc->setObjectName("lblDesc"); + lblDesc->setStyleSheet("#lblDesc { color: #130F2A; background: #F6CB1C; border: solid 4px #F6CB1C; border-top-left-radius: 10px; padding: 4px 10px;}"); + lblDesc->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); + lblDesc->setFixedHeight(24); + lblDesc->setMinimumWidth(0); + + // Search text box + QWidget * searchContainer = new QWidget(); + searchContainer->setFixedHeight(24); + searchContainer->setObjectName("searchContainer"); + searchContainer->setStyleSheet("#searchContainer { background: #F6CB1C; border-top-right-radius: 10px; padding: 3px; }"); + searchContainer->setFixedWidth(200); + searchText = new LineEditCursor(searchContainer); + searchText->setFixedWidth(200); + searchText->setMaxLength(60); + searchText->setFixedHeight(22); + searchText->setStyleSheet("LineEditCursor { border-width: 0px; border-radius: 6px; margin-top: 3px; margin-right: 3px; padding-left: 4px; padding-bottom: 2px; background-color: rgb(23, 11, 54); } LineEditCursor:hover, LineEditCursor:focus { background-color: rgb(13, 5, 68); }"); - QHBoxLayout * newRoomLayout = new QHBoxLayout(); - QLabel * roomNameLabel = new QLabel(this); - roomNameLabel->setText(tr("Room Name:")); - roomName = new QLineEdit(this); - roomName->setMaxLength(60); - newRoomLayout->addWidget(roomNameLabel); - newRoomLayout->addWidget(roomName); - pageLayout->addLayout(newRoomLayout, 0, 0, 1, 2); + // Corner widget + QLabel * corner = new QLabel(); + corner->setPixmap(QPixmap(QString::fromUtf8(":/res/inverse-corner-bl.png"))); + corner->setFixedSize(10, 10); + + const QIcon& lp = QIcon(":/res/new.png"); + QSize sz = lp.actualSize(QSize(65535, 65535)); + BtnCreate = new QPushButton(); + BtnCreate->setText(tr("Create room")); + BtnCreate->setIcon(lp); + BtnCreate->setStyleSheet("padding: 4px 8px; margin-bottom: 6px;"); + + BtnJoin = new QPushButton(tr("Join room")); + BtnJoin->setStyleSheet("padding: 4px 8px; margin-bottom: 6px; margin-left: 6px;"); + BtnJoin->setEnabled(false); - roomsList = new QTableView(this); + // Add widgets to top layout + topLayout->addWidget(lblDesc, 1, 0); + topLayout->addWidget(searchContainer, 1, 1); + topLayout->addWidget(corner, 1, 2, Qt::AlignBottom); + topLayout->addWidget(BtnCreate, 0, 4, 2, 1); + topLayout->addWidget(BtnJoin, 0, 5, 2, 1); + + // Top layout stretch + topLayout->setRowStretch(0, 1); + topLayout->setRowStretch(1, 0); + topLayout->setColumnStretch(3, 1); + + // Room list + + roomsList = new RoomTableView(this); roomsList->setSelectionBehavior(QAbstractItemView::SelectRows); roomsList->verticalHeader()->setVisible(false); roomsList->horizontalHeader()->setResizeMode(QHeaderView::Interactive); roomsList->setAlternatingRowColors(true); roomsList->setShowGrid(false); roomsList->setSelectionMode(QAbstractItemView::SingleSelection); - pageLayout->addWidget(roomsList, 1, 0, 3, 2); - pageLayout->setRowStretch(2, 100); + roomsList->setStyleSheet("QTableView { border-top-left-radius: 0px; }"); + roomsList->setFocusPolicy(Qt::NoFocus); + pageLayout->addWidget(roomsList, 200); + + // Room filters container + + QWidget * filtersContainer = new QWidget(); + filtersContainer->setMaximumWidth(800); + filtersContainer->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); - QHBoxLayout * filterLayout = new QHBoxLayout(); + pageLayout->addSpacing(7); + pageLayout->addWidget(filtersContainer, 0, Qt::AlignHCenter); + pageLayout->addSpacing(7); + + QHBoxLayout * filterLayout = new QHBoxLayout(filtersContainer); + filterLayout->setSpacing(0); + filterLayout->setMargin(0); - QLabel * stateLabel = new QLabel(this); - CBState = new QComboBox(this); + const int filterSpacing = 20; + + // State button - filterLayout->addWidget(stateLabel); - filterLayout->addWidget(CBState); - filterLayout->addStretch(1); + QPushButton * btnState = new QPushButton(tr("Room state")); + btnState->setStyleSheet("QPushButton { padding: 2px 4px; } QPushButton:pressed { background-color: #ffcc00; border-color: #ffcc00; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; color: #11084A; }"); + btnState->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Preferred); + filterLayout->addWidget(btnState); + filterLayout->addSpacing(filterSpacing); + + // State menu - QLabel * ruleLabel = new QLabel(this); - ruleLabel->setText(tr("Rules:")); + QMenu * stateMenu = new QMenu(btnState); + showGamesInLobby = new QAction(QAction::tr("Show games in lobby"), stateMenu); + showGamesInLobby->setCheckable(true); + showGamesInLobby->setChecked(true); + showGamesInProgress = new QAction(QAction::tr("Show games in-progress"), stateMenu); + showGamesInProgress->setCheckable(true); + showGamesInProgress->setChecked(true); + stateMenu->addAction(showGamesInLobby); + stateMenu->addAction(showGamesInProgress); + btnState->setMenu(stateMenu); + + // Rules dropdown + CBRules = new QComboBox(this); + CBRules->setStyleSheet("QComboBox { border-top-left-radius: 0px; border-bottom-left-radius: 0px; border-left-width: 2px; }"); + + QLabel * ruleLabel = new QLabel(tr("Rules:"), this); + ruleLabel->setFixedHeight(CBRules->height()); + ruleLabel->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); + ruleLabel->setStyleSheet("border: solid; border-width: 3px; border-right-width: 0px; border-color: #ffcc00; border-top-left-radius: 10px; border-bottom-left-radius: 10px; background-color: rgba(13, 5, 68, 70%);"); filterLayout->addWidget(ruleLabel); filterLayout->addWidget(CBRules); - filterLayout->addStretch(1); + filterLayout->addSpacing(filterSpacing); + + // Weapons dropdown - QLabel * weaponLabel = new QLabel(this); - weaponLabel->setText(tr("Weapons:")); CBWeapons = new QComboBox(this); + CBWeapons->setStyleSheet("QComboBox { border-top-left-radius: 0px; border-bottom-left-radius: 0px; border-left-width: 2px; }"); + + QLabel * weaponLabel = new QLabel(tr("Weapons:"), this); + weaponLabel->setFixedHeight(CBWeapons->height()); + weaponLabel->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); + weaponLabel->setStyleSheet("border: solid; border-width: 3px; border-right-width: 0px; border-color: #ffcc00; border-top-left-radius: 10px; border-bottom-left-radius: 10px; background-color: rgba(13, 5, 68, 70%);"); filterLayout->addWidget(weaponLabel); filterLayout->addWidget(CBWeapons); - filterLayout->addStretch(1); + filterLayout->addSpacing(filterSpacing); - QLabel * searchLabel = new QLabel(this); - searchLabel->setText(tr("Search:")); - searchText = new QLineEdit(this); - searchText->setMaxLength(60); - searchText->setMinimumWidth(100); - searchText->setMaximumWidth(360); - filterLayout->addWidget(searchLabel); - filterLayout->addWidget(searchText); - filterLayout->setStretchFactor(searchText, 2); + // Clear filters button - pageLayout->addLayout(filterLayout, 4, 0, 1, 2); - - chatWidget = new HWChatWidget(this, m_gameSettings, false); - pageLayout->addWidget(chatWidget, 5, 0, 1, 3); - pageLayout->setRowStretch(5, 350); + BtnClear = addButton(tr("Clear filters"), filterLayout, 0); + weaponLabel->setFixedHeight(CBWeapons->height()); + BtnClear->setStyleSheet("padding: 4px;"); - BtnCreate = addButton(tr("Create"), pageLayout, 0, 2); - BtnJoin = addButton(tr("Join"), pageLayout, 1, 2); - BtnClear = addButton(tr("Clear"), pageLayout, 4, 2); + // Lobby chat - // strech all but the buttons column - pageLayout->setColumnStretch(0, 1); - pageLayout->setColumnStretch(1, 1); - pageLayout->setColumnStretch(2, 0); + chatWidget = new HWChatWidget(this, false); + pageLayout->addWidget(chatWidget, 350); CBRules->addItem(QComboBox::tr("Any")); - CBState->addItem(QComboBox::tr("Any")); - CBState->addItem(QComboBox::tr("In lobby")); - CBState->addItem(QComboBox::tr("In progress")); return pageLayout; } @@ -120,18 +195,9 @@ { QHBoxLayout * bottomLayout = new QHBoxLayout(); - lblCount = new QLabel(this); - bottomLayout->addWidget(lblCount, 0, Qt::AlignHCenter); - bottomLayout->setStretchFactor(lblCount, 1); - lblCount->setText("?"); - lblCount->setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Maximum); - - BtnAdmin = addButton(tr("Admin features"), bottomLayout, 1); - BtnAdmin->setMinimumWidth(160); - - // strech left part - bottomLayout->setStretch(0, 1); - bottomLayout->setStretch(1, 0); + BtnAdmin = addButton(tr("Admin features"), bottomLayout, 0); + BtnAdmin->setStyleSheet("padding: 4px auto;"); + BtnAdmin->setWhatsThis(tr("Open server administration page")); return bottomLayout; } @@ -143,24 +209,44 @@ connect(BtnCreate, SIGNAL(clicked()), this, SLOT(onCreateClick())); connect(BtnJoin, SIGNAL(clicked()), this, SLOT(onJoinClick())); connect(BtnClear, SIGNAL(clicked()), this, SLOT(onClearClick())); + connect(searchText, SIGNAL(moveUp()), this, SLOT(moveSelectionUp())); + connect(searchText, SIGNAL(moveDown()), this, SLOT(moveSelectionDown())); + connect(searchText, SIGNAL(returnPressed()), this, SLOT(onJoinClick())); connect(roomsList, SIGNAL(doubleClicked (const QModelIndex &)), this, SLOT(onJoinClick())); - connect(CBState, SIGNAL(currentIndexChanged (int)), this, SLOT(onFilterChanged())); + connect(roomsList, SIGNAL(clicked (const QModelIndex &)), searchText, SLOT(setFocus())); + connect(showGamesInLobby, SIGNAL(triggered()), this, SLOT(onFilterChanged())); + connect(showGamesInProgress, SIGNAL(triggered()), this, SLOT(onFilterChanged())); connect(CBRules, SIGNAL(currentIndexChanged (int)), this, SLOT(onFilterChanged())); connect(CBWeapons, SIGNAL(currentIndexChanged (int)), this, SLOT(onFilterChanged())); connect(searchText, SIGNAL(textChanged (const QString &)), this, SLOT(onFilterChanged())); connect(this, SIGNAL(askJoinConfirmation (const QString &)), this, SLOT(onJoinConfirmation(const QString &)), Qt::QueuedConnection); + // Set focus on search box + connect(this, SIGNAL(pageEnter()), searchText, SLOT(setFocus())); + // sorting connect(roomsList->horizontalHeader(), SIGNAL(sortIndicatorChanged(int, Qt::SortOrder)), this, SLOT(onSortIndicatorChanged(int, Qt::SortOrder))); } +void PageRoomsList::moveSelectionUp() +{ + roomsList->setCurrentIndex(roomsList->moveCursor(QAbstractItemView::MoveUp, Qt::NoModifier)); +} -PageRoomsList::PageRoomsList(QWidget* parent, QSettings * gameSettings) : +void PageRoomsList::moveSelectionDown() +{ + roomsList->setCurrentIndex(roomsList->moveCursor(QAbstractItemView::MoveDown, Qt::NoModifier)); +} + +void PageRoomsList::roomSelectionChanged(const QModelIndex & current, const QModelIndex & previous) +{ + BtnJoin->setEnabled(current.isValid()); +} + +PageRoomsList::PageRoomsList(QWidget* parent) : AbstractPage(parent) { - m_gameSettings = gameSettings; - roomsModel = NULL; stateFilteredModel = NULL; schemeFilteredModel = NULL; @@ -421,16 +507,21 @@ void PageRoomsList::onCreateClick() { - if (roomName->text().size()) - emit askForCreateRoom(roomName->text()); + RoomNamePrompt prompt(parentWidget()->parentWidget(), m_gameSettings->value("frontend/lastroomname", QString()).toString()); + connect(&prompt, SIGNAL(roomNameChosen(const QString &)), this, SLOT(onRoomNameChosen(const QString &))); + prompt.exec(); +} + +void PageRoomsList::onRoomNameChosen(const QString & roomName) +{ + if (!roomName.trimmed().isEmpty()) + { + m_gameSettings->setValue("frontend/lastroomname", roomName); + emit askForCreateRoom(roomName); + } else { - QMessageBox roomNameMsg(this); - roomNameMsg.setIcon(QMessageBox::Warning); - roomNameMsg.setWindowTitle(QMessageBox::tr("Room Name - Error")); - roomNameMsg.setText(QMessageBox::tr("Please enter room name")); - roomNameMsg.setWindowModality(Qt::WindowModal); - roomNameMsg.exec(); + onCreateClick(); } } @@ -465,10 +556,12 @@ void PageRoomsList::onClearClick() { - CBState->setCurrentIndex(0); + showGamesInLobby->setChecked(true); + showGamesInProgress->setChecked(true); CBRules->setCurrentIndex(0); CBWeapons->setCurrentIndex(0); searchText->clear(); + searchText->setFocus(); } void PageRoomsList::onJoinConfirmation(const QString & room) @@ -489,7 +582,7 @@ void PageRoomsList::updateNickCounter(int cnt) { - lblCount->setText(tr("%1 players online", 0, cnt).arg(cnt)); + setDefautDescription(tr("%1 players online", 0, cnt).arg(cnt)); } void PageRoomsList::setUser(const QString & nickname) @@ -533,6 +626,12 @@ // let the table view display the last model in the filter chain roomsList->setModel(roomsModel); + + // When the data changes + connect(roomsModel, SIGNAL(layoutChanged()), roomsList, SLOT(repaint())); + + // When a selection changes + connect(roomsList->selectionModel(), SIGNAL(currentRowChanged(const QModelIndex &, const QModelIndex &)), this, SLOT(roomSelectionChanged(const QModelIndex &, const QModelIndex &))); } stateFilteredModel->setSourceModel(model); @@ -561,6 +660,8 @@ this, SLOT(saveHeaderState())); connect(roomsList->horizontalHeader(), SIGNAL(sectionResized(int, int, int)), this, SLOT(saveHeaderState())); + + roomsList->repaint(); } @@ -591,13 +692,15 @@ roomsModel->setFilterWildcard(QString("*%1*").arg(searchText->text())); - int stateIdx = CBState->currentIndex(); - // any = 0, in lobby/false = 1, in progress/true = 2 + bool stateLobby = showGamesInLobby->isChecked(); + bool stateProgress = showGamesInProgress->isChecked(); - if (stateIdx == 0) + if (stateLobby && stateProgress) stateFilteredModel->setFilterWildcard("*"); // "any" + else if (stateLobby != stateProgress) + stateFilteredModel->setFilterFixedString(QString(stateProgress)); else - stateFilteredModel->setFilterFixedString(QString(stateIdx == 2)); + stateFilteredModel->setFilterFixedString(QString("none")); // Basically, none. if (CBRules->currentIndex() == 0) schemeFilteredModel->setFilterWildcard("*"); // "any" @@ -612,13 +715,17 @@ QString("*%1*").arg(CBWeapons->currentText())); } +void PageRoomsList::setSettings(QSettings *settings) +{ + m_gameSettings = settings; +} bool PageRoomsList::restoreHeaderState() { if (!m_gameSettings->contains("frontend/roomslist_header")) return false; return roomsList->horizontalHeader()->restoreState(QByteArray::fromBase64( - (m_gameSettings->value("frontend/roomslist_header").toString().toAscii()))); + (m_gameSettings->value("frontend/roomslist_header").toByteArray()))); } void PageRoomsList::saveHeaderState() diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/ui/page/pageroomslist.h --- a/QTfrontend/ui/page/pageroomslist.h Sun Nov 18 01:06:01 2012 +0400 +++ b/QTfrontend/ui/page/pageroomslist.h Fri Feb 22 05:05:32 2013 +0100 @@ -19,6 +19,7 @@ #ifndef PAGE_ROOMLIST_H #define PAGE_ROOMLIST_H +#include #include "AbstractPage.h" class HWChatWidget; @@ -27,19 +28,27 @@ class RoomsListModel; class QSortFilterProxyModel; +class RoomTableView : public QTableView +{ + friend class PageRoomsList; + + public: + RoomTableView(QWidget* parent = 0) : QTableView(parent){} +}; + class PageRoomsList : public AbstractPage { Q_OBJECT public: - PageRoomsList(QWidget* parent, QSettings * config); + PageRoomsList(QWidget* parent); void displayError(const QString & message); void displayNotice(const QString & message); void displayWarning(const QString & message); + void setSettings(QSettings * settings); - QLineEdit * roomName; QLineEdit * searchText; - QTableView * roomsList; + RoomTableView * roomsList; QPushButton * BtnCreate; QPushButton * BtnJoin; QPushButton * BtnAdmin; @@ -77,6 +86,10 @@ void onSortIndicatorChanged(int logicalIndex, Qt::SortOrder order); void onFilterChanged(); void saveHeaderState(); + void onRoomNameChosen(const QString &); + void roomSelectionChanged(const QModelIndex &, const QModelIndex &); + void moveSelectionUp(); + void moveSelectionDown(); private: QSettings * m_gameSettings; @@ -84,6 +97,8 @@ QSortFilterProxyModel * stateFilteredModel; QSortFilterProxyModel * schemeFilteredModel; QSortFilterProxyModel * weaponsFilteredModel; + QAction * showGamesInLobby; + QAction * showGamesInProgress; AmmoSchemeModel * ammoSchemeModel; diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/ui/page/pagescheme.cpp --- a/QTfrontend/ui/page/pagescheme.cpp Sun Nov 18 01:06:01 2012 +0400 +++ b/QTfrontend/ui/page/pagescheme.cpp Fri Feb 22 05:05:32 2013 +0100 @@ -68,127 +68,102 @@ // Left TBW_mode_Forts = new ToggleButtonWidget(gbGameModes, ":/res/btnForts@2x.png"); - TBW_mode_Forts->setToolTip("" + ToggleButtonWidget::tr("Fort Mode") + ""); TBW_mode_Forts->setWhatsThis(tr("Defend your fort and destroy the opponents, two team colours max!")); glGMLayout->addWidget(TBW_mode_Forts,0,0,1,1); TBW_teamsDivide = new ToggleButtonWidget(gbGameModes, ":/res/btnTeamsDivide@2x.png"); - TBW_teamsDivide->setToolTip("" + ToggleButtonWidget::tr("Divide Teams") + ""); TBW_teamsDivide->setWhatsThis(tr("Teams will start on opposite sides of the terrain, two team colours max!")); glGMLayout->addWidget(TBW_teamsDivide,0,1,1,1); TBW_solid = new ToggleButtonWidget(gbGameModes, ":/res/btnSolid@2x.png"); - TBW_solid->setToolTip("" + ToggleButtonWidget::tr("Solid Land") + ""); TBW_solid->setWhatsThis(tr("Land can not be destroyed!")); glGMLayout->addWidget(TBW_solid,0,2,1,1); TBW_border = new ToggleButtonWidget(gbGameModes, ":/res/btnBorder@2x.png"); - TBW_border->setToolTip("" + ToggleButtonWidget::tr("Add Border") + ""); TBW_border->setWhatsThis(tr("Add an indestructible border around the terrain")); glGMLayout->addWidget(TBW_border,0,3,1,1); TBW_lowGravity = new ToggleButtonWidget(gbGameModes, ":/res/btnLowGravity@2x.png"); - TBW_lowGravity->setToolTip("" + ToggleButtonWidget::tr("Low Gravity") + ""); TBW_lowGravity->setWhatsThis(tr("Lower gravity")); glGMLayout->addWidget(TBW_lowGravity,0,4,1,1); TBW_laserSight = new ToggleButtonWidget(gbGameModes, ":/res/btnLaserSight@2x.png"); - TBW_laserSight->setToolTip("" + ToggleButtonWidget::tr("Laser Sight") + ""); TBW_laserSight->setWhatsThis(tr("Assisted aiming with laser sight")); glGMLayout->addWidget(TBW_laserSight,1,0,1,1); TBW_invulnerable = new ToggleButtonWidget(gbGameModes, ":/res/btnInvulnerable@2x.png"); - TBW_invulnerable->setToolTip("" + ToggleButtonWidget::tr("Invulnerable") + ""); TBW_invulnerable->setWhatsThis(tr("All hogs have a personal forcefield")); glGMLayout->addWidget(TBW_invulnerable,1,1,1,1); TBW_resethealth = new ToggleButtonWidget(gbGameModes, ":/res/btnResetHealth@2x.png"); - TBW_resethealth->setToolTip("" + ToggleButtonWidget::tr("Reset Health") + ""); TBW_resethealth->setWhatsThis(tr("All (living) hedgehogs are fully restored at the end of turn")); glGMLayout->addWidget(TBW_resethealth,1,2,1,1); TBW_vampiric = new ToggleButtonWidget(gbGameModes, ":/res/btnVampiric@2x.png"); - TBW_vampiric->setToolTip("" + ToggleButtonWidget::tr("Vampirism") + ""); TBW_vampiric->setWhatsThis(tr("Gain 80% of the damage you do back in health")); glGMLayout->addWidget(TBW_vampiric,1,3,1,1); TBW_karma = new ToggleButtonWidget(gbGameModes, ":/res/btnKarma@2x.png"); - TBW_karma->setToolTip("" + ToggleButtonWidget::tr("Karma") + ""); TBW_karma->setWhatsThis(tr("Share your opponents pain, share their damage")); glGMLayout->addWidget(TBW_karma,1,4,1,1); TBW_artillery = new ToggleButtonWidget(gbGameModes, ":/res/btnArtillery@2x.png"); - TBW_artillery->setToolTip("" + ToggleButtonWidget::tr("Artillery") + ""); TBW_artillery->setWhatsThis(tr("Your hogs are unable to move, put your artillery skills to the test")); glGMLayout->addWidget(TBW_artillery,2,0,1,1); TBW_randomorder = new ToggleButtonWidget(gbGameModes, ":/res/btnRandomOrder@2x.png"); - TBW_randomorder->setToolTip("" + ToggleButtonWidget::tr("Random Order") + ""); TBW_randomorder->setWhatsThis(tr("Order of play is random instead of in room order.")); glGMLayout->addWidget(TBW_randomorder,2,1,1,1); TBW_king = new ToggleButtonWidget(gbGameModes, ":/res/btnKing@2x.png"); - TBW_king->setToolTip("" + ToggleButtonWidget::tr("King") + ""); TBW_king->setWhatsThis(tr("Play with a King. If he dies, your side dies.")); glGMLayout->addWidget(TBW_king,2,2,1,1); TBW_placehog = new ToggleButtonWidget(gbGameModes, ":/res/btnPlaceHog@2x.png"); - TBW_placehog->setToolTip("" + ToggleButtonWidget::tr("Place Hedgehogs") + ""); TBW_placehog->setWhatsThis(tr("Take turns placing your hedgehogs before the start of play.")); glGMLayout->addWidget(TBW_placehog,2,3,1,1); TBW_sharedammo = new ToggleButtonWidget(gbGameModes, ":/res/btnSharedAmmo@2x.png"); - TBW_sharedammo->setToolTip("" + ToggleButtonWidget::tr("Clan Shares Ammo") + ""); TBW_sharedammo->setWhatsThis(tr("Ammo is shared between all teams that share a colour.")); glGMLayout->addWidget(TBW_sharedammo,2,4,1,1); TBW_disablegirders = new ToggleButtonWidget(gbGameModes, ":/res/btnDisableGirders@2x.png"); - TBW_disablegirders->setToolTip("" + ToggleButtonWidget::tr("Disable Girders") + ""); TBW_disablegirders->setWhatsThis(tr("Disable girders when generating random maps.")); glGMLayout->addWidget(TBW_disablegirders,3,0,1,1); TBW_disablelandobjects = new ToggleButtonWidget(gbGameModes, ":/res/btnDisableLandObjects@2x.png"); - TBW_disablelandobjects->setToolTip("" + ToggleButtonWidget::tr("Disable Land Objects") + ""); TBW_disablelandobjects->setWhatsThis(tr("Disable land objects when generating random maps.")); glGMLayout->addWidget(TBW_disablelandobjects,3,1,1,1); TBW_aisurvival = new ToggleButtonWidget(gbGameModes, ":/res/btnAISurvival@2x.png"); - TBW_aisurvival->setToolTip("" + ToggleButtonWidget::tr("AI Survival Mode") + ""); TBW_aisurvival->setWhatsThis(tr("AI respawns on death.")); glGMLayout->addWidget(TBW_aisurvival,3,2,1,1); TBW_infattack = new ToggleButtonWidget(gbGameModes, ":/res/btnInfAttack@2x.png"); - TBW_infattack->setToolTip("" + ToggleButtonWidget::tr("Unlimited Attacks") + ""); TBW_infattack->setWhatsThis(tr("Attacking does not end your turn.")); glGMLayout->addWidget(TBW_infattack,3,3,1,1); TBW_resetweps = new ToggleButtonWidget(gbGameModes, ":/res/btnResetWeps@2x.png"); - TBW_resetweps->setToolTip("" + ToggleButtonWidget::tr("Reset Weapons") + ""); TBW_resetweps->setWhatsThis(tr("Weapons are reset to starting values each turn.")); glGMLayout->addWidget(TBW_resetweps,3,4,1,1); TBW_perhogammo = new ToggleButtonWidget(gbGameModes, ":/res/btnPerHogAmmo@2x.png"); - TBW_perhogammo->setToolTip("" + ToggleButtonWidget::tr("Per Hedgehog Ammo") + ""); TBW_perhogammo->setWhatsThis(tr("Each hedgehog has its own ammo. It does not share with the team.")); glGMLayout->addWidget(TBW_perhogammo,4,0,1,1); TBW_nowind = new ToggleButtonWidget(gbGameModes, ":/res/btnNoWind@2x.png"); - TBW_nowind->setToolTip("" + ToggleButtonWidget::tr("Disable Wind") + ""); TBW_nowind->setWhatsThis(tr("You will not have to worry about wind anymore.")); glGMLayout->addWidget(TBW_nowind,4,1,1,1); TBW_morewind = new ToggleButtonWidget(gbGameModes, ":/res/btnMoreWind@2x.png"); - TBW_morewind->setToolTip("" + ToggleButtonWidget::tr("More Wind") + ""); TBW_morewind->setWhatsThis(tr("Wind will affect almost everything.")); glGMLayout->addWidget(TBW_morewind,4,2,1,1); TBW_tagteam = new ToggleButtonWidget(gbGameModes, ":/res/btnTagTeam@2x.png"); - TBW_tagteam->setToolTip("" + ToggleButtonWidget::tr("Tag Team") + ""); TBW_tagteam->setWhatsThis(tr("Teams in each clan take successive turns sharing their turn time.")); glGMLayout->addWidget(TBW_tagteam,4,3,1,1); TBW_bottomborder = new ToggleButtonWidget(gbGameModes, ":/res/btnBottomBorder@2x.png"); - TBW_bottomborder->setToolTip("" + ToggleButtonWidget::tr("Add Bottom Border") + ""); TBW_bottomborder->setWhatsThis(tr("Add an indestructible border along the bottom")); glGMLayout->addWidget(TBW_bottomborder,4,4,1,1); diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/ui/page/pagesingleplayer.cpp --- a/QTfrontend/ui/page/pagesingleplayer.cpp Sun Nov 18 01:06:01 2012 +0400 +++ b/QTfrontend/ui/page/pagesingleplayer.cpp Fri Feb 22 05:05:32 2013 +0100 @@ -36,22 +36,18 @@ topLine->addStretch(); BtnSimpleGamePage = addButton(":/res/SimpleGame.png", topLine, 0, true); - BtnSimpleGamePage->setToolTip(tr("Simple Game")); BtnSimpleGamePage->setWhatsThis(tr("Play a quick game against the computer with random settings")); topLine->addSpacing(60); BtnMultiplayer = addButton(":/res/Multiplayer.png", topLine, 1, true); - BtnMultiplayer->setToolTip(tr("Multiplayer")); BtnMultiplayer->setWhatsThis(tr("Play a hotseat game against your friends, or AI teams")); topLine->addStretch(); BtnCampaignPage = addButton(":/res/Campaign.png", middleLine, 0, true); - BtnCampaignPage->setToolTip(tr("Campaign Mode")); BtnCampaignPage->setWhatsThis(tr("Campaign Mode")); BtnCampaignPage->setVisible(true); BtnTrainPage = addButton(":/res/Trainings.png", middleLine, 1, true); - BtnTrainPage->setToolTip(tr("Training Mode")); BtnTrainPage->setWhatsThis(tr("Practice your skills in a range of training missions")); return vLayout; @@ -63,11 +59,9 @@ bottomLine->addStretch(); BtnDemos = addButton(":/res/Record.png", bottomLine, 1, true); - BtnDemos->setToolTip(tr("Demos")); BtnDemos->setWhatsThis(tr("Watch recorded demos")); BtnLoad = addButton(":/res/Load.png", bottomLine, 2, true); BtnLoad->setStyleSheet("QPushButton{margin: 24px 0 0 0;}"); - BtnLoad->setToolTip(tr("Load")); BtnLoad->setWhatsThis(tr("Load a previously saved game")); bottomLine->setStretch(1,0); diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/ui/page/pagetraining.cpp --- a/QTfrontend/ui/page/pagetraining.cpp Sun Nov 18 01:06:01 2012 +0400 +++ b/QTfrontend/ui/page/pagetraining.cpp Fri Feb 22 05:05:32 2013 +0100 @@ -118,7 +118,7 @@ DataManager & dataMgr = DataManager::instance(); // get locale - QSettings settings(cfgdir->absolutePath() + "/hedgewars.ini", + QSettings settings("physfs://hedgewars.ini", QSettings::IniFormat); QString loc = settings.value("misc/locale", "").toString(); diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/ui/page/pagevideos.cpp --- a/QTfrontend/ui/page/pagevideos.cpp Sun Nov 18 01:06:01 2012 +0400 +++ b/QTfrontend/ui/page/pagevideos.cpp Fri Feb 22 05:05:32 2013 +0100 @@ -109,119 +109,6 @@ QGridLayout * pPageLayout = new QGridLayout(); pPageLayout->setColumnStretch(0, 1); pPageLayout->setColumnStretch(1, 2); - pPageLayout->setRowStretch(0, 1); - pPageLayout->setRowStretch(1, 1); - - // options - { - IconedGroupBox* pOptionsGroup = new IconedGroupBox(this); - pOptionsGroup->setIcon(QIcon(":/res/Settings.png")); // FIXME - pOptionsGroup->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); - pOptionsGroup->setTitle(QGroupBox::tr("Video recording options")); - QGridLayout * pOptLayout = new QGridLayout(pOptionsGroup); - - // label for format - QLabel *labelFormat = new QLabel(pOptionsGroup); - labelFormat->setText(QLabel::tr("Format")); - pOptLayout->addWidget(labelFormat, 0, 0); - - // list of supported formats - comboAVFormats = new QComboBox(pOptionsGroup); - pOptLayout->addWidget(comboAVFormats, 0, 1, 1, 4); - LibavInteraction::instance().fillFormats(comboAVFormats); - - // separator - QFrame * hr = new QFrame(pOptionsGroup); - hr->setFrameStyle(QFrame::HLine); - hr->setLineWidth(3); - hr->setFixedHeight(10); - pOptLayout->addWidget(hr, 1, 0, 1, 5); - - // label for audio codec - QLabel *labelACodec = new QLabel(pOptionsGroup); - labelACodec->setText(QLabel::tr("Audio codec")); - pOptLayout->addWidget(labelACodec, 2, 0); - - // list of supported audio codecs - comboAudioCodecs = new QComboBox(pOptionsGroup); - pOptLayout->addWidget(comboAudioCodecs, 2, 1, 1, 3); - - // checkbox 'record audio' - checkRecordAudio = new QCheckBox(pOptionsGroup); - checkRecordAudio->setText(QCheckBox::tr("Record audio")); - pOptLayout->addWidget(checkRecordAudio, 2, 4); - - // separator - hr = new QFrame(pOptionsGroup); - hr->setFrameStyle(QFrame::HLine); - hr->setLineWidth(3); - hr->setFixedHeight(10); - pOptLayout->addWidget(hr, 3, 0, 1, 5); - - // label for video codec - QLabel *labelVCodec = new QLabel(pOptionsGroup); - labelVCodec->setText(QLabel::tr("Video codec")); - pOptLayout->addWidget(labelVCodec, 4, 0); - - // list of supported video codecs - comboVideoCodecs = new QComboBox(pOptionsGroup); - pOptLayout->addWidget(comboVideoCodecs, 4, 1, 1, 4); - - // label for resolution - QLabel *labelRes = new QLabel(pOptionsGroup); - labelRes->setText(QLabel::tr("Resolution")); - pOptLayout->addWidget(labelRes, 5, 0); - - // width - widthEdit = new QLineEdit(pOptionsGroup); - widthEdit->setValidator(new QIntValidator(this)); - pOptLayout->addWidget(widthEdit, 5, 1); - - // x - QLabel *labelX = new QLabel(pOptionsGroup); - labelX->setText("X"); - pOptLayout->addWidget(labelX, 5, 2); - - // height - heightEdit = new QLineEdit(pOptionsGroup); - heightEdit->setValidator(new QIntValidator(pOptionsGroup)); - pOptLayout->addWidget(heightEdit, 5, 3); - - // checkbox 'use game resolution' - checkUseGameRes = new QCheckBox(pOptionsGroup); - checkUseGameRes->setText(QCheckBox::tr("Use game resolution")); - pOptLayout->addWidget(checkUseGameRes, 5, 4); - - // label for framerate - QLabel *labelFramerate = new QLabel(pOptionsGroup); - labelFramerate->setText(QLabel::tr("Framerate")); - pOptLayout->addWidget(labelFramerate, 6, 0); - - // framerate - framerateBox = new QSpinBox(pOptionsGroup); - framerateBox->setRange(1, 200); - framerateBox->setSingleStep(1); - pOptLayout->addWidget(framerateBox, 6, 1); - - // label for Bitrate - QLabel *labelBitrate = new QLabel(pOptionsGroup); - labelBitrate->setText(QLabel::tr("Bitrate (Kbps)")); - pOptLayout->addWidget(labelBitrate, 6, 2); - - // bitrate - bitrateBox = new QSpinBox(pOptionsGroup); - bitrateBox->setRange(100, 5000); - bitrateBox->setSingleStep(100); - pOptLayout->addWidget(bitrateBox, 6, 3); - - // button 'set default options' - btnDefaults = new QPushButton(pOptionsGroup); - btnDefaults->setText(QPushButton::tr("Set default options")); - btnDefaults->setWhatsThis(QPushButton::tr("Restore default coding parameters")); - pOptLayout->addWidget(btnDefaults, 7, 0, 1, 5); - - pPageLayout->addWidget(pOptionsGroup, 1, 0); - } // list of videos { @@ -257,7 +144,7 @@ box->addWidget(filesTable); box->addWidget(btnOpenDir); - pPageLayout->addWidget(pTableGroup, 0, 1, 2, 1); + pPageLayout->addWidget(pTableGroup, 0, 1); } // description @@ -267,7 +154,6 @@ pDescGroup->setTitle(QGroupBox::tr("Description")); QVBoxLayout* pDescLayout = new QVBoxLayout(pDescGroup); - QHBoxLayout* pTopDescLayout = new QHBoxLayout(0); // picture and text QHBoxLayout* pBottomDescLayout = new QHBoxLayout(0); // buttons // label with thumbnail picture @@ -282,18 +168,19 @@ "border-radius: 4px;" "}" ); clearThumbnail(); - pTopDescLayout->addWidget(labelThumbnail, 2); // label with file description labelDesc = new QLabel(pDescGroup); labelDesc->setAlignment(Qt::AlignLeft | Qt::AlignTop); labelDesc->setTextInteractionFlags(Qt::TextSelectableByMouse | - Qt::TextSelectableByKeyboard | + Qt::TextSelectableByKeyboard | Qt::LinksAccessibleByMouse | Qt::LinksAccessibleByKeyboard); labelDesc->setTextFormat(Qt::RichText); + labelDesc->setWordWrap(true); labelDesc->setOpenExternalLinks(true); - pTopDescLayout->addWidget(labelDesc, 1); + //labelDesc->setMinimumSize(ThumbnailSize); + //pTopDescLayout->addWidget(labelDesc, 1); // buttons: play and delete btnPlay = new QPushButton(QPushButton::tr("Play"), pDescGroup); @@ -309,10 +196,10 @@ btnToYouTube->setWhatsThis(QPushButton::tr("Upload this video to your Youtube account")); pBottomDescLayout->addWidget(btnToYouTube); + pDescLayout->addWidget(labelThumbnail, 0); + pDescLayout->addWidget(labelDesc, 0); + pDescLayout->addLayout(pBottomDescLayout, 0); pDescLayout->addStretch(1); - pDescLayout->addLayout(pTopDescLayout, 0); - pDescLayout->addStretch(1); - pDescLayout->addLayout(pBottomDescLayout, 0); pPageLayout->addWidget(pDescGroup, 0, 0); } @@ -327,10 +214,6 @@ void PageVideos::connectSignals() { - connect(checkUseGameRes, SIGNAL(stateChanged(int)), this, SLOT(changeUseGameRes(int))); - connect(checkRecordAudio, SIGNAL(stateChanged(int)), this, SLOT(changeRecordAudio(int))); - connect(comboAVFormats, SIGNAL(currentIndexChanged(int)), this, SLOT(changeAVFormat(int))); - connect(btnDefaults, SIGNAL(clicked()), this, SLOT(setDefaultOptions())); connect(filesTable, SIGNAL(cellDoubleClicked(int, int)), this, SLOT(cellDoubleClicked(int, int))); connect(filesTable, SIGNAL(cellChanged(int,int)), this, SLOT(cellChanged(int, int))); connect(filesTable, SIGNAL(currentCellChanged(int,int,int,int)), this, SLOT(currentCellChanged())); @@ -362,124 +245,6 @@ startEncoding(); // this is for videos recorded from demos which were executed directly (without frontend) } -// user changed file format, we need to update list of codecs -void PageVideos::changeAVFormat(int index) -{ - // remember selected codecs - QString prevVCodec = videoCodec(); - QString prevACodec = audioCodec(); - - // clear lists of codecs - comboVideoCodecs->clear(); - comboAudioCodecs->clear(); - - // get list of codecs for specified format - LibavInteraction::instance().fillCodecs(comboAVFormats->itemData(index).toString(), comboVideoCodecs, comboAudioCodecs); - - // disable audio if there is no audio codec - if (comboAudioCodecs->count() == 0) - { - checkRecordAudio->setChecked(false); - checkRecordAudio->setEnabled(false); - } - else - checkRecordAudio->setEnabled(true); - - // restore selected codecs if possible - int iVCodec = comboVideoCodecs->findData(prevVCodec); - if (iVCodec != -1) - comboVideoCodecs->setCurrentIndex(iVCodec); - int iACodec = comboAudioCodecs->findData(prevACodec); - if (iACodec != -1) - comboAudioCodecs->setCurrentIndex(iACodec); -} - -// user switched checkbox 'use game resolution' -void PageVideos::changeUseGameRes(int state) -{ - if (state && config) - { - // set resolution to game resolution - QRect resolution = config->vid_Resolution(); - widthEdit->setText(QString::number(resolution.width())); - heightEdit->setText(QString::number(resolution.height())); - } - widthEdit->setEnabled(!state); - heightEdit->setEnabled(!state); -} - -// user switched checkbox 'record audio' -void PageVideos::changeRecordAudio(int state) -{ - comboAudioCodecs->setEnabled(!!state); -} - -void PageVideos::setDefaultCodecs() -{ - // VLC should be able to handle any of these configurations - // Quicktime X only opens the first one - // Windows Media Player TODO - if (tryCodecs("mp4", "libx264", "aac")) - return; - if (tryCodecs("mp4", "libx264", "libfaac")) - return; - if (tryCodecs("mp4", "libx264", "libmp3lame")) - return; - if (tryCodecs("mp4", "libx264", "mp2")) - return; - if (tryCodecs("avi", "libxvid", "libmp3lame")) - return; - if (tryCodecs("avi", "libxvid", "ac3_fixed")) - return; - if (tryCodecs("avi", "libxvid", "mp2")) - return; - if (tryCodecs("avi", "mpeg4", "libmp3lame")) - return; - if (tryCodecs("avi", "mpeg4", "ac3_fixed")) - return; - if (tryCodecs("avi", "mpeg4", "mp2")) - return; - - // this shouldn't happen, just in case - if (tryCodecs("ogg", "libtheora", "libvorbis")) - return; - tryCodecs("ogg", "libtheora", "flac"); -} - -void PageVideos::setDefaultOptions() -{ - framerateBox->setValue(30); - bitrateBox->setValue(1000); - checkRecordAudio->setChecked(true); - checkUseGameRes->setChecked(true); - setDefaultCodecs(); -} - -bool PageVideos::tryCodecs(const QString & format, const QString & vcodec, const QString & acodec) -{ - // first we should change format - int iFormat = comboAVFormats->findData(format); - if (iFormat == -1) - return false; - comboAVFormats->setCurrentIndex(iFormat); - // format was changed, so lists of codecs were automatically updated to codecs supported by this format - - // try to find video codec - int iVCodec = comboVideoCodecs->findData(vcodec); - if (iVCodec == -1) - return false; - comboVideoCodecs->setCurrentIndex(iVCodec); - - // try to find audio codec - int iACodec = comboAudioCodecs->findData(acodec); - if (iACodec == -1 && checkRecordAudio->isChecked()) - return false; - if (iACodec != -1) - comboAudioCodecs->setCurrentIndex(iACodec); - - return true; -} - // get file size as string static QString FileSizeStr(const QString & path) { @@ -743,8 +508,8 @@ else { QString path = item->path(); - desc += tr("Date: ") + QFileInfo(path).created().toString(Qt::DefaultLocaleLongDate) + '\n'; - desc += tr("Size: ") + FileSizeStr(path) + '\n'; + desc += tr("Date: %1\n").arg(QFileInfo(path).created().toString(Qt::DefaultLocaleLongDate)); + desc += tr("Size: %1\n").arg(FileSizeStr(path)); if (item->desc.isEmpty()) { // Extract description from file; @@ -1096,7 +861,7 @@ int row = filesTable->currentRow(); VideoItem * item = nameItem(row); - if (item->pUploading) + if (item->pUploading) //Act as 'cancel uploading' button { // ask user if (s)he is serious QMessageBox reallyStopMsg(this); @@ -1108,9 +873,10 @@ if (reallyStopMsg.exec() != QMessageBox::Ok) return; - item->pUploading->deleteLater(); + item->pUploading->abort(); + btnToYouTube->setText(QPushButton::tr("Upload to YouTube")); filesTable->setCellWidget(row, vcProgress, NULL); // remove progress bar - numUploads--; + //numUploads--; return; } diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/ui/page/pagevideos.h --- a/QTfrontend/ui/page/pagevideos.h Sun Nov 18 01:06:01 2012 +0400 +++ b/QTfrontend/ui/page/pagevideos.h Fri Feb 22 05:05:32 2013 +0100 @@ -36,24 +36,6 @@ public: PageVideos(QWidget* parent = 0); - QSpinBox *framerateBox; - QSpinBox *bitrateBox; - QLineEdit *widthEdit; - QLineEdit *heightEdit; - QCheckBox *checkUseGameRes; - QCheckBox *checkRecordAudio; - - QString format() - { return comboAVFormats->itemData(comboAVFormats->currentIndex()).toString(); } - - QString videoCodec() - { return comboVideoCodecs->itemData(comboVideoCodecs->currentIndex()).toString(); } - - QString audioCodec() - { return comboAudioCodecs->itemData(comboAudioCodecs->currentIndex()).toString(); } - - void setDefaultCodecs(); - bool tryCodecs(const QString & format, const QString & vcodec, const QString & acodec); void addRecorder(HWRecorder* pRecorder); bool tryQuit(HWForm *form); QString getVideosInProgress(); // get multi-line string with list of videos in progress @@ -83,12 +65,6 @@ GameUIConfig * config; QNetworkAccessManager* netManager; - // options group - QComboBox *comboAVFormats; - QComboBox *comboVideoCodecs; - QComboBox *comboAudioCodecs; - QPushButton *btnDefaults; - // file list group QTableWidget *filesTable; QPushButton *btnOpenDir; @@ -105,10 +81,6 @@ int numRecorders, numUploads; private slots: - void changeAVFormat(int index); - void changeUseGameRes(int state); - void changeRecordAudio(int state); - void setDefaultOptions(); void encodingFinished(bool success); void updateProgress(float value); void cellDoubleClicked(int row, int column); diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/ui/widget/about.cpp --- a/QTfrontend/ui/widget/about.cpp Sun Nov 18 01:06:01 2012 +0400 +++ b/QTfrontend/ui/widget/about.cpp Fri Feb 22 05:05:32 2013 +0100 @@ -21,8 +21,23 @@ #include #include #include +#include +#include +#include +#include +#include #include "hwconsts.h" #include "SDLInteraction.h" +#include "SDL.h" +#include "SDL_version.h" +#include "physfs.h" + +#ifdef VIDEOREC +extern "C" +{ +#include "libavutil/avutil.h" +} +#endif #include "about.h" @@ -31,6 +46,9 @@ { QGridLayout *mainLayout = new QGridLayout(this); + QVBoxLayout * leftLayout = new QVBoxLayout(); + mainLayout->addLayout(leftLayout, 0, 0, 2, 1); + QLabel *imageLabel = new QLabel; QImage image(":/res/Hedgehog.png"); imageLabel->setPixmap(QPixmap::fromImage(image)); @@ -40,7 +58,7 @@ imageLabel->setMinimumHeight(30); imageLabel->setMaximumHeight(300); - mainLayout->addWidget(imageLabel, 0, 0, 2, 1); + leftLayout->addWidget(imageLabel, 0, Qt::AlignHCenter); QLabel *lbl1 = new QLabel(this); lbl1->setOpenExternalLinks(true); @@ -51,7 +69,7 @@ "" "

Hedgewars

" "

" + QLabel::tr("Version") + " " + *cVersionString + "

" - "

http://www.hedgewars.org/


" + + "

http://www.hedgewars.org/

" + QLabel::tr("This program is distributed under the GNU General Public License v2") + "
" ); @@ -59,98 +77,46 @@ mainLayout->addWidget(lbl1, 0, 1); lbl2 = new QTextBrowser(this); + lbl2->setOpenExternalLinks(true); + QUrl localpage = QUrl::fromLocalFile(":/res/html/about.html"); + lbl2->setSource(localpage); //sets the source of the label from the file above + mainLayout->addWidget(lbl2, 1, 1); - lbl2->setOpenExternalLinks(true); - lbl2->setText( - "" + - QString("

") + - QLabel::tr("Developers:") + - "

" - "Engine, frontend, net server: Andrey Korotaev <unC0Rr@gmail.com>
" - "Many frontend improvements: Igor Ulyanov <disinbox@gmail.com>
" - "Many engine and frontend improvements: Derek Pomery <nemo@m8y.org>
" - "Drill rocket, Ballgun, RC Plane weapons: Martin Boze <afffect@gmail.com>
" - "Mine number and time game settings: David A. Cuadrado <krawek@gmail.com>
" - "Frontend improvements: Martin Minarik <ttsmj@pokec.sk>
" - "Frontend improvements: Kristian Lehmann <email@thexception.net>
" - "Mac OS X/iPhone port, OpenGL-ES conversion: Vittorio Giovara <vittorio.giovara@gmail.com>
" - "Many engine and frontend improvements (and bugs): Richard Karolyi <sheepluva@" "ercatec.net>
" - "Gamepad and Lua integration: Mario Liebisch <mario.liebisch@gmail.com>
" - "Many engine improvements and graphics: Carlos Vives <mail@carlosvives.es>
" - "Maze maps: Henning Kühn <prg@cooco.de>
" - "Engine and frontend improvements: Henrik Rostedt <henrik.rostedt@gmail.com>
" - "Lua game modes and missions: John Lambert <redgrinner@gmail.com>
" - "Frontend improvements: Mayur Pawashe <zorgiepoo@gmail.com>
" - "Android port: Richard Deurwaarder <xeli@xelification.com>
" - "Android netplay, portability abstraction: Simeon Maxein <smaxein@googlemail.com>
" - "WebGL port, some pas2c and GLES2 work: Meng Xiangyun <xymengxy@gmail.com>
" - "Video recording: Stepan Podoskin <stepik-777@mail.ru>
" - "Campaign support, first campaign: Szabolcs Orbàn <szabibibi@gmail.com>
" - "

" + + /* Library information */ + + QString libinfo = ""; + +#ifdef __GNUC__ + libinfo.append(QString("GCC %1
").arg(__VERSION__)); +#else + libinfo.append(QString(tr("Unknown Compiler")).arg(__VERSION__) + QString("
")); +#endif + + libinfo.append(QString("SDL version: %1.%2.%3
") + .arg(SDL_MAJOR_VERSION) + .arg(SDL_MINOR_VERSION) + .arg(SDL_PATCHLEVEL)); - QLabel::tr("Art:") + "

" - + QString::fromUtf8( - "

John Dum <fizzy@gmail.com>" - "
" - "Joshua Frese <joshfrese@gmail.com>" - "
" - "Stanko Tadić <stanko@mfhinc.net>" - "
" - "Julien Koesten <julienkoesten@aol.com>" - "
" - "Joshua O'Sullivan <coheedftw@hotmail.co.uk>" - "
" - "Nils Lück <nils.luck.design@gmail.com>" - "
" - "Guillaume Englert <genglert@hybird.org>" - "
" - "Hats: Trey Perry <tx.perry.j@gmail.com>" - "

") + - QLabel::tr("Sounds:") + "

" - "Hedgehogs voice: Stephen Alexander <ArmagonNo1@gmail.com>" - "
" - "John Dum <fizzy@gmail.com>" - "
" - "Jonatan Nilsson <jonatanfan@gmail.com>" - "
" - "Daniel Martin <elhombresinremedio@gmail.com>" - "

" + + libinfo.append(QString("Qt version: %1
").arg(QT_VERSION_STR)); + +#ifdef VIDEOREC + libinfo.append(QString("Libav version: %1.%2.%3
") + .arg(LIBAVUTIL_VERSION_MAJOR) + .arg(LIBAVUTIL_VERSION_MINOR) + .arg(LIBAVUTIL_VERSION_MICRO)); +#endif - QLabel::tr("Translations:") + "

" - + QString::fromUtf8( - "Brazilian Portuguese: Romulo Fernandes Machado <abra185@gmail.com>
" - "Bulgarian: Svetoslav Stefanov
" - "Czech: Petr Řezáček <rezacek@gmail.com>
" - "Chinese: Jie Luo <lililjlj@gmail.com>
" - "English: Andrey Korotaev <unC0Rr@gmail.com>
" - "Finnish: Nina Kuisma <ninnnu@gmail.com>
" - "French: Antoine Turmel <geekshadow@gmail.com>, Clement Woitrain <sphrixclement@gmail.com>
" - "German: Peter Hüwe <PeterHuewe@gmx.de>, Mario Liebisch <mario.liebisch@gmail.com>, Richard Karolyi <sheepluva@" "ercatec.net>
" - "Greek: <talos_kriti@yahoo.gr>
" - "Italian: Luca Bonora <bonora.luca@gmail.com>, Marco Bresciani
" - "Japanese: ADAM Etienne <etienne.adam@gmail.com>
" - "Korean: Anthony Bellew <anthonyreflected@gmail.com>
" - "Lithuanian: Lukas Urbonas <lukasu08@gmail.com>
" - "Polish: Maciej Mroziński <mynick2@o2.pl>, Wojciech Latkowski <magik17l@gmail.com>, Piotr Mitana, Maciej Górny
" - "Portuguese: Fábio Canário <inufabie@gmail.com>
" - "Russian: Andrey Korotaev <unC0Rr@gmail.com>
" - "Slovak: Jose Riha
" - "Spanish: Carlos Vives <mail@carlosvives.es>
" - "Swedish: Niklas Grahn <raewolusjoon@yaoo.com>, Henrik Rostedt <henrik.rostedt@gmail.com>
" - "Ukrainian: Eugene V. Lyubimkin <jackyf.devel@gmail.com>, Igor Paliychuk <mansonigor@gmail.com>, Eugene Sakara <eresid@gmail.com>" - "

") + + libinfo.append(QString("PhysFS version: %1.%2.%3
") + .arg(PHYSFS_VER_MAJOR) + .arg(PHYSFS_VER_MINOR) + .arg(PHYSFS_VER_PATCH)); - QLabel::tr("Special thanks:") + "

" - "Aleksey Andreev <blaknayabr@gmail.com>
" - "Aleksander Rudalev <alexv@pomorsu.ru>
" - "Natasha Korotaeva <layout@pisem.net>
" - "Adam Higerd (aka ahigerd at FreeNode)" - "

" - ); - mainLayout->addWidget(lbl2, 1, 1); + QLabel * lblLibInfo = new QLabel(); + lblLibInfo->setText(libinfo); + lblLibInfo->setWordWrap(true); + lblLibInfo->setMaximumWidth(280); + leftLayout->addWidget(lblLibInfo, 0, Qt::AlignHCenter); + leftLayout->addStretch(1); setAcceptDrops(true); } diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/ui/widget/about.h --- a/QTfrontend/ui/widget/about.h Sun Nov 18 01:06:01 2012 +0400 +++ b/QTfrontend/ui/widget/about.h Fri Feb 22 05:05:32 2013 +0100 @@ -23,7 +23,6 @@ #include #include - class About : public QWidget { Q_OBJECT diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/ui/widget/bgwidget.cpp --- a/QTfrontend/ui/widget/bgwidget.cpp Sun Nov 18 01:06:01 2012 +0400 +++ b/QTfrontend/ui/widget/bgwidget.cpp Fri Feb 22 05:05:32 2013 +0100 @@ -176,6 +176,8 @@ int ydiff = newPos.y() - oldPos.y(); update(oldPos.x(), oldPos.y(), xdiff+sprite.width(), ydiff+sprite.height()); } + + //repaint(); // Repaint every frame. Prevents ghosting of widgets if widgets resize in runtime. } void BGWidget::startAnimation() diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/ui/widget/chatwidget.cpp --- a/QTfrontend/ui/widget/chatwidget.cpp Sun Nov 18 01:06:01 2012 +0400 +++ b/QTfrontend/ui/widget/chatwidget.cpp Fri Feb 22 05:05:32 2013 +0100 @@ -31,6 +31,7 @@ #include #include #include +#include #include "DataManager.h" #include "hwconsts.h" @@ -156,28 +157,22 @@ void HWChatWidget::displayError(const QString & message) { addLine("msg_Error", " !!! " + message); - // scroll to the end - chatText->moveCursor(QTextCursor::End); } void HWChatWidget::displayNotice(const QString & message) { addLine("msg_Notice", " *** " + message); - // scroll to the end - chatText->moveCursor(QTextCursor::End); } void HWChatWidget::displayWarning(const QString & message) { addLine("msg_Warning", " *!* " + message); - // scroll to the end - chatText->moveCursor(QTextCursor::End); } -HWChatWidget::HWChatWidget(QWidget* parent, QSettings * gameSettings, bool notify) : +HWChatWidget::HWChatWidget(QWidget* parent, bool notify) : QWidget(parent), mainLayout(this) { @@ -187,43 +182,54 @@ m_isAdmin = false; m_autoKickEnabled = false; - if(gameSettings->value("frontend/sound", true).toBool()) - { - QStringList vpList = - QStringList() << "Classic" << "Default" << "Mobster" << "Russian"; + QStringList vpList = + QStringList() << "Classic" << "Default" << "Mobster" << "Russian"; - foreach (QString vp, vpList) - { - m_helloSounds.append(QString("physfs://Sounds/voices/%1/Hello.ogg").arg(vp)); - } - - m_hilightSound = "physfs://Sounds/beep.ogg"; - + foreach (const QString & vp, vpList) + { + m_helloSounds.append(QString("/Sounds/voices/%1/Hello.ogg").arg(vp)); } - mainLayout.setSpacing(1); - mainLayout.setMargin(1); - mainLayout.setSizeConstraint(QLayout::SetMinimumSize); - mainLayout.setColumnStretch(0, 76); - mainLayout.setColumnStretch(1, 24); + m_hilightSound = "/Sounds/beep.ogg"; + + mainLayout.setMargin(0); - chatEditLine = new SmartLineEdit(this); - chatEditLine->setMaxLength(300); - connect(chatEditLine, SIGNAL(returnPressed()), this, SLOT(returnPressed())); + QWidget * leftSideContainer = new QWidget(); + leftSideContainer->setObjectName("leftSideContainer"); + leftSideContainer->setStyleSheet("#leftSideContainer { border-width: 0px; background-color: #ffcc00; border-radius: 10px;} QTextBrowser, SmartLineEdit { background-color: rgb(13, 5, 68); }"); + QVBoxLayout * leftSide = new QVBoxLayout(leftSideContainer); + leftSide->setSpacing(3); + leftSide->setMargin(3); + mainLayout.addWidget(leftSideContainer, 76); - mainLayout.addWidget(chatEditLine, 2, 0); + // Chat view chatText = new QTextBrowser(this); - chatText->document()->setDefaultStyleSheet(styleSheet()); - chatText->setMinimumHeight(20); chatText->setMinimumWidth(10); chatText->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); chatText->setOpenLinks(false); + chatText->setStyleSheet("QTextBrowser { background-color: rgb(23, 11, 54); border-width: 0px; }"); connect(chatText, SIGNAL(anchorClicked(const QUrl&)), this, SLOT(linkClicked(const QUrl&))); - mainLayout.addWidget(chatText, 0, 0, 2, 1); + leftSide->addWidget(chatText, 1); + + // Input box + + // Normal: rgb(23, 11, 54) + // Hover: rgb(13, 5, 68) + + chatEditLine = new SmartLineEdit(); + chatEditLine->setMaxLength(300); + chatEditLine->setStyleSheet("SmartLineEdit { background-color: rgb(23, 11, 54); padding: 2px 8px; border-width: 0px; border-radius: 7px; } SmartLineEdit:hover, SmartLineEdit:focus { background-color: rgb(13, 5, 68); }"); + chatEditLine->setFixedHeight(24); + chatEditLine->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); + connect(chatEditLine, SIGNAL(returnPressed()), this, SLOT(returnPressed())); + + leftSide->addWidget(chatEditLine, 0); + + // Nickname list chatNicks = new QListView(this); chatNicks->setIconSize(QSize(24, 16)); @@ -239,7 +245,8 @@ connect(chatNicks, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(nicksContextMenuRequested(QPoint))); - mainLayout.addWidget(chatNicks, 0, 1, 3, 1); + mainLayout.addSpacing(0); + mainLayout.addWidget(chatNicks, 24); // the userData is used to flag things that are even available when user // is offline @@ -281,6 +288,10 @@ clear(); } +void HWChatWidget::setSettings(QSettings * settings) +{ + gameSettings = settings; +} void HWChatWidget::linkClicked(const QUrl & link) { @@ -435,6 +446,8 @@ if (s_displayNone->contains(cssClass)) return; // the css forbids us to display this line + beforeContentAdd(); + if (chatStrings.size() > 250) chatStrings.removeFirst(); @@ -457,11 +470,13 @@ chatText->setHtml(""+chatStrings.join("
")+""); - chatText->moveCursor(QTextCursor::End); + afterContentAdd(); } void HWChatWidget::onServerMessage(const QString& str) { + beforeContentAdd(); + if (chatStrings.size() > 250) chatStrings.removeFirst(); @@ -469,7 +484,7 @@ chatText->setHtml(""+chatStrings.join("
")+""); - chatText->moveCursor(QTextCursor::End); + afterContentAdd(); } @@ -497,7 +512,7 @@ emit nickCountUpdate(chatNicks->model()->rowCount()); - if(notifyNick && notify && gameSettings->value("frontend/sound", true).toBool()) + if (notifyNick && notify && (m_helloSounds.size() > 0)) { SDLInteraction::instance().playSoundFile( m_helloSounds.at(rand() % m_helloSounds.size())); @@ -798,11 +813,7 @@ else if (tline == "/saveStyleSheet") saveStyleSheet(); else - { - static QRegExp post("\\s.*$"); - tline.remove(post); - displayWarning(tr("%1 is not a valid command!").arg(tline)); - } + emit consoleCommand(tline.mid(1)); return true; } @@ -889,3 +900,21 @@ m_nicksMenu->popup(chatNicks->mapToGlobal(pos)); } + +void HWChatWidget::beforeContentAdd() +{ + m_scrollBarPos = chatText->verticalScrollBar()->value(); + m_scrollToBottom = m_scrollBarPos == chatText->verticalScrollBar()->maximum(); +} + +void HWChatWidget::afterContentAdd() +{ + if(m_scrollToBottom) + { + chatText->verticalScrollBar()->setValue(chatText->verticalScrollBar()->maximum()); + chatText->moveCursor(QTextCursor::End); + } else + { + chatText->verticalScrollBar()->setValue(m_scrollBarPos); + } +} diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/ui/widget/chatwidget.h --- a/QTfrontend/ui/widget/chatwidget.h Sun Nov 18 01:06:01 2012 +0400 +++ b/QTfrontend/ui/widget/chatwidget.h Fri Feb 22 05:05:32 2013 +0100 @@ -54,7 +54,7 @@ Q_OBJECT public: - HWChatWidget(QWidget* parent, QSettings * gameSettings, bool notify); + HWChatWidget(QWidget* parent, bool notify); void setIgnoreListKick(bool enabled); ///< automatically kick people on ignore list (if possible) void setShowFollow(bool enabled); static const QString & styleSheet(); @@ -63,6 +63,7 @@ void displayWarning(const QString & message); void setUser(const QString & nickname); void setUsersModel(QAbstractItemModel * model); + void setSettings(QSettings * settings); protected: virtual void dragEnterEvent(QDragEnterEvent * event); @@ -82,6 +83,8 @@ void discardStyleSheet(); void saveStyleSheet(); QString linkedNick(const QString & nickname); + void beforeContentAdd(); + void afterContentAdd(); public slots: void onChatString(const QString& str); @@ -99,10 +102,11 @@ void info(const QString & str); void follow(const QString &); void nickCountUpdate(int cnt); + void consoleCommand(const QString & command); private: bool m_isAdmin; - QGridLayout mainLayout; + QHBoxLayout mainLayout; QTextBrowser* chatText; QStringList chatStrings; QListView* chatNicks; @@ -122,6 +126,8 @@ QList m_highlights; ///< regular expressions used for highlighting bool notify; bool m_autoKickEnabled; + bool m_scrollToBottom; + int m_scrollBarPos; private slots: void returnPressed(); diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/ui/widget/colorwidget.h --- a/QTfrontend/ui/widget/colorwidget.h Sun Nov 18 01:06:01 2012 +0400 +++ b/QTfrontend/ui/widget/colorwidget.h Fri Feb 22 05:05:32 2013 +0100 @@ -13,7 +13,7 @@ class ColorWidget : public QFrame { Q_OBJECT - + public: explicit ColorWidget(QStandardItemModel *colorsModel, QWidget *parent = 0); ~ColorWidget(); @@ -24,7 +24,7 @@ signals: void colorChanged(int color); - + private: int m_color; QStandardItemModel * m_colorsModel; diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/ui/widget/feedbackdialog.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/QTfrontend/ui/widget/feedbackdialog.cpp Fri Feb 22 05:05:32 2013 +0100 @@ -0,0 +1,484 @@ +/* + * Hedgewars, a free turn based strategy game + * Copyright (c) 2004-2012 Andrey Korotaev + * + * 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 +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#ifdef Q_WS_WIN +#define WINVER 0x0500 +#include +#else +#include +#include +#endif + +#ifdef Q_WS_MAC +#include +#endif + +#include + +#include "AbstractPage.h" +#include "hwconsts.h" +#include "feedbackdialog.h" + +FeedbackDialog::FeedbackDialog(QWidget * parent) : QDialog(parent) +{ + setModal(true); + setWindowFlags(Qt::Sheet); + setWindowModality(Qt::WindowModal); + setMinimumSize(700, 460); + resize(700, 460); + setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum); + + netManager = NULL; + GenerateSpecs(); + + /* Top layout */ + + QVBoxLayout * pageLayout = new QVBoxLayout(); + QHBoxLayout * summaryLayout = new QHBoxLayout(); + QHBoxLayout * emailLayout = new QHBoxLayout(); + QHBoxLayout * descriptionLayout = new QHBoxLayout(); + QHBoxLayout * combinedTopLayout = new QHBoxLayout(); + QHBoxLayout * systemLayout = new QHBoxLayout(); + + info = new QLabel(); + info->setText( + "" + "

Please give us feedback!

" + "

We are always happy about suggestions, ideas, or bug reports.

" + "

Your email address is optional, but we may want to contact you.

" + "

" + ); + pageLayout->addWidget(info); + + QVBoxLayout * summaryEmailLayout = new QVBoxLayout(); + + const int labelWidth = 90; + + label_email = new QLabel(); + label_email->setText(QLabel::tr("Your Email")); + label_email->setFixedWidth(labelWidth); + emailLayout->addWidget(label_email); + email = new QLineEdit(); + emailLayout->addWidget(email); + summaryEmailLayout->addLayout(emailLayout); + + label_summary = new QLabel(); + label_summary->setText(QLabel::tr("Summary")); + label_summary->setFixedWidth(labelWidth); + summaryLayout->addWidget(label_summary); + summary = new QLineEdit(); + summaryLayout->addWidget(summary); + summaryEmailLayout->addLayout(summaryLayout); + + combinedTopLayout->addLayout(summaryEmailLayout); + + CheckSendSpecs = new QCheckBox(); + CheckSendSpecs->setText(QLabel::tr("Send system information")); + CheckSendSpecs->setChecked(true); + systemLayout->addWidget(CheckSendSpecs); + BtnViewInfo = new QPushButton(tr("View")); + systemLayout->addWidget(BtnViewInfo, 1); + BtnViewInfo->setFixedSize(60, 30); + connect(BtnViewInfo, SIGNAL(clicked()), this, SLOT(ShowSpecs())); + combinedTopLayout->addLayout(systemLayout); + + combinedTopLayout->setStretch(0, 1); + combinedTopLayout->insertSpacing(1, 20); + + pageLayout->addLayout(combinedTopLayout); + + label_description = new QLabel(); + label_description->setText(QLabel::tr("Description")); + label_description->setFixedWidth(labelWidth); + descriptionLayout->addWidget(label_description, 0, Qt::AlignTop); + description = new QTextBrowser(); + description->setReadOnly(false); + descriptionLayout->addWidget(description); + pageLayout->addLayout(descriptionLayout); + + /* Bottom layout */ + + QHBoxLayout * bottomLayout = new QHBoxLayout(); + QHBoxLayout * captchaLayout = new QHBoxLayout(); + QVBoxLayout * captchaInputLayout = new QVBoxLayout(); + + QPushButton * BtnCancel = new QPushButton(tr("Cancel")); + bottomLayout->addWidget(BtnCancel, 0); + BtnCancel->setFixedSize(100, 40); + connect(BtnCancel, SIGNAL(clicked()), this, SLOT(reject())); + + bottomLayout->insertStretch(1); + + label_captcha = new QLabel(); + label_captcha->setStyleSheet("border: 3px solid #ffcc00; border-radius: 4px"); + label_captcha->setText("loading
captcha"); + label_captcha->setFixedSize(200, 50); + captchaLayout->addWidget(label_captcha); + + label_captcha_input = new QLabel(); + label_captcha_input->setText(QLabel::tr("Type the security code:")); + captchaInputLayout->addWidget(label_captcha_input); + captchaInputLayout->setAlignment(label_captcha, Qt::AlignBottom); + captcha_code = new QLineEdit(); + captcha_code->setFixedSize(165, 30); + captchaInputLayout->addWidget(captcha_code); + captchaInputLayout->setAlignment(captcha_code, Qt::AlignTop); + captchaLayout->addLayout(captchaInputLayout); + captchaLayout->setAlignment(captchaInputLayout, Qt::AlignLeft); + + bottomLayout->addLayout(captchaLayout); + bottomLayout->addSpacing(40); + + // TODO: Set green arrow icon for send button (:/res/Start.png) + BtnSend = new QPushButton(tr("Send Feedback")); + bottomLayout->addWidget(BtnSend, 0); + BtnSend->setFixedSize(120, 40); + connect(BtnSend, SIGNAL(clicked()), this, SLOT(SendFeedback())); + + bottomLayout->setStretchFactor(captchaLayout, 0); + bottomLayout->setStretchFactor(BtnSend, 1); + + QVBoxLayout * dialogLayout = new QVBoxLayout(this); + dialogLayout->addLayout(pageLayout, 1); + dialogLayout->addLayout(bottomLayout); + + LoadCaptchaImage(); +} + +void FeedbackDialog::GenerateSpecs() +{ + // Gather some information about the system and embed it into the report + QDesktopWidget* screen = QApplication::desktop(); + QString os_version = "Operating system: "; + QString qt_version = QString("Qt version: ") + QT_VERSION_STR + QString("\n"); + QString total_ram = "Total RAM: "; + QString number_of_cores = "Number of cores: "; + QString compiler_bits = "Compiler architecture: "; + QString compiler_version = "Compiler version: "; + QString kernel_line = "Kernel: "; + QString screen_size = "Size of the screen(s): " + + QString::number(screen->width()) + "x" + QString::number(screen->height()) + "\n"; + QString number_of_screens = "Number of screens: " + QString::number(screen->screenCount()) + "\n"; + std::string processor_name = "Processor: "; + + // platform specific code +#ifdef Q_WS_MACX + number_of_cores += QString::number(sysconf(_SC_NPROCESSORS_ONLN)) + "\n"; + + uint64_t memsize; + size_t len = sizeof(memsize); + static int mib_s[2] = { CTL_HW, HW_MEMSIZE }; + if (sysctl (mib_s, 2, &memsize, &len, NULL, 0) == 0) + total_ram += QString::number(memsize/1024/1024) + " MB\n"; + else + total_ram += "Error getting total RAM information\n"; + + int mib[] = {CTL_KERN, KERN_OSRELEASE}; + sysctl(mib, sizeof mib / sizeof(int), NULL, &len, NULL, 0); + + char *kernelVersion = (char *)malloc(sizeof(char)*len); + sysctl(mib, sizeof mib / sizeof(int), kernelVersion, &len, NULL, 0); + + QString kernelVersionStr = QString(kernelVersion); + free(kernelVersion); + int major_version = kernelVersionStr.split(".").first().toUInt() - 4; + int minor_version = kernelVersionStr.split(".").at(1).toUInt(); + os_version += QString("Mac OS X 10.%1.%2").arg(major_version).arg(minor_version) + " "; + + switch(major_version) + { + case 4: os_version += "\"Tiger\"\n"; break; + case 5: os_version += "\"Leopard\"\n"; break; + case 6: os_version += "\"Snow Leopard\"\n"; break; + case 7: os_version += "\"Lion\"\n"; break; + case 8: os_version += "\"Mountain Lion\"\n"; break; + default: os_version += "\"Unknown version\"\n"; break; + } +#endif +#ifdef Q_WS_WIN + SYSTEM_INFO sysinfo; + GetSystemInfo(&sysinfo); + number_of_cores += QString::number(sysinfo.dwNumberOfProcessors) + "\n"; + MEMORYSTATUSEX status; + status.dwLength = sizeof(status); + GlobalMemoryStatusEx(&status); + total_ram += QString::number(status.ullTotalPhys); + + switch(QSysInfo::WinVersion()) + { + case QSysInfo::WV_2000: os_version += "Windows 2000\n"; break; + case QSysInfo::WV_XP: os_version += "Windows XP\n"; break; + case QSysInfo::WV_VISTA: os_version += "Windows Vista\n"; break; + case QSysInfo::WV_WINDOWS7: os_version += "Windows 7\n"; break; + default: os_version += "Windows (Unknown version)\n"; break; + } + kernel_line += "Windows kernel\n"; +#endif +#ifdef Q_WS_X11 + number_of_cores += QString::number(sysconf(_SC_NPROCESSORS_ONLN)) + "\n"; + long pages = sysconf(_SC_PHYS_PAGES), +/* +#ifndef Q_OS_FREEBSD + available_pages = sysconf(_SC_AVPHYS_PAGES), +#else + available_pages = 0, +#endif*/ + page_size = sysconf(_SC_PAGE_SIZE); + total_ram += QString::number(pages * page_size) + "\n"; + os_version += "GNU/Linux or BSD\n"; +#endif + + // uname -a +#if defined(Q_WS_X11) || defined(Q_WS_MACX) + QProcess *process = new QProcess(); + QStringList arguments = QStringList("-a"); + process->start("uname", arguments); + if (process->waitForFinished()) + kernel_line += QString(process->readAll()); + delete process; +#endif + + // cpu info + quint32 registers[4]; + quint32 i; + + i = 0x80000002; + asm volatile + ("cpuid" : "=a" (registers[0]), "=b" (registers[1]), "=c" (registers[2]), "=d" (registers[3]) + : "a" (i), "c" (0)); + processor_name += std::string((const char *)®isters[0], 4); + processor_name += std::string((const char *)®isters[1], 4); + processor_name += std::string((const char *)®isters[2], 4); + processor_name += std::string((const char *)®isters[3], 4); + i = 0x80000003; + asm volatile + ("cpuid" : "=a" (registers[0]), "=b" (registers[1]), "=c" (registers[2]), "=d" (registers[3]) + : "a" (i), "c" (0)); + processor_name += std::string((const char *)®isters[0], 4); + processor_name += std::string((const char *)®isters[1], 4); + processor_name += std::string((const char *)®isters[2], 4); + processor_name += std::string((const char *)®isters[3], 4); + i = 0x80000004; + asm volatile + ("cpuid" : "=a" (registers[0]), "=b" (registers[1]), "=c" (registers[2]), "=d" (registers[3]) + : "a" (i), "c" (0)); + processor_name += std::string((const char *)®isters[0], 4); + processor_name += std::string((const char *)®isters[1], 4); + processor_name += std::string((const char *)®isters[2], 4); + processor_name += std::string((const char *)®isters[3], 3); + + // compiler +#ifdef __GNUC__ + compiler_version += "GCC " + QString(__VERSION__) + "\n"; +#else + compiler_version += "Unknown\n"; +#endif + + if(sizeof(void*) == 4) + compiler_bits += "i386\n"; + else if(sizeof(void*) == 8) + compiler_bits += "x86_64\n"; + + // concat system info + specs = qt_version + + os_version + + total_ram + + screen_size + + number_of_screens + + QString::fromStdString(processor_name + "\n") + + number_of_cores + + compiler_version + + compiler_bits + + kernel_line; +} + +void FeedbackDialog::ShowErrorMessage(const QString & msg) +{ + QMessageBox msgMsg(this); + msgMsg.setIcon(QMessageBox::Warning); + msgMsg.setWindowTitle(QMessageBox::tr("Hedgewars - Error")); + msgMsg.setText(msg); + msgMsg.setWindowModality(Qt::WindowModal); + msgMsg.exec(); +} + +void FeedbackDialog::ShowSpecs() +{ + QMessageBox msgMsg(this); + msgMsg.setIcon(QMessageBox::Information); + msgMsg.setWindowTitle(QMessageBox::tr("System Information Preview")); + msgMsg.setText(specs); + msgMsg.setTextFormat(Qt::PlainText); + msgMsg.setWindowModality(Qt::WindowModal); + msgMsg.setStyleSheet("background: #0A0533;"); + msgMsg.exec(); +} + +void FeedbackDialog::NetReply(QNetworkReply *reply) +{ + if (reply == genCaptchaRequest) + { + if (reply->error() != QNetworkReply::NoError) + { + qDebug() << "Error generating captcha image: " << reply->errorString(); + ShowErrorMessage(QMessageBox::tr("Failed to generate captcha")); + return; + } + + bool okay; + QByteArray body = reply->readAll(); + captchaID = QString(body).toInt(&okay); + + if (!okay) + { + qDebug() << "Failed to get captcha ID: " << body; + ShowErrorMessage(QMessageBox::tr("Failed to generate captcha")); + return; + } + + QString url = "http://hedgewars.org/feedback/?captcha&id="; + url += QString::number(captchaID); + + QNetworkAccessManager *netManager = GetNetManager(); + QUrl captchaURL(url); + QNetworkRequest req(captchaURL); + captchaImageRequest = netManager->get(req); + } + else if (reply == captchaImageRequest) + { + if (reply->error() != QNetworkReply::NoError) + { + qDebug() << "Error loading captcha image: " << reply->errorString(); + ShowErrorMessage(QMessageBox::tr("Failed to download captcha")); + return; + } + + QByteArray imageData = reply->readAll(); + QPixmap pixmap; + pixmap.loadFromData(imageData); + label_captcha->setPixmap(pixmap); + captcha_code->setText(""); + } +} + +QNetworkAccessManager * FeedbackDialog::GetNetManager() +{ + if (netManager) return netManager; + netManager = new QNetworkAccessManager(this); + connect(netManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(NetReply(QNetworkReply*))); + return netManager; +} + +void FeedbackDialog::LoadCaptchaImage() +{ + QNetworkAccessManager *netManager = GetNetManager(); + QUrl captchaURL("http://hedgewars.org/feedback/?gencaptcha"); + QNetworkRequest req(captchaURL); + genCaptchaRequest = netManager->get(req); +} + +void FeedbackDialog::finishedSlot(QNetworkReply* reply) +{ + if (reply && reply->error() == QNetworkReply::NoError) + { + QMessageBox infoMsg(this); + infoMsg.setIcon(QMessageBox::Information); + infoMsg.setWindowTitle(QMessageBox::tr("Hedgewars - Success")); + infoMsg.setText(reply->readAll()); + infoMsg.setWindowModality(Qt::WindowModal); + infoMsg.exec(); + + accept(); + + return; + } + else + { + ShowErrorMessage(QString("Error: ") + reply->readAll()); + LoadCaptchaImage(); + } +} + +void FeedbackDialog::SendFeedback() +{ + // Get form data + + QString summary = this->summary->text(); + QString description = this->description->toPlainText(); + QString email = this->email->text(); + QString captchaCode = this->captcha_code->text(); + QString captchaID = QString::number(this->captchaID); + QString version = "HedgewarsFoundation-Hedgewars-" + (cVersionString?(*cVersionString):QString("")); + + if (summary.isEmpty() || description.isEmpty()) + { + ShowErrorMessage(QMessageBox::tr("Please fill out all fields. Email is optional.")); + return; + } + + // Submit issue to PHP script + + QByteArray body; + body.append("captcha="); + body.append(captchaID); + body.append("&code="); + body.append(captchaCode); + body.append("&version="); + body.append(QUrl::toPercentEncoding(version)); + body.append("&title="); + body.append(QUrl::toPercentEncoding(summary)); + body.append("&body="); + body.append(QUrl::toPercentEncoding(description)); + body.append("&email="); + body.append(QUrl::toPercentEncoding(email)); + if (CheckSendSpecs->isChecked()) + { + body.append("&specs="); + body.append(QUrl::toPercentEncoding(specs)); + } + + nam = new QNetworkAccessManager(this); + connect(nam, SIGNAL(finished(QNetworkReply*)), + this, SLOT(finishedSlot(QNetworkReply*))); + + QNetworkRequest header(QUrl("http://hedgewars.org/feedback/?submit")); + header.setRawHeader("Content-Length", QString::number(body.size()).toAscii()); + header.setRawHeader("Content-Type", "application/x-www-form-urlencoded"); + + nam->post(header, body); +} diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/ui/widget/feedbackdialog.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/QTfrontend/ui/widget/feedbackdialog.h Fri Feb 22 05:05:32 2013 +0100 @@ -0,0 +1,75 @@ +/* + * Hedgewars, a free turn based strategy game + * Copyright (c) 2004-2012 Andrey Korotaev + * + * 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 + */ + +#ifndef FEEDBACKDIALOG_H +#define FEEDBACKDIALOG_H + +#include + +class QNetworkReply; +class QNetworkAccessManager; +class QCheckBox; +class QLineEdit; +class QTextBrowser; +class QLabel; + +class FeedbackDialog : public QDialog +{ + Q_OBJECT + + public: + FeedbackDialog(QWidget * parent = 0); + void EmbedSystemInfo(); + void LoadCaptchaImage(); + + QPushButton * BtnSend; + QPushButton * BtnViewInfo; + QCheckBox * CheckSendSpecs; + QLineEdit * summary; + QTextBrowser * description; + QLabel * info; + QLabel * label_summary; + QLabel * label_description; + QLabel * label_captcha; + QLabel * label_email; + QLabel * label_captcha_input; + QLineEdit * captcha_code; + QLineEdit * email; + int captchaID; + QString specs; + + private: + void GenerateSpecs(); + QLayout * bodyLayoutDefinition(); + QLayout * footerLayoutDefinition(); + QNetworkAccessManager * GetNetManager(); + void ShowErrorMessage(const QString & msg); + + QNetworkAccessManager * netManager; + QNetworkReply * captchaImageRequest; + QNetworkReply * genCaptchaRequest; + QNetworkAccessManager * nam; + + private slots: + virtual void NetReply(QNetworkReply*); + virtual void ShowSpecs(); + void SendFeedback(); + void finishedSlot(QNetworkReply* reply); +}; + +#endif // FEEDBACKDIALOG_H diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/ui/widget/gamecfgwidget.cpp --- a/QTfrontend/ui/widget/gamecfgwidget.cpp Sun Nov 18 01:06:01 2012 +0400 +++ b/QTfrontend/ui/widget/gamecfgwidget.cpp Fri Feb 22 05:05:32 2013 +0100 @@ -24,7 +24,11 @@ #include #include #include +#include +#include #include +#include +#include #include "gamecfgwidget.h" #include "igbox.h" @@ -33,6 +37,7 @@ #include "ammoSchemeModel.h" #include "proto.h" #include "GameStyleModel.h" +#include "themeprompt.h" GameCFGWidget::GameCFGWidget(QWidget* parent) : QGroupBox(parent) @@ -40,28 +45,76 @@ , seedRegexp("\\{[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\\}") { mainLayout.setMargin(0); -// mainLayout.setSizeConstraint(QLayout::SetMinimumSize); + setMinimumHeight(310); + setMaximumHeight(447); + setMinimumWidth(470); + setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); + m_master = true; + + // Easy containers for the map/game options in either stacked or tabbed mode + + mapContainerFree = new QWidget(); + mapContainerTabbed = new QWidget(); + optionsContainerFree = new QWidget(); + optionsContainerTabbed = new QWidget(); + tabbed = false; + + // Container for when in tabbed mode - pMapContainer = new HWMapContainer(this); - mainLayout.addWidget(pMapContainer, 0, 0); + tabs = new QTabWidget(this); + tabs->setFixedWidth(470); + tabs->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Expanding); + tabs->addTab(mapContainerTabbed, tr("Map")); + tabs->addTab(optionsContainerTabbed, tr("Game options")); + tabs->setObjectName("gameCfgWidgetTabs"); + mainLayout.addWidget(tabs, 1); + tabs->setVisible(false); + + // Container for when in stacked mode + + StackContainer = new QWidget(); + StackContainer->setObjectName("gameStackContainer"); + mainLayout.addWidget(StackContainer, 1); + QVBoxLayout * stackLayout = new QVBoxLayout(StackContainer); - IconedGroupBox *GBoxOptions = new IconedGroupBox(this); - GBoxOptions->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum); - mainLayout.addWidget(GBoxOptions, 1, 0); + // Map options + + pMapContainer = new HWMapContainer(mapContainerFree); + stackLayout->addWidget(mapContainerFree, 0, Qt::AlignHCenter); + pMapContainer->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); + pMapContainer->setFixedSize(width() - 14, 278); + mapContainerFree->setFixedSize(pMapContainer->width(), pMapContainer->height()); + + // Horizontal divider + + QFrame * divider = new QFrame(); + divider->setFrameShape(QFrame::HLine); + divider->setFrameShadow(QFrame::Plain); + stackLayout->addWidget(divider, 0, Qt::AlignBottom); + //stackLayout->setRowMinimumHeight(1, 10); - QGridLayout *GBoxOptionsLayout = new QGridLayout(GBoxOptions); + // Game options + + optionsContainerTabbed->setContentsMargins(0, 0, 0, 0); + optionsContainerFree->setFixedSize(width() - 14, 140); + stackLayout->addWidget(optionsContainerFree, 0, Qt::AlignHCenter); - GBoxOptions->setTitle(tr("Game Options")); - GBoxOptionsLayout->addWidget(new QLabel(QLabel::tr("Style"), GBoxOptions), 1, 0); + OptionsInnerContainer = new QWidget(optionsContainerFree); + m_childWidgets << OptionsInnerContainer; + OptionsInnerContainer->setFixedSize(optionsContainerFree->width(), optionsContainerFree->height()); + OptionsInnerContainer->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred); + GBoxOptionsLayout = new QGridLayout(OptionsInnerContainer); - Scripts = new QComboBox(GBoxOptions); + GBoxOptionsLayout->addWidget(new QLabel(QLabel::tr("Style"), this), 1, 0); + + Scripts = new QComboBox(this); GBoxOptionsLayout->addWidget(Scripts, 1, 1); Scripts->setModel(DataManager::instance().gameStyleModel()); m_curScript = Scripts->currentText(); connect(Scripts, SIGNAL(currentIndexChanged(int)), this, SLOT(scriptChanged(int))); - QWidget *SchemeWidget = new QWidget(GBoxOptions); + QWidget *SchemeWidget = new QWidget(this); GBoxOptionsLayout->addWidget(SchemeWidget, 2, 0, 1, 2); QGridLayout *SchemeWidgetLayout = new QGridLayout(SchemeWidget); @@ -76,7 +129,7 @@ QPixmap pmEdit(":/res/edit.png"); QPushButton * goToSchemePage = new QPushButton(SchemeWidget); - goToSchemePage->setToolTip(tr("Edit schemes")); + goToSchemePage->setWhatsThis(tr("Edit schemes")); goToSchemePage->setIconSize(pmEdit.size()); goToSchemePage->setIcon(pmEdit); goToSchemePage->setMaximumWidth(pmEdit.width() + 6); @@ -91,7 +144,7 @@ connect(WeaponsName, SIGNAL(currentIndexChanged(int)), this, SLOT(ammoChanged(int))); QPushButton * goToWeaponPage = new QPushButton(SchemeWidget); - goToWeaponPage->setToolTip(tr("Edit weapons")); + goToWeaponPage->setWhatsThis(tr("Edit weapons")); goToWeaponPage->setIconSize(pmEdit.size()); goToWeaponPage->setIcon(pmEdit); goToWeaponPage->setMaximumWidth(pmEdit.width() + 6); @@ -99,7 +152,7 @@ connect(goToWeaponPage, SIGNAL(clicked()), this, SLOT(jumpToWeapons())); bindEntries = new QCheckBox(SchemeWidget); - bindEntries->setToolTip(tr("When this option is enabled selecting a game scheme will auto-select a weapon")); + bindEntries->setWhatsThis(tr("Game scheme will auto-select a weapon")); bindEntries->setChecked(true); bindEntries->setMaximumWidth(42); bindEntries->setStyleSheet( "QCheckBox::indicator:checked { image: url(\":/res/lock.png\"); }" @@ -118,6 +171,42 @@ connect(&DataManager::instance(), SIGNAL(updated()), this, SLOT(updateModelViews())); } +void GameCFGWidget::setTabbed(bool tabbed) +{ + if (tabbed && !this->tabbed) + { // Make tabbed + tabs->setCurrentIndex(0); + StackContainer->setVisible(false); + tabs->setVisible(true); + pMapContainer->setParent(mapContainerTabbed); + OptionsInnerContainer->setParent(optionsContainerTabbed); + pMapContainer->setVisible(true); + setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Expanding); + this->tabbed = true; + } + else if (!tabbed && this->tabbed) + { // Make stacked + pMapContainer->setParent(mapContainerFree); + OptionsInnerContainer->setParent(optionsContainerFree); + tabs->setVisible(false); + StackContainer->setVisible(true); + pMapContainer->setVisible(true); + setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); + this->tabbed = false; + } + + // Restore scrollbar palettes, since Qt seems to forget them easily when switching parents + QList allSBars = findChildren(); + QPalette pal = palette(); + pal.setColor(QPalette::WindowText, QColor(0xff, 0xcc, 0x00)); + pal.setColor(QPalette::Button, QColor(0x00, 0x35, 0x1d)); + pal.setColor(QPalette::Base, QColor(0x00, 0x35, 0x1d)); + pal.setColor(QPalette::Window, QColor(0x00, 0x00, 0x00)); + + for (int i = 0; i < allSBars.size(); ++i) + allSBars.at(i)->setPalette(pal); +} + void GameCFGWidget::jumpToSchemes() { emit goToSchemes(GameSchemes->currentIndex()); @@ -186,7 +275,7 @@ if (schemeData(24).toBool()) result |= 0x02000000; // tag team if (schemeData(25).toBool()) - result |= 0x04000000; // bottom border + result |= 0x04000000; // bottom return result; } @@ -235,6 +324,8 @@ bcfg << QString("e$template_filter %1").arg(pMapContainer->getTemplateFilter()).toUtf8(); bcfg << QString("e$mapgen %1").arg(mapgen).toUtf8(); + + switch (mapgen) { case MAPGEN_MAZE: @@ -271,7 +362,7 @@ bool illegal = ammo.size() != cDefaultAmmoStore->size(); if (illegal) { - QMessageBox illegalMsg(this); + QMessageBox illegalMsg(parentWidget()); illegalMsg.setIcon(QMessageBox::Warning); illegalMsg.setWindowTitle(QMessageBox::tr("Error")); illegalMsg.setText(QMessageBox::tr("Cannot use the ammo '%1'!").arg(name)); @@ -325,10 +416,6 @@ if (param == "SEED") { pMapContainer->setSeed(value); - if (!seedRegexp.exactMatch(value)) - { - pMapContainer->seedEdit->setVisible(true); - } return; } if (param == "THEME") @@ -377,8 +464,6 @@ if (param == "FULLMAPCONFIG") { QString seed = slValue[3]; - if (!seedRegexp.exactMatch(seed)) - pMapContainer->seedEdit->setVisible(true); pMapContainer->setAllMapParameters( slValue[0], @@ -586,3 +671,19 @@ Scripts->setCurrentIndex(0); } } + +bool GameCFGWidget::isMaster() +{ + return m_master; +} + +void GameCFGWidget::setMaster(bool master) +{ + if (master == m_master) return; + m_master = master; + + pMapContainer->setMaster(master); + + foreach (QWidget *widget, m_childWidgets) + widget->setEnabled(master); +} diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/ui/widget/gamecfgwidget.h --- a/QTfrontend/ui/widget/gamecfgwidget.h Sun Nov 18 01:06:01 2012 +0400 +++ b/QTfrontend/ui/widget/gamecfgwidget.h Fri Feb 22 05:05:32 2013 +0100 @@ -31,11 +31,14 @@ class QVBoxLayout; class QLabel; class QTableView; +class QTabWidget; class GameCFGWidget : public QGroupBox { Q_OBJECT + Q_PROPERTY(bool master READ isMaster WRITE setMaster) + public: GameCFGWidget(QWidget* parent); quint32 getGameFlags() const; @@ -47,11 +50,14 @@ HWMapContainer* pMapContainer; QTableView * tv; QVariant schemeData(int column) const; + bool isMaster(); public slots: void setParam(const QString & param, const QStringList & value); void fullNetConfig(); void resendSchemeData(); + void setMaster(bool master); + void setTabbed(bool tabbed); signals: void paramChanged(const QString & param, const QStringList & value); @@ -75,12 +81,24 @@ void updateModelViews(); private: - QGridLayout mainLayout; + QVBoxLayout mainLayout; QCheckBox * bindEntries; QString curNetAmmoName; QString curNetAmmo; QRegExp seedRegexp; QString m_curScript; + bool m_master; + QList m_childWidgets; + QGridLayout * GBoxOptionsLayout; + QWidget * OptionsInnerContainer; + QWidget * StackContainer; + + QWidget * mapContainerFree; + QWidget * mapContainerTabbed; + QWidget * optionsContainerFree; + QWidget * optionsContainerTabbed; + bool tabbed; + QTabWidget * tabs; void setNetAmmo(const QString& name, const QString& ammo); diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/ui/widget/hatbutton.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/QTfrontend/ui/widget/hatbutton.cpp Fri Feb 22 05:05:32 2013 +0100 @@ -0,0 +1,72 @@ +/* + * Hedgewars, a free turn based strategy game + * Copyright (c) 2004-2012 Andrey Korotaev + * + * 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 + +#include "hatprompt.h" +#include "DataManager.h" +#include "HatModel.h" +#include "hatbutton.h" + +HatButton::HatButton(QWidget* parent) : QPushButton(parent) +{ + setIconSize(QSize(32, 37)); + setFixedSize(44, 44); + + m_hatModel = DataManager::instance().hatModel(); + connect(this, SIGNAL(clicked()), this, SLOT(showPrompt())); + + setCurrentIndex(0); +} + +void HatButton::setCurrentIndex(int index) +{ + m_hat = m_hatModel->index(index, 0); + setWhatsThis(QString(tr("Change hat (%1)")).arg(m_hat.data(Qt::DisplayRole).toString())); + setToolTip(m_hat.data(Qt::DisplayRole).toString()); + setIcon(m_hat.data(Qt::DecorationRole).value()); +} + +int HatButton::currentIndex() +{ + return m_hat.row(); +} + +void HatButton::setCurrentHat(const QString & name) +{ + QList hats = m_hatModel->findItems(name); + + if (hats.count() > 0) + setCurrentIndex(hats[0]->row()); +} + +QString HatButton::currentHat() const +{ + return m_hat.data(Qt::DisplayRole).toString(); +} + +void HatButton::showPrompt() +{ + HatPrompt prompt(currentIndex(), this); + int hatID = prompt.exec() - 1; // Since 0 means canceled, so all indexes are +1'd + if (hatID < 0) return; + + setCurrentIndex(hatID); + emit currentIndexChanged(hatID); + emit currentHatChanged(currentHat()); +} diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/ui/widget/hatbutton.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/QTfrontend/ui/widget/hatbutton.h Fri Feb 22 05:05:32 2013 +0100 @@ -0,0 +1,55 @@ +/* + * Hedgewars, a free turn based strategy game + * Copyright (c) 2004-2012 Andrey Korotaev + * + * 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 + */ + +#ifndef HATBUTTON_H +#define HATBUTTON_H + +#include +#include +#include + +class HatModel; + +class HatButton : public QPushButton +{ + Q_OBJECT + Q_PROPERTY(int currentIndex READ currentIndex WRITE setCurrentIndex) + Q_PROPERTY(QString currentHat READ currentHat WRITE setCurrentHat) + + public: + HatButton(QWidget* parent); + int currentIndex(); + QString currentHat() const; + + private: + QModelIndex m_hat; + HatModel * m_hatModel; + + signals: + void currentIndexChanged(int); + void currentHatChanged(const QString &); + + public slots: + void setCurrentIndex(int index); + void setCurrentHat(const QString & name); + + private slots: + void showPrompt(); +}; + +#endif // HATBUTTON_H diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/ui/widget/hatprompt.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/QTfrontend/ui/widget/hatprompt.cpp Fri Feb 22 05:05:32 2013 +0100 @@ -0,0 +1,165 @@ +/* + * Hedgewars, a free turn based strategy game + * Copyright (c) 2004-2012 Andrey Korotaev + * + * 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 +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "DataManager.h" +#include "lineeditcursor.h" +#include "HatModel.h" +#include "hatprompt.h" + +HatPrompt::HatPrompt(int currentIndex, QWidget* parent) : QDialog(parent) +{ + setModal(true); + setWindowFlags(Qt::Sheet); + setWindowModality(Qt::WindowModal); + setMinimumSize(550, 430); + resize(550, 430); + setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum); + + setStyleSheet("QPushButton { padding: 5px; margin-top: 10px; }"); + + // Hat model, and a model for setting a filter + HatModel * hatModel = DataManager::instance().hatModel(); + filterModel = new QSortFilterProxyModel(); + filterModel->setSourceModel(hatModel); + filterModel->setFilterCaseSensitivity(Qt::CaseInsensitive); + + // Grid + QGridLayout * dialogLayout = new QGridLayout(this); + dialogLayout->setSpacing(0); + dialogLayout->setColumnStretch(1, 1); + + QHBoxLayout * topLayout = new QHBoxLayout(); + + // Help/prompt message at top + QLabel * lblDesc = new QLabel(tr("Search for a hat:")); + lblDesc->setObjectName("lblDesc"); + lblDesc->setStyleSheet("#lblDesc { color: #130F2A; background: #F6CB1C; border: solid 4px #F6CB1C; border-top-left-radius: 10px; padding: 4px 10px;}"); + lblDesc->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); + lblDesc->setFixedHeight(24); + lblDesc->setMinimumWidth(0); + + // Filter text box + QWidget * filterContainer = new QWidget(); + filterContainer->setFixedHeight(24); + filterContainer->setObjectName("filterContainer"); + filterContainer->setStyleSheet("#filterContainer { background: #F6CB1C; border-top-right-radius: 10px; padding: 3px; }"); + filterContainer->setFixedWidth(150); + txtFilter = new LineEditCursor(filterContainer); + txtFilter->setFixedWidth(150); + txtFilter->setFocus(); + txtFilter->setFixedHeight(22); + txtFilter->setStyleSheet("LineEditCursor { border-width: 0px; border-radius: 6px; margin-top: 3px; margin-right: 3px; padding-left: 4px; padding-bottom: 2px; background-color: rgb(23, 11, 54); } LineEditCursor:hover, LineEditCursor:focus { background-color: rgb(13, 5, 68); }"); + connect(txtFilter, SIGNAL(textChanged(const QString &)), this, SLOT(filterChanged(const QString &))); + connect(txtFilter, SIGNAL(moveUp()), this, SLOT(moveUp())); + connect(txtFilter, SIGNAL(moveDown()), this, SLOT(moveDown())); + connect(txtFilter, SIGNAL(moveLeft()), this, SLOT(moveLeft())); + connect(txtFilter, SIGNAL(moveRight()), this, SLOT(moveRight())); + + // Corner widget + QLabel * corner = new QLabel(); + corner->setPixmap(QPixmap(QString::fromUtf8(":/res/inverse-corner-bl.png"))); + corner->setFixedSize(10, 10); + + // Add widgets to top layout + topLayout->addWidget(lblDesc); + topLayout->addWidget(filterContainer); + topLayout->addWidget(corner, 0, Qt::AlignBottom); + topLayout->addStretch(1); + + // Cancel button (closes dialog) + QPushButton * btnCancel = new QPushButton(tr("Cancel")); + connect(btnCancel, SIGNAL(clicked()), this, SLOT(reject())); + + // Select button + QPushButton * btnSelect = new QPushButton(tr("Use selected hat")); + btnSelect->setDefault(true); + connect(btnSelect, SIGNAL(clicked()), this, SLOT(onAccepted())); + + // Add hats + list = new HatListView(); + list->setModel(filterModel); + list->setViewMode(QListView::IconMode); + list->setResizeMode(QListView::Adjust); + list->setMovement(QListView::Static); + list->setEditTriggers(QAbstractItemView::NoEditTriggers); + list->setSpacing(8); + list->setWordWrap(true); + list->setSelectionMode(QAbstractItemView::SingleSelection); + list->setObjectName("hatList"); + list->setCurrentIndex(filterModel->index(currentIndex, 0)); + connect(list, SIGNAL(activated(const QModelIndex &)), this, SLOT(hatChosen(const QModelIndex &))); + connect(list, SIGNAL(clicked(const QModelIndex &)), this, SLOT(hatChosen(const QModelIndex &))); + + // Add elements to layouts + dialogLayout->addLayout(topLayout, 0, 0, 1, 3); + dialogLayout->addWidget(list, 1, 0, 1, 3); + dialogLayout->addWidget(btnCancel, 2, 0, 1, 1, Qt::AlignLeft); + dialogLayout->addWidget(btnSelect, 2, 2, 1, 1, Qt::AlignRight); +} + +void HatPrompt::moveUp() +{ + list->setCurrentIndex(list->moveCursor(QAbstractItemView::MoveUp, Qt::NoModifier)); +} + +void HatPrompt::moveDown() +{ + list->setCurrentIndex(list->moveCursor(QAbstractItemView::MoveDown, Qt::NoModifier)); +} + +void HatPrompt::moveLeft() +{ + list->setCurrentIndex(list->moveCursor(QAbstractItemView::MoveLeft, Qt::NoModifier)); +} + +void HatPrompt::moveRight() +{ + list->setCurrentIndex(list->moveCursor(QAbstractItemView::MoveRight, Qt::NoModifier)); +} + +void HatPrompt::onAccepted() +{ + hatChosen(list->currentIndex()); +} + +// When a hat is selected +void HatPrompt::hatChosen(const QModelIndex & index) +{ + done(filterModel->mapToSource(index).row() + 1); // Since returning 0 means canceled +} + +// When the text in the filter text box is changed +void HatPrompt::filterChanged(const QString & text) +{ + filterModel->setFilterFixedString(text); + list->setCurrentIndex(filterModel->index(0, 0)); +} diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/ui/widget/hatprompt.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/QTfrontend/ui/widget/hatprompt.h Fri Feb 22 05:05:32 2013 +0100 @@ -0,0 +1,61 @@ +/* + * Hedgewars, a free turn based strategy game + * Copyright (c) 2004-2012 Andrey Korotaev + * + * 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 + */ + +#ifndef HATPROMPT_H +#define HATPROMPT_H + +#include +#include +#include + +class QLineEdit; +class QModelIndex; +class QSortFilterProxyModel; +class LineEditCursor; + +class HatListView : public QListView +{ + friend class HatPrompt; + + public: + HatListView(QWidget* parent = 0) : QListView(parent){} +}; + +class HatPrompt : public QDialog +{ + Q_OBJECT + + public: + HatPrompt(int currentIndex = 0, QWidget* parent = 0); + + private: + LineEditCursor * txtFilter; + HatListView * list; + QSortFilterProxyModel * filterModel; + + private slots: + void onAccepted(); + void hatChosen(const QModelIndex & index); + void filterChanged(const QString & text); + void moveUp(); + void moveDown(); + void moveLeft(); + void moveRight(); +}; + +#endif // HATPROMPT_H diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/ui/widget/keybinder.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/QTfrontend/ui/widget/keybinder.cpp Fri Feb 22 05:05:32 2013 +0100 @@ -0,0 +1,301 @@ +/* + * Hedgewars, a free turn based strategy game + * Copyright (c) 2004-2012 Andrey Korotaev + * + * 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 "keybinder.h" +#include "HWApplication.h" +#include "DataManager.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +KeyBinder::KeyBinder(QWidget * parent, const QString & helpText, const QString & defaultText, const QString & resetButtonText) : QWidget(parent) +{ + this->defaultText = defaultText; + enableSignal = false; + + // Two-column tab layout + QHBoxLayout * pageKeysLayout = new QHBoxLayout(this); + pageKeysLayout->setSpacing(0); + pageKeysLayout->setContentsMargins(0, 0, 0, 0); + + // Table for category list + QVBoxLayout * catListContainer = new QVBoxLayout(); + catListContainer->setContentsMargins(10, 10, 10, 10); + catList = new QListWidget(); + catList->setFixedWidth(180); + catList->setStyleSheet("QListWidget::item { font-size: 14px; } QListWidget:hover { border-color: #F6CB1C; } QListWidget::item:selected { background: #150A61; color: yellow; }"); + catList->setFocusPolicy(Qt::NoFocus); + connect(catList, SIGNAL(currentRowChanged(int)), this, SLOT(changeBindingsPage(int))); + catListContainer->addWidget(catList); + pageKeysLayout->addLayout(catListContainer); + + // Reset all binds button + if (!resetButtonText.isEmpty()) + { + QPushButton * btnResetAll = new QPushButton(resetButtonText); + catListContainer->addWidget(btnResetAll); + btnResetAll->setFixedHeight(40); + catListContainer->setStretch(1, 0); + catListContainer->setSpacing(10); + connect(btnResetAll, SIGNAL(clicked()), this, SIGNAL(resetAllBinds())); + } + + // Container for pages of key bindings + QWidget * bindingsPagesContainer = new QWidget(); + QVBoxLayout * rightLayout = new QVBoxLayout(bindingsPagesContainer); + + // Scroll area for key bindings + QScrollArea * scrollArea = new QScrollArea(); + scrollArea->setContentsMargins(0, 0, 0, 0); + scrollArea->setWidget(bindingsPagesContainer); + scrollArea->setVerticalScrollBarPolicy(Qt::ScrollBarAsNeeded); + scrollArea->setWidgetResizable(true); + scrollArea->setFrameShape(QFrame::NoFrame); + scrollArea->setStyleSheet("background: #130F2A;"); + + // Add key binding pages to bindings tab + pageKeysLayout->addWidget(scrollArea); + pageKeysLayout->setStretch(1, 1); + + // Custom help text + QLabel * helpLabel = new QLabel(); + helpLabel->setText(helpText); + helpLabel->setStyleSheet("color: #130F2A; background: #F6CB1C; border: solid 4px #F6CB1C; border-radius: 10px; padding: auto 20px;"); + helpLabel->setFixedHeight(24); + rightLayout->addWidget(helpLabel, 0, Qt::AlignCenter); + + // Category list and bind table row heights + const int rowHeight = 20; + QSize catSize, headerSize; + catSize.setHeight(36); + headerSize.setHeight(24); + + // Category list header + QListWidgetItem * catListHeader = new QListWidgetItem(tr("Category")); + catListHeader->setSizeHint(headerSize); + catListHeader->setFlags(Qt::NoItemFlags); + catListHeader->setForeground(QBrush(QColor("#130F2A"))); + catListHeader->setBackground(QBrush(QColor("#F6CB1C"))); + catListHeader->setTextAlignment(Qt::AlignCenter); + catList->addItem(catListHeader); + + // Populate + bindingsPages = new QHBoxLayout(); + bindingsPages->setContentsMargins(0, 0, 0, 0); + rightLayout->addLayout(bindingsPages); + QWidget * curPage = NULL; + QVBoxLayout * curLayout = NULL; + QTableWidget * curTable = NULL; + bool bFirstPage = true; + selectedBindTable = NULL; + bindComboBoxCellMappings = new QHash(); + bindCellComboBoxMappings = new QHash(); + for (int i = 0; i < BINDS_NUMBER; i++) + { + if (cbinds[i].category != NULL) + { + // Add stretch at end of previous layout + if (curLayout != NULL) curLayout->insertStretch(-1, 1); + + // Category list item + QListWidgetItem * catItem = new QListWidgetItem(HWApplication::translate("binds (categories)", cbinds[i].category)); + catItem->setSizeHint(catSize); + catList->addItem(catItem); + + // Create new page + curPage = new QWidget(); + curLayout = new QVBoxLayout(curPage); + curLayout->setSpacing(2); + bindingsPages->addWidget(curPage); + if (!bFirstPage) curPage->setVisible(false); + } + + // Description + if (cbinds[i].description != NULL) + { + QLabel * desc = new QLabel(HWApplication::translate("binds (descriptions)", cbinds[i].description)); + curLayout->addWidget(desc, 0); + QFrame * divider = new QFrame(); + divider->setFrameShape(QFrame::HLine); + divider->setFrameShadow(QFrame::Plain); + curLayout->addWidget(divider, 0); + } + + // New table + if (cbinds[i].category != NULL || cbinds[i].description != NULL) + { + curTable = new QTableWidget(0, 2); + curTable->verticalHeader()->setVisible(false); + curTable->horizontalHeader()->setVisible(false); + curTable->horizontalHeader()->setResizeMode(QHeaderView::Stretch); + curTable->verticalHeader()->setDefaultSectionSize(rowHeight); + curTable->setShowGrid(false); + curTable->setStyleSheet("QTableWidget { border: none; } "); + curTable->setSelectionBehavior(QAbstractItemView::SelectRows); + curTable->setSelectionMode(QAbstractItemView::SingleSelection); + curTable->setFocusPolicy(Qt::NoFocus); + connect(curTable, SIGNAL(itemSelectionChanged()), this, SLOT(bindSelectionChanged())); + connect(curTable, SIGNAL(itemClicked(QTableWidgetItem *)), this, SLOT(bindCellClicked(QTableWidgetItem *))); + curLayout->addWidget(curTable, 0); + } + + // Hidden combo box + QComboBox * comboBox = CBBind[i] = new QComboBox(curTable); + comboBox->setModel((QAbstractItemModel*)DataManager::instance().bindsModel()); + comboBox->setVisible(false); + comboBox->setFixedWidth(200); + + // Table row + int row = curTable->rowCount(); + QTableWidgetItem * nameCell = new QTableWidgetItem(HWApplication::translate("binds", cbinds[i].name)); + nameCell->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled); + curTable->insertRow(row); + curTable->setItem(row, 0, nameCell); + QTableWidgetItem * bindCell = new QTableWidgetItem(comboBox->currentText()); + bindCell->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled); + curTable->setItem(row, 1, bindCell); + curTable->resizeColumnsToContents(); + curTable->setFixedHeight(curTable->verticalHeader()->length() + 10); + + // Updates the text in the table cell + connect(comboBox, SIGNAL(currentIndexChanged(const QString &)), this, SLOT(bindChanged(const QString &))); + + // Map combo box and that row's cells to each other + bindComboBoxCellMappings->insert(comboBox, bindCell); + bindCellComboBoxMappings->insert(nameCell, comboBox); + bindCellComboBoxMappings->insert(bindCell, comboBox); + } + + // Add stretch at end of last layout + if (curLayout != NULL) curLayout->insertStretch(-1, 1); + + // Go to first page + catList->setCurrentItem(catList->item(1)); + + enableSignal = true; +} + +KeyBinder::~KeyBinder() +{ + delete bindComboBoxCellMappings; + delete bindCellComboBoxMappings; +} + +// Switches between different pages of key binds +void KeyBinder::changeBindingsPage(int page) +{ + page--; // Disregard first item (the list header) + int pages = bindingsPages->count(); + for (int i = 0; i < pages; i++) + bindingsPages->itemAt(i)->widget()->setVisible(false); + bindingsPages->itemAt(page)->widget()->setVisible(true); +} + +// When a key bind combobox value is changed, updates the table cell text +void KeyBinder::bindChanged(const QString & text) +{ + bindComboBoxCellMappings->value(sender())->setText(text); + + if (enableSignal) + { + for (int i = 0; i < BINDS_NUMBER; i++) + { + if (CBBind[i] == sender()) + { + emit bindUpdate(i); + break; + } + } + } +} + +// When a row in a key bind table is clicked, this shows the popup +void KeyBinder::bindCellClicked(QTableWidgetItem * item) +{ + QComboBox * box = bindCellComboBoxMappings->value(item); + QTableWidget * table = item->tableWidget(); + QFrame * frame = box->findChild(); + + box->showPopup(); + frame->move( + frame->x() + table->horizontalHeader()->sectionSize(0), + frame->y() + (table->verticalHeader()->defaultSectionSize() * item->row()) + ); +} + +// When a new row in a bind table is *selected*, this clears selection in any other table +void KeyBinder::bindSelectionChanged() +{ + QTableWidget * theSender = (QTableWidget*)sender(); + if (theSender != selectedBindTable) + { + if (selectedBindTable != NULL) + selectedBindTable->clearSelection(); + selectedBindTable = theSender; + } +} + +// Set a combobox's index +void KeyBinder::setBindIndex(int keyIndex, int bindIndex) +{ + enableSignal = false; + CBBind[keyIndex]->setCurrentIndex(bindIndex); + enableSignal = true; +} + +// Return a combobox's selected index +int KeyBinder::bindIndex(int keyIndex) +{ + return CBBind[keyIndex]->currentIndex(); +} + +// Clears selection and goes to first category +void KeyBinder::resetInterface() +{ + enableSignal = false; + + catList->setCurrentItem(catList->item(1)); + changeBindingsPage(1); + if (selectedBindTable != NULL) + { + selectedBindTable->clearSelection(); + selectedBindTable = NULL; + } + + // Default bind text + DataManager::instance().bindsModel()->item(0)->setData(defaultText, Qt::DisplayRole); + for (int i = 0; i < BINDS_NUMBER; i++) + { + CBBind[i]->setModel(DataManager::instance().bindsModel()); + CBBind[i]->setCurrentIndex(0); + bindComboBoxCellMappings->value(CBBind[i])->setText(defaultText); + } + + enableSignal = true; +} diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/ui/widget/keybinder.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/QTfrontend/ui/widget/keybinder.h Fri Feb 22 05:05:32 2013 +0100 @@ -0,0 +1,68 @@ +/* + * Hedgewars, a free turn based strategy game + * Copyright (c) 2004-2012 Andrey Korotaev + * + * 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 + */ + +#ifndef _KEY_BINDER_H +#define _KEY_BINDER_H + +#include +#include + +#include "binds.h" + +class QListWidget; +class QTableWidgetItem; +class QTableWidget; +class QBoxLayout; +class QComboBox; + +// USAGE NOTE: Every time the widget comes into view, you must call resetInterface() + +class KeyBinder : public QWidget +{ + Q_OBJECT + + public: + KeyBinder(QWidget * parent = NULL, const QString & helpText = QString(), const QString & defaultText = QString(), const QString & resetButtonText = QString()); + ~KeyBinder(); + + void setBindIndex(int keyIndex, int bindIndex); + int bindIndex(int keyIndex); + void resetInterface(); + + private: + QHash * bindComboBoxCellMappings; + QHash * bindCellComboBoxMappings; + QTableWidget * selectedBindTable; + QListWidget * catList; + QBoxLayout *bindingsPages; + QComboBox * CBBind[BINDS_NUMBER]; + QString defaultText; + bool enableSignal; + + signals: + void bindUpdate(int bindID); + void resetAllBinds(); + + private slots: + void changeBindingsPage(int page); + void bindChanged(const QString &); + void bindCellClicked(QTableWidgetItem * item); + void bindSelectionChanged(); +}; + +#endif // _KEY_BINDER_H diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/ui/widget/lineeditcursor.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/QTfrontend/ui/widget/lineeditcursor.cpp Fri Feb 22 05:05:32 2013 +0100 @@ -0,0 +1,35 @@ +/* + * Hedgewars, a free turn based strategy game + * Copyright (c) 2004-2012 Andrey Korotaev + * + * 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 + +#include "lineeditcursor.h" + +void LineEditCursor::keyPressEvent(QKeyEvent * event) +{ + if (event->key() == Qt::Key_Up) + emit moveUp(); + else if (event->key() == Qt::Key_Down) + emit moveDown(); + else if (event->key() == Qt::Key_Left) + emit moveLeft(); + else if (event->key() == Qt::Key_Right) + emit moveRight(); + else + QLineEdit::keyPressEvent(event); +} diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/ui/widget/lineeditcursor.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/QTfrontend/ui/widget/lineeditcursor.h Fri Feb 22 05:05:32 2013 +0100 @@ -0,0 +1,41 @@ +/* + * Hedgewars, a free turn based strategy game + * Copyright (c) 2004-2012 Andrey Korotaev + * + * 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 + */ + +#ifndef LINEEDITCURSOR_H +#define LINEEDITCURSOR_H + +#include + +class LineEditCursor : public QLineEdit +{ + Q_OBJECT + + public: + LineEditCursor(QWidget* parent = 0) : QLineEdit(parent) {} + + signals: + void moveUp(); + void moveDown(); + void moveLeft(); + void moveRight(); + + private: + void keyPressEvent(QKeyEvent * event); +}; + +#endif // LINEEDITCURSOR_H diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/ui/widget/mapContainer.cpp --- a/QTfrontend/ui/widget/mapContainer.cpp Sun Nov 18 01:06:01 2012 +0400 +++ b/QTfrontend/ui/widget/mapContainer.cpp Fri Feb 22 05:05:32 2013 +0100 @@ -30,13 +30,24 @@ #include #include #include +#include +#include +#include +#include +#include +#include +#include #include "hwconsts.h" #include "mapContainer.h" +#include "themeprompt.h" +#include "seedprompt.h" #include "igbox.h" #include "HWApplication.h" #include "ThemeModel.h" + + HWMapContainer::HWMapContainer(QWidget * parent) : QWidget(parent), mainLayout(this), @@ -47,145 +58,205 @@ hhSmall.load(":/res/hh_small.png"); hhLimit = 18; templateFilter = 0; + m_master = true; linearGrad = QLinearGradient(QPoint(128, 0), QPoint(128, 128)); linearGrad.setColorAt(1, QColor(0, 0, 192)); linearGrad.setColorAt(0, QColor(66, 115, 225)); mainLayout.setContentsMargins(HWApplication::style()->pixelMetric(QStyle::PM_LayoutLeftMargin), - 1, + 10, HWApplication::style()->pixelMetric(QStyle::PM_LayoutRightMargin), HWApplication::style()->pixelMetric(QStyle::PM_LayoutBottomMargin)); - QWidget* mapWidget = new QWidget(this); - mainLayout.addWidget(mapWidget, 0, 0, Qt::AlignHCenter); + m_staticMapModel = DataManager::instance().staticMapModel(); + m_missionMapModel = DataManager::instance().missionMapModel(); + m_themeModel = DataManager::instance().themeModel(); - QGridLayout* mapLayout = new QGridLayout(mapWidget); - mapLayout->setMargin(0); + /* Layouts */ - imageButt = new QPushButton(mapWidget); - imageButt->setObjectName("imageButt"); - imageButt->setFixedSize(256 + 6, 128 + 6); - imageButt->setFlat(true); - imageButt->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);//QSizePolicy::Minimum, QSizePolicy::Minimum); - mapLayout->addWidget(imageButt, 0, 0, 1, 2); - connect(imageButt, SIGNAL(clicked()), this, SLOT(setRandomMap())); + QHBoxLayout * typeLayout = new QHBoxLayout(); + QHBoxLayout * seedLayout = new QHBoxLayout(); + QHBoxLayout * twoColumnLayout = new QHBoxLayout(); + QVBoxLayout * leftLayout = new QVBoxLayout(); + QVBoxLayout * rightLayout = new QVBoxLayout(); + twoColumnLayout->addLayout(leftLayout, 0); + twoColumnLayout->addStretch(1); + twoColumnLayout->addLayout(rightLayout, 0); + QVBoxLayout * drawnControls = new QVBoxLayout(); + leftLayout->addLayout(typeLayout, 0); + rightLayout->addLayout(seedLayout, 0); + + /* Map type combobox */ - chooseMap = new QComboBox(mapWidget); - chooseMap->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); - m_mapModel = DataManager::instance().mapModel(); - chooseMap->setEditable(false); - chooseMap->setModel(m_mapModel); + typeLayout->setSpacing(10); + typeLayout->addWidget(new QLabel(tr("Map type:")), 0); + cType = new QComboBox(this); + typeLayout->addWidget(cType, 1); + cType->insertItem(0, tr("Image map"), MapModel::StaticMap); + cType->insertItem(1, tr("Mission map"), MapModel::MissionMap); + cType->insertItem(2, tr("Hand-drawn"), MapModel::HandDrawnMap); + cType->insertItem(3, tr("Randomly generated"), MapModel::GeneratedMap); + cType->insertItem(4, tr("Random maze"), MapModel::GeneratedMaze); + connect(cType, SIGNAL(currentIndexChanged(int)), this, SLOT(mapTypeChanged(int))); + m_childWidgets << cType; - mapLayout->addWidget(chooseMap, 1, 1); - - QLabel * lblMap = new QLabel(tr("Map"), mapWidget); - mapLayout->addWidget(lblMap, 1, 0); + /* Randomize button */ - lblFilter = new QLabel(tr("Filter"), mapWidget); - mapLayout->addWidget(lblFilter, 2, 0); + seedLayout->addStretch(1); + const QIcon& lp = QIcon(":/res/dice.png"); + QSize sz = lp.actualSize(QSize(65535, 65535)); + btnRandomize = new QPushButton(); + btnRandomize->setText(tr("Random")); + btnRandomize->setIcon(lp); + btnRandomize->setFixedHeight(30); + btnRandomize->setIconSize(sz); + btnRandomize->setFlat(true); + btnRandomize->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); + connect(btnRandomize, SIGNAL(clicked()), this, SLOT(setRandomMap())); + m_childWidgets << btnRandomize; + btnRandomize->setStyleSheet("padding: 5px;"); + btnRandomize->setFixedHeight(cType->height()); + seedLayout->addWidget(btnRandomize, 1); - cbTemplateFilter = new QComboBox(mapWidget); - cbTemplateFilter->addItem(tr("All"), 0); - cbTemplateFilter->addItem(tr("Small"), 1); - cbTemplateFilter->addItem(tr("Medium"), 2); - cbTemplateFilter->addItem(tr("Large"), 3); - cbTemplateFilter->addItem(tr("Cavern"), 4); - cbTemplateFilter->addItem(tr("Wacky"), 5); - mapLayout->addWidget(cbTemplateFilter, 2, 1); - - connect(cbTemplateFilter, SIGNAL(activated(int)), this, SLOT(setTemplateFilter(int))); + /* Seed button */ + btnSeed = new QPushButton(parentWidget()->parentWidget()); + btnSeed->setText(tr("Seed")); + btnSeed->setStyleSheet("padding: 5px;"); + btnSeed->setFixedHeight(cType->height()); + connect(btnSeed, SIGNAL(clicked()), this, SLOT(showSeedPrompt())); + seedLayout->addWidget(btnSeed, 0); - maze_size_label = new QLabel(tr("Type"), mapWidget); - mapLayout->addWidget(maze_size_label, 2, 0); - maze_size_label->hide(); - cbMazeSize = new QComboBox(mapWidget); - cbMazeSize->addItem(tr("Small tunnels"), 0); - cbMazeSize->addItem(tr("Medium tunnels"), 1); - cbMazeSize->addItem(tr("Large tunnels"), 2); - cbMazeSize->addItem(tr("Small floating islands"), 3); - cbMazeSize->addItem(tr("Medium floating islands"), 4); - cbMazeSize->addItem(tr("Large floating islands"), 5); - cbMazeSize->setCurrentIndex(1); + /* Map preview label */ + + QLabel * lblMapPreviewText = new QLabel(this); + lblMapPreviewText->setText(tr("Map preview:")); + leftLayout->addWidget(lblMapPreviewText, 0); + + /* Map Preview */ - mapLayout->addWidget(cbMazeSize, 2, 1); - cbMazeSize->hide(); - connect(cbMazeSize, SIGNAL(activated(int)), this, SLOT(setMazeSize(int))); + mapPreview = new QPushButton(this); + mapPreview->setObjectName("mapPreview"); + mapPreview->setFixedSize(256, 128); + mapPreview->setContentsMargins(0, 0, 0, 0); + leftLayout->addWidget(mapPreview, 0); + connect(mapPreview, SIGNAL(clicked()), this, SLOT(previewClicked())); + + /* Bottom-Left layout */ + + QVBoxLayout * bottomLeftLayout = new QVBoxLayout(); + leftLayout->addLayout(bottomLeftLayout, 1); + + /* Map list label */ + + lblMapList = new QLabel(); + rightLayout->addWidget(lblMapList, 0); + + /* Static maps list */ - gbThemes = new IconedGroupBox(mapWidget); - gbThemes->setTitleTextPadding(80); - gbThemes->setContentTopPadding(15); - gbThemes->setTitle(tr("Themes")); + staticMapList = new QListView; + staticMapList->setModel(m_staticMapModel); + rightLayout->addWidget(staticMapList, 1); + staticMapList->setEditTriggers(QAbstractItemView::NoEditTriggers); + m_childWidgets << staticMapList; + QItemSelectionModel * staticSelectionModel = staticMapList->selectionModel(); + connect(staticSelectionModel, + SIGNAL(currentRowChanged(const QModelIndex &, const QModelIndex &)), + this, + SLOT(staticMapChanged(const QModelIndex &, const QModelIndex &))); + + /* Mission maps list */ - //gbThemes->setStyleSheet("padding: 0px"); // doesn't work - stylesheet is set with icon - mapLayout->addWidget(gbThemes, 0, 2, 3, 1); - // disallow row to be collapsed (so it can't get ignored when Qt applies rowSpan of gbThemes) - mapLayout->setRowMinimumHeight(2, 13); - QVBoxLayout * gbTLayout = new QVBoxLayout(gbThemes); - gbTLayout->setContentsMargins(0, 0, 0 ,0); - gbTLayout->setSpacing(0); - lvThemes = new QListView(mapWidget); - lvThemes->setMinimumHeight(30); - lvThemes->setFixedWidth(140); - m_themeModel = DataManager::instance().themeModel(); - lvThemes->setModel(m_themeModel); - lvThemes->setIconSize(QSize(16, 16)); - lvThemes->setEditTriggers(QListView::NoEditTriggers); + missionMapList = new QListView; + missionMapList->setModel(m_missionMapModel); + missionMapList->setEditTriggers(QAbstractItemView::NoEditTriggers); + rightLayout->addWidget(missionMapList, 1); + m_childWidgets << missionMapList; + QItemSelectionModel * missionSelectionModel = missionMapList->selectionModel(); + connect(missionSelectionModel, + SIGNAL(currentRowChanged(const QModelIndex &, const QModelIndex &)), + this, + SLOT(missionMapChanged(const QModelIndex &, const QModelIndex &))); + + /* Map load and edit buttons */ + + drawnControls->addStretch(1); - connect(lvThemes->selectionModel(), SIGNAL(currentRowChanged( const QModelIndex &, const QModelIndex &)), this, SLOT(themeSelected( const QModelIndex &, const QModelIndex &))); + btnLoadMap = new QPushButton(tr("Load map drawing")); + btnLoadMap->setStyleSheet("padding: 20px;"); + drawnControls->addWidget(btnLoadMap, 0); + m_childWidgets << btnLoadMap; + connect(btnLoadMap, SIGNAL(clicked()), this, SLOT(loadDrawing())); + + btnEditMap = new QPushButton(tr("Edit map drawing")); + btnEditMap->setStyleSheet("padding: 20px;"); + drawnControls->addWidget(btnEditMap, 0); + m_childWidgets << btnEditMap; + connect(btnEditMap, SIGNAL(clicked()), this, SIGNAL(drawMapRequested())); + + drawnControls->addStretch(1); + + rightLayout->addLayout(drawnControls); + + /* Generator style list */ - // override default style to tighten up theme scroller - lvThemes->setStyleSheet(QString( - "QListView{" - "border: solid;" - "border-width: 0px;" - "border-radius: 0px;" - "border-color: transparent;" - "background-color: #0d0544;" - "color: #ffcc00;" - "font: bold 13px;" - "}" - ) - ); + generationStyles = new QListWidget(); + new QListWidgetItem(tr("All"), generationStyles); + new QListWidgetItem(tr("Small"), generationStyles); + new QListWidgetItem(tr("Medium"), generationStyles); + new QListWidgetItem(tr("Large"), generationStyles); + new QListWidgetItem(tr("Cavern"), generationStyles); + new QListWidgetItem(tr("Wacky"), generationStyles); + connect(generationStyles, SIGNAL(currentRowChanged(int)), this, SLOT(setTemplateFilter(int))); + m_childWidgets << generationStyles; + rightLayout->addWidget(generationStyles, 1); - gbTLayout->addWidget(lvThemes); - lvThemes->setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Minimum); + /* Maze style list */ - mapLayout->setSizeConstraint(QLayout::SetFixedSize); + mazeStyles = new QListWidget(); + new QListWidgetItem(tr("Small tunnels"), mazeStyles); + new QListWidgetItem(tr("Medium tunnels"), mazeStyles); + new QListWidgetItem(tr("Largetunnels"), mazeStyles); + new QListWidgetItem(tr("Small islands"), mazeStyles); + new QListWidgetItem(tr("Medium islands"), mazeStyles); + new QListWidgetItem(tr("Large islands"), mazeStyles); + connect(mazeStyles, SIGNAL(currentRowChanged(int)), this, SLOT(setMazeSize(int))); + m_childWidgets << mazeStyles; + rightLayout->addWidget(mazeStyles, 1); - QWidget* seedWidget = new QWidget(this); - mainLayout.addWidget(seedWidget, 1, 0); + /* Mission description */ - QGridLayout* seedLayout = new QGridLayout(seedWidget); - seedLayout->setMargin(0); + lblDesc = new QLabel(); + lblDesc->setWordWrap(true); + lblDesc->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); + lblDesc->setAlignment(Qt::AlignTop | Qt::AlignLeft); + lblDesc->setStyleSheet("font: 10px;"); + bottomLeftLayout->addWidget(lblDesc, 100); + + /* Add stretch above theme button */ + + bottomLeftLayout->addStretch(1); - seedLabel = new QLabel(tr("Seed"), seedWidget); - seedLayout->addWidget(seedLabel, 3, 0); - seedEdit = new QLineEdit(seedWidget); - seedEdit->setMaxLength(54); - connect(seedEdit, SIGNAL(returnPressed()), this, SLOT(seedEdited())); - seedLayout->addWidget(seedEdit, 3, 1); - seedLayout->setColumnStretch(1, 5); - seedSet = new QPushButton(seedWidget); - seedSet->setText(QPushButton::tr("more")); - connect(seedSet, SIGNAL(clicked()), this, SLOT(seedEdited())); - seedLayout->setColumnStretch(2, 1); - seedLayout->addWidget(seedSet, 3, 2); + /* Theme chooser */ - seedLabel->setVisible(false); - seedEdit->setVisible(false); + btnTheme = new QPushButton(); + connect(btnTheme, SIGNAL(clicked()), this, SLOT(showThemePrompt())); + m_childWidgets << btnTheme; + bottomLeftLayout->addWidget(btnTheme, 0); + + /* Add everything to main layout */ + + mainLayout.addLayout(twoColumnLayout, 0); + + /* Set defaults */ setRandomSeed(); + setMazeSize(0); + setTemplateFilter(0); + staticMapChanged(m_staticMapModel->index(0, 0)); + missionMapChanged(m_missionMapModel->index(0, 0)); + changeMapType(MapModel::GeneratedMap); setRandomTheme(); - - chooseMap->setCurrentIndex(0); - mapChanged(0); - // use signal "activated" rather than currentIndexChanged - // because index is somtimes changed a few times in a row programmatically - connect(chooseMap, SIGNAL(activated(int)), this, SLOT(mapChanged(int))); - - // update model views after model changes (to e.g. re-adjust separators) - connect(&DataManager::instance(), SIGNAL(updated()), this, SLOT(updateModelViews())); } void HWMapContainer::setImage(const QImage newImage) @@ -199,11 +270,12 @@ px.setMask(bm); p.fillRect(pxres.rect(), linearGrad); - p.drawPixmap(QPoint(0, 0), px); + p.drawPixmap(0, 0, px); addInfoToPreview(pxres); - //chooseMap->setCurrentIndex(mapgen); pMap = 0; + + cType->setEnabled(isMaster()); } void HWMapContainer::setHHLimit(int newHHLimit) @@ -211,70 +283,6 @@ hhLimit = newHHLimit; } -void HWMapContainer::mapChanged(int index) -{ - if (chooseMap->currentIndex() != index) - chooseMap->setCurrentIndex(index); - - if (index < 0) - { - m_mapInfo.type = MapModel::Invalid; - updatePreview(); - return; - } - - Q_ASSERT(chooseMap->itemData(index, Qt::UserRole + 1).canConvert()); - m_mapInfo = chooseMap->itemData(index, Qt::UserRole + 1).value(); - m_curMap = m_mapInfo.name; - - switch(m_mapInfo.type) - { - case MapModel::GeneratedMap: - mapgen = MAPGEN_REGULAR; - gbThemes->show(); - lblFilter->show(); - cbTemplateFilter->show(); - maze_size_label->hide(); - cbMazeSize->hide(); - break; - case MapModel::GeneratedMaze: - mapgen = MAPGEN_MAZE; - gbThemes->show(); - lblFilter->hide(); - cbTemplateFilter->hide(); - maze_size_label->show(); - cbMazeSize->show(); - break; - case MapModel::HandDrawnMap: - mapgen = MAPGEN_DRAWN; - gbThemes->show(); - lblFilter->hide(); - cbTemplateFilter->hide(); - maze_size_label->hide(); - cbMazeSize->hide(); - break; - default: - mapgen = MAPGEN_MAP; - gbThemes->hide(); - lblFilter->hide(); - cbTemplateFilter->hide(); - maze_size_label->hide(); - cbMazeSize->hide(); - m_theme = m_mapInfo.theme; - } - - // the map has no pre-defined theme, so let's use the selected one - if (m_mapInfo.theme.isEmpty()) - { - m_theme = lvThemes->currentIndex().data().toString(); - emit themeChanged(m_theme); - } - - updatePreview(); - emit mapChanged(m_curMap); - emit mapgenChanged(mapgen); -} - // Should this add text to identify map size? void HWMapContainer::addInfoToPreview(QPixmap image) { @@ -292,13 +300,19 @@ p.drawText(image.rect().width() - hhSmall.rect().width() - 14 - (hhLimit > 9 ? 10 : 0), 18, text); p.drawPixmap(image.rect().width() - hhSmall.rect().width() - 5, 5, hhSmall.rect().width(), hhSmall.rect().height(), hhSmall); - imageButt->setIcon(finalImage); - imageButt->setIconSize(image.size()); + // Shrink, crop, and center preview image + QPixmap centered(QSize(m_previewSize.width() - 6, m_previewSize.height() - 6)); + QPainter pc(¢ered); + pc.fillRect(centered.rect(), linearGrad); + pc.drawPixmap(-3, -3, finalImage); + + mapPreview->setIcon(QIcon(centered)); + mapPreview->setIconSize(centered.size()); } void HWMapContainer::askForGeneratedPreview() { - pMap = new HWMap(); + pMap = new HWMap(this); connect(pMap, SIGNAL(ImageReceived(const QImage)), this, SLOT(setImage(const QImage))); connect(pMap, SIGNAL(HHLimitReceived(int)), this, SLOT(setHHLimit(int))); connect(pMap, SIGNAL(destroyed(QObject *)), this, SLOT(onPreviewMapDestroyed(QObject *))); @@ -322,14 +336,21 @@ p.drawPixmap(QPoint(x, y), waitIcon); addInfoToPreview(waitImage); + + cType->setEnabled(false); } -void HWMapContainer::themeSelected(const QModelIndex & current, const QModelIndex &) +void HWMapContainer::previewClicked() { - m_theme = current.data().toString(); - - gbThemes->setIcon(qVariantValue(current.data(Qt::UserRole))); - emit themeChanged(m_theme); + switch (m_mapInfo.type) + { + case MapModel::HandDrawnMap: + emit drawMapRequested(); + break; + default: + setRandomMap(); + break; + } } QString HWMapContainer::getCurrentSeed() const @@ -339,8 +360,14 @@ QString HWMapContainer::getCurrentMap() const { - if(chooseMap->currentIndex() < MAPGEN_MAP) return QString(); - return(m_curMap); + switch (m_mapInfo.type) + { + case MapModel::StaticMap: + case MapModel::MissionMap: + return m_curMap; + default: + return QString(); + } } QString HWMapContainer::getCurrentTheme() const @@ -370,20 +397,17 @@ quint32 HWMapContainer::getTemplateFilter() const { - return cbTemplateFilter->itemData(cbTemplateFilter->currentIndex()).toInt(); + return generationStyles->currentRow(); } void HWMapContainer::resizeEvent ( QResizeEvent * event ) { Q_UNUSED(event); - //imageButt->setIconSize(imageButt->size()); } void HWMapContainer::intSetSeed(const QString & seed) { m_seed = seed; - if (seed != seedEdit->text()) - seedEdit->setText(seed); } void HWMapContainer::setSeed(const QString & seed) @@ -395,11 +419,29 @@ void HWMapContainer::intSetMap(const QString & map) { - m_curMap = map; - - int id = m_mapModel->indexOf(map); - - mapChanged(id); + if (map == "+rnd+") + { + changeMapType(MapModel::GeneratedMap); + } + else if (map == "+maze+") + { + changeMapType(MapModel::GeneratedMaze); + } + else if (map == "+drawn+") + { + changeMapType(MapModel::HandDrawnMap); + } + else if (m_staticMapModel->mapExists(map)) + { + changeMapType(MapModel::StaticMap, m_staticMapModel->index(m_staticMapModel->findMap(map), 0)); + } + else if (m_missionMapModel->mapExists(map)) + { + changeMapType(MapModel::MissionMap, m_missionMapModel->index(m_missionMapModel->findMap(map), 0)); + } else + { + qDebug() << "HWMapContainer::intSetMap: Map doesn't exist: " << map; + } } void HWMapContainer::setMap(const QString & map) @@ -410,16 +452,16 @@ void HWMapContainer::setTheme(const QString & theme) { - QModelIndexList mdl = m_themeModel->match(m_themeModel->index(0), Qt::DisplayRole, theme); + QModelIndexList mdl = m_themeModel->match(m_themeModel->index(0), ThemeModel::ActualNameRole, theme); if(mdl.size()) - lvThemes->setCurrentIndex(mdl.at(0)); + updateTheme(mdl.at(0)); + else + intSetIconlessTheme(theme); } void HWMapContainer::setRandomMap() { - int idx; - setRandomSeed(); switch(m_mapInfo.type) { @@ -427,21 +469,17 @@ case MapModel::GeneratedMaze: setRandomTheme(); break; - case MapModel::HandDrawnMap: - emit drawMapRequested(); + case MapModel::MissionMap: + missionMapChanged(m_missionMapModel->index(rand() % m_missionMapModel->rowCount(), 0)); break; - case MapModel::MissionMap: case MapModel::StaticMap: - // get random map of same type - idx = m_mapModel->randomMap(m_mapInfo.type); - mapChanged(idx); + staticMapChanged(m_staticMapModel->index(rand() % m_staticMapModel->rowCount(), 0)); break; - case MapModel::Invalid: - mapChanged(0); + default: + break; } } - void HWMapContainer::setRandomSeed() { setSeed(QUuid::createUuid().toString()); @@ -452,12 +490,13 @@ { if(!m_themeModel->rowCount()) return; quint32 themeNum = rand() % m_themeModel->rowCount(); - lvThemes->setCurrentIndex(m_themeModel->index(themeNum)); + updateTheme(m_themeModel->index(themeNum)); + qDebug() << "RANDOM THEME:" << themeNum; } void HWMapContainer::intSetTemplateFilter(int filter) { - cbTemplateFilter->setCurrentIndex(filter); + generationStyles->setCurrentRow(filter); emit newTemplateFilter(filter); } @@ -475,12 +514,12 @@ int HWMapContainer::getMazeSize(void) const { - return cbMazeSize->currentIndex(); + return mazeStyles->currentRow(); } void HWMapContainer::intSetMazeSize(int size) { - cbMazeSize->setCurrentIndex(size); + mazeStyles->setCurrentRow(size); emit mazeSizeChanged(size); } @@ -521,9 +560,6 @@ break; } - if(m != MAPGEN_MAP) - chooseMap->setCurrentIndex(m); - emit mapgenChanged(m); } } @@ -546,23 +582,10 @@ return drawMapScene.encode(); } -void HWMapContainer::seedEdited() +void HWMapContainer::setNewSeed(const QString & newSeed) { - if (seedLabel->isVisible() == false ) - { - seedLabel->setVisible(true); - seedEdit->setVisible(true); - seedSet->setText(tr("Set")); - return; - } - - if (seedEdit->text().isEmpty()) - seedEdit->setText(m_seed); - else - { - setSeed(seedEdit->text()); - emit seedChanged(seedEdit->text()); - } + setSeed(newSeed); + emit seedChanged(newSeed); } DrawMapScene * HWMapContainer::getDrawMapScene() @@ -592,8 +615,8 @@ { case MapModel::Invalid: failIcon = QPixmap(":/res/btnDisabled.png"); - imageButt->setIcon(failIcon); - imageButt->setIconSize(failIcon.size()); + mapPreview->setIcon(QIcon(failIcon)); + mapPreview->setIconSize(failIcon.size()); break; case MapModel::GeneratedMap: askForGeneratedPreview(); @@ -610,7 +633,7 @@ if(!success) { - imageButt->setIcon(QIcon()); + mapPreview->setIcon(QIcon()); return; } @@ -629,7 +652,6 @@ intSetMap(map); } - void HWMapContainer::updateModelViews() { // restore theme selection @@ -638,13 +660,13 @@ { QModelIndexList mdl = m_themeModel->match(m_themeModel->index(0), Qt::DisplayRole, m_theme); if (mdl.size() > 0) - lvThemes->setCurrentIndex(mdl.at(0)); + updateTheme(mdl.at(0)); else setRandomTheme(); } // restore map selection - if ((!m_curMap.isEmpty()) && (chooseMap->currentIndex() < 0)) + if (!m_curMap.isEmpty()) intSetMap(m_curMap); else updatePreview(); @@ -656,3 +678,252 @@ if (map == pMap) pMap = 0; } + +void HWMapContainer::mapTypeChanged(int index) +{ + changeMapType((MapModel::MapType)cType->itemData(index).toInt()); +} + +void HWMapContainer::changeMapType(MapModel::MapType type, const QModelIndex & newMap) +{ + staticMapList->hide(); + missionMapList->hide(); + lblMapList->hide(); + generationStyles->hide(); + mazeStyles->hide(); + lblDesc->hide(); + btnLoadMap->hide(); + btnEditMap->hide(); + + switch (type) + { + case MapModel::GeneratedMap: + mapgen = MAPGEN_REGULAR; + setMapInfo(MapModel::MapInfoRandom); + lblMapList->setText(tr("Map size:")); + lblMapList->show(); + generationStyles->show(); + break; + case MapModel::GeneratedMaze: + mapgen = MAPGEN_MAZE; + setMapInfo(MapModel::MapInfoMaze); + lblMapList->setText(tr("Maze style:")); + lblMapList->show(); + mazeStyles->show(); + break; + case MapModel::HandDrawnMap: + mapgen = MAPGEN_DRAWN; + setMapInfo(MapModel::MapInfoDrawn); + btnLoadMap->show(); + btnEditMap->show(); + break; + case MapModel::MissionMap: + mapgen = MAPGEN_MAP; + missionMapChanged(newMap.isValid() ? newMap : missionMapList->currentIndex()); + lblMapList->setText(tr("Mission:")); + lblMapList->show(); + missionMapList->show(); + lblDesc->setText(m_mapInfo.desc); + lblDesc->show(); + emit mapChanged(m_curMap); + break; + case MapModel::StaticMap: + mapgen = MAPGEN_MAP; + staticMapChanged(newMap.isValid() ? newMap : staticMapList->currentIndex()); + lblMapList->setText(tr("Map:")); + lblMapList->show(); + staticMapList->show(); + emit mapChanged(m_curMap); + break; + default: + break; + } + + // Update theme button size + updateThemeButtonSize(); + + // Update cType combobox + for (int i = 0; i < cType->count(); i++) + { + if ((MapModel::MapType)cType->itemData(i).toInt() == type) + { + cType->setCurrentIndex(i); + break; + } + } + + repaint(); + + emit mapgenChanged(mapgen); +} + +void HWMapContainer::updateThemeButtonSize() +{ + if (m_mapInfo.type == MapModel::MissionMap) + { + btnTheme->setIconSize(QSize(30, 30)); + btnTheme->setFixedHeight(30); + } + else + { + QSize iconSize = btnTheme->icon().actualSize(QSize(65535, 65535)); + btnTheme->setFixedHeight(64); + btnTheme->setIconSize(iconSize); + } + + repaint(); +} + +void HWMapContainer::showThemePrompt() +{ + ThemePrompt prompt(m_themeID, this); + int theme = prompt.exec() - 1; // Since 0 means canceled, so all indexes are +1'd + if (theme < 0) return; + + QModelIndex current = m_themeModel->index(theme, 0); + updateTheme(current); + emit themeChanged(m_theme); +} + +void HWMapContainer::updateTheme(const QModelIndex & current) +{ + m_theme = selectedTheme = current.data(ThemeModel::ActualNameRole).toString(); + m_themeID = current.row(); + QIcon icon = qVariantValue(current.data(Qt::DecorationRole)); + QSize iconSize = icon.actualSize(QSize(65535, 65535)); + btnTheme->setFixedHeight(64); + btnTheme->setIconSize(iconSize); + btnTheme->setIcon(icon); + btnTheme->setText(tr("Theme: ") + current.data(Qt::DisplayRole).toString()); + updateThemeButtonSize(); +} + +void HWMapContainer::staticMapChanged(const QModelIndex & map, const QModelIndex & old) +{ + mapChanged(map, 0, old); +} + +void HWMapContainer::missionMapChanged(const QModelIndex & map, const QModelIndex & old) +{ + mapChanged(map, 1, old); +} + +// Type: 0 = static, 1 = mission +void HWMapContainer::mapChanged(const QModelIndex & map, int type, const QModelIndex & old) +{ + QListView * mapList; + + if (type == 0) mapList = staticMapList; + else if (type == 1) mapList = missionMapList; + else return; + + // Make sure it is a valid index + if (!map.isValid()) + { + if (old.isValid()) + { + mapList->setCurrentIndex(old); + mapList->scrollTo(old); + } + else + { + m_mapInfo.type = MapModel::Invalid; + updatePreview(); + } + + return; + } + + // If map changed, update list selection + if (mapList->currentIndex() != map) + { + mapList->setCurrentIndex(map); + mapList->scrollTo(map); + } + + if (map.data(Qt::UserRole + 1).canConvert()) + setMapInfo(map.data(Qt::UserRole + 1).value()); + else + Q_ASSERT(false); // Houston, we have a problem. + +} + +void HWMapContainer::setMapInfo(MapModel::MapInfo mapInfo) +{ + m_mapInfo = mapInfo; + m_curMap = m_mapInfo.name; + + // the map has no pre-defined theme, so let's use the selected one + if (m_mapInfo.theme.isEmpty()) + { + if (!selectedTheme.isEmpty()) + { + setTheme(selectedTheme); + emit themeChanged(selectedTheme); + } + } + else + { + setTheme(m_mapInfo.theme); + emit themeChanged(m_mapInfo.theme); + } + + lblDesc->setText(mapInfo.desc); + + updatePreview(); + emit mapChanged(m_curMap); +} + +void HWMapContainer::loadDrawing() +{ + QString fileName = QFileDialog::getOpenFileName(NULL, tr("Load drawn map"), ".", tr("Drawn Maps") + " (*.hwmap);;" + tr("All files") + " (*)"); + + if(fileName.isEmpty()) return; + + QFile f(fileName); + + if(!f.open(QIODevice::ReadOnly)) + { + QMessageBox errorMsg(parentWidget()); + errorMsg.setIcon(QMessageBox::Warning); + errorMsg.setWindowTitle(QMessageBox::tr("File error")); + errorMsg.setText(QMessageBox::tr("Cannot open '%1' for reading").arg(fileName)); + errorMsg.setWindowModality(Qt::WindowModal); + errorMsg.exec(); + } + else + { + drawMapScene.decode(qUncompress(QByteArray::fromBase64(f.readAll()))); + mapDrawingFinished(); + } +} + +void HWMapContainer::showSeedPrompt() +{ + SeedPrompt prompt(parentWidget()->parentWidget(), getCurrentSeed(), isMaster()); + connect(&prompt, SIGNAL(seedSelected(const QString &)), this, SLOT(setNewSeed(const QString &))); + prompt.exec(); +} + +bool HWMapContainer::isMaster() +{ + return m_master; +} + +void HWMapContainer::setMaster(bool master) +{ + if (master == m_master) return; + m_master = master; + + foreach (QWidget *widget, m_childWidgets) + widget->setEnabled(master); +} + +void HWMapContainer::intSetIconlessTheme(const QString & name) +{ + if (name.isEmpty()) return; + + m_theme = name; + btnTheme->setIcon(QIcon()); + btnTheme->setText(tr("Theme: ") + name); +} diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/ui/widget/mapContainer.h --- a/QTfrontend/ui/widget/mapContainer.h Sun Nov 18 01:06:01 2012 +0400 +++ b/QTfrontend/ui/widget/mapContainer.h Fri Feb 22 05:05:32 2013 +0100 @@ -22,6 +22,7 @@ #include #include +#include #include #include #include @@ -37,6 +38,7 @@ class IconedGroupBox; class QListView; class SeparatorPainter; +class QListWidget; class MapFileErrorException { @@ -46,6 +48,8 @@ { Q_OBJECT + Q_PROPERTY(bool master READ isMaster WRITE setMaster) + public: HWMapContainer(QWidget * parent=0); QString getCurrentSeed() const; @@ -62,6 +66,7 @@ DrawMapScene * getDrawMapScene(); void mapDrawingFinished(); QLineEdit* seedEdit; + bool isMaster(); public slots: void askForGeneratedPreview(); @@ -75,6 +80,7 @@ void setAllMapParameters(const QString & map, MapGenerator m, int mazesize, const QString & seed, int tmpl); void updateModelViews(); void onPreviewMapDestroyed(QObject * map); + void setMaster(bool master); signals: void seedChanged(const QString & seed); @@ -89,22 +95,29 @@ private slots: void setImage(const QImage newImage); void setHHLimit(int hhLimit); - void mapChanged(int index); void setRandomSeed(); void setRandomTheme(); void setRandomMap(); - void themeSelected(const QModelIndex & current, const QModelIndex &); void addInfoToPreview(QPixmap image); - void seedEdited(); + void setNewSeed(const QString & newSeed); + void mapTypeChanged(int); + void showThemePrompt(); + void updateTheme(const QModelIndex & current); + void staticMapChanged(const QModelIndex & map, const QModelIndex & old = QModelIndex()); + void missionMapChanged(const QModelIndex & map, const QModelIndex & old = QModelIndex()); + void loadDrawing(); + void showSeedPrompt(); + void previewClicked(); protected: virtual void resizeEvent ( QResizeEvent * event ); private: - QGridLayout mainLayout; - QPushButton* imageButt; + QVBoxLayout mainLayout; + QPushButton* mapPreview; QComboBox* chooseMap; - MapModel * m_mapModel; + MapModel * m_staticMapModel; + MapModel * m_missionMapModel; IconedGroupBox* gbThemes; QListView* lvThemes; ThemeModel * m_themeModel; @@ -121,15 +134,36 @@ QComboBox *cbMazeSize; MapGenerator mapgen; DrawMapScene drawMapScene; + QComboBox * cType; + QListView * staticMapList; + QListView * missionMapList; + QListWidget * generationStyles; + QListWidget * mazeStyles; + QLabel * lblMapList; + QLabel * lblDesc; + QPushButton * btnTheme; + QPushButton * btnLoadMap; + QPushButton * btnEditMap; + QPushButton * btnRandomize; + QString selectedTheme; + QPushButton * btnSeed; + bool m_master; + QList m_childWidgets; void intSetSeed(const QString & seed); void intSetMap(const QString & map); void intSetMapgen(MapGenerator m); void intSetTemplateFilter(int); void intSetMazeSize(int size); + void intSetIconlessTheme(const QString & name); + void mapChanged(const QModelIndex & map, int type, const QModelIndex & old = QModelIndex()); + void setMapInfo(MapModel::MapInfo mapInfo); + void changeMapType(MapModel::MapType type, const QModelIndex & newMap = QModelIndex()); void updatePreview(); + void updateThemeButtonSize(); MapModel::MapInfo m_mapInfo; + int m_themeID; QString m_theme; QString m_curMap; diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/ui/widget/qpushbuttonwithsound.cpp --- a/QTfrontend/ui/widget/qpushbuttonwithsound.cpp Sun Nov 18 01:06:01 2012 +0400 +++ b/QTfrontend/ui/widget/qpushbuttonwithsound.cpp Fri Feb 22 05:05:32 2013 +0100 @@ -33,7 +33,7 @@ void QPushButtonWithSound::buttonClicked() { - if ( !isSoundEnabled || !HWForm::config->isFrontendSoundEnabled()) + if ( !isSoundEnabled ) return; if (this->isEnabled()) diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/ui/widget/roomnameprompt.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/QTfrontend/ui/widget/roomnameprompt.cpp Fri Feb 22 05:05:32 2013 +0100 @@ -0,0 +1,77 @@ +/* + * Hedgewars, a free turn based strategy game + * Copyright (c) 2004-2012 Andrey Korotaev + * + * 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 +#include +#include +#include +#include +#include +#include + +#include "roomnameprompt.h" + +RoomNamePrompt::RoomNamePrompt(QWidget* parent, const QString & roomName) : QDialog(parent) +{ + setModal(true); + setWindowFlags(Qt::Sheet); + setWindowModality(Qt::WindowModal); + setMinimumSize(360, 130); + resize(360, 130); + setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed); + + // Layout + QVBoxLayout * dialogLayout = new QVBoxLayout(this); + + // Label + label = new QLabel(tr("Enter a name for your room.")); + label->setWordWrap(true); + dialogLayout->addWidget(label, 0); + + // Input box + editBox = new QLineEdit(); + editBox->setText(roomName); + editBox->setMaxLength(59); // It didn't like 60 :( + editBox->setStyleSheet("QLineEdit { padding: 3px; }"); + editBox->selectAll(); + dialogLayout->addWidget(editBox, 1); + + dialogLayout->addStretch(1); + + // Buttons + QHBoxLayout * buttonLayout = new QHBoxLayout(); + buttonLayout->addStretch(1); + dialogLayout->addLayout(buttonLayout); + + QPushButton * btnCancel = new QPushButton(tr("Cancel")); + QPushButton * btnOkay = new QPushButton(tr("Create room")); + connect(btnCancel, SIGNAL(clicked()), this, SLOT(reject())); + connect(btnOkay, SIGNAL(clicked()), this, SLOT(accept())); + buttonLayout->addWidget(btnCancel); + buttonLayout->addWidget(btnOkay); + btnOkay->setDefault(true); + + setStyleSheet("QPushButton { padding: 5px; }"); + + connect(btnOkay, SIGNAL(clicked()), this, SLOT(setRoomName())); +} + +void RoomNamePrompt::setRoomName() +{ + emit roomNameChosen(editBox->text()); +} diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/ui/widget/roomnameprompt.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/QTfrontend/ui/widget/roomnameprompt.h Fri Feb 22 05:05:32 2013 +0100 @@ -0,0 +1,45 @@ +/* + * Hedgewars, a free turn based strategy game + * Copyright (c) 2004-2012 Andrey Korotaev + * + * 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 + */ + +#ifndef ROOMNAMEPROMPT_H +#define ROOMNAMEPROMPT_H + +#include + +class QLineEdit; +class QLabel; + +class RoomNamePrompt : public QDialog +{ + Q_OBJECT + + public: + RoomNamePrompt(QWidget* parent, const QString & roomName); + + signals: + void roomNameChosen(const QString & roomName); + + private slots: + void setRoomName(); + + private: + QLineEdit * editBox; + QLabel * label; +}; + +#endif // ROOMNAMEPROMPT_H diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/ui/widget/seedprompt.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/QTfrontend/ui/widget/seedprompt.cpp Fri Feb 22 05:05:32 2013 +0100 @@ -0,0 +1,85 @@ +/* + * Hedgewars, a free turn based strategy game + * Copyright (c) 2004-2012 Andrey Korotaev + * + * 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 +#include +#include +#include +#include +#include +#include + +#include "seedprompt.h" + +SeedPrompt::SeedPrompt(QWidget* parent, const QString & seed, bool editable) : QDialog(parent) +{ + setModal(true); + setWindowFlags(Qt::Sheet); + setWindowModality(Qt::WindowModal); + setMinimumSize(360, 160); + resize(360, 160); + setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum); + + // Layout + QVBoxLayout * dialogLayout = new QVBoxLayout(this); + + // Label + QLabel * label = new QLabel(tr("The map seed is the basis for all random values generated by the game.")); + label->setWordWrap(true); + dialogLayout->addWidget(label, 0); + + // Input box + editBox = new QLineEdit(); + editBox->setText(seed); + editBox->setReadOnly(!editable); + editBox->setStyleSheet("QLineEdit { padding: 3px; }"); + dialogLayout->addWidget(editBox, 1); + + dialogLayout->addStretch(1); + + // Buttons + QHBoxLayout * buttonLayout = new QHBoxLayout(); + buttonLayout->addStretch(1); + dialogLayout->addLayout(buttonLayout); + if (editable) + { + QPushButton * btnCancel = new QPushButton(tr("Cancel")); + QPushButton * btnOkay = new QPushButton(tr("Set seed")); + connect(btnCancel, SIGNAL(clicked()), this, SLOT(reject())); + connect(btnOkay, SIGNAL(clicked()), this, SLOT(accept())); + buttonLayout->addWidget(btnCancel); + buttonLayout->addWidget(btnOkay); + btnOkay->setDefault(true); + } + else + { + QPushButton * btnClose = new QPushButton(tr("Close")); + connect(btnClose, SIGNAL(clicked()), this, SLOT(reject())); + buttonLayout->addWidget(btnClose); + btnClose->setDefault(true); + } + + setStyleSheet("QPushButton { padding: 5px; }"); + + connect(this, SIGNAL(accepted()), this, SLOT(setSeed())); +} + +void SeedPrompt::setSeed() +{ + emit seedSelected(editBox->text()); +} diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/ui/widget/seedprompt.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/QTfrontend/ui/widget/seedprompt.h Fri Feb 22 05:05:32 2013 +0100 @@ -0,0 +1,43 @@ +/* + * Hedgewars, a free turn based strategy game + * Copyright (c) 2004-2012 Andrey Korotaev + * + * 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 + */ + +#ifndef SEEDPROMPT_H +#define SEEDPROMPT_H + +#include + +class QLineEdit; + +class SeedPrompt : public QDialog +{ + Q_OBJECT + + public: + SeedPrompt(QWidget* parent, const QString & seed, bool editable); + + signals: + void seedSelected(const QString & seed); + + private slots: + void setSeed(); + + private: + QLineEdit * editBox; +}; + +#endif // SEEDPROMPT_H diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/ui/widget/teamselect.cpp --- a/QTfrontend/ui/widget/teamselect.cpp Sun Nov 18 01:06:01 2012 +0400 +++ b/QTfrontend/ui/widget/teamselect.cpp Fri Feb 22 05:05:32 2013 +0100 @@ -36,8 +36,6 @@ { framePlaying->addTeam(team, true); curPlayingTeams.push_back(team); - connect(framePlaying->getTeamWidget(team), SIGNAL(teamStatusChanged(HWTeam)), - this, SLOT(netTeamStatusChanged(const HWTeam&))); connect(framePlaying->getTeamWidget(team), SIGNAL(hhNmChanged(const HWTeam&)), this, SLOT(hhNumChanged(const HWTeam&))); dynamic_cast(framePlaying->getTeamWidget(team))->hhNumChanged(); @@ -59,6 +57,7 @@ this, SLOT(changeTeamStatus(HWTeam))); } } + emit setEnabledGameStart(curPlayingTeams.size()>1); } @@ -144,17 +143,6 @@ emit setEnabledGameStart(curPlayingTeams.size()>1); } -void TeamSelWidget::netTeamStatusChanged(const HWTeam& team) -{ - QList::iterator itPlay=std::find(curPlayingTeams.begin(), curPlayingTeams.end(), team); - -} - -//void TeamSelWidget::removeTeam(__attribute__ ((unused)) HWTeam team) -//{ -//curDontPlayingTeams.erase(std::find(curDontPlayingTeams.begin(), curDontPlayingTeams.end(), team)); -//} - void TeamSelWidget::changeTeamStatus(HWTeam team) { QList::iterator itDontPlay=std::find(m_curNotPlayingTeams.begin(), m_curNotPlayingTeams.end(), team); @@ -168,6 +156,12 @@ m_curNotPlayingTeams.push_back(*itPlay); emit teamNotPlaying(*itPlay); curPlayingTeams.erase(itPlay); + + // Show team notice if less than two teams. + if (curPlayingTeams.size() < 2) + { + numTeamNotice->show(); + } } else { @@ -179,6 +173,12 @@ curPlayingTeams.push_back(*itDontPlay); if(!m_acceptOuter) emit teamWillPlay(*itDontPlay); m_curNotPlayingTeams.erase(itDontPlay); + + // Hide team notice if at least two teams. + if (curPlayingTeams.size() >= 2) + { + numTeamNotice->hide(); + } } FrameTeams* pRemoveTeams; @@ -224,6 +224,8 @@ pRemoveTeams->resize(pRemoveTeams->size().width(), szh1.height()); } + repaint(); + emit setEnabledGameStart(curPlayingTeams.size()>1); } @@ -254,9 +256,13 @@ framePlaying = new FrameTeams(); frameDontPlaying = new FrameTeams(); + // Add notice about number of required teams. + numTeamNotice = new QLabel("Two teams are required to play!"); + mainLayout.addWidget(numTeamNotice); + QPalette p; p.setColor(QPalette::Window, QColor(0x00, 0x00, 0x00)); - addScrArea(framePlaying, p.color(QPalette::Window).light(105), 250); + addScrArea(framePlaying, p.color(QPalette::Window).light(105), 150); addScrArea(frameDontPlaying, p.color(QPalette::Window).dark(105), 0); } @@ -280,7 +286,9 @@ m_curNotPlayingTeams.clear(); foreach(HWTeam team, teamslist) - addTeam(team); + addTeam(team); + + repaint(); } bool TeamSelWidget::isPlaying(const HWTeam &team) const @@ -303,3 +311,10 @@ //team.setColor(framePlaying->getNextColor()); emit acceptRequested(team); } + +void TeamSelWidget::repaint() +{ + QWidget::repaint(); + framePlaying->repaint(); + frameDontPlaying->repaint(); +} diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/ui/widget/teamselect.h --- a/QTfrontend/ui/widget/teamselect.h Sun Nov 18 01:06:01 2012 +0400 +++ b/QTfrontend/ui/widget/teamselect.h Fri Feb 22 05:05:32 2013 +0100 @@ -20,6 +20,7 @@ #ifndef _TEAM_SELECT_INCLUDED #define _TEAM_SELECT_INCLUDED +#include #include #include #include @@ -50,7 +51,6 @@ public slots: void addTeam(HWTeam team); - void netTeamStatusChanged(const HWTeam& team); void changeHHNum(const HWTeam&); void changeTeamColor(const HWTeam&); void changeTeamStatus(HWTeam team); @@ -74,7 +74,9 @@ FrameTeams* framePlaying; QVBoxLayout mainLayout; + QLabel *numTeamNotice; bool m_acceptOuter; + void repaint(); QList curPlayingTeams; QList m_curNotPlayingTeams; diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/ui/widget/teamselhelper.cpp --- a/QTfrontend/ui/widget/teamselhelper.cpp Sun Nov 18 01:06:01 2012 +0400 +++ b/QTfrontend/ui/widget/teamselhelper.cpp Fri Feb 22 05:05:32 2013 +0100 @@ -55,7 +55,7 @@ butt = new QPushButton(difficultyIcon, team.name().replace("&","&&"), this); butt->setFlat(true); - butt->setToolTip(team.owner()); + butt->setWhatsThis(tr("%1's team").arg(team.owner())); mainLayout.addWidget(butt); butt->setStyleSheet("QPushButton{" "icon-size: 48px;" diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/ui/widget/themeprompt.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/QTfrontend/ui/widget/themeprompt.cpp Fri Feb 22 05:05:32 2013 +0100 @@ -0,0 +1,165 @@ +/* + * Hedgewars, a free turn based strategy game + * Copyright (c) 2004-2012 Andrey Korotaev + * + * 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 +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "DataManager.h" +#include "lineeditcursor.h" +#include "ThemeModel.h" +#include "themeprompt.h" + +ThemePrompt::ThemePrompt(int currentIndex, QWidget* parent) : QDialog(parent) +{ + setModal(true); + setWindowFlags(Qt::Sheet); + setWindowModality(Qt::WindowModal); + setMinimumSize(550, 430); + resize(550, 430); + setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum); + + setStyleSheet("QPushButton { padding: 5px; margin-top: 10px; }"); + + // Theme model, and a model for setting a filter + ThemeModel * themeModel = DataManager::instance().themeModel(); + filterModel = new QSortFilterProxyModel(); + filterModel->setSourceModel(themeModel); + filterModel->setFilterCaseSensitivity(Qt::CaseInsensitive); + + // Grid + QGridLayout * dialogLayout = new QGridLayout(this); + dialogLayout->setSpacing(0); + dialogLayout->setColumnStretch(1, 1); + + QHBoxLayout * topLayout = new QHBoxLayout(); + + // Help/prompt message at top + QLabel * lblDesc = new QLabel(tr("Search for a theme:")); + lblDesc->setObjectName("lblDesc"); + lblDesc->setStyleSheet("#lblDesc { color: #130F2A; background: #F6CB1C; border: solid 4px #F6CB1C; border-top-left-radius: 10px; padding: 4px 10px;}"); + lblDesc->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); + lblDesc->setFixedHeight(24); + lblDesc->setMinimumWidth(0); + + // Filter text box + QWidget * filterContainer = new QWidget(); + filterContainer->setFixedHeight(24); + filterContainer->setObjectName("filterContainer"); + filterContainer->setStyleSheet("#filterContainer { background: #F6CB1C; border-top-right-radius: 10px; padding: 3px; }"); + filterContainer->setFixedWidth(150); + txtFilter = new LineEditCursor(filterContainer); + txtFilter->setFixedWidth(150); + txtFilter->setFocus(); + txtFilter->setFixedHeight(22); + txtFilter->setStyleSheet("LineEditCursor { border-width: 0px; border-radius: 6px; margin-top: 3px; margin-right: 3px; padding-left: 4px; padding-bottom: 2px; background-color: rgb(23, 11, 54); } LineEditCursor:hover, LineEditCursor:focus { background-color: rgb(13, 5, 68); }"); + connect(txtFilter, SIGNAL(textChanged(const QString &)), this, SLOT(filterChanged(const QString &))); + connect(txtFilter, SIGNAL(moveUp()), this, SLOT(moveUp())); + connect(txtFilter, SIGNAL(moveDown()), this, SLOT(moveDown())); + connect(txtFilter, SIGNAL(moveLeft()), this, SLOT(moveLeft())); + connect(txtFilter, SIGNAL(moveRight()), this, SLOT(moveRight())); + + // Corner widget + QLabel * corner = new QLabel(); + corner->setPixmap(QPixmap(QString::fromUtf8(":/res/inverse-corner-bl.png"))); + corner->setFixedSize(10, 10); + + // Add widgets to top layout + topLayout->addWidget(lblDesc); + topLayout->addWidget(filterContainer); + topLayout->addWidget(corner, 0, Qt::AlignBottom); + topLayout->addStretch(1); + + // Cancel button (closes dialog) + QPushButton * btnCancel = new QPushButton(tr("Cancel")); + connect(btnCancel, SIGNAL(clicked()), this, SLOT(reject())); + + // Select button + QPushButton * btnSelect = new QPushButton(tr("Use selected theme")); + btnSelect->setDefault(true); + connect(btnSelect, SIGNAL(clicked()), this, SLOT(onAccepted())); + + // Add themes + list = new ThemeListView(); + list->setModel(filterModel); + list->setViewMode(QListView::IconMode); + list->setResizeMode(QListView::Adjust); + list->setMovement(QListView::Static); + list->setEditTriggers(QAbstractItemView::NoEditTriggers); + list->setSpacing(8); + list->setWordWrap(true); + list->setSelectionMode(QAbstractItemView::SingleSelection); + list->setObjectName("themeList"); + list->setCurrentIndex(filterModel->index(currentIndex, 0)); + connect(list, SIGNAL(activated(const QModelIndex &)), this, SLOT(themeChosen(const QModelIndex &))); + connect(list, SIGNAL(clicked(const QModelIndex &)), this, SLOT(themeChosen(const QModelIndex &))); + + // Add elements to layouts + dialogLayout->addLayout(topLayout, 0, 0, 1, 3); + dialogLayout->addWidget(list, 1, 0, 1, 3); + dialogLayout->addWidget(btnCancel, 2, 0, 1, 1, Qt::AlignLeft); + dialogLayout->addWidget(btnSelect, 2, 2, 1, 1, Qt::AlignRight); +} + +void ThemePrompt::moveUp() +{ + list->setCurrentIndex(list->moveCursor(QAbstractItemView::MoveUp, Qt::NoModifier)); +} + +void ThemePrompt::moveDown() +{ + list->setCurrentIndex(list->moveCursor(QAbstractItemView::MoveDown, Qt::NoModifier)); +} + +void ThemePrompt::moveLeft() +{ + list->setCurrentIndex(list->moveCursor(QAbstractItemView::MoveLeft, Qt::NoModifier)); +} + +void ThemePrompt::moveRight() +{ + list->setCurrentIndex(list->moveCursor(QAbstractItemView::MoveRight, Qt::NoModifier)); +} + +void ThemePrompt::onAccepted() +{ + themeChosen(list->currentIndex()); +} + +// When a theme is selected +void ThemePrompt::themeChosen(const QModelIndex & index) +{ + done(filterModel->mapToSource(index).row() + 1); // Since returning 0 means canceled +} + +// When the text in the filter text box is changed +void ThemePrompt::filterChanged(const QString & text) +{ + filterModel->setFilterFixedString(text); + list->setCurrentIndex(filterModel->index(0, 0)); +} \ No newline at end of file diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/ui/widget/themeprompt.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/QTfrontend/ui/widget/themeprompt.h Fri Feb 22 05:05:32 2013 +0100 @@ -0,0 +1,61 @@ +/* + * Hedgewars, a free turn based strategy game + * Copyright (c) 2004-2012 Andrey Korotaev + * + * 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 + */ + +#ifndef THEMEPROMPT_H +#define THEMEPROMPT_H + +#include +#include +#include + +class QLineEdit; +class QModelIndex; +class QSortFilterProxyModel; +class LineEditCursor; + +class ThemeListView : public QListView +{ + friend class ThemePrompt; + + public: + ThemeListView(QWidget* parent = 0) : QListView(parent){} +}; + +class ThemePrompt : public QDialog +{ + Q_OBJECT + + public: + ThemePrompt(int currentIndex = 0, QWidget* parent = 0); + + private: + LineEditCursor * txtFilter; + ThemeListView * list; + QSortFilterProxyModel * filterModel; + + private slots: + void onAccepted(); + void themeChosen(const QModelIndex & index); + void filterChanged(const QString & text); + void moveUp(); + void moveDown(); + void moveLeft(); + void moveRight(); +}; + +#endif // THEMEPROMPT_H diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/ui_hwform.cpp --- a/QTfrontend/ui_hwform.cpp Sun Nov 18 01:06:01 2012 +0400 +++ b/QTfrontend/ui_hwform.cpp Fri Feb 22 05:05:32 2013 +0100 @@ -27,10 +27,8 @@ #include "pagetraining.h" #include "pagenetserver.h" #include "pageoptions.h" -#include "pagefeedback.h" #include "pageingame.h" #include "pagescheme.h" -#include "pagenettype.h" #include "pageroomslist.h" #include "pageinfo.h" #include "pagenetgame.h" @@ -60,7 +58,7 @@ centralWidget = new QWidget(HWForm); centralWidget->setObjectName(QString::fromUtf8("centralWidget")); - SetupPages(centralWidget, HWForm); + SetupPages(centralWidget); HWForm->setCentralWidget(centralWidget); @@ -74,7 +72,7 @@ font14 = new QFont("MS Shell Dlg", 14); } -void Ui_HWForm::SetupPages(QWidget *Parent, HWForm *HWForm) +void Ui_HWForm::SetupPages(QWidget *Parent) { Pages = new QStackedLayout(Parent); @@ -93,7 +91,7 @@ pageNet = new PageNet(); Pages->addWidget(pageNet); - pageNetGame = new PageNetGame(Parent, HWForm->gameSettings); + pageNetGame = new PageNetGame(Parent); Pages->addWidget(pageNetGame); pageInfo = new PageInfo(); @@ -120,7 +118,7 @@ pageInGame = new PageInGame(); Pages->addWidget(pageInGame); - pageRoomsList = new PageRoomsList(Parent, HWForm->gameSettings); + pageRoomsList = new PageRoomsList(Parent); Pages->addWidget(pageRoomsList); pageConnecting = new PageConnecting(); @@ -132,9 +130,6 @@ pageAdmin = new PageAdmin(); Pages->addWidget(pageAdmin); - pageNetType = new PageNetType(); - Pages->addWidget(pageNetType); - pageCampaign = new PageCampaign(); Pages->addWidget(pageCampaign); @@ -144,9 +139,6 @@ pageDataDownload = new PageDataDownload(); Pages->addWidget(pageDataDownload); - pageFeedback = new PageFeedback(); - Pages->addWidget(pageFeedback); - pageVideos = new PageVideos(); Pages->addWidget(pageVideos); } diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/ui_hwform.h --- a/QTfrontend/ui_hwform.h Sun Nov 18 01:06:01 2012 +0400 +++ b/QTfrontend/ui_hwform.h Fri Feb 22 05:05:32 2013 +0100 @@ -24,7 +24,6 @@ class PageMultiplayer; class PagePlayDemo; class PageOptions; -class PageFeedback; class PageNet; class PageNetServer; class PageNetChat; @@ -41,7 +40,6 @@ class PageConnecting; class PageScheme; class PageAdmin; -class PageNetType; class PageDrawMap; class PageVideos; class QStackedLayout; @@ -60,7 +58,6 @@ PageMultiplayer *pageMultiplayer; PagePlayDemo *pagePlayDemo; PageOptions *pageOptions; - PageFeedback *pageFeedback; PageNet *pageNet; PageNetServer * pageNetServer; PageNetChat *pageNetChat; @@ -76,7 +73,6 @@ PageConnecting *pageConnecting; PageScheme *pageScheme; PageAdmin *pageAdmin; - PageNetType *pageNetType; PageCampaign *pageCampaign; PageDrawMap *pageDrawMap; PageVideos *pageVideos; @@ -86,7 +82,7 @@ void setupUi(HWForm *HWForm); void SetupFonts(); - void SetupPages(QWidget *Parent, HWForm *HWForm); + void SetupPages(QWidget *Parent); }; #endif // UI_HWFORM_H diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/util/DataManager.cpp --- a/QTfrontend/util/DataManager.cpp Sun Nov 18 01:06:01 2012 +0400 +++ b/QTfrontend/util/DataManager.cpp Fri Feb 22 05:05:32 2013 +0100 @@ -40,7 +40,8 @@ DataManager::DataManager() { m_hatModel = NULL; - m_mapModel = NULL; + m_staticMapModel = NULL; + m_missionMapModel = NULL; m_themeModel = NULL; m_colorsModel = NULL; m_bindsModel = NULL; @@ -92,13 +93,22 @@ return m_hatModel; } -MapModel * DataManager::mapModel() +MapModel * DataManager::staticMapModel() { - if (m_mapModel == NULL) { - m_mapModel = new MapModel(); - m_mapModel->loadMaps(); + if (m_staticMapModel == NULL) { + m_staticMapModel = new MapModel(); + m_staticMapModel->loadMaps(MapModel::StaticMap); } - return m_mapModel; + return m_staticMapModel; +} + +MapModel * DataManager::missionMapModel() +{ + if (m_missionMapModel == NULL) { + m_missionMapModel = new MapModel(); + m_missionMapModel->loadMaps(MapModel::MissionMap); + } + return m_missionMapModel; } ThemeModel * DataManager::themeModel() @@ -135,6 +145,11 @@ { m_bindsModel = new QStandardItemModel(); + QStandardItem * firstItem = new QStandardItem(); + firstItem->setData(tr("Use Default"), Qt::DisplayRole); + firstItem->setData("default", Qt::UserRole + 1); + m_bindsModel->appendRow(firstItem); + for(int j = 0; sdlkeys[j][1][0] != '\0'; j++) { QStandardItem * item = new QStandardItem(); @@ -161,3 +176,12 @@ m_colorsModel->item(i)->setData(QColor(colors[i])); } } + +bool DataManager::ensureFileExists(const QString &fileName) +{ + QFile tmpfile(fileName); + if (!tmpfile.exists()) + return tmpfile.open(QFile::WriteOnly); + else + return true; +} diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/util/DataManager.h --- a/QTfrontend/util/DataManager.h Sun Nov 18 01:06:01 2012 +0400 +++ b/QTfrontend/util/DataManager.h Fri Feb 22 05:05:32 2013 +0100 @@ -88,13 +88,22 @@ HatModel * hatModel(); /** - * @brief Returns pointer to a model of available maps. + * @brief Returns pointer to a model of available static maps. * * The model is updated automatically on data reload. * * @return map model pointer. */ - MapModel * mapModel(); + MapModel * staticMapModel(); + + /** + * @brief Returns pointer to a model of available mission maps. + * + * The model is updated automatically on data reload. + * + * @return map model pointer. + */ + MapModel * missionMapModel(); /** * @brief Returns pointer to a model of available themes. @@ -108,6 +117,8 @@ QStandardItemModel * colorsModel(); QStandardItemModel * bindsModel(); + static bool ensureFileExists(const QString & fileName); + public slots: /// Reloads data from storage. void reload(); @@ -132,7 +143,8 @@ GameStyleModel * m_gameStyleModel; ///< game style model instance HatModel * m_hatModel; ///< hat model instance - MapModel * m_mapModel; ///< map model instance + MapModel * m_staticMapModel; ///< static map model instance + MapModel * m_missionMapModel; ///< mission map model instance ThemeModel * m_themeModel; ///< theme model instance QStandardItemModel * m_colorsModel; QStandardItemModel * m_bindsModel; diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/util/FileEngine.cpp --- a/QTfrontend/util/FileEngine.cpp Sun Nov 18 01:06:01 2012 +0400 +++ b/QTfrontend/util/FileEngine.cpp Fri Feb 22 05:05:32 2013 +0100 @@ -1,306 +1,380 @@ -/* borrowed from https://github.com/skhaz/qt-physfs-wrapper - * TODO: add copyright header, determine license - */ - - -#include "hwpacksmounter.h" -#include "FileEngine.h" - - -const QString FileEngineHandler::scheme = "physfs:/"; - -FileEngine::FileEngine(const QString& filename) -: _handler(NULL) -, _flags(0) -{ - setFileName(filename); -} - -FileEngine::~FileEngine() -{ - close(); -} - -bool FileEngine::open(QIODevice::OpenMode openMode) -{ - close(); - - if (openMode & QIODevice::WriteOnly) { - _handler = PHYSFS_openWrite(_filename.toUtf8().constData()); - _flags = QAbstractFileEngine::WriteOwnerPerm | QAbstractFileEngine::WriteUserPerm | QAbstractFileEngine::FileType; - } - - else if (openMode & QIODevice::ReadOnly) { - _handler = PHYSFS_openRead(_filename.toUtf8().constData()); - } - - else if (openMode & QIODevice::Append) { - _handler = PHYSFS_openAppend(_filename.toUtf8().constData()); - } - - else { - qWarning("Bad file open mode: %d", (int)openMode); - } - - if (!_handler) { - qWarning("Failed to open %s, reason: %s", _filename.toUtf8().constData(), PHYSFS_getLastError()); - return false; - } - - return true; -} - -bool FileEngine::close() -{ - if (isOpened()) { - int result = PHYSFS_close(_handler); - _handler = NULL; - return result != 0; - } - - return true; -} - -bool FileEngine::flush() -{ - return PHYSFS_flush(_handler) != 0; -} - -qint64 FileEngine::size() const -{ - return _size; -} - -qint64 FileEngine::pos() const -{ - return PHYSFS_tell(_handler); -} - -bool FileEngine::seek(qint64 pos) -{ - return PHYSFS_seek(_handler, pos) != 0; -} - -bool FileEngine::isSequential() const -{ - return false; -} - -bool FileEngine::remove() -{ - return PHYSFS_delete(_filename.toUtf8().constData()) != 0; -} - -bool FileEngine::mkdir(const QString &dirName, bool createParentDirectories) const -{ - Q_UNUSED(createParentDirectories); - return PHYSFS_mkdir(dirName.toUtf8().constData()) != 0; -} - -bool FileEngine::rmdir(const QString &dirName, bool recurseParentDirectories) const -{ - Q_UNUSED(recurseParentDirectories); - return PHYSFS_delete(dirName.toUtf8().constData()) != 0; -} - -bool FileEngine::caseSensitive() const -{ - return true; -} - -bool FileEngine::isRelativePath() const -{ - return true; -} - -QAbstractFileEngineIterator * FileEngine::beginEntryList(QDir::Filters filters, const QStringList &filterNames) -{ - return new FileEngineIterator(filters, filterNames, entryList(filters, filterNames)); -} - -QStringList FileEngine::entryList(QDir::Filters filters, const QStringList &filterNames) const -{ - Q_UNUSED(filters); - - QString file; - QStringList result; - char **files = PHYSFS_enumerateFiles(_filename.toUtf8().constData()); - - for (char **i = files; *i != NULL; i++) { - file = QString::fromUtf8(*i); - - if (filterNames.isEmpty() || QDir::match(filterNames, file)) { - result << file; - } - } - - PHYSFS_freeList(files); - - return result; -} - -QAbstractFileEngine::FileFlags FileEngine::fileFlags(FileFlags type) const -{ - return type & _flags; -} - -QString FileEngine::fileName(FileName file) const -{ - if (file == QAbstractFileEngine::AbsolutePathName) - return PHYSFS_getWriteDir(); - - return QString("physfs://%1").arg(_filename); -} - -QDateTime FileEngine::fileTime(FileTime time) const -{ - - switch (time) - { - case QAbstractFileEngine::ModificationTime: - default: - return _datetime; - break; - }; -} - -void FileEngine::setFileName(const QString &file) -{ - if(file.startsWith(FileEngineHandler::scheme)) - _filename = file.mid(FileEngineHandler::scheme.size()); - else - _filename = file; - - PHYSFS_Stat stat; - if (PHYSFS_stat(_filename.toUtf8().constData(), &stat) != 0) { - _size = stat.filesize; - _datetime = QDateTime::fromTime_t(stat.modtime); -// _flags |= QAbstractFileEngine::WriteUserPerm; - _flags |= QAbstractFileEngine::ReadUserPerm; - _flags |= QAbstractFileEngine::ExistsFlag; - - switch (stat.filetype) - { - case PHYSFS_FILETYPE_REGULAR: - _flags |= QAbstractFileEngine::FileType; - break; - - case PHYSFS_FILETYPE_DIRECTORY: - _flags |= QAbstractFileEngine::DirectoryType; - break; - case PHYSFS_FILETYPE_SYMLINK: - _flags |= QAbstractFileEngine::LinkType; - break; - default: ; - } - } -} - -bool FileEngine::atEnd() const -{ - return PHYSFS_eof(_handler) != 0; -} - -qint64 FileEngine::read(char *data, qint64 maxlen) -{ - return PHYSFS_readBytes(_handler, data, maxlen); -} - -qint64 FileEngine::write(const char *data, qint64 len) -{ - return PHYSFS_writeBytes(_handler, data, len); -} - -bool FileEngine::isOpened() const -{ - return _handler != NULL; -} - -QFile::FileError FileEngine::error() const -{ - return QFile::UnspecifiedError; -} - -QString FileEngine::errorString() const -{ - return PHYSFS_getLastError(); -} - -bool FileEngine::supportsExtension(Extension extension) const -{ - return extension == QAbstractFileEngine::AtEndExtension; -} - - - -FileEngineHandler::FileEngineHandler(char *argv0) -{ - PHYSFS_init(argv0); -} - -FileEngineHandler::~FileEngineHandler() -{ - PHYSFS_deinit(); -} - -QAbstractFileEngine* FileEngineHandler::create(const QString &filename) const -{ - if (filename.startsWith(scheme)) - return new FileEngine(filename.mid(scheme.size())); - else - return NULL; -} - -void FileEngineHandler::mount(const QString &path) -{ - PHYSFS_mount(path.toUtf8().constData(), NULL, 1); -} - -void FileEngineHandler::mount(const QString & path, const QString & mountPoint) -{ - PHYSFS_mount(path.toUtf8().constData(), mountPoint.toUtf8().constData(), 1); -} - -void FileEngineHandler::setWriteDir(const QString &path) -{ - PHYSFS_setWriteDir(path.toUtf8().constData()); -} - -void FileEngineHandler::mountPacks() -{ - hedgewarsMountPackages(); -} - - -FileEngineIterator::FileEngineIterator(QDir::Filters filters, const QStringList &nameFilters, const QStringList &entries) - : QAbstractFileEngineIterator(filters, nameFilters) -{ - m_entries = entries; - - /* heck.. docs are unclear on this - * QDirIterator puts iterator before first entry - * but QAbstractFileEngineIterator example puts iterator on first entry - * though QDirIterator approach seems to be the right one - */ - - m_index = -1; -} - -bool FileEngineIterator::hasNext() const -{ - return m_index < m_entries.size() - 1; -} - -QString FileEngineIterator::next() -{ - if (!hasNext()) - return QString(); - - ++m_index; - return currentFilePath(); -} - -QString FileEngineIterator::currentFileName() const -{ - return m_entries.at(m_index); -} +/* borrowed from https://github.com/skhaz/qt-physfs-wrapper + * TODO: add copyright header, determine license + */ + +#include "hwpacksmounter.h" +#include "FileEngine.h" + + +const QString FileEngineHandler::scheme = "physfs:/"; + +FileEngine::FileEngine(const QString& filename) + : m_handle(NULL) + , m_size(0) + , m_flags(0) + , m_bufferSet(false) + , m_readWrite(false) +{ + setFileName(filename); +} + +FileEngine::~FileEngine() +{ + close(); +} + +bool FileEngine::open(QIODevice::OpenMode openMode) +{ + close(); + + if ((openMode & QIODevice::ReadWrite) == QIODevice::ReadWrite) { + m_handle = PHYSFS_openAppend(m_fileName.toUtf8().constData()); + if(m_handle) + { + m_readWrite = true; + seek(0); + } + } + + else if (openMode & QIODevice::WriteOnly) { + m_handle = PHYSFS_openWrite(m_fileName.toUtf8().constData()); + m_flags = QAbstractFileEngine::WriteOwnerPerm | QAbstractFileEngine::WriteUserPerm | QAbstractFileEngine::FileType; + } + + else if (openMode & QIODevice::ReadOnly) { + m_handle = PHYSFS_openRead(m_fileName.toUtf8().constData()); + } + + else if (openMode & QIODevice::Append) { + m_handle = PHYSFS_openAppend(m_fileName.toUtf8().constData()); + } + + else { + qWarning("[PHYSFS] Bad file open mode: %d", (int)openMode); + } + + if (!m_handle) { + qWarning("[PHYSFS] Failed to open %s, reason: %s", m_fileName.toUtf8().constData(), PHYSFS_getLastError()); + return false; + } + + return true; +} + +bool FileEngine::close() +{ + if (isOpened()) { + int result = PHYSFS_close(m_handle); + m_handle = NULL; + return result != 0; + } + + return true; +} + +bool FileEngine::flush() +{ + return PHYSFS_flush(m_handle) != 0; +} + +qint64 FileEngine::size() const +{ + return m_size; +} + +qint64 FileEngine::pos() const +{ + return PHYSFS_tell(m_handle); +} + +bool FileEngine::setSize(qint64 size) +{ + if(size == 0) + { + m_size = 0; + return open(QIODevice::WriteOnly); + } + else + return false; +} + +bool FileEngine::seek(qint64 pos) +{ + bool ok = PHYSFS_seek(m_handle, pos) != 0; + + return ok; +} + +bool FileEngine::isSequential() const +{ + return false; +} + +bool FileEngine::remove() +{ + return PHYSFS_delete(m_fileName.toUtf8().constData()) != 0; +} + +bool FileEngine::mkdir(const QString &dirName, bool createParentDirectories) const +{ + Q_UNUSED(createParentDirectories); + + return PHYSFS_mkdir(dirName.toUtf8().constData()) != 0; +} + +bool FileEngine::rmdir(const QString &dirName, bool recurseParentDirectories) const +{ + Q_UNUSED(recurseParentDirectories); + + return PHYSFS_delete(dirName.toUtf8().constData()) != 0; +} + +bool FileEngine::caseSensitive() const +{ + return true; +} + +bool FileEngine::isRelativePath() const +{ + return false; +} + +QAbstractFileEngineIterator * FileEngine::beginEntryList(QDir::Filters filters, const QStringList &filterNames) +{ + return new FileEngineIterator(filters, filterNames, entryList(filters, filterNames)); +} + +QStringList FileEngine::entryList(QDir::Filters filters, const QStringList &filterNames) const +{ + Q_UNUSED(filters); + + QString file; + QStringList result; + char **files = PHYSFS_enumerateFiles(m_fileName.toUtf8().constData()); + + for (char **i = files; *i != NULL; i++) { + file = QString::fromUtf8(*i); + + if (filterNames.isEmpty() || QDir::match(filterNames, file)) { + result << file; + } + } + + PHYSFS_freeList(files); + + return result; +} + +QAbstractFileEngine::FileFlags FileEngine::fileFlags(FileFlags type) const +{ + return type & m_flags; +} + +QString FileEngine::fileName(FileName file) const +{ + switch(file) + { + case QAbstractFileEngine::AbsolutePathName: + { + QString s(PHYSFS_getWriteDir()); + return s; + } + case QAbstractFileEngine::BaseName: + { + int l = m_fileName.lastIndexOf('/'); + QString s = m_fileName.mid(l + 1); + return s; + } + case QAbstractFileEngine::DefaultName: + case QAbstractFileEngine::AbsoluteName: + default: + { + QString s = "physfs:/" + m_fileName; + return s; + } + } +} + +QDateTime FileEngine::fileTime(FileTime time) const +{ + switch (time) + { + case QAbstractFileEngine::ModificationTime: + default: + return m_date; + break; + }; +} + +void FileEngine::setFileName(const QString &file) +{ + if(file.startsWith(FileEngineHandler::scheme)) + m_fileName = file.mid(FileEngineHandler::scheme.size()); + else + m_fileName = file; + PHYSFS_Stat stat; + if (PHYSFS_stat(m_fileName.toUtf8().constData(), &stat) != 0) { + m_size = stat.filesize; + m_date = QDateTime::fromTime_t(stat.modtime); +// m_flags |= QAbstractFileEngine::WriteOwnerPerm; + m_flags |= QAbstractFileEngine::ReadOwnerPerm; + m_flags |= QAbstractFileEngine::ReadUserPerm; + m_flags |= QAbstractFileEngine::ExistsFlag; + m_flags |= QAbstractFileEngine::LocalDiskFlag; + + switch (stat.filetype) + { + case PHYSFS_FILETYPE_REGULAR: + m_flags |= QAbstractFileEngine::FileType; + break; + case PHYSFS_FILETYPE_DIRECTORY: + m_flags |= QAbstractFileEngine::DirectoryType; + break; + case PHYSFS_FILETYPE_SYMLINK: + m_flags |= QAbstractFileEngine::LinkType; + break; + default: ; + } + } +} + +bool FileEngine::atEnd() const +{ + return PHYSFS_eof(m_handle) != 0; +} + +qint64 FileEngine::read(char *data, qint64 maxlen) +{ + if(m_readWrite) + { + if(pos() == 0) + open(QIODevice::ReadOnly); + else + return -1; + } + + qint64 len = PHYSFS_readBytes(m_handle, data, maxlen); + return len; +} + +qint64 FileEngine::readLine(char *data, qint64 maxlen) +{ + if(!m_bufferSet) + { + PHYSFS_setBuffer(m_handle, 4096); + m_bufferSet = true; + } + + qint64 bytesRead = 0; + while(PHYSFS_readBytes(m_handle, data, 1) + && maxlen + && (*data == '\n')) + { + ++data; + --maxlen; + ++bytesRead; + } + + return bytesRead; +} + +qint64 FileEngine::write(const char *data, qint64 len) +{ + return PHYSFS_writeBytes(m_handle, data, len); +} + +bool FileEngine::isOpened() const +{ + return m_handle != NULL; +} + +QFile::FileError FileEngine::error() const +{ + return QFile::UnspecifiedError; +} + +QString FileEngine::errorString() const +{ + return PHYSFS_getLastError(); +} + +bool FileEngine::supportsExtension(Extension extension) const +{ + return + (extension == QAbstractFileEngine::AtEndExtension) + || (extension == QAbstractFileEngine::FastReadLineExtension) + ; +} + + +FileEngineHandler::FileEngineHandler(char *argv0) +{ + PHYSFS_init(argv0); +} + +FileEngineHandler::~FileEngineHandler() +{ + PHYSFS_deinit(); +} + +QAbstractFileEngine* FileEngineHandler::create(const QString &filename) const +{ + if (filename.startsWith(scheme)) + return new FileEngine(filename); + else + return NULL; +} + +void FileEngineHandler::mount(const QString &path) +{ + PHYSFS_mount(path.toUtf8().constData(), NULL, 1); +} + +void FileEngineHandler::mount(const QString & path, const QString & mountPoint) +{ + PHYSFS_mount(path.toUtf8().constData(), mountPoint.toUtf8().constData(), 1); +} + +void FileEngineHandler::setWriteDir(const QString &path) +{ + PHYSFS_setWriteDir(path.toUtf8().constData()); +} + +void FileEngineHandler::mountPacks() +{ + hedgewarsMountPackages(); +} + + +FileEngineIterator::FileEngineIterator(QDir::Filters filters, const QStringList &nameFilters, const QStringList &entries) + : QAbstractFileEngineIterator(filters, nameFilters) +{ + m_entries = entries; + + /* heck.. docs are unclear on this + * QDirIterator puts iterator before first entry + * but QAbstractFileEngineIterator example puts iterator on first entry + * though QDirIterator approach seems to be the right one + */ + + m_index = -1; +} + +bool FileEngineIterator::hasNext() const +{ + return m_index < m_entries.size() - 1; +} + +QString FileEngineIterator::next() +{ + if (!hasNext()) + return QString(); + + ++m_index; + return currentFilePath(); +} + +QString FileEngineIterator::currentFileName() const +{ + return m_entries.at(m_index); +} diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/util/FileEngine.h --- a/QTfrontend/util/FileEngine.h Sun Nov 18 01:06:01 2012 +0400 +++ b/QTfrontend/util/FileEngine.h Fri Feb 22 05:05:32 2013 +0100 @@ -22,6 +22,7 @@ virtual bool flush(); virtual qint64 size() const; virtual qint64 pos() const; + virtual bool setSize(qint64 size); virtual bool seek(qint64 pos); virtual bool isSequential() const; virtual bool remove(); @@ -38,6 +39,7 @@ bool atEnd() const; virtual qint64 read(char *data, qint64 maxlen); + virtual qint64 readLine(char *data, qint64 maxlen); virtual qint64 write(const char *data, qint64 len); bool isOpened() const; @@ -48,11 +50,13 @@ virtual bool supportsExtension(Extension extension) const; private: - PHYSFS_file *_handler; - qint64 _size; - FileFlags _flags; - QString _filename; - QDateTime _datetime; + PHYSFS_file *m_handle; + qint64 m_size; + FileFlags m_flags; + QString m_fileName; + QDateTime m_date; + bool m_bufferSet; + bool m_readWrite; }; class FileEngineHandler : public QAbstractFileEngineHandler diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/util/LibavInteraction.cpp --- a/QTfrontend/util/LibavInteraction.cpp Sun Nov 18 01:06:01 2012 +0400 +++ b/QTfrontend/util/LibavInteraction.cpp Fri Feb 22 05:05:32 2013 +0100 @@ -70,7 +70,7 @@ // get list of all codecs AVCodec* pCodec = NULL; - while (pCodec = av_codec_next(pCodec)) + while ((pCodec = av_codec_next(pCodec))) { #if LIBAVCODEC_VERSION_MAJOR >= 54 if (!av_codec_is_encoder(pCodec)) @@ -162,7 +162,7 @@ // get list of all formats AVOutputFormat* pFormat = NULL; - while (pFormat = av_oformat_next(pFormat)) + while ((pFormat = av_oformat_next(pFormat))) { if (!pFormat->extensions) continue; @@ -270,7 +270,7 @@ QByteArray utf8path = filepath.toUtf8(); if (avformat_open_input(&pContext, utf8path.data(), NULL, NULL) < 0) return ""; -#if LIBAVFORMAT_VERSION_MAJOR < 54 +#if LIBAVFORMAT_VERSION_MAJOR < 53 if (av_find_stream_info(pContext) < 0) #else if (avformat_find_stream_info(pContext, NULL) < 0) @@ -302,13 +302,13 @@ else continue; AVCodec* pDecoder = avcodec_find_decoder(pCodec->codec_id); - desc += pDecoder? pDecoder->name : "unknown"; + desc += pDecoder? pDecoder->name : tr("unknown"); desc += "\n"; } AVDictionaryEntry* pComment = av_dict_get(pContext->metadata, "comment", NULL, 0); if (pComment) desc += QString("\n") + pComment->value; -#if LIBAVFORMAT_VERSION_MAJOR < 54 +#if LIBAVFORMAT_VERSION_MAJOR < 53 av_close_input_file(pContext); #else avformat_close_input(&pContext); diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/util/MessageDialog.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/QTfrontend/util/MessageDialog.cpp Fri Feb 22 05:05:32 2013 +0100 @@ -0,0 +1,39 @@ +/* + * Hedgewars, a free turn based strategy game + * Copyright (c) 2004-2012 Andrey Korotaev + * + * 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 "MessageDialog.h" + +int MessageDialog::ShowErrorMessage(const QString & msg, QWidget * parent) +{ + return ShowMessage(msg, QMessageBox::tr("Hedgewars - Warning"), QMessageBox::Warning, parent); +} + +int MessageDialog::ShowInfoMessage(const QString & msg, QWidget * parent) +{ + return ShowMessage(msg, QMessageBox::tr("Hedgewars - Information"), QMessageBox::Information, parent); +} + +int MessageDialog::ShowMessage(const QString & msg, const QString & title, QMessageBox::Icon icon, QWidget * parent) +{ + QMessageBox msgMsg(parent); + msgMsg.setIcon(icon); + msgMsg.setWindowTitle(title.isEmpty() ? QMessageBox::tr("Hedgewars") : title); + msgMsg.setText(msg); + msgMsg.setWindowModality(Qt::WindowModal); + return msgMsg.exec(); +} diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/util/MessageDialog.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/QTfrontend/util/MessageDialog.h Fri Feb 22 05:05:32 2013 +0100 @@ -0,0 +1,35 @@ +/* + * Hedgewars, a free turn based strategy game + * Copyright (c) 2004-2012 Andrey Korotaev + * + * 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 + */ + +#ifndef MESSAGEDIALOG_H +#define MESSAGEDIALOG_H + +#include +#include + +class QWidget; + +class MessageDialog +{ + public: + static int ShowErrorMessage(const QString & msg, QWidget * parent = 0); + static int ShowInfoMessage(const QString & msg, QWidget * parent = 0); + static int ShowMessage(const QString & msg, const QString & title = QString(), QMessageBox::Icon icon = QMessageBox::NoIcon, QWidget * parent = 0); +}; + +#endif diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/util/SDLInteraction.cpp --- a/QTfrontend/util/SDLInteraction.cpp Sun Nov 18 01:06:01 2012 +0400 +++ b/QTfrontend/util/SDLInteraction.cpp Fri Feb 22 05:05:32 2013 +0100 @@ -25,9 +25,13 @@ #include "SDL_mixer.h" #include "HWApplication.h" +#include "hwform.h" /* you know, we could just put a config singleton lookup function in gameuiconfig or something... */ +#include "gameuiconfig.h" #include "SDLInteraction.h" +#include "physfsrwops.h" + extern char sdlkeys[1024][2][128]; extern char xb360buttons[][128]; extern char xb360dpad[128]; @@ -184,16 +188,18 @@ return; SDL_Init(SDL_INIT_AUDIO); - Mix_OpenAudio(44100, MIX_DEFAULT_FORMAT, 2, 1024); - m_audioInitialized = true; + if(!Mix_OpenAudio(44100, MIX_DEFAULT_FORMAT, 2, 1024)) /* should we keep trying, or just turn off permanently? */ + m_audioInitialized = true; } void SDLInteraction::playSoundFile(const QString & soundFile) { + if (!HWForm::config || !HWForm::config->isFrontendSoundEnabled()) return; SDLAudioInit(); + if (!m_audioInitialized) return; if (!m_soundMap->contains(soundFile)) - m_soundMap->insert(soundFile, Mix_LoadWAV(soundFile.toLocal8Bit().constData())); + m_soundMap->insert(soundFile, Mix_LoadWAV_RW(PHYSFSRWOPS_openRead(soundFile.toLocal8Bit().constData()), 1)); //FIXME: this is a hack, but works as long as we have few concurrent playing sounds if (Mix_Playing(lastchannel) == false) @@ -230,9 +236,10 @@ return; SDLAudioInit(); + if (!m_audioInitialized) return; if (m_music == NULL) - m_music = Mix_LoadMUS(m_musicTrack.toLocal8Bit().constData()); + m_music = Mix_LoadMUS_RW(PHYSFSRWOPS_openRead(m_musicTrack.toLocal8Bit().constData())); Mix_VolumeMusic(MIX_MAX_VOLUME - 28); Mix_FadeInMusic(m_music, -1, 1750); diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/util/namegen.cpp --- a/QTfrontend/util/namegen.cpp Sun Nov 18 01:06:01 2012 +0400 +++ b/QTfrontend/util/namegen.cpp Fri Feb 22 05:05:32 2013 +0100 @@ -125,22 +125,21 @@ QStringList list; // find .txt to load the names from - QFile * file = new QFile(QString("physfs://Names/%1.txt").arg(filename)); + QFile file(QString("physfs://Names/%1.txt").arg(filename)); - if (file->exists() && file->open(QIODevice::ReadOnly | QIODevice::Text)) + if (file.open(QIODevice::ReadOnly | QIODevice::Text)) { - QTextStream in(file); - while (!in.atEnd()) + QTextStream in(&file); + QString line; + do { - QString line = in.readLine(); + line = in.readLine(); + if(!line.isEmpty()) list.append(line); - } + } while (!line.isNull()); } - // this QFile isn't needed any further - delete file; - if (list.size() == 0) list.append(filename); @@ -153,22 +152,21 @@ QStringList list; // find .cfg to load the dicts from - QFile * file = new QFile(QString("physfs://Names/%1.cfg").arg(hatname)); + QFile file(QString("physfs://Names/%1.cfg").arg(hatname)); - if (file->exists() && file->open(QIODevice::ReadOnly | QIODevice::Text)) + if (file.open(QIODevice::ReadOnly | QIODevice::Text)) { - QTextStream in(file); - while (!in.atEnd()) + QTextStream in(&file); + QString line; + do { - QString line = in.readLine(); + line = in.readLine(); + if(!line.isEmpty()) list.append(line); - } + } while (!line.isNull()); } - // this QFile isn't needed any further - delete file; - if (list.size() == 0) list.append(QString("generic")); diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/util/platform/AutoUpdater.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/QTfrontend/util/platform/AutoUpdater.cpp Fri Feb 22 05:05:32 2013 +0100 @@ -0,0 +1,9 @@ +/* + * Copyright (C) 2008 Remko Troncon + */ + +#include "AutoUpdater.h" + +AutoUpdater::~AutoUpdater() +{ +} diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/util/platform/AutoUpdater.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/QTfrontend/util/platform/AutoUpdater.h Fri Feb 22 05:05:32 2013 +0100 @@ -0,0 +1,17 @@ +/* + * Copyright (C) 2008 Remko Troncon + */ + +#ifndef AUTOUPDATER_H +#define AUTOUPDATER_H + +class AutoUpdater +{ + public: + virtual ~AutoUpdater(); + + virtual void checkForUpdates() = 0; + virtual void checkForUpdatesNow() = 0; +}; + +#endif diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/util/platform/CocoaInitializer.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/QTfrontend/util/platform/CocoaInitializer.h Fri Feb 22 05:05:32 2013 +0100 @@ -0,0 +1,35 @@ +/* + * Hedgewars, a free turn based strategy game + * Copyright (c) 2004-2012 Andrey Korotaev + * + * 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 + */ + +// see original example here http://el-tramo.be/blog/mixing-cocoa-and-qt + +#ifndef COCOAINITIALIZER_H +#define COCOAINITIALIZER_H + +class CocoaInitializer +{ + public: + CocoaInitializer(); + ~CocoaInitializer(); + + private: + class Private; + Private* c; +}; + +#endif diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/util/platform/CocoaInitializer.mm --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/QTfrontend/util/platform/CocoaInitializer.mm Fri Feb 22 05:05:32 2013 +0100 @@ -0,0 +1,44 @@ +/* + * Hedgewars, a free turn based strategy game + * Copyright (c) 2004-2012 Andrey Korotaev + * + * 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 + */ + +// see original example here http://el-tramo.be/blog/mixing-cocoa-and-qt + +#include "CocoaInitializer.h" + +#include +#include +#include + +class CocoaInitializer::Private +{ + public: + NSAutoreleasePool* pool; +}; + +CocoaInitializer::CocoaInitializer() +{ + c = new CocoaInitializer::Private(); + c->pool = [[NSAutoreleasePool alloc] init]; + NSApplicationLoad(); +} + +CocoaInitializer::~CocoaInitializer() +{ + [c->pool release]; + delete c; +} diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/util/platform/InstallController.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/QTfrontend/util/platform/InstallController.cpp Fri Feb 22 05:05:32 2013 +0100 @@ -0,0 +1,23 @@ +/* + * Hedgewars, a free turn based strategy game + * Copyright (c) 2004-2012 Andrey Korotaev + * + * 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 "InstallController.h" + +InstallController::~InstallController() +{ +} diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/util/platform/InstallController.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/QTfrontend/util/platform/InstallController.h Fri Feb 22 05:05:32 2013 +0100 @@ -0,0 +1,30 @@ +/* + * Hedgewars, a free turn based strategy game + * Copyright (c) 2004-2012 Andrey Korotaev + * + * 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 + */ + +#ifndef INSTALLCONTROLLER_H +#define INSTALLCONTROLLER_H + +class InstallController +{ + public: + virtual ~InstallController(); + + virtual void showInstallController() = 0; +}; + +#endif diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/util/platform/M3InstallController.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/QTfrontend/util/platform/M3InstallController.h Fri Feb 22 05:05:32 2013 +0100 @@ -0,0 +1,53 @@ +/***************************************************************** + M3InstallController.m + + Created by Martin Pilkington on 02/06/2007. + + Copyright (c) 2006-2009 M Cubed Software + + Permission is hereby granted, free of charge, to any person + obtaining a copy of this software and associated documentation + files (the "Software"), to deal in the Software without + restriction, including without limitation the rights to use, + copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the + Software is furnished to do so, subject to the following + conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + OTHER DEALINGS IN THE SOFTWARE. + + *****************************************************************/ + +#import +#import + +//#if MAC_OS_X_VERSION_MIN_REQUIRED < 1050 +#if __LP64__ || NS_BUILD_32_LIKE_64 +typedef long NSInteger; +typedef unsigned long NSUInteger; +#else +typedef int NSInteger; +typedef unsigned int NSUInteger; +#endif +//#endif + + +@interface M3InstallController : +NSObject +{ + NSAlert *alert; +} + +- (void)displayInstaller; +- (void)installApp; +@end diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/util/platform/M3InstallController.m --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/QTfrontend/util/platform/M3InstallController.m Fri Feb 22 05:05:32 2013 +0100 @@ -0,0 +1,119 @@ +/***************************************************************** + M3InstallController.m + + Created by Martin Pilkington on 02/06/2007. + + Copyright (c) 2006-2009 M Cubed Software + + Permission is hereby granted, free of charge, to any person + obtaining a copy of this software and associated documentation + files (the "Software"), to deal in the Software without + restriction, including without limitation the rights to use, + copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the + Software is furnished to do so, subject to the following + conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + OTHER DEALINGS IN THE SOFTWARE. + + *****************************************************************/ + +#import "M3InstallController.h" +#import "NSWorkspace_RBAdditions.h" + +#import + +@implementation M3InstallController + +- (id) init { + if ((self = [super init])) { + NSString *appName = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleName"]; + NSString *title = [NSString stringWithFormat:NSLocalizedString(@"%@ is currently running from a disk image", @"AppName is currently running from a disk image"), appName]; + NSString *body = [NSString stringWithFormat:NSLocalizedString(@"Would you like to install %@ in your applications folder before quitting?", @"Would you like to install App Name in your applications folder before quitting?"), appName]; + alert = [[NSAlert alertWithMessageText:title + defaultButton:NSLocalizedString(@"Install", @"Install") + alternateButton:NSLocalizedString(@"Don't Install", @"Don't Install") + otherButton:nil + informativeTextWithFormat:body] retain]; + //[alert setShowsSuppressionButton:YES]; + } + return self; +} + +- (void)displayInstaller { + NSString *imageFilePath = [[[NSWorkspace sharedWorkspace] propertiesForPath:[[NSBundle mainBundle] bundlePath]] objectForKey:NSWorkspace_RBimagefilepath]; + if (imageFilePath && ![imageFilePath isEqualToString:[NSString stringWithFormat:@"/Users/.%@/%@.sparseimage", NSUserName(), NSUserName()]] && ![[NSUserDefaults standardUserDefaults] boolForKey:@"M3DontAskInstallAgain"]) { + NSInteger returnValue = [alert runModal]; + if (returnValue == NSAlertDefaultReturn) { + [self installApp]; + } + if ([[alert suppressionButton] state] == NSOnState) { + [[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"M3DontAskInstallAgain"]; + } + } +} + +- (void)installApp { + NSString *appsPath = [[NSString stringWithString:@"/Applications"] stringByAppendingPathComponent:[[[NSBundle mainBundle] bundlePath] lastPathComponent]]; + NSString *userAppsPath = [[[NSString stringWithString:@"~/Applications"] stringByAppendingPathComponent:[[[NSBundle mainBundle] bundlePath] lastPathComponent]] stringByExpandingTildeInPath]; + NSString *appName = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleName"]; + + //Delete the app that is installed + if ([[NSFileManager defaultManager] fileExistsAtPath:appsPath]) { + if ([NSFileManager instancesRespondToSelector:@selector(removeItemAtPath:error:)]) + [[NSFileManager defaultManager] removeItemAtPath:appsPath error:nil]; + else + //casting hides the deprecation warning + [(id)[NSFileManager defaultManager] removeFileAtPath:appsPath handler:nil]; + } + //Delete the app that is installed + BOOL success = NO; + if ([NSFileManager instancesRespondToSelector:@selector(copyItemAtPath:toPath:error:)]) + success = [[NSFileManager defaultManager] copyItemAtPath:[[NSBundle mainBundle] bundlePath] + toPath:appsPath + error:nil]; + else + success = [(id)[NSFileManager defaultManager] copyPath:[[NSBundle mainBundle] bundlePath] + toPath:appsPath + handler:nil]; + if (success) { + NSRunAlertPanel([NSString stringWithFormat:NSLocalizedString(@"%@ installed successfully", @"App Name installed successfully"), appName], + [NSString stringWithFormat:NSLocalizedString(@"%@ was installed in /Applications", @"App Name was installed in /Applications"), appName], + NSLocalizedString(@"Quit", @"Quit"), nil, nil); + } else { + if ([[NSFileManager defaultManager] fileExistsAtPath:userAppsPath]) { + if ([NSFileManager instancesRespondToSelector:@selector(removeItemAtPath:error:)]) + [[NSFileManager defaultManager] removeItemAtPath:userAppsPath error:nil]; + else + [(id)[NSFileManager defaultManager] removeFileAtPath:userAppsPath handler:nil]; + } + if ([NSFileManager instancesRespondToSelector:@selector(copyItemAtPath:toPath:error:)]) + success = [[NSFileManager defaultManager] copyItemAtPath:[[NSBundle mainBundle] bundlePath] + toPath:userAppsPath + error:nil]; + else + success = [(id)[NSFileManager defaultManager] copyPath:[[NSBundle mainBundle] bundlePath] + toPath:userAppsPath + handler:nil]; + if (success) { + NSRunAlertPanel([NSString stringWithFormat:NSLocalizedString(@"%@ installed successfully", @"AppName installed successfully"), appName], + [NSString stringWithFormat:NSLocalizedString(@"%@ was installed in %@", @"App Name was installed in %@"), appName, [[NSString stringWithString:@"~/Applications"] stringByExpandingTildeInPath]], + NSLocalizedString(@"Quit", @"Quit"), nil, nil); + } else { + NSRunAlertPanel([NSString stringWithFormat:NSLocalizedString(@"Could not install %@", @"Could not install App Name"), appName], + NSLocalizedString(@"An error occurred when installing", @"An error occurred when installing"), NSLocalizedString(@"Quit", @"Quit"), nil, nil); + } + } +} + +@end diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/util/platform/M3Panel.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/QTfrontend/util/platform/M3Panel.h Fri Feb 22 05:05:32 2013 +0100 @@ -0,0 +1,37 @@ +/* + * Hedgewars, a free turn based strategy game + * Copyright (c) 2004-2012 Andrey Korotaev + * + * 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 + */ + +#ifndef M3PANEL_H +#define M3PANEL_H + +#include "InstallController.h" + +class M3Panel : public InstallController +{ + public: + M3Panel(void); + ~M3Panel(); + + void showInstallController(); + + private: + class Private; + Private* m; +}; + +#endif diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/util/platform/M3Panel.mm --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/QTfrontend/util/platform/M3Panel.mm Fri Feb 22 05:05:32 2013 +0100 @@ -0,0 +1,47 @@ +/* + * Hedgewars, a free turn based strategy game + * Copyright (c) 2004-2012 Andrey Korotaev + * + * 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 "M3Panel.h" +#include "M3InstallController.h" + +#include + +class M3Panel::Private +{ + public: + M3InstallController *install; +}; + +M3Panel::M3Panel(void) +{ + m = new M3Panel::Private(); + + m->install = [[M3InstallController alloc] init]; + [m->install retain]; +} + +M3Panel::~M3Panel() +{ + [m->install release]; + delete m; +} + +void M3Panel::showInstallController() +{ + [m->install displayInstaller]; +} diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/util/platform/NSWorkspace_RBAdditions.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/QTfrontend/util/platform/NSWorkspace_RBAdditions.h Fri Feb 22 05:05:32 2013 +0100 @@ -0,0 +1,38 @@ +// +// NSWorkspace_RBAdditions.h +// PathProps +// +// Created by Rainer Brockerhoff on 10/04/2007. +// Copyright 2007 Rainer Brockerhoff. All rights reserved. +// + +#import + +extern NSString* NSWorkspace_RBfstypename; +extern NSString* NSWorkspace_RBmntonname; +extern NSString* NSWorkspace_RBmntfromname; +extern NSString* NSWorkspace_RBdeviceinfo; +extern NSString* NSWorkspace_RBimagefilepath; +extern NSString* NSWorkspace_RBconnectiontype; +extern NSString* NSWorkspace_RBpartitionscheme; +extern NSString* NSWorkspace_RBserverURL; + +@interface NSWorkspace (NSWorkspace_RBAdditions) + +// This method will return nil if the input path is invalid. Otherwise, the returned NSDictionary may contain +// the following keys: +//- NSWorkspace_RBfstypename: will always be present.Shows the filesystem type (usually "hfs"), from statfs. +//- NSWorkspace_RBmntonname: will always be present. Shows the volume mount point. +//- NSWorkspace_RBmntfromname: will always be present. Shows the BSD device path for local volumes; info for +// remote volumes depends on the filesystem type. +//- NSWorkspace_RBconnectiontype: should always be present for local volumes. Shows the connection type ("SATA", "USB", etc.). +//- NSWorkspace_RBpartitionscheme: should always be present for local volumes. Shows the partition scheme. +//- NSWorkspace_RBdeviceinfo: should always be present for local volumes. Shows some information about the +// physical device; varies widely. +//- NSWorkspace_RBimagefilepath: should be present for disk images only. Shows the path of the disk image file. +//- NSWorkspace_RBserverURL: should be present for remote volumes only. Shows the server URL. + +- (NSDictionary*)propertiesForPath: +(NSString*)path; + +@end diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/util/platform/NSWorkspace_RBAdditions.m --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/QTfrontend/util/platform/NSWorkspace_RBAdditions.m Fri Feb 22 05:05:32 2013 +0100 @@ -0,0 +1,263 @@ +// +// NSWorkspace_RBAdditions.m +// PathProps +// +// Created by Rainer Brockerhoff on 10/04/2007. +// Copyright 2007 Rainer Brockerhoff. All rights reserved. +// + +#import "NSWorkspace_RBAdditions.h" +#include +#include +#include + +NSString* NSWorkspace_RBfstypename = @"NSWorkspace_RBfstypename"; +NSString* NSWorkspace_RBmntonname = @"NSWorkspace_RBmntonname"; +NSString* NSWorkspace_RBmntfromname = @"NSWorkspace_RBmntfromname"; +NSString* NSWorkspace_RBdeviceinfo = @"NSWorkspace_RBdeviceinfo"; +NSString* NSWorkspace_RBimagefilepath = @"NSWorkspace_RBimagefilepath"; +NSString* NSWorkspace_RBconnectiontype = @"NSWorkspace_RBconnectiontype"; +NSString* NSWorkspace_RBpartitionscheme = @"NSWorkspace_RBpartitionscheme"; +NSString* NSWorkspace_RBserverURL = @"NSWorkspace_RBserverURL"; + +// This static funtion concatenates two strings, but first checks several possibilities... +// like one or the other nil, or one containing the other already. + +static NSString* AddPart(NSString* first,NSString* second) { + if (!second) { + return first; + } + second = [second stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]]; + if (first) { + if ([first rangeOfString:second options:NSCaseInsensitiveSearch].location==NSNotFound) { + if ([second rangeOfString:first options:NSCaseInsensitiveSearch].location==NSNotFound) { + return [NSString stringWithFormat:@"%@; %@",first,second]; + } + return second; + } + return first; + } + return second; +} + +// This static functions recurses "upwards" over the IO registry. Returns strings that are concatenated +// and ultimately end up under the NSWorkspace_RBdeviceinfo key. +// This isn't too robust in that it assumes that objects returned by the objectForKey methods are +// either strings or dictionaries. A "standard" implementations would use either only CoreFoundation and +// IOKit calls for this, or do more robust type checking on the returned objects. +// +// Also notice that this works as determined experimentally in 10.4.9, there's no official docs I could find. +// YMMV, and it may stop working in any new version of Mac OS X. + +static NSString* CheckParents(io_object_t thing,NSString* part,NSMutableDictionary* dict) { + NSString* result = part; + io_iterator_t parentsIterator = 0; + kern_return_t kernResult = IORegistryEntryGetParentIterator(thing,kIOServicePlane,&parentsIterator); + if ((kernResult==KERN_SUCCESS)&&parentsIterator) { + io_object_t nextParent = 0; + while ((nextParent = IOIteratorNext(parentsIterator))) { + NSDictionary* props = nil; + NSString* image = nil; + NSString* partition = nil; + NSString* connection = nil; + kernResult = IORegistryEntryCreateCFProperties(nextParent,(CFMutableDictionaryRef*)&props,kCFAllocatorDefault,0); + if (IOObjectConformsTo(nextParent,"IOApplePartitionScheme")) { + partition = [props objectForKey:@"Content Mask"]; + } else if (IOObjectConformsTo(nextParent,"IOMedia")) { + partition = [props objectForKey:@"Content"]; + } else if (IOObjectConformsTo(nextParent,"IODiskImageBlockStorageDeviceOutKernel")) { + NSData* data = nil; + if ((data = [[props objectForKey:@"Protocol Characteristics"] objectForKey:@"Virtual Interface Location Path"])) { + image = [[[NSString alloc] initWithBytes:[data bytes] length:[data length] encoding:NSUTF8StringEncoding] autorelease]; + } + } else if (IOObjectConformsTo(nextParent,"IOHDIXHDDriveInKernel")) { + image = [props objectForKey:@"KDIURLPath"]; + } + NSDictionary* subdict; + if ((subdict = [props objectForKey:@"Protocol Characteristics"])) { + connection = [subdict objectForKey:@"Physical Interconnect"]; + } else { + connection = [props objectForKey:@"Physical Interconnect"]; + } + if (connection) { + [dict setObject:AddPart([dict objectForKey:NSWorkspace_RBconnectiontype],connection) forKey:NSWorkspace_RBconnectiontype]; + } + if (partition) { + [dict setObject:partition forKey:NSWorkspace_RBpartitionscheme]; + } + if (image) { + [dict setObject:image forKey:NSWorkspace_RBimagefilepath]; + } + NSString* value; + if ((subdict = [props objectForKey:@"Device Characteristics"])) { + if ((value = [subdict objectForKey:@"Product Name"])) { + result = AddPart(result,value); + } + if ((value = [subdict objectForKey:@"Product Revision Level"])) { + result = AddPart(result,value); + } + if ((value = [subdict objectForKey:@"Vendor Name"])) { + result = AddPart(result,value); + } + } + if ((value = [props objectForKey:@"USB Serial Number"])) { + result = AddPart(result,value); + } + if ((value = [props objectForKey:@"USB Vendor Name"])) { + result = AddPart(result,value); + } + NSString* cls = [(NSString*)IOObjectCopyClass(nextParent) autorelease]; + if (![cls isEqualToString:@"IOPCIDevice"]) { + +// Uncomment the following line to have the device tree dumped to the console. +// NSLog(@"=================================> %@:%@\n",cls,props); + + result = CheckParents(nextParent,result,dict); + } + IOObjectRelease(nextParent); + } + } + if (parentsIterator) { + IOObjectRelease(parentsIterator); + } + return result; +} + +// This formats the (partially undocumented) AFPXMountInfo info into a string. + +/* +static NSString* FormatAFPURL(AFPXVolMountInfoPtr mountInfo,NSString** devdesc) { + UInt8* work = ((UInt8*)mountInfo)+mountInfo->serverNameOffset; + if (devdesc) { + *devdesc = [[[NSString alloc] initWithBytes:&work[1] length:work[0] encoding:NSUTF8StringEncoding] autorelease]; + } + work = ((UInt8*)mountInfo)+mountInfo->volNameOffset; + NSString* volname = [[[NSString alloc] initWithBytes:&work[1] length:work[0] encoding:NSUTF8StringEncoding] autorelease]; + work = ((UInt8*)mountInfo)+mountInfo->alternateAddressOffset; + AFPAlternateAddress* afpa = (AFPAlternateAddress*)work; + AFPTagData* afpta = (AFPTagData*)(&afpa->fAddressList); + NSString* ip = nil; + NSString* dns = nil; + int i = afpa->fAddressCount; + while ((i-->0)) { + switch (afpta->fType) { + case kAFPTagTypeIP: + if (!ip) { + ip = [[[NSString alloc] initWithBytes:&afpta->fData[0] length:afpta->fLength-2 encoding:NSUTF8StringEncoding] autorelease]; + } + break; + case kAFPTagTypeIPPort: + ip = [NSString stringWithFormat:@"%u.%u.%u.%u:%u",afpta->fData[0],afpta->fData[1],afpta->fData[2],afpta->fData[3],OSSwapBigToHostInt16(*(UInt16*)&afpta->fData[4])]; + break; + case kAFPTagTypeDNS: + dns = [[[NSString alloc] initWithBytes:&afpta->fData[0] length:afpta->fLength-2 encoding:NSUTF8StringEncoding] autorelease]; + break; + case 0x07: + ip = [NSString stringWithFormat:@"[%x:%x:%x:%x:%x:%x:%x:%x]",OSSwapBigToHostInt16(*(UInt16*)&afpta->fData[0]), + OSSwapBigToHostInt16(*(UInt16*)&afpta->fData[2]),OSSwapBigToHostInt16(*(UInt16*)&afpta->fData[4]), + OSSwapBigToHostInt16(*(UInt16*)&afpta->fData[6]),OSSwapBigToHostInt16(*(UInt16*)&afpta->fData[8]), + OSSwapBigToHostInt16(*(UInt16*)&afpta->fData[10]),OSSwapBigToHostInt16(*(UInt16*)&afpta->fData[12]), + OSSwapBigToHostInt16(*(UInt16*)&afpta->fData[14])]; + break; + } + afpta = (AFPTagData*)((char*)afpta+afpta->fLength); + } + return [NSString stringWithFormat:@"afp://%@/%@",dns?:(ip?:@""),volname]; +} +*/ + +@implementation NSWorkspace (NSWorkspace_RBAdditions) + +// Returns a NSDictionary with properties for the path. See details in the .h file. +// This assumes that the length of path is less than PATH_MAX (currently 1024 characters). + +- (NSDictionary*)propertiesForPath:(NSString*)path { + const char* ccpath = (const char*)[path fileSystemRepresentation]; + NSMutableDictionary* result = nil; + struct statfs fs; + if (!statfs(ccpath,&fs)) { + NSString* from = [NSString stringWithUTF8String:fs.f_mntfromname]; + result = [NSMutableDictionary dictionaryWithObjectsAndKeys: + [NSString stringWithUTF8String:fs.f_fstypename],NSWorkspace_RBfstypename, + [NSString stringWithUTF8String:fs.f_mntonname],NSWorkspace_RBmntonname, + nil]; + if (strncmp(fs.f_mntfromname,"/dev/",5)==0) { +// For a local volume,get the IO registry tree and search it for further info. + mach_port_t masterPort = 0; + io_iterator_t mediaIterator = 0; + kern_return_t kernResult = IOMasterPort(bootstrap_port,&masterPort); + if (kernResult==KERN_SUCCESS) { + CFMutableDictionaryRef classesToMatch = IOBSDNameMatching(masterPort,0,&fs.f_mntfromname[5]); + if (classesToMatch) { + kernResult = IOServiceGetMatchingServices(masterPort,classesToMatch,&mediaIterator); + if ((kernResult==KERN_SUCCESS)&&mediaIterator) { + io_object_t firstMedia = 0; + while ((firstMedia = IOIteratorNext(mediaIterator))) { + NSString* stuff = CheckParents(firstMedia,nil,result); + if (stuff) { + [result setObject:stuff forKey:NSWorkspace_RBdeviceinfo]; + } + IOObjectRelease(firstMedia); + } + } + } + } + if (mediaIterator) { + IOObjectRelease(mediaIterator); + } + if (masterPort) { + mach_port_deallocate(mach_task_self(),masterPort); + } + } + //Don't need this for disk images, gets around warnings for some deprecated functions + + /* else { +// For a network volume, get the volume reference number and use to get the server URL. + FSRef ref; + if (FSPathMakeRef((const UInt8*)ccpath,&ref,NULL)==noErr) { + FSCatalogInfo info; + if (FSGetCatalogInfo(&ref,kFSCatInfoVolume,&info,NULL,NULL,NULL)==noErr) { + ParamBlockRec pb; + UInt16 vmisize = 0; + VolumeMountInfoHeaderPtr mountInfo = NULL; + pb.ioParam.ioCompletion = NULL; + pb.ioParam.ioNamePtr = NULL; + pb.ioParam.ioVRefNum = info.volume; + pb.ioParam.ioBuffer = (Ptr)&vmisize; + pb.ioParam.ioReqCount = sizeof(vmisize); + if ((PBGetVolMountInfoSize(&pb)==noErr)&&vmisize) { + mountInfo = (VolumeMountInfoHeaderPtr)malloc(vmisize); + if (mountInfo) { + pb.ioParam.ioBuffer = (Ptr)mountInfo; + pb.ioParam.ioReqCount = vmisize; + if (PBGetVolMountInfo(&pb)==noErr) { + NSString* url = nil; + switch (mountInfo->media) { + case AppleShareMediaType: + url = FormatAFPURL((AFPXVolMountInfoPtr)mountInfo,&from); + break; + case 'http': + url = from; + break; + case 'crbm': + case 'nfs_': + case 'cifs': + url = [NSString stringWithUTF8String:(char*)mountInfo+sizeof(VolumeMountInfoHeader)+sizeof(OSType)]; + break; + } + if (url) { + [result setObject:url forKey:NSWorkspace_RBserverURL]; + } + } + } + free(mountInfo); + } + } + } + }*/ + [result setObject:from forKey:NSWorkspace_RBmntfromname]; + } + return result; +} + +@end diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/util/platform/SparkleAutoUpdater.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/QTfrontend/util/platform/SparkleAutoUpdater.h Fri Feb 22 05:05:32 2013 +0100 @@ -0,0 +1,26 @@ +/* + * Copyright (C) 2008 Remko Troncon + */ + +#ifndef SPARKLEAUTOUPDATER_H +#define SPARKLEAUTOUPDATER_H + +#include + +#include "AutoUpdater.h" + +class SparkleAutoUpdater : public AutoUpdater +{ + public: + SparkleAutoUpdater(); + ~SparkleAutoUpdater(); + + void checkForUpdates(); + void checkForUpdatesNow(); + + private: + class Private; + Private* d; +}; + +#endif diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/util/platform/SparkleAutoUpdater.mm --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/QTfrontend/util/platform/SparkleAutoUpdater.mm Fri Feb 22 05:05:32 2013 +0100 @@ -0,0 +1,54 @@ +/* + * Hedgewars, a free turn based strategy game + * Copyright (c) 2004-2012 Andrey Korotaev + * + * 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 + */ + +// see original example here http://el-tramo.be/blog/mixing-cocoa-and-qt + +#include "SparkleAutoUpdater.h" + +#include +#include + +class SparkleAutoUpdater::Private +{ + public: + SUUpdater* updater; +}; + +SparkleAutoUpdater::SparkleAutoUpdater() +{ + d = new SparkleAutoUpdater::Private(); + + d->updater = [SUUpdater sharedUpdater]; + [d->updater retain]; +} + +SparkleAutoUpdater::~SparkleAutoUpdater() +{ + [d->updater release]; + delete d; +} + +void SparkleAutoUpdater::checkForUpdates() +{ + [d->updater checkForUpdatesInBackground]; +} + +void SparkleAutoUpdater::checkForUpdatesNow() +{ + [d->updater checkForUpdates:NULL]; +} diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/util/platform/Xfire Game SDK.url --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/QTfrontend/util/platform/Xfire Game SDK.url Fri Feb 22 05:05:32 2013 +0100 @@ -0,0 +1,5 @@ +[{000214A0-0000-0000-C000-000000000046}] +Prop3=19,2 +[InternetShortcut] +URL=http://www.xfire.com/cms/xf_game_sdk +IDList= diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/util/platform/xfire.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/QTfrontend/util/platform/xfire.cpp Fri Feb 22 05:05:32 2013 +0100 @@ -0,0 +1,85 @@ +/* + * Hedgewars, a free turn based strategy game + * Copyright (c) 2004-2012 Andrey Korotaev + * + * 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 +#include +#include + +#include "xfire.h" +#include "xfiregameclient.h" + +#ifdef USE_XFIRE +// use_xfire: stores if xfire is loaded and functions should do something at all +bool use_xfire = false; +char *keys[XFIRE_KEY_COUNT]; +char *values[XFIRE_KEY_COUNT]; + +// xfire_init(): used to initialize all variables and set their default values +void xfire_init(void) +{ + if(use_xfire) + return; + use_xfire = XfireIsLoaded() == 1; + + if(!use_xfire) + return; + + for(int i = 0; i < XFIRE_KEY_COUNT; i++) + { + keys[i] = new char[256]; + values[i] = new char[256]; + strcpy(keys[i], ""); + strcpy(values[i], ""); + } + + strcpy(keys[XFIRE_NICKNAME], "Nickname"); + strcpy(keys[XFIRE_ROOM], "Room"); + strcpy(keys[XFIRE_SERVER], "Server"); + strcpy(keys[XFIRE_STATUS], "Status"); + xfire_update(); +} + +// xfire_free(): used to free up ressources used etc. +void xfire_free(void) +{ + if(!use_xfire) + return; + + for(int i = 0; i < XFIRE_KEY_COUNT; i++) + { + delete [] keys[i]; + delete [] values[i]; + } +} + +// xfire_setvalue(): set a specific value +void xfire_setvalue(const XFIRE_KEYS status, const char *value) +{ + if(!use_xfire || strlen(value) > 255) + return; + strcpy(values[status], value); +} + +// xfire_update(): submits current values to the xfire app +void xfire_update(void) +{ + if(!use_xfire) + return; + XfireSetCustomGameDataA(XFIRE_KEY_COUNT, (const char**)keys, (const char**)values); +} +#endif // USE_XFIRE diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/util/platform/xfire.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/QTfrontend/util/platform/xfire.h Fri Feb 22 05:05:32 2013 +0100 @@ -0,0 +1,39 @@ +/* + * Hedgewars, a free turn based strategy game + * Copyright (c) 2004-2012 Andrey Korotaev + * + * 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 + */ + +#ifndef XFIRE_H +#define XFIRE_H + + +#ifdef USE_XFIRE +enum XFIRE_KEYS +{ + XFIRE_STATUS = 0, + XFIRE_NICKNAME, + XFIRE_SERVER, + XFIRE_ROOM, + XFIRE_KEY_COUNT, +}; + +void xfire_init(void); +void xfire_free(void); +void xfire_setvalue(const XFIRE_KEYS status, const char *value); +void xfire_update(void); +#endif + +#endif // XFIRE_H diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/util/platform/xfire_license.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/QTfrontend/util/platform/xfire_license.txt Fri Feb 22 05:05:32 2013 +0100 @@ -0,0 +1,103 @@ +Terms and Conditions +AGREEMENT BETWEEN USER AND XFIRE INC. +This is a legal agreement between you and Xfire Inc. ("Xfire") with respect to your access and use of the Xfire Service, which may also include Xfire software, content and related documentation and information (collectively, the "Service"). You must accept without modification all of the terms, conditions, and notices contained in these Terms of Use in order to access and/or use the Service (collectively, the "Terms of Use" or "Agreement"). If you do not accept these Terms of Use in their entirety, you may not access or use the Service. + +Portions of the Service may be governed by posted guidelines, rules, or other terms and conditions. All such guidelines, rules, terms and conditions are hereby incorporated by reference into these Terms of Use. In the event of a conflict between such other guidelines, rules, terms and conditions and these Terms of Use, the Terms of Use shall control, except that the Xfire Service Privacy Policy, referenced below, supersedes any conflicting language in these Terms of Use and/or any other guidelines, rules, terms and conditions published in connection with the Service with respect to the subject matter covered by such privacy policy. + +MODIFICATION OF THESE TERMS OF USE; UPDATES +Xfire may change the Terms of Use at any time and such changes shall be effective immediately. You are responsible for regularly reviewing the Terms of Use. The most recent version of the Terms of Use can be found at http://www.xfire.com/xf/terms.php. Your continued use of the Service affirms your agreement to the Terms of Use and any changes. + +Xfire is not obligated to provide updates or improvements to the Service. However, if Xfire, in its sole discretion, updates or improves the Service, these Terms of Use shall apply to such updates and improvements unless expressly noted otherwise. + +CLIENT SOFTWARE USE LIMITATION +YOU MAY ONLY USE XFIRE CLIENT SOFTWARE OR AUTHORIZED THIRD-PARTY SOFTWARE TO ACCESS AND/OR USE THE SERVICE. You may not use any software or services in conjunction with the Xfire software or authorized third-party software which modifies or reroutes, or attempts to modify or reroute, the Service. You may not authorize any third party to access and/or use the Service on your behalf using any automated process such as a BOT, a spider or periodic caching of information stored by the Xfire Service on your behalf without a separate written agreement with Xfire. You may not use any software or hardware that reduces the number of users directly accessing or using the Service (sometimes called 'multiplexing' or 'pooling' software or hardware). + +You may not modify, copy, distribute, transmit, display, perform, reproduce, publish, license, create derivative works from, transfer, or sell any information, software, products or services that are part of the Service except as expressly provided in these Terms of Use. + +NO UNLAWFUL OR PROHIBITED USE; RESPONSIBILITY FOR YOUR ACCOUNT +As a condition of your use of the Service, you will not use the Service for any purpose that is unlawful or prohibited by these Terms of Use. You may not use the Service in any manner that could damage, disable, overburden, or impair the Service or interfere with any other party's use and enjoyment of it. You may not attempt to gain unauthorized access to any account, computer systems or networks associated with the Service or to otherwise interfere with or disrupt any accounts, computer systems or networks connected to the Service. You may not obtain or attempt to obtain any materials or information through any means not intentionally made available or provided for through the Service. You may not use access to the Service to obtain information necessary for you to design, develop or update unauthorized software that you use or provide to others to use to access the Service. You may not charge others to use the Service either directly or indirectly without the express written agreement of Xfire. +Subject to these Terms of Use, you may use the Service within your commercial organization, but you may not use the Service to advertise or offer to buy or sell any goods or services, or to run a business or commercial entity without the express written agreement of Xfire. +You agree to use the Service only to send, receive, and transfer appropriate messages and material. By way of example, and not as a limitation, you agree that when using the Service, you will not: + + + Use the Service in connection with surveys, contests, pyramid schemes, chain letters, junk email, spamming or any duplicative, bulk or unsolicited messages (commercial or otherwise). + + Defame, abuse, harass, stalk, threaten or otherwise violate the legal rights (such as rights of privacy and publicity) of others. + + Create a false identity for the purpose of misleading others. + + Publish, transfer, distribute or disseminate any inappropriate, profane, defamatory, obscene, indecent or unlawful topic, name, material or information. + + Transfer, stream, or otherwise make available, files or other material that contain images, photographs, software or other material protected by intellectual property laws, including, by way of example, and not as limitation, copyright or trademark laws (or by rights of privacy or publicity) unless you own or control the rights thereto or have received all necessary consents to do the same. + + Use any material or information, including images or photographs, which is made available through the Service in any manner that infringes any copyright, trademark, patent, trade secret, or other proprietary right of any party. + + Transfer, stream or otherwise make available, files or other material that contain viruses, Trojan horses, worms, time bombs, cancelbots, corrupted files, or any other similar software or programs that may damage the operation of another's computer or property of another. + + Download any file or other material transferred by another user of the Service that you know, or reasonably should know, cannot be legally distributed in such manner. + + Use, download or otherwise copy, or provide (whether or not for a fee) to a person or entity any directory of users of the Service or other user or usage information or any portion thereof. + + Falsify or delete any author attributions, legal or other proper notices or proprietary designations or labels of the origin or source of software or other material contained in a file that is transferred. + + Violate any code of conduct or other guidelines which may be applicable to the Service. + + Use any portion of the Service to harvest or otherwise collect information about others, including e-mail addresses. + +Xfire reserves the right at all times to monitor communications on the Service and disclose any information Xfire deems necessary to (i) ensure your compliance with this Agreement; (ii) satisfy any applicable law, regulation or legal process; or (iii) protect the rights, property, and interests of Xfire, its employees or the public. Xfire also reserves the right to edit, refuse to transfer or to remove any information or materials, in whole or in part, in Xfire's sole discretion. + +Always use caution when giving out any personally identifiable information about yourself or your children in the Service. Xfire does not control or endorse the content, messages or information exchanged by means of the Service and, therefore, Xfire specifically disclaims any liability with regard to the Service and any actions resulting from your participation in the Service. + +You are responsible for all activities that occur in your Service account. You agree to notify Xfire immediately of any unauthorized use of your account or breach in security known to you related to the Service. + + +PRIVACY +See the Xfire Service Privacy Statement at http://www.xfire.com/xf/privacy.php for disclosures relating to the collection and use of your information. + + +INTERACTION WITH THIRD PARTY SITES AND SERVICES +The Service may allow you to interact with third-party Web sites and Web services ("Link(s)"). The Links are not under the control of Xfire and Xfire is not responsible for the contents of any Links, including without limitation any link contained in a Link, or any changes or updates to a Link. Xfire is not responsible for any form of transmission received from any Link, nor is Xfire responsible if the Link is not working appropriately. Xfire is providing these Links to you only as a convenience, and the inclusion of any Link does not imply endorsement by Xfire of the Link or any association with its operators. You are responsible for viewing and abiding by any privacy statements and terms of use posted in connection with the Links. + +You are solely responsible for any dealings with third parties (including advertisers) who support the Service, including the delivery of and payment for goods and services. + +TERMS OF USE FOR SERVICE-ENABLED PROPERTIES +For the terms and conditions governing your use of any Xfire or authorized third party Web site or service that enables you to use the Service other than the Service itself ("Service-Enabled Properties"), please refer to the applicable Terms of Use for such Service-Enabled Properties. + +SOFTWARE AND CONTENT AVAILABLE ON THE SERVICE +All Xfire content and software (if any) that is made available to view and/or download in connection with the Service ("Software") is owned by and is the copyrighted work of Xfire and/or its suppliers and is licensed, not sold. Your use of the Software is governed by the terms of the license agreement, if any, which accompanies or is included with the Software ("License Agreement"). You may not install or use any Software that is accompanied by or includes a License Agreement unless you first agree to the License Agreement terms. For any Software not accompanied by a license agreement, Xfire hereby grants to you, the user, a non-exclusive, revocable, personal, non-transferable license to use the Software solely in connection with the Service in accordance with these Terms of Use. You may not lend, lease, rent or sublicense the Software or any aspect of the Service. + +You will not disassemble, decompile, or reverse engineer the Software. All Software is protected by copyright laws and international treaty provisions. Any unauthorized reproduction or redistribution of the Software is expressly prohibited by law, and may result in severe civil and criminal penalties. WITHOUT LIMITING THE FOREGOING, COPYING OR REPRODUCTION OF THE SOFTWARE TO ANY OTHER SERVER OR LOCATION FOR FURTHER REPRODUCTION OR REDISTRIBUTION IS EXPRESSLY PROHIBITED. THE SOFTWARE IS WARRANTED, IF AT ALL, ONLY ACCORDING TO THE TERMS OF THE LICENSE AGREEMENT. You acknowledge that the Software, and any accompanying documentation and/or technical information, is subject to applicable export control laws and regulations of the U.S.A. You agree not to export or re-export the Software, directly or indirectly, to any countries that are subject to U.S.A. export restrictions. + +Your license to use the Software with the Service terminates when you terminate your use of the Service. Your license to use the Software with the Service may also terminate if Xfire, in its sole discretion, modifies the Service to no longer support such Software. + +NO WARRANTIES; LIABILITY DISCLAIMER; EXCLUSIVE REMEDY +XFIRE PROVIDES THE SERVICE AND THE SOFTWARE "AS IS," "WITH ALL FAULTS" AND "AS AVAILABLE," AND THE ENTIRE RISK AS TO SATISFACTORY QUALITY, PERFORMANCE, ACCURACY, AND EFFORT IS WITH YOU. XFIRE, ITS AFFILIATES, ITS RESELLERS, DISTRIBUTORS, SERVICE PROVIDERS AND/OR SUPPLIERS (COLLECTIVELY, THE "XFIRE PARTIES") MAKE NO WARRANTIES. THE XFIRE PARTIES DISCLAIM ANY AND ALL WARRANTIES, EXPRESS, STATUTORY AND IMPLIED, INCLUDING WITHOUT LIMITATION (1) WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, WORKMANLIKE EFFORT, ACCURACY, TITLE, QUIET ENJOYMENT, NO ENCUMBRANCES, NO LIENS AND NON-INFRINGEMENT, (2) WARRANTIES ARISING THROUGH COURSE OF DEALING OR USAGE OF TRADE, AND (3) WARRANTIES THAT ACCESS TO OR USE OF THE SERVICE WILL BE UNINTERRUPTED OR ERROR-FREE. THERE ARE NO WARRANTIES THAT EXTEND BEYOND THE FACE OF THIS AGREEMENT. XFIRE MAY CHANGE THE SERVICE OR THE FEATURES IN ANY WAY, AND AT ANY TIME AND FOR ANY REASON. + +IN NO EVENT SHALL ANY OF THE XFIRE PARTIES BE LIABLE FOR ANY DIRECT, INDIRECT, CONSEQUENTIAL, SPECIAL, INCIDENTAL, OR PUNITIVE DAMAGES ARISING OUT OF, BASED ON, OR RESULTING FROM THIS AGREEMENT OR YOUR USE OF THE SERVICE, INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF USE, DATA OR PROFITS, WITH THE DELAY OR INABILITY TO USE THE SERVICE, THE PROVISION OF OR FAILURE TO PROVIDE SUPPORT SERVICES, OR FOR ANY INFORMATION, SOFTWARE, PRODUCTS, OR SERVICES OBTAINED THROUGH THE SERVICE, OR OTHERWISE ARISING OUT OF THE USE OF THE SERVICE, WHETHER BASED ON CONTRACT, TORT, NEGLIGENCE, STRICT LIABILITY OR OTHERWISE, EVEN IF XFIREOR ANY OF ITS SUPPLIERS HAS BEEN ADVISED OF THE POSSIBILITY OF DAMAGES. BECAUSE SOME STATES/JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES, THE ABOVE LIMITATION MAY NOT APPLY TO YOU. + +IF YOU ARE DISSATISFIED WITH ANY PORTION OF THE SERVICE, OR WITH ANY OF THESE TERMS OF USE, YOUR SOLE AND EXCLUSIVE REMEDY IS TO DISCONTINUE USING THE SERVICE. + +INDEMNITY +You agree to indemnify and hold Xfire, its officers, and employees, harmless from any claim or demand, including reasonable attorneys' fees, made by any third party due to or arising out of your use of the Services, the violation of these Terms of Use by you, or the infringement by you, or other user of the Services using your computer or identity, of any intellectual property or other right of any person or entity. + +CUSTOMER SUPPORT +Xfire may, but is not required to, provide you with customer support ("Support"). Unless you have entered into a separate written support agreement with Xfire with respect to the Service, Xfire may terminate any Support it provides at any time in its sole discretion. + +Authorized third-party software that uses the Service is not supported by Xfire and you should contact the provider of such software for support, if any. + +TERMINATION/ACCESS RESTRICTION +Unless you, or a third party on your behalf, have entered into a separate written agreement with Xfire that modifies these Terms of Use, Xfire reserves the right, in its sole discretion, to terminate your access to and use of the Service or any portion thereof at any time, without notice. Also, unless you or a third party on your behalf have entered into a separate agreement with Xfire, Xfire may terminate or suspend your access to the Service for inactivity, which is defined as failing to log onto the Service for an extended period of time, as determined by Xfire. +ELECTRONIC NOTICES +You consent to Xfire providing you any information regarding the Service in electronic form. Xfire may provide such information to you via e-mail at the e-mail address you specified when you registered for the Service, by instant message to your account, or by access to a Xfire web site. As long as you access and use the Service, you will have the necessary software and hardware to receive such notices. If you do not consent to receive any notices electronically, you must discontinue your use of the Service. + +GENERAL +If you reside in the United States, claims for enforcement, breach or violation of duties or rights under these Terms of Use are governed by the laws of the State of California, without reference to conflict of laws principles. All other claims, including, without limitation, claims under or for violation of state consumer protection laws, unfair competition laws, and in tort, are governed by the laws of your state of residence in the United States. If you reside outside of the United States, these Terms of Use are governed by the laws of the State of California, without reference to conflict of laws principles. You hereby irrevocably consent to the exclusive jurisdiction and venue of courts in San Mateo County, California, U.S.A. in all disputes arising out of or relating to the use of the Service. + +YOU AND XFIRE AGREE THAT ANY CAUSE OF ACTION ARISING OUT OF OR RELATED TO THE SERVICE MUST COMMENCE WITHIN ONE (1) YEAR AFTER THE CAUSE OF ACTION ACCRUES. OTHERWISE, SUCH CAUSE OF ACTION IS PERMANENTLY BARRED. + +Xfire may have patents, patent applications, trademarks, copyrights, or other intellectual property rights covering subject matter in any Web pages that are part of the Service. Except as expressly provided in these Terms of Use, the furnishing of such Web pages to you does not give you any license to these patents, trademarks, copyrights, or other intellectual property. Any rights not expressly granted herein are reserved. + +June 2004 + + + diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/util/platform/xfiregameclient.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/QTfrontend/util/platform/xfiregameclient.cpp Fri Feb 22 05:05:32 2013 +0100 @@ -0,0 +1,121 @@ +/* This file is NOT open source. See "license.txt" to read the full license provided with the Xfire SDK. */ + +#define WIN32_LEAN_AND_MEAN +#include +#include + +#include "xfiregameclient.h" + +static HMODULE g_toucan_dll = NULL; +static void HelperInit(); +static HMODULE HelperGetToucanDLL(); + +typedef int (*XfireSetCustomGameDataAFunction)(int , const char **, const char **); +typedef int (*XfireSetCustomGameDataWFunction)(int , const wchar_t **, const wchar_t **); +typedef int (*XfireSetCustomGameDataUTF8Function)(int , const char **, const char **); + +static XfireSetCustomGameDataAFunction ptr_XfireSetCustomGameDataA = NULL; +static XfireSetCustomGameDataWFunction ptr_XfireSetCustomGameDataW = NULL; +static XfireSetCustomGameDataUTF8Function ptr_XfireSetCustomGameDataUTF8 = NULL; + +/* make sure we are going to call the ANSI version */ +#ifdef MODULEENTRY32 +#undef MODULEENTRY32 +#endif + +#ifdef Module32First +#undef Module32First +#endif + +#ifdef Module32Next +#undef Module32Next +#endif + + +int XfireIsLoaded() +{ + HelperInit(); + if (ptr_XfireSetCustomGameDataA && + ptr_XfireSetCustomGameDataW && + ptr_XfireSetCustomGameDataUTF8) + return 1; + return 0; +} + +int XfireSetCustomGameDataA(int num_keys, const char **keys, const char **values) +{ + HelperInit(); + if (ptr_XfireSetCustomGameDataA) + return ptr_XfireSetCustomGameDataA(num_keys, keys, values); + return 1; +} + +int XfireSetCustomGameDataW(int num_keys, const wchar_t **keys, const wchar_t **values) +{ + HelperInit(); + if (ptr_XfireSetCustomGameDataW) + return ptr_XfireSetCustomGameDataW(num_keys, keys, values); + return 1; +} + +int XfireSetCustomGameDataUTF8(int num_keys, const char **keys, const char **values) +{ + HelperInit(); + if (ptr_XfireSetCustomGameDataUTF8) + return ptr_XfireSetCustomGameDataUTF8(num_keys, keys, values); + return 1; +} + +/* ------------------------------------------------------------------------- */ +static void HelperInit() +{ + if (!ptr_XfireSetCustomGameDataA || + !ptr_XfireSetCustomGameDataW || + !ptr_XfireSetCustomGameDataUTF8) + { + HMODULE toucan_dll = HelperGetToucanDLL(); + if (toucan_dll) + { + ptr_XfireSetCustomGameDataA = (XfireSetCustomGameDataAFunction)::GetProcAddress(toucan_dll, "ToucanSendGameClientDataA_V1"); + ptr_XfireSetCustomGameDataW = (XfireSetCustomGameDataWFunction)::GetProcAddress(toucan_dll, "ToucanSendGameClientDataW_V1"); + ptr_XfireSetCustomGameDataUTF8 = (XfireSetCustomGameDataUTF8Function)::GetProcAddress(toucan_dll, "ToucanSendGameClientDataUTF8_V1"); + } + } +} + + +static HMODULE HelperGetToucanDLL() +{ + if (g_toucan_dll) + return g_toucan_dll; + + /* + ** We need to enumerate the DLLs loaded to find toucan dll. + ** This is done because the toucan dll changes with each update. + ** The toucan dll has the following format. "xfire_toucan_{BUILD_NUMBER}.dll" + ** We simply try to find a dll w/ the prefix "xfire_toucan" + */ + HANDLE snapshot_handle = CreateToolhelp32Snapshot(TH32CS_SNAPMODULE, GetCurrentProcessId()); + if (snapshot_handle != INVALID_HANDLE_VALUE) + { + MODULEENTRY32 module_entry; + module_entry.dwSize = sizeof(MODULEENTRY32); + + BOOL result = Module32First(snapshot_handle, &module_entry); + char module_name[] = "xfire_toucan"; + DWORD module_name_len = sizeof(module_name)-1; + while (result) + { + if (CompareStringA(LOCALE_USER_DEFAULT, NORM_IGNORECASE, module_entry.szModule, module_name_len, module_name, module_name_len) == CSTR_EQUAL) + { + g_toucan_dll = module_entry.hModule; + break; + } + result = Module32Next(snapshot_handle, &module_entry); + } + + CloseHandle(snapshot_handle); + } + + return g_toucan_dll; +} diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/util/platform/xfiregameclient.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/QTfrontend/util/platform/xfiregameclient.h Fri Feb 22 05:05:32 2013 +0100 @@ -0,0 +1,49 @@ +/* This file is NOT open source. See "license.txt" to read the full license provided with the Xfire SDK. */ + +#ifndef __XFIREGAMECLIENT_H__ +#define __XFIREGAMECLIENT_H__ + +#ifdef __cplusplus +extern "C" { +#endif + +/* +** XfireIsLoaded() +** +** returns 1 if application can talk to Xfire, 0 otherwise +*/ +int XfireIsLoaded(); + +/* +** XfireSetCustomGameDataA() +** +** ANSI version to tell xfire of custom game data +*/ +int XfireSetCustomGameDataA(int num_keys, const char **keys, const char **values); + +/* +** XfireSetCustomGameDataA() +** +** UNICODE version to tell xfire of custom game data +*/ +int XfireSetCustomGameDataW(int num_keys, const wchar_t **keys, const wchar_t **values); + +/* +** XfireSetCustomGameDataUTF8() +** +** UTF8 version to tell xfire of custom game data +*/ +int XfireSetCustomGameDataUTF8(int num_keys, const char **keys, const char **values); + +#ifdef UNICODE +#define XfireSetCustomGameData XfireSetCustomGameDataW +#else +#define XfireSetCustomGameData XfireSetCustomGameDataA +#endif + + +#ifdef __cplusplus +} +#endif + +#endif /* __XFIREGAMECLIENT_H__ */ diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/xfire.cpp --- a/QTfrontend/xfire.cpp Sun Nov 18 01:06:01 2012 +0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,85 +0,0 @@ -/* - * Hedgewars, a free turn based strategy game - * Copyright (c) 2004-2012 Andrey Korotaev - * - * 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 -#include -#include - -#include "xfire.h" -#include "../misc/xfire/xfiregameclient.h" - -#ifdef USE_XFIRE -// use_xfire: stores if xfire is loaded and functions should do something at all -bool use_xfire = false; -char *keys[XFIRE_KEY_COUNT]; -char *values[XFIRE_KEY_COUNT]; - -// xfire_init(): used to initialize all variables and set their default values -void xfire_init(void) -{ - if(use_xfire) - return; - use_xfire = XfireIsLoaded() == 1; - - if(!use_xfire) - return; - - for(int i = 0; i < XFIRE_KEY_COUNT; i++) - { - keys[i] = new char[256]; - values[i] = new char[256]; - strcpy(keys[i], ""); - strcpy(values[i], ""); - } - - strcpy(keys[XFIRE_NICKNAME], "Nickname"); - strcpy(keys[XFIRE_ROOM], "Room"); - strcpy(keys[XFIRE_SERVER], "Server"); - strcpy(keys[XFIRE_STATUS], "Status"); - xfire_update(); -} - -// xfire_free(): used to free up ressources used etc. -void xfire_free(void) -{ - if(!use_xfire) - return; - - for(int i = 0; i < XFIRE_KEY_COUNT; i++) - { - delete [] keys[i]; - delete [] values[i]; - } -} - -// xfire_setvalue(): set a specific value -void xfire_setvalue(const XFIRE_KEYS status, const char *value) -{ - if(!use_xfire || strlen(value) > 255) - return; - strcpy(values[status], value); -} - -// xfire_update(): submits current values to the xfire app -void xfire_update(void) -{ - if(!use_xfire) - return; - XfireSetCustomGameDataA(XFIRE_KEY_COUNT, (const char**)keys, (const char**)values); -} -#endif // USE_XFIRE diff -r d5d5e1698554 -r 1dedcc37bfe8 QTfrontend/xfire.h --- a/QTfrontend/xfire.h Sun Nov 18 01:06:01 2012 +0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,39 +0,0 @@ -/* - * Hedgewars, a free turn based strategy game - * Copyright (c) 2004-2012 Andrey Korotaev - * - * 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 - */ - -#ifndef XFIRE_H -#define XFIRE_H - - -#ifdef USE_XFIRE -enum XFIRE_KEYS -{ - XFIRE_STATUS = 0, - XFIRE_NICKNAME, - XFIRE_SERVER, - XFIRE_ROOM, - XFIRE_KEY_COUNT, -}; - -void xfire_init(void); -void xfire_free(void); -void xfire_setvalue(const XFIRE_KEYS status, const char *value); -void xfire_update(void); -#endif - -#endif // XFIRE_H diff -r d5d5e1698554 -r 1dedcc37bfe8 README --- a/README Sun Nov 18 01:06:01 2012 +0400 +++ b/README Fri Feb 22 05:05:32 2013 +0100 @@ -5,3 +5,10 @@ Source: Copyright 2004-2011 Andrey Korotaev Portions copyright 2006-2008 Igor Ulyanov aka Displacer + +Instructions: +depending on your system, consult our wiki at: +- http://code.google.com/p/hedgewars/wiki/BuildingOnLinux +- http://code.google.com/p/hedgewars/wiki/BuildingOnWindows +- http://code.google.com/p/hedgewars/wiki/BuildingOnMac + diff -r d5d5e1698554 -r 1dedcc37bfe8 README_WINDOWS --- a/README_WINDOWS Sun Nov 18 01:06:01 2012 +0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -For instructions, please visit: http://code.google.com/p/hedgewars/wiki/BuildingOnWindows diff -r d5d5e1698554 -r 1dedcc37bfe8 bin/CMakeLists.txt --- a/bin/CMakeLists.txt Sun Nov 18 01:06:01 2012 +0400 +++ b/bin/CMakeLists.txt Fri Feb 22 05:05:32 2013 +0100 @@ -1,9 +1,9 @@ if(WIN32 AND NOT UNIX) - file(GLOB DLLs *.dll) - file(GLOB ICOs *.ico) - - install(FILES - ${DLLs} - ${ICOs} - DESTINATION bin) + file(GLOB DLLs *.dll) + file(GLOB ICOs *.ico) + + install(FILES + ${DLLs} + ${ICOs} + DESTINATION ${target_library_install_dir}) endif(WIN32 AND NOT UNIX) diff -r d5d5e1698554 -r 1dedcc37bfe8 cmake_modules/FindFFMPEG.cmake --- a/cmake_modules/FindFFMPEG.cmake Sun Nov 18 01:06:01 2012 +0400 +++ b/cmake_modules/FindFFMPEG.cmake Fri Feb 22 05:05:32 2013 +0100 @@ -16,17 +16,23 @@ # BSD license. # +set(FFMPEG_FOUND FALSE) + if (FFMPEG_LIBRARIES AND FFMPEG_INCLUDE_DIR) # in cache already set(FFMPEG_FOUND TRUE) else (FFMPEG_LIBRARIES AND FFMPEG_INCLUDE_DIR) + # silence output option + if (FFMPEG_FIND_QUIETLY) + set(VERBOSITY "QUIET") + endif () # use pkg-config to get the directories and then use these values # in the FIND_PATH() and FIND_LIBRARY() calls find_package(PkgConfig) if (PKG_CONFIG_FOUND) - pkg_check_modules(_FFMPEG_AVCODEC libavcodec) - pkg_check_modules(_FFMPEG_AVFORMAT libavformat) - pkg_check_modules(_FFMPEG_AVUTIL libavutil) + pkg_check_modules(_FFMPEG_AVCODEC libavcodec ${VERBOSITY}) + pkg_check_modules(_FFMPEG_AVFORMAT libavformat ${VERBOSITY}) + pkg_check_modules(_FFMPEG_AVUTIL libavutil ${VERBOSITY}) endif (PKG_CONFIG_FOUND) find_path(FFMPEG_AVCODEC_INCLUDE_DIR @@ -74,10 +80,6 @@ ${FFMPEG_LIBAVFORMAT} ${FFMPEG_LIBAVUTIL} ) - if (APPLE) - set(FFMPEG_LIBRARIES ${FFMPEG_LIBRARIES} "bz2" "-framework CoreVideo" "-framework VideoDecodeAcceleration") - endif(APPLE) - endif (FFMPEG_FOUND) if (FFMPEG_FOUND) diff -r d5d5e1698554 -r 1dedcc37bfe8 cmake_modules/FindFreepascal.cmake --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/cmake_modules/FindFreepascal.cmake Fri Feb 22 05:05:32 2013 +0100 @@ -0,0 +1,37 @@ +# Load Freepascal +if (FPC) + set(FPC_EXECUTABLE ${FPC}) +else() + find_program(FPC_EXECUTABLE + NAMES fpc + PATHS /opt/local/bin /usr/local/bin /usr/bin) +endif() + +# Check Freepascal version +if (FPC_EXECUTABLE) + exec_program(${FPC_EXECUTABLE} ARGS "-v" OUTPUT_VARIABLE FPC_VERSION_FULL) + + string(REGEX MATCH "[0-9]+\\.[0-9]+" FPC_VERSION_LONG "${FPC_VERSION_FULL}") + string(REGEX REPLACE "([0-9]+\\.[0-9]+)" "\\1" FPC_VERSION "${FPC_VERSION_LONG}") + message(STATUS "Found Freepascal: ${FPC_EXECUTABLE} (version ${FPC_VERSION})") +else() + message(FATAL_ERROR "Could NOT find Freepascal") +endif() + +# Check for noexecstack flag support +message(STATUS "Checking whether linker needs explicit noexecstack") +set(NOEXECSTACK_FLAGS "-k-z" "-knoexecstack") +file(WRITE ${EXECUTABLE_OUTPUT_PATH}/checkstack.pas "begin end.") + +execute_process(COMMAND ${FPC_EXECUTABLE} ${NOEXECSTACK_FLAGS} checkstack.pas + WORKING_DIRECTORY ${EXECUTABLE_OUTPUT_PATH} + RESULT_VARIABLE TEST_NOEXECSTACK + OUTPUT_QUIET ERROR_QUIET) + +if (TEST_NOEXECSTACK) + set(NOEXECSTACK_FLAGS "") + message(STATUS "Checking whether linker needs explicit noexecstack -- no") +else(TEST_NOEXECSTACK) + message(STATUS "Checking whether linker needs explicit noexecstack -- yes") +endif(TEST_NOEXECSTACK) + diff -r d5d5e1698554 -r 1dedcc37bfe8 cmake_modules/FindLibraryWithDebug.cmake --- a/cmake_modules/FindLibraryWithDebug.cmake Sun Nov 18 01:06:01 2012 +0400 +++ b/cmake_modules/FindLibraryWithDebug.cmake Fri Feb 22 05:05:32 2013 +0100 @@ -100,7 +100,7 @@ SET(${var_name} ${${var_name}_DEBUG}) ENDIF(${var_name}_RELEASE) - + ENDIF(${var_name}_RELEASE AND ${var_name}_DEBUG) MARK_AS_ADVANCED(${var_name}_RELEASE) diff -r d5d5e1698554 -r 1dedcc37bfe8 cmake_modules/FindLua.cmake --- a/cmake_modules/FindLua.cmake Sun Nov 18 01:06:01 2012 +0400 +++ b/cmake_modules/FindLua.cmake Fri Feb 22 05:05:32 2013 +0100 @@ -6,6 +6,7 @@ # the bundled one when nothing is found set(LUA_FOUND false) +set(LUA_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/misc/liblua) if (ANDROID) SET(LUA_DEFAULT "liblua5.1.so") @@ -19,10 +20,11 @@ #locate the system's lua library 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) + set(LUA_DEFAULT lua) ELSE() set(LUA_FOUND true) message(STATUS "LibLua 5.1 found at ${LUA_DEFAULT}") + find_path(LUA_INCLUDE_DIR lua.h) #remove the path (fpc doesn't like it - why?) GET_FILENAME_COMPONENT(LUA_DEFAULT ${LUA_DEFAULT} NAME) ENDIF() @@ -32,3 +34,4 @@ SET(LUA_LIBRARY ${LUA_DEFAULT} CACHE STRING "Lua library to link to; file name without path only!") + diff -r d5d5e1698554 -r 1dedcc37bfe8 cmake_modules/FindSDL_Extras.cmake --- a/cmake_modules/FindSDL_Extras.cmake Sun Nov 18 01:06:01 2012 +0400 +++ b/cmake_modules/FindSDL_Extras.cmake Fri Feb 22 05:05:32 2013 +0100 @@ -13,7 +13,7 @@ if(sdlmixer_version GREATER "10209") message(STATUS "Mix_Init() is present") - set(pascal_flags "-dSDL_MIXER_NEWER" ${pascal_flags}) + list(APPEND pascal_flags "-dSDL_MIXER_NEWER") endif() endif() @@ -30,7 +30,7 @@ if(sdlimage_version GREATER "010207") message(STATUS "IMG_Init() is present") - set(pascal_flags "-dSDL_IMAGE_NEWER" ${pascal_flags}) + list(APPEND pascal_flags "-dSDL_IMAGE_NEWER") endif() endif() diff -r d5d5e1698554 -r 1dedcc37bfe8 doc/protocol.txt --- a/doc/protocol.txt Sun Nov 18 01:06:01 2012 +0400 +++ b/doc/protocol.txt Fri Feb 22 05:05:32 2013 +0100 @@ -1,34 +1,35 @@ - '?' ping? - '!' pong! - 'l','L' срабатывание команд -left, +left - 'r','R' -right, +right - 'u','U' -up, +up - 'd','D' -down, +down - 'z', 'Z' -precise, +precise - 'N' срабатывание команды /nextturn - 'S' /switch - 's' + <текст> /say - '+' пустой пакет для постоянности лага - '1'..'5' /timer 1..5 - chr(128+№) /slot № - 'w' /setweap - 'p' /put - 'j' /ljump - 'J' /hjump - 'E' + <текст> сообщение об ошибке - ',' /skip - 'K' вывести сообщение из KB - 'Q' выход через команду /quit - 'q' выход по причине окончания игры - 't' + № /taunt № - 'F' + команда team вылетела в сетевой игре + '?' ping? + '!' pong! + 'l','L' срабатывание команд -left, +left + 'r','R' -right, +right + 'u','U' -up, +up + 'd','D' -down, +down + 'z', 'Z' -precise, +precise + 'N' срабатывание команды /nextturn + 'S' /switch + 's' + <текст> /say + '+' пустой пакет для постоянности лага + '1'..'5' /timer 1..5 + chr(128+№) /slot № + 'w' /setweap + 'p' /put + 'j' /ljump + 'J' /hjump + 'E' + <текст> сообщение об ошибке + ',' /skip + 't' + № /taunt № фронтенд клиенту: - 'e' + <команда> выполнить "/<команда>" - 'T' + {L,N,D} тип игры (локальная, сетевая, просмотр демо) - 'W' + <текст> сообщение о нефатальной ошибке + 'e' + <команда> выполнить "/<команда>" + 'T' + {L,N,D} тип игры (локальная, сетевая, просмотр демо) + 'W' + <текст> сообщение о нефатальной ошибке + 'F' + команда team вылетела в сетевой игре + 'o' stop syncing, game over! Клиент фронтенду: - 'C' запрос текущего конфига игры - 'q' выход по причине окончания демки - 'i' статистика + 'C' запрос текущего конфига игры + 'q' выход по причине окончания демки + 'i' статистика + 'K' вывести сообщение из KB + 'Q' выход через команду /quit + 'q' выход по причине окончания игры diff -r d5d5e1698554 -r 1dedcc37bfe8 gameServer/Actions.hs --- a/gameServer/Actions.hs Sun Nov 18 01:06:01 2012 +0400 +++ b/gameServer/Actions.hs Fri Feb 22 05:05:32 2013 +0100 @@ -1,10 +1,10 @@ -{-# LANGUAGE CPP, OverloadedStrings #-} +{-# LANGUAGE CPP, OverloadedStrings, ScopedTypeVariables #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module Actions where import Control.Concurrent import qualified Data.Set as Set -import qualified Data.Sequence as Seq +import qualified Data.Map as Map import qualified Data.List as L import qualified Control.Exception as Exception import System.Log.Logger @@ -52,10 +52,11 @@ | KickRoomClient ClientIndex | BanClient NominalDiffTime B.ByteString ClientIndex | BanIP B.ByteString NominalDiffTime B.ByteString + | BanNick B.ByteString NominalDiffTime B.ByteString | BanList | Unban B.ByteString - | ChangeMaster - | RemoveClientTeams ClientIndex + | ChangeMaster (Maybe ClientIndex) + | RemoveClientTeams | ModifyClient (ClientInfo -> ClientInfo) | ModifyClient2 ClientIndex (ClientInfo -> ClientInfo) | ModifyRoomClients (ClientInfo -> ClientInfo) @@ -73,8 +74,12 @@ | RestartServer | AddNick2Bans B.ByteString B.ByteString UTCTime | AddIP2Bans B.ByteString B.ByteString UTCTime - | CheckBanned + | CheckBanned Bool | SaveReplay + | Stats + | CheckRecord + | CheckFailed B.ByteString + | CheckSuccess [B.ByteString] type CmdHandler = [B.ByteString] -> Reader (ClientIndex, IRnC) [Action] @@ -83,7 +88,10 @@ rnf (AnswerClients chans msg) = chans `deepseq` msg `deepseq` () rnf a = a `seq` () +#if __GLASGOW_HASKELL__ < 706 instance NFData B.ByteString +#endif + instance NFData (Chan a) @@ -142,22 +150,22 @@ chan <- client's sendChan clNick <- client's nick - loggedIn <- client's logonPassed + loggedIn <- client's isVisible when (ri /= lobbyId) $ do processAction $ MoveToLobby ("quit: " `B.append` msg) return () - clientsChans <- liftM (Prelude.map sendChan . Prelude.filter logonPassed) $! allClientsS + clientsChans <- liftM (Prelude.map sendChan . Prelude.filter isVisible) $! allClientsS io $ infoM "Clients" (show ci ++ " quits: " ++ B.unpack msg) when loggedIn $ processAction $ AnswerClients clientsChans ["LOBBY:LEFT", clNick, msg] - mapM processAction + mapM_ processAction [ AnswerClients [chan] ["BYE", msg] - , ModifyClient (\c -> c{nick = "", logonPassed = False}) -- this will effectively hide client from others while he isn't deleted from list + , ModifyClient (\c -> c{nick = "", isVisible = False}) -- this will effectively hide client from others while he isn't deleted from list ] s <- get @@ -212,7 +220,7 @@ rnc <- gets roomsClients io $ do - modifyClient rnc (\cl -> cl{teamsInGame = 0, isReady = False, isMaster = False, isInGame = False}) ci + modifyClient rnc (\cl -> cl{teamsInGame = 0, isReady = False, isMaster = False, isInGame = False, clientClan = Nothing}) ci modifyRoom rnc (\r -> r{playersIn = playersIn r + 1}) ri moveClientToRoom rnc ri ci @@ -234,11 +242,11 @@ if master then if playersNum > 1 then - mapM_ processAction [ChangeMaster, NoticeMessage AdminLeft, RemoveClientTeams ci, AnswerClients chans ["LEFT", clNick, msg]] + mapM_ processAction [ChangeMaster Nothing, NoticeMessage AdminLeft, RemoveClientTeams, AnswerClients chans ["LEFT", clNick, msg]] else processAction RemoveRoom else - mapM_ processAction [RemoveClientTeams ci, AnswerClients chans ["LEFT", clNick, msg]] + mapM_ processAction [RemoveClientTeams, AnswerClients chans ["LEFT", clNick, msg]] -- when not removing room ready <- client's isReady @@ -250,26 +258,27 @@ moveClientToLobby rnc ci -processAction ChangeMaster = do +processAction (ChangeMaster delegateId)= do (Just ci) <- gets clientIndex proto <- client's clientProto ri <- clientRoomA rnc <- gets roomsClients - newMasterId <- liftM (last . filter (/= ci)) . io $ roomClientsIndicesM rnc ri + newMasterId <- liftM (\ids -> fromMaybe (last . filter (/= ci) $ ids) delegateId) . io $ roomClientsIndicesM rnc ri newMaster <- io $ client'sM rnc id newMasterId oldRoomName <- io $ room'sM rnc name ri oldMaster <- client's nick + kicked <- client's isKickedFromServer thisRoomChans <- liftM (map sendChan) $ roomClientsS ri - let newRoomName = if proto < 42 then nick newMaster else oldRoomName + let newRoomName = if (proto < 42) || kicked then nick newMaster else oldRoomName mapM_ processAction [ ModifyRoom (\r -> r{masterID = newMasterId , name = newRoomName , isRestrictedJoins = False , isRestrictedTeams = False + , isRegisteredOnly = False , readyPlayers = if isReady newMaster then readyPlayers r else readyPlayers r + 1}) , ModifyClient2 newMasterId (\c -> c{isMaster = True, isReady = True}) , AnswerClients [sendChan newMaster] ["ROOM_CONTROL_ACCESS", "1"] - , AnswerClients thisRoomChans ["WARNING", "New room admin is " `B.append` nick newMaster] , AnswerClients thisRoomChans ["CLIENT_FLAGS", "-h", oldMaster] , AnswerClients thisRoomChans ["CLIENT_FLAGS", "+hr", nick newMaster] ] @@ -361,6 +370,7 @@ ) : UnreadyRoomClients : SendUpdateOnThisRoom + : AnswerClients thisRoomChans ["ROUND_FINISHED"] : answerRemovedTeams @@ -371,7 +381,7 @@ ModifyRoom (\r -> r{ gameInfo = liftM (\g -> g{ teamsInGameNumber = teamsInGameNumber g - 1 - , roundMsgs = roundMsgs g Seq.|> rmTeamMsg + , roundMsgs = rmTeamMsg : roundMsgs g }) $ gameInfo r }) ] @@ -379,16 +389,20 @@ rnc <- gets roomsClients ri <- clientRoomA gi <- io $ room'sM rnc gameInfo ri - when (isJust gi && 0 == teamsInGameNumber (fromJust gi)) $ + when (0 == teamsInGameNumber (fromJust gi)) $ processAction FinishGame where rmTeamMsg = toEngineMsg $ 'F' `B.cons` teamName processAction (RemoveTeam teamName) = do + (Just ci) <- gets clientIndex rnc <- gets roomsClients ri <- clientRoomA - inGame <- io $ room'sM rnc (isJust . gameInfo) ri + inGame <- io $ do + r <- room'sM rnc (isJust . gameInfo) ri + c <- client'sM rnc isInGame ci + return $ r && c chans <- othersChans mapM_ processAction $ ModifyRoom (\r -> r{ @@ -400,14 +414,14 @@ : [SendTeamRemovalMessage teamName | inGame] -processAction (RemoveClientTeams clId) = do +processAction RemoveClientTeams = do + (Just ci) <- gets clientIndex rnc <- gets roomsClients removeTeamActions <- io $ do - clNick <- client'sM rnc nick clId - rId <- clientRoomM rnc clId + rId <- clientRoomM rnc ci roomTeams <- room'sM rnc teams rId - return . Prelude.map (RemoveTeam . teamname) . Prelude.filter (\t -> teamowner t == clNick) $ roomTeams + return . Prelude.map (RemoveTeam . teamname) . Prelude.filter (\t -> teamownerId t == ci) $ roomTeams mapM_ processAction removeTeamActions @@ -418,21 +432,20 @@ n <- client's nick h <- client's host p <- client's clientProto + checker <- client's isChecker uid <- client's clUID - haveSameNick <- liftM (not . null . tail . filter (\c -> caseInsensitiveCompare (nick c) n)) allClientsS - if haveSameNick then + -- allow multiple checker logins + haveSameNick <- liftM (not . null . tail . filter (\c -> (not $ isChecker c) && caseInsensitiveCompare (nick c) n)) allClientsS + if (not checker) && haveSameNick then if p < 38 then - mapM_ processAction [ByeClient "Nickname is already in use", removeNick] + processAction $ ByeClient $ loc "Nickname is already in use" else - mapM_ processAction [NoticeMessage NickAlreadyInUse, removeNick] + processAction $ NoticeMessage NickAlreadyInUse else do db <- gets (dbQueries . serverInfo) io $ writeChan db $ CheckAccount ci (hashUnique uid) n h return () - where - removeNick = ModifyClient (\c -> c{nick = ""}) - processAction ClearAccountsCache = do dbq <- gets (dbQueries . serverInfo) @@ -440,25 +453,39 @@ return () -processAction (ProcessAccountInfo info) = +processAction (ProcessAccountInfo info) = do case info of HasAccount passwd isAdmin -> do - chan <- client's sendChan - mapM_ processAction [AnswerClients [chan] ["ASKPASSWORD"], ModifyClient (\c -> c{webPassword = passwd, isAdministrator = isAdmin})] - Guest -> - processAction JoinLobby + b <- isBanned + c <- client's isChecker + when (not b) $ (if c then checkerLogin else playerLogin) passwd isAdmin + Guest -> do + b <- isBanned + when (not b) $ + processAction JoinLobby Admin -> do mapM_ processAction [ModifyClient (\cl -> cl{isAdministrator = True}), JoinLobby] chan <- client's sendChan processAction $ AnswerClients [chan] ["ADMIN_ACCESS"] - + where + isBanned = do + processAction $ CheckBanned False + liftM B.null $ client's nick + checkerLogin _ False = processAction $ ByeClient $ loc "No checker rights" + checkerLogin p True = do + wp <- client's webPassword + processAction $ + if wp == p then ModifyClient $ \c -> c{logonPassed = True} else ByeClient $ loc "Authentication failed" + playerLogin p a = do + chan <- client's sendChan + mapM_ processAction [AnswerClients [chan] ["ASKPASSWORD"], ModifyClient (\c -> c{webPassword = p, isAdministrator = a})] processAction JoinLobby = do chan <- client's sendChan clientNick <- client's nick isAuthenticated <- liftM (not . B.null) $ client's webPassword isAdmin <- client's isAdministrator - loggedInClients <- liftM (Prelude.filter logonPassed) $! allClientsS + loggedInClients <- liftM (Prelude.filter isVisible) $! allClientsS let (lobbyNicks, clientsChans) = unzip . L.map (nick &&& sendChan) $ loggedInClients let authenticatedNicks = L.map nick . L.filter (not . B.null . webPassword) $ loggedInClients let adminsNicks = L.map nick . L.filter isAdministrator $ loggedInClients @@ -469,7 +496,7 @@ , [AnswerClients [chan] ("CLIENT_FLAGS" : "+u" : authenticatedNicks) | not $ null authenticatedNicks] , [AnswerClients [chan] ("CLIENT_FLAGS" : "+a" : adminsNicks) | not $ null adminsNicks] , [AnswerClients (chan : clientsChans) ["CLIENT_FLAGS", B.concat["+" , clFlags], clientNick] | not $ B.null clFlags] - , [ModifyClient (\cl -> cl{logonPassed = True})] + , [ModifyClient (\cl -> cl{logonPassed = True, isVisible = True})] , [SendServerMessage] ] @@ -479,8 +506,9 @@ clHost <- client's host currentTime <- io getCurrentTime mapM_ processAction [ - AddIP2Bans clHost "60 seconds cooldown after kick" (addUTCTime 60 currentTime), - ByeClient "Kicked" + AddIP2Bans clHost (loc "60 seconds cooldown after kick") (addUTCTime 60 currentTime) + , ModifyClient (\c -> c{isKickedFromServer = True}) + , ByeClient "Kicked" ] @@ -494,28 +522,47 @@ , KickClient banId ] + processAction (BanIP ip seconds reason) = do currentTime <- io getCurrentTime let msg = B.concat ["Ban for ", B.pack . show $ seconds, " (", reason, ")"] processAction $ AddIP2Bans ip msg (addUTCTime seconds currentTime) + +processAction (BanNick n seconds reason) = do + currentTime <- io getCurrentTime + let msg = + if seconds > 60 * 60 * 24 * 365 then + B.concat ["Permanent ban (", reason, ")"] + else + B.concat ["Ban for ", B.pack . show $ seconds, " (", reason, ")"] + processAction $ + AddNick2Bans n msg (addUTCTime seconds currentTime) + + processAction BanList = do + time <- io $ getCurrentTime ch <- client's sendChan - b <- gets (B.pack . unlines . map show . bans . serverInfo) + b <- gets (B.intercalate "\n" . concatMap (ban2Str time) . bans . serverInfo) processAction $ AnswerClients [ch] ["BANLIST", b] + where + ban2Str time (BanByIP b r t) = ["I", b, r, B.pack . show $ t `diffUTCTime` time] + ban2Str time (BanByNick b r t) = ["N", b, r, B.pack . show $ t `diffUTCTime` time] + processAction (Unban entry) = do - processAction $ ModifyServerInfo (\s -> s{bans = filter f $ bans s}) + processAction $ ModifyServerInfo (\s -> s{bans = filter (not . f) $ bans s}) where f (BanByIP bip _ _) = bip == entry f (BanByNick bn _ _) = bn == entry + processAction (KickRoomClient kickId) = do modify (\s -> s{clientIndex = Just kickId}) ch <- client's sendChan - mapM_ processAction [AnswerClients [ch] ["KICKED"], MoveToLobby "kicked"] + mapM_ processAction [AnswerClients [ch] ["KICKED"], MoveToLobby $ loc "kicked"] processAction (AddClient cl) = do @@ -533,7 +580,7 @@ mapM_ processAction [ AnswerClients [sendChan cl] ["CONNECTED", "Hedgewars server http://www.hedgewars.org/", serverVersion] - , CheckBanned + , CheckBanned True , AddIP2Bans (host cl) "Reconnected too fast" (addUTCTime 10 $ connectTime cl) ] @@ -547,21 +594,22 @@ when (not $ ci `Set.member` rc) $ processAction $ ModifyServerInfo (\s -> s{bans = BanByIP ip reason expiring : bans s}) -processAction CheckBanned = do +processAction (CheckBanned byIP) = do clTime <- client's connectTime clNick <- client's nick clHost <- client's host si <- gets serverInfo let validBans = filter (checkNotExpired clTime) $ bans si - let ban = L.find (checkBan clHost clNick) $ validBans + let ban = L.find (checkBan byIP clHost clNick) $ validBans mapM_ processAction $ ModifyServerInfo (\s -> s{bans = validBans}) : [ByeClient (getBanReason $ fromJust ban) | isJust ban] where checkNotExpired testTime (BanByIP _ _ time) = testTime `diffUTCTime` time <= 0 checkNotExpired testTime (BanByNick _ _ time) = testTime `diffUTCTime` time <= 0 - checkBan ip _ (BanByIP bip _ _) = bip `B.isPrefixOf` ip - checkBan _ n (BanByNick bn _ _) = bn == n + checkBan True ip _ (BanByIP bip _ _) = bip `B.isPrefixOf` ip + checkBan False _ n (BanByNick bn _ _) = caseInsensitiveCompare bn n + checkBan _ _ _ _ = False getBanReason (BanByIP _ msg _) = msg getBanReason (BanByNick _ msg _) = msg @@ -577,7 +625,7 @@ pq <- io $ client'sM rnc pingsQueue ci when (pq > 0) $ do withStateT (\as -> as{clientIndex = Just ci}) $ - processAction (ByeClient "Ping timeout") + processAction (ByeClient $ loc "Ping timeout") -- when (pq > 1) $ -- processAction $ DeleteClient ci -- smth went wrong with client io threads, issue DeleteClient here @@ -604,13 +652,53 @@ return () processAction $ ModifyServerInfo (\s -> s{shutdownPending = True}) +processAction Stats = do + cls <- allClientsS + rms <- allRoomsS + let clientsMap = Map.fromListWith (+) . map (\c -> (clientProto c, 1 :: Int)) $ cls + let roomsMap = Map.fromListWith (+) . map (\c -> (roomProto c, 1 :: Int)) . filter ((/=) 0 . roomProto) $ rms + let keys = Map.keysSet clientsMap `Set.union` Map.keysSet roomsMap + let versionsStats = B.concat . ((:) "") . (flip (++) ["
"]) + . concatMap (\p -> [ + "", protoNumber2ver p + , "", showB $ Map.findWithDefault 0 p clientsMap + , "", showB $ Map.findWithDefault 0 p roomsMap + , ""]) + . Set.toList $ keys + processAction $ Warning versionsStats + + #if defined(OFFICIAL_SERVER) processAction SaveReplay = do ri <- clientRoomA rnc <- gets roomsClients + io $ do r <- room'sM rnc id ri saveReplay r + + +processAction CheckRecord = do + p <- client's clientProto + c <- client's sendChan + (cinfo, l) <- io $ loadReplay (fromIntegral p) + when (not . null $ l) $ + mapM_ processAction [ + AnswerClients [c] ("REPLAY" : l) + , ModifyClient $ \c -> c{checkInfo = cinfo} + ] + +processAction (CheckFailed msg) = do + Just (CheckInfo fileName _) <- client's checkInfo + io $ moveFailedRecord fileName + +processAction (CheckSuccess info) = do + Just (CheckInfo fileName _) <- client's checkInfo + io $ moveCheckedRecord fileName + #else processAction SaveReplay = return () +processAction CheckRecord = return () +processAction (CheckFailed _) = return () +processAction (CheckSuccess _) = return () #endif diff -r d5d5e1698554 -r 1dedcc37bfe8 gameServer/CMakeLists.txt --- a/gameServer/CMakeLists.txt Sun Nov 18 01:06:01 2012 +0400 +++ b/gameServer/CMakeLists.txt Fri Feb 22 05:05:32 2013 +0100 @@ -42,4 +42,4 @@ add_custom_target(hedgewars-server ALL DEPENDS "${EXECUTABLE_OUTPUT_PATH}/hedgewars-server${CMAKE_EXECUTABLE_SUFFIX}") -install(PROGRAMS "${EXECUTABLE_OUTPUT_PATH}/hedgewars-server${CMAKE_EXECUTABLE_SUFFIX}" DESTINATION ${target_dir}) +install(PROGRAMS "${EXECUTABLE_OUTPUT_PATH}/hedgewars-server${CMAKE_EXECUTABLE_SUFFIX}" DESTINATION ${target_binary_install_dir}) diff -r d5d5e1698554 -r 1dedcc37bfe8 gameServer/ClientIO.hs --- a/gameServer/ClientIO.hs Sun Nov 18 01:06:01 2012 +0400 +++ b/gameServer/ClientIO.hs Fri Feb 22 05:05:32 2013 +0100 @@ -30,25 +30,26 @@ return (B.splitWith (== '\n') packet : packets) listenLoop :: Socket -> Chan CoreMessage -> ClientIndex -> IO () -listenLoop sock chan ci = recieveWithBufferLoop B.empty +listenLoop sock chan ci = receiveWithBufferLoop B.empty where - recieveWithBufferLoop recvBuf = do + receiveWithBufferLoop recvBuf = do recvBS <- recv sock 4096 unless (B.null recvBS) $ do let (packets, newrecvBuf) = bs2Packets $ B.append recvBuf recvBS forM_ packets sendPacket - recieveWithBufferLoop newrecvBuf + receiveWithBufferLoop $ B.copy newrecvBuf sendPacket packet = writeChan chan $ ClientMessage (ci, packet) clientRecvLoop :: Socket -> Chan CoreMessage -> Chan [B.ByteString] -> ClientIndex -> (forall a. IO a -> IO a) -> IO () clientRecvLoop s chan clChan ci restore = (myThreadId >>= - \t -> (restore $ forkIO (clientSendLoop s t clChan ci) >> + (\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 :: Exception.SomeException) -> return . B.pack . show $ e) + ) >>= clientOff) `Exception.finally` remove where clientOff msg = writeChan chan $ ClientMessage (ci, ["QUIT", msg]) diff -r d5d5e1698554 -r 1dedcc37bfe8 gameServer/ConfigFile.hs --- a/gameServer/ConfigFile.hs Sun Nov 18 01:06:01 2012 +0400 +++ b/gameServer/ConfigFile.hs Fri Feb 22 05:05:32 2013 +0100 @@ -58,4 +58,3 @@ , ("sv_message", sm) , ("sv_messageOld", smo) ] - \ No newline at end of file diff -r d5d5e1698554 -r 1dedcc37bfe8 gameServer/CoreTypes.hs --- a/gameServer/CoreTypes.hs Sun Nov 18 01:06:01 2012 +0400 +++ b/gameServer/CoreTypes.hs Fri Feb 22 05:05:32 2013 +0100 @@ -4,7 +4,6 @@ import Control.Concurrent import Data.Word import qualified Data.Map as Map -import Data.Sequence(Seq, empty) import Data.Time import Network import Data.Function @@ -18,6 +17,13 @@ type ClientChan = Chan [B.ByteString] +data CheckInfo = + CheckInfo + { + recordFileName :: String, + recordTeams :: [TeamInfo] + } + data ClientInfo = ClientInfo { @@ -29,6 +35,7 @@ nick :: B.ByteString, webPassword :: B.ByteString, logonPassed :: Bool, + isVisible :: Bool, clientProto :: !Word16, roomID :: RoomIndex, pingsQueue :: !Word, @@ -36,7 +43,10 @@ isReady :: !Bool, isInGame :: Bool, isAdministrator :: Bool, - clientClan :: Maybe B.ByteString, + isChecker :: Bool, + isKickedFromServer :: Bool, + clientClan :: !(Maybe B.ByteString), + checkInfo :: Maybe CheckInfo, teamsInGame :: Word } @@ -64,14 +74,17 @@ } deriving (Show, Read) +instance Eq TeamInfo where + (==) = (==) `on` teamname + data GameInfo = GameInfo { - roundMsgs :: Seq B.ByteString, + roundMsgs :: [B.ByteString], leftTeams :: [B.ByteString], teamsAtStart :: [TeamInfo], teamsInGameNumber :: Int, - allPlayersHaveRegisteredAccounts :: Bool, + allPlayersHaveRegisteredAccounts :: !Bool, giMapParams :: Map.Map B.ByteString B.ByteString, giParams :: Map.Map B.ByteString [B.ByteString] } deriving (Show, Read) @@ -84,7 +97,7 @@ -> GameInfo newGameInfo = GameInfo - Data.Sequence.empty + [] [] data RoomInfo = @@ -100,6 +113,7 @@ readyPlayers :: !Int, isRestrictedJoins :: Bool, isRestrictedTeams :: Bool, + isRegisteredOnly :: Bool, roomBansList :: ![B.ByteString], mapParams :: Map.Map B.ByteString B.ByteString, params :: Map.Map B.ByteString [B.ByteString] @@ -118,6 +132,7 @@ 0 False False + False [] ( Map.fromList $ Prelude.zipWith (,) diff -r d5d5e1698554 -r 1dedcc37bfe8 gameServer/EngineInteraction.hs --- a/gameServer/EngineInteraction.hs Sun Nov 18 01:06:01 2012 +0400 +++ b/gameServer/EngineInteraction.hs Fri Feb 22 05:05:32 2013 +0100 @@ -1,3 +1,5 @@ +{-# LANGUAGE OverloadedStrings #-} + module EngineInteraction where import qualified Data.Set as Set @@ -5,8 +7,14 @@ import qualified Codec.Binary.Base64 as Base64 import qualified Data.ByteString.Char8 as B import qualified Data.ByteString as BW +import qualified Data.Map as Map +import qualified Data.List as L +import Data.Word +import Data.Bits +import Control.Arrow ------------- import CoreTypes +import Utils toEngineMsg :: B.ByteString -> B.ByteString @@ -20,19 +28,130 @@ removeLength _ = Nothing -checkNetCmd :: B.ByteString -> (Bool, Bool) +splitMessages :: B.ByteString -> [B.ByteString] +splitMessages = L.unfoldr (\b -> if B.null b then Nothing else Just $ B.splitAt (1 + fromIntegral (BW.head b)) b) + + +checkNetCmd :: B.ByteString -> (B.ByteString, B.ByteString) checkNetCmd msg = check decoded where - decoded = fromEngineMsg msg - check Nothing = (False, False) - check (Just ms) | B.length ms > 0 = let m = B.head ms in (m `Set.member` legalMessages, m == '+') - | otherwise = (False, False) + decoded = liftM (splitMessages . BW.pack) $ Base64.decode $ B.unpack msg + check Nothing = (B.empty, B.empty) + check (Just msgs) = let (a, b) = (filter isLegal msgs, filter isNonEmpty a) in (encode a, encode b) + encode = B.pack . Base64.encode . BW.unpack . B.concat + isLegal m = (B.length m > 1) && (flip Set.member legalMessages . B.head . B.tail $ m) + isNonEmpty = (/=) '+' . B.head . B.tail legalMessages = Set.fromList $ "M#+LlRrUuDdZzAaSjJ,sNpPwtghbc12345" ++ slotMessages slotMessages = "\128\129\130\131\132\133\134\135\136\137\138" -gameInfo2Replay :: GameInfo -> B.ByteString -gameInfo2Replay GameInfo{roundMsgs = rm, - teamsAtStart = teams, - giMapParams = params1, - giParams = params2} = undefined +replayToDemo :: [TeamInfo] + -> Map.Map B.ByteString B.ByteString + -> Map.Map B.ByteString [B.ByteString] + -> [B.ByteString] + -> [B.ByteString] +replayToDemo teams mapParams params msgs = concat [ + [em "TD"] + , maybeScript + , maybeMap + , [eml ["etheme ", head $ params Map.! "THEME"]] + , [eml ["eseed ", mapParams Map.! "SEED"]] + , [eml ["e$gmflags ", showB gameFlags]] + , schemeFlags + , [eml ["e$template_filter ", mapParams Map.! "TEMPLATE"]] + , [eml ["e$mapgen ", mapgen]] + , mapgenSpecific + , concatMap teamSetup teams + , msgs + , [em "!"] + ] + where + em = toEngineMsg + eml = em . B.concat + mapGenTypes = ["+rnd+", "+maze+", "+drawn+"] + maybeScript = let s = head $ params Map.! "SCRIPT" in if s == "Normal" then [] else [eml ["escript Scripts/Multiplayer/", s, ".lua"]] + maybeMap = let m = mapParams Map.! "MAP" in if m `elem` mapGenTypes then [] else [eml ["emap ", m]] + scheme = tail $ params Map.! "SCHEME" + mapgen = mapParams Map.! "MAPGEN" + mapgenSpecific = case mapgen of + "+maze+" -> [eml ["e$maze_size ", head $ params Map.! "MAZE_SIZE"]] + "+drawn" -> drawnMapData . head $ params Map.! "DRAWNMAP" + _ -> [] + gameFlags :: Word32 + gameFlags = foldl (\r (b, f) -> if b == "false" then r else r .|. f) 0 $ zip scheme gameFlagConsts + schemeFlags = map (\(v, (n, m)) -> eml [n, " ", showB $ (readInt_ v) * m]) + $ filter (\(_, (n, _)) -> not $ B.null n) + $ zip (drop (length gameFlagConsts) scheme) schemeParams + ammoStr :: B.ByteString + ammoStr = head . tail $ params Map.! "AMMO" + ammo = let l = B.length ammoStr `div` 4; ((a, b), (c, d)) = (B.splitAt l . fst &&& B.splitAt l . snd) . B.splitAt (l * 2) $ ammoStr in + (map (\(x, y) -> eml [x, " ", y]) $ zip ["eammloadt", "eammprob", "eammdelay", "eammreinf"] [a, b, c, d]) + ++ [em "eammstore" | scheme !! 14 == "true" || scheme !! 20 == "false"] + initHealth = scheme !! 27 + teamSetup :: TeamInfo -> [B.ByteString] + teamSetup t = (++) ammo $ + eml ["eaddteam ", showB $ (1 + (readInt_ $ teamcolor t) :: Int) * 1234, " ", teamname t] + : em "erdriven" + : eml ["efort ", teamfort t] + : take (hhnum t) ( + concatMap (\(HedgehogInfo hname hhat) -> [ + eml ["eaddhh ", showB $ difficulty t, " ", initHealth, " ", hname] + , eml ["ehat ", hhat] + ]) + $ hedgehogs t + ) + +drawnMapData :: B.ByteString -> [B.ByteString] +drawnMapData = error "drawnMapData" + +schemeParams :: [(B.ByteString, Int)] +schemeParams = [ + ("e$damagepct", 1) + , ("e$turntime", 1000) + , ("", 0) + , ("e$sd_turns", 1) + , ("e$casefreq", 1) + , ("e$minestime", 1000) + , ("e$minesnum", 1) + , ("e$minedudpct", 1) + , ("e$explosives", 1) + , ("e$healthprob", 1) + , ("e$hcaseamount", 1) + , ("e$waterrise", 1) + , ("e$healthdec", 1) + , ("e$ropepct", 1) + , ("e$getawaytime", 1) + ] + + +gameFlagConsts :: [Word32] +gameFlagConsts = [ + 0x00001000 + , 0x00000010 + , 0x00000004 + , 0x00000008 + , 0x00000020 + , 0x00000040 + , 0x00000080 + , 0x00000100 + , 0x00000200 + , 0x00000400 + , 0x00000800 + , 0x00002000 + , 0x00004000 + , 0x00008000 + , 0x00010000 + , 0x00020000 + , 0x00040000 + , 0x00080000 + , 0x00100000 + , 0x00200000 + , 0x00400000 + , 0x00800000 + , 0x01000000 + , 0x02000000 + , 0x04000000 + ] + + + diff -r d5d5e1698554 -r 1dedcc37bfe8 gameServer/HWProtoChecker.hs --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gameServer/HWProtoChecker.hs Fri Feb 22 05:05:32 2013 +0100 @@ -0,0 +1,36 @@ +{-# LANGUAGE OverloadedStrings #-} +module HWProtoChecker where + +import qualified Data.Map as Map +import Data.Maybe +import Data.List +import Control.Monad.Reader +-------------------------------------- +import CoreTypes +import Actions +import Utils +import HandlerUtils +import RoomsAndClients +import EngineInteraction + + +handleCmd_checker :: CmdHandler + +handleCmd_checker ["READY"] = return [CheckRecord] + +handleCmd_checker ["CHECKED", "FAIL", msg] = do + isChecking <- liftM (isJust . checkInfo) thisClient + if not isChecking then + return [] + else + return [CheckFailed msg, ModifyClient $ \c -> c{checkInfo = Nothing}] + + +handleCmd_checker ("CHECKED" : "OK" : info) = do + isChecking <- liftM (isJust . checkInfo) thisClient + if not isChecking then + return [] + else + return [CheckSuccess info, ModifyClient $ \c -> c{checkInfo = Nothing}] + +handleCmd_checker _ = return [ProtocolError "Unknown command"] diff -r d5d5e1698554 -r 1dedcc37bfe8 gameServer/HWProtoCore.hs --- a/gameServer/HWProtoCore.hs Sun Nov 18 01:06:01 2012 +0400 +++ b/gameServer/HWProtoCore.hs Fri Feb 22 05:05:32 2013 +0100 @@ -4,12 +4,14 @@ import Control.Monad.Reader import Data.Maybe import qualified Data.ByteString.Char8 as B +import qualified Data.List as L -------------------------------------- import CoreTypes import Actions import HWProtoNEState import HWProtoLobbyState import HWProtoInRoomState +import HWProtoChecker import HandlerUtils import RoomsAndClients import Utils @@ -22,7 +24,7 @@ handleCmd ("QUIT" : xs) = return [ByeClient msg] where - msg = if not $ null xs then head xs else "bye" + msg = if not $ null xs then head xs else loc "bye" handleCmd ["PONG"] = do @@ -32,10 +34,27 @@ else return [ModifyClient (\c -> c{pingsQueue = pingsQueue c - 1})] +handleCmd ("CMD" : params) = + let c = concatMap B.words params in + if not $ null c then + h $ (upperCase . head $ c) : tail c + else + return [] + where + h ["DELEGATE", n] = handleCmd ["DELEGATE", n] + h ["STATS"] = handleCmd ["STATS"] + h ["PART", msg] = handleCmd ["PART", msg] + h ["QUIT", msg] = handleCmd ["QUIT", msg] + h c = return [Warning . B.concat . L.intersperse " " $ "Unknown cmd" : c] + handleCmd cmd = do (ci, irnc) <- ask - if logonPassed (irnc `client` ci) then - handleCmd_loggedin cmd + let cl = irnc `client` ci + if logonPassed cl then + if isChecker cl then + handleCmd_checker cmd + else + handleCmd_loggedin cmd else handleCmd_NotEntered cmd diff -r d5d5e1698554 -r 1dedcc37bfe8 gameServer/HWProtoInRoomState.hs --- a/gameServer/HWProtoInRoomState.hs Sun Nov 18 01:06:01 2012 +0400 +++ b/gameServer/HWProtoInRoomState.hs Fri Feb 22 05:05:32 2013 +0100 @@ -2,13 +2,11 @@ module HWProtoInRoomState where import qualified Data.Map as Map -import Data.Sequence((|>)) import Data.List as L import Data.Maybe import qualified Data.ByteString.Char8 as B import Control.Monad import Control.Monad.Reader -import Control.DeepSeq -------------------------------------- import CoreTypes import Actions @@ -29,7 +27,7 @@ handleCmd_inRoom ("CFG" : paramName : paramStrs) - | null paramStrs = return [ProtocolError "Empty config entry"] + | null paramStrs = return [ProtocolError $ loc "Empty config entry"] | otherwise = do chans <- roomOthersChans cl <- thisClient @@ -38,7 +36,7 @@ ModifyRoom f, AnswerClients chans ("CFG" : paramName : paramStrs)] else - return [ProtocolError "Not room master"] + return [ProtocolError $ loc "Not room master"] where f r = if paramName `Map.member` (mapParams r) then r{mapParams = Map.insert paramName (head paramStrs) (mapParams r)} @@ -46,7 +44,7 @@ r{params = Map.insert paramName paramStrs (params r)} handleCmd_inRoom ("ADD_TEAM" : tName : color : grave : fort : voicepack : flag : difStr : hhsInfo) - | length hhsInfo /= 16 = return [ProtocolError "Corrupted hedgehogs info"] + | length hhsInfo /= 16 = return [ProtocolError $ loc "Corrupted hedgehogs info"] | otherwise = do (ci, _) <- ask rm <- thisRoom @@ -60,34 +58,37 @@ return color else liftM (head . (L.\\) (map B.singleton ['0'..]) . map teamcolor . teams) thisRoom - let newTeam = clNick `seq` TeamInfo ci clNick tName teamColor grave fort voicepack flag dif (newTeamHHNum rm) (hhsList hhsInfo) + let roomTeams = teams rm + let hhNum = let p = if not $ null roomTeams then hhnum $ head roomTeams else 4 in newTeamHHNum roomTeams p + let newTeam = clNick `seq` TeamInfo ci clNick tName teamColor grave fort voicepack flag dif hhNum (hhsList hhsInfo) return $ - if not . null . drop (maxTeams rm - 1) $ teams rm then - [Warning "too many teams"] - else if canAddNumber rm <= 0 then - [Warning "too many hedgehogs"] + if not . null . drop (maxTeams rm - 1) $ roomTeams then + [Warning $ loc "too many teams"] + else if canAddNumber roomTeams <= 0 then + [Warning $ loc "too many hedgehogs"] else if isJust $ findTeam rm then - [Warning "There's already a team with same name in the list"] + [Warning $ loc "There's already a team with same name in the list"] else if isJust $ gameInfo rm then - [Warning "round in progress"] + [Warning $ loc "round in progress"] else if isRestrictedTeams rm then - [Warning "restricted"] + [Warning $ loc "restricted"] else [ModifyRoom (\r -> r{teams = teams r ++ [newTeam]}), SendUpdateOnThisRoom, ModifyClient (\c -> c{teamsInGame = teamsInGame c + 1, clientClan = Just teamColor}), AnswerClients clChan ["TEAM_ACCEPTED", tName], + AnswerClients clChan ["HH_NUM", tName, showB $ hhnum newTeam], AnswerClients othChans $ teamToNet $ newTeam, AnswerClients roomChans ["TEAM_COLOR", tName, teamColor] ] where - canAddNumber r = 48 - (sum . map hhnum $ teams r) + canAddNumber rt = (48::Int) - (sum $ map hhnum rt) findTeam = find (\t -> tName == teamname t) . teams dif = readInt_ difStr hhsList [] = [] hhsList [_] = error "Hedgehogs list with odd elements number" hhsList (n:h:hhs) = HedgehogInfo n h : hhsList hhs - newTeamHHNum r = min 4 (canAddNumber r) + newTeamHHNum rt p = min p (canAddNumber rt) maxTeams r | roomProto r < 38 = 6 | otherwise = 8 @@ -96,42 +97,44 @@ handleCmd_inRoom ["REMOVE_TEAM", tName] = do (ci, _) <- ask r <- thisRoom - clNick <- clientNick let maybeTeam = findTeam r let team = fromJust maybeTeam return $ - if isNothing $ findTeam r then - [Warning "REMOVE_TEAM: no such team"] - else if clNick /= teamowner team then - [ProtocolError "Not team owner!"] + if isNothing $ maybeTeam then + [Warning $ loc "REMOVE_TEAM: no such team"] + else if ci /= teamownerId team then + [ProtocolError $ loc "Not team owner!"] else [RemoveTeam tName, ModifyClient (\c -> c{ teamsInGame = teamsInGame c - 1, - clientClan = if teamsInGame c == 1 then Nothing else Just $ anotherTeamClan ci r + clientClan = if teamsInGame c == 1 then Nothing else Just $ anotherTeamClan ci team r }) ] where - anotherTeamClan ci = teamcolor . fromJust . find (\t -> teamownerId t == ci) . teams + anotherTeamClan ci team = teamcolor . fromMaybe (error "CHECKPOINT 011") . find (\t -> (teamownerId t == ci) && (t /= team)) . teams findTeam = find (\t -> tName == teamname t) . teams handleCmd_inRoom ["HH_NUM", teamName, numberStr] = do cl <- thisClient + r <- thisRoom + clChan <- thisClientChans others <- roomOthersChans - r <- thisRoom let maybeTeam = findTeam r let team = fromJust maybeTeam return $ if not $ isMaster cl then - [ProtocolError "Not room master"] - else if hhNumber < 1 || hhNumber > 8 || isNothing maybeTeam || hhNumber > canAddNumber r + hhnum team then + [ProtocolError $ loc "Not room master"] + else if isNothing maybeTeam then [] + else if hhNumber < 1 || hhNumber > 8 || hhNumber > canAddNumber r + hhnum team then + [AnswerClients clChan ["HH_NUM", teamName, showB $ hhnum team]] else [ModifyRoom $ modifyTeam team{hhnum = hhNumber}, AnswerClients others ["HH_NUM", teamName, showB hhNumber]] @@ -152,7 +155,7 @@ return $ if not $ isMaster cl then - [ProtocolError "Not room master"] + [ProtocolError $ loc "Not room master"] else if isNothing maybeTeam then [] else @@ -178,6 +181,7 @@ ["CLIENT_FLAGS", if isReady cl then "-r" else "+r", nick cl] ] + handleCmd_inRoom ["START_GAME"] = do (ci, rnc) <- ask cl <- thisClient @@ -187,7 +191,7 @@ let nicks = map (nick . client rnc) . roomClients rnc $ clientRoom rnc ci let allPlayersRegistered = all ((<) 0 . B.length . webPassword . client rnc . teamownerId) $ teams rm - if isMaster cl && playersIn rm == readyPlayers rm && not (isJust $ gameInfo rm) then + if isMaster cl && (playersIn rm == readyPlayers rm || clientProto cl > 43) && not (isJust $ gameInfo rm) then if enoughClans rm then return [ ModifyRoom @@ -201,7 +205,7 @@ , ModifyRoomClients (\c -> c{isInGame = True}) ] else - return [Warning "Less than two clans!"] + return [Warning $ loc "Less than two clans!"] else return [] where @@ -213,12 +217,13 @@ rm <- thisRoom chans <- roomOthersChans - if teamsInGame cl > 0 && (isJust $ gameInfo rm) && isLegal then - return $ AnswerClients chans ["EM", msg] : [ModifyRoom (\r -> r{gameInfo = liftM (\g -> g{roundMsgs = roundMsgs g |> msg}) $ gameInfo r}) | not isKeepAlive] + if teamsInGame cl > 0 && (isJust $ gameInfo rm) && (not $ B.null legalMsgs) then + return $ AnswerClients chans ["EM", legalMsgs] + : [ModifyRoom (\r -> r{gameInfo = liftM (\g -> g{roundMsgs = nonEmptyMsgs : roundMsgs g}) $ gameInfo r}) | not $ B.null nonEmptyMsgs] else return [] where - (isLegal, isKeepAlive) = checkNetCmd msg + (legalMsgs, nonEmptyMsgs) = checkNetCmd msg handleCmd_inRoom ["ROUNDFINISHED", correctly] = do @@ -231,10 +236,7 @@ if isInGame cl then if isJust $ gameInfo rm then - if (isMaster cl && isCorrect) then - return $ FinishGame : unsetInGameState - else - return $ unsetInGameState ++ map SendTeamRemovalMessage clTeams + return $ unsetInGameState ++ map SendTeamRemovalMessage clTeams else return unsetInGameState else @@ -250,7 +252,7 @@ cl <- thisClient return $ if not $ isMaster cl then - [ProtocolError "Not room master"] + [ProtocolError $ loc "Not room master"] else [ModifyRoom (\r -> r{isRestrictedJoins = not $ isRestrictedJoins r})] @@ -259,11 +261,20 @@ cl <- thisClient return $ if not $ isMaster cl then - [ProtocolError "Not room master"] + [ProtocolError $ loc "Not room master"] else [ModifyRoom (\r -> r{isRestrictedTeams = not $ isRestrictedTeams r})] +handleCmd_inRoom ["TOGGLE_REGISTERED_ONLY"] = do + cl <- thisClient + return $ + if not $ isMaster cl then + [ProtocolError $ loc "Not room master"] + else + [ModifyRoom (\r -> r{isRegisteredOnly = not $ isRegisteredOnly r})] + + handleCmd_inRoom ["ROOM_NAME", newName] = do cl <- thisClient rs <- allRoomInfos @@ -272,10 +283,10 @@ return $ if not $ isMaster cl then - [ProtocolError "Not room master"] + [ProtocolError $ loc "Not room master"] else if isJust $ find (\r -> newName == name r) rs then - [Warning "Room with such name already exists"] + [Warning $ loc "Room with such name already exists"] else [ModifyRoom roomUpdate, AnswerClients chans ("ROOM" : "UPD" : name rm : roomInfo (nick cl) (roomUpdate rm))] @@ -287,10 +298,34 @@ (thisClientId, rnc) <- ask maybeClientId <- clientByNick kickNick master <- liftM isMaster thisClient + rm <- thisRoom let kickId = fromJust maybeClientId + let kickCl = rnc `client` kickId let sameRoom = clientRoom rnc thisClientId == clientRoom rnc kickId + let notOnly2Clans = (length . group . sort . map teamcolor . teams $ rm) > 2 return - [KickRoomClient kickId | master && isJust maybeClientId && (kickId /= thisClientId) && sameRoom] + [KickRoomClient kickId | + master + && isJust maybeClientId + && (kickId /= thisClientId) + && sameRoom + && ((isNothing $ gameInfo rm) || notOnly2Clans || teamsInGame kickCl == 0) + ] + + +handleCmd_inRoom ["DELEGATE", newAdmin] = do + (thisClientId, rnc) <- ask + maybeClientId <- clientByNick newAdmin + master <- liftM isMaster thisClient + serverAdmin <- liftM isAdministrator thisClient + let newAdminId = fromJust maybeClientId + let sameRoom = clientRoom rnc thisClientId == clientRoom rnc newAdminId + return + [ChangeMaster (Just newAdminId) | + (master || serverAdmin) + && isJust maybeClientId + && ((newAdminId /= thisClientId) || (serverAdmin && not master)) + && sameRoom] handleCmd_inRoom ["TEAMCHAT", msg] = do @@ -300,6 +335,7 @@ where engineMsg cl = toEngineMsg $ B.concat ["b", nick cl, "(team): ", msg, "\x20\x20"] + handleCmd_inRoom ["BAN", banNick] = do (thisClientId, rnc) <- ask maybeClientId <- clientByNick banNick @@ -308,8 +344,8 @@ let sameRoom = clientRoom rnc thisClientId == clientRoom rnc banId if master && isJust maybeClientId && (banId /= thisClientId) && sameRoom then return [ - ModifyRoom (\r -> r{roomBansList = let h = host $ rnc `client` banId in h `deepseq` h : roomBansList r}) - , KickRoomClient banId +-- ModifyRoom (\r -> r{roomBansList = let h = host $ rnc `client` banId in h `deepseq` h : roomBansList r}) + KickRoomClient banId ] else return [] diff -r d5d5e1698554 -r 1dedcc37bfe8 gameServer/HWProtoLobbyState.hs --- a/gameServer/HWProtoLobbyState.hs Sun Nov 18 01:06:01 2012 +0400 +++ b/gameServer/HWProtoLobbyState.hs Fri Feb 22 05:05:32 2013 +0100 @@ -2,11 +2,9 @@ module HWProtoLobbyState where import qualified Data.Map as Map -import qualified Data.Foldable as Foldable import Data.Maybe import Data.List import Control.Monad.Reader -import qualified Data.ByteString.Char8 as B -------------------------------------- import CoreTypes import Actions @@ -43,7 +41,7 @@ return [AnswerClients s ["CHAT", n, msg]] handleCmd_lobby ["CREATE_ROOM", rName, roomPassword] - | illegalName rName = return [Warning "Illegal room name"] + | illegalName rName = return [Warning $ loc "Illegal room name"] | otherwise = do rs <- allRoomInfos cl <- thisClient @@ -77,11 +75,13 @@ let isBanned = host cl `elem` roomBansList jRoom return $ if isNothing maybeRI || not sameProto then - [Warning "No such room"] + [Warning $ loc "No such room"] else if isRestrictedJoins jRoom then - [Warning "Joining restricted"] + [Warning $ loc "Joining restricted"] + else if isRegisteredOnly jRoom then + [Warning $ loc "Registered users only"] else if isBanned then - [Warning "You are banned in this room"] + [Warning $ loc "You are banned in this room"] else if roomPassword /= password jRoom then [NoticeMessage WrongPassword] else @@ -89,20 +89,21 @@ MoveToRoom jRI , AnswerClients [sendChan cl] $ "JOINED" : nicks , AnswerClients chans ["CLIENT_FLAGS", "-r", nick cl] - , AnswerClients [sendChan cl] $ ["WARNING", "Room admin is " `B.append` ownerNick] , AnswerClients [sendChan cl] $ ["CLIENT_FLAGS", "+h", ownerNick] ] - ++ map (readynessMessage cl) jRoomClients + ++ (if clientProto cl < 38 then map (readynessMessage cl) jRoomClients else [sendStateFlags cl jRoomClients]) ++ answerFullConfig cl (mapParams jRoom) (params jRoom) ++ answerTeams cl jRoom - ++ watchRound cl jRoom + ++ watchRound cl jRoom chans where - readynessMessage cl c = AnswerClients [sendChan cl] $ - if clientProto cl < 38 then - [if isReady c then "READY" else "NOT_READY", nick c] - else - ["CLIENT_FLAGS", if isReady c then "+r" else "-r", nick c] + readynessMessage cl c = AnswerClients [sendChan cl] [if isReady c then "READY" else "NOT_READY", nick c] + sendStateFlags cl clients = AnswerClients [sendChan cl] . concat . intersperse [""] . filter (not . null) . concat $ + [f "+r" ready, f "-r" unready, f "+g" ingame, f "-g" inroomlobby] + where + (ready, unready) = partition isReady clients + (ingame, inroomlobby) = partition isInGame clients + f fl lst = ["CLIENT_FLAGS" : fl : map nick lst | not $ null lst] toAnswer cl (paramName, paramStrs) = AnswerClients [sendChan cl] $ "CFG" : paramName : paramStrs @@ -119,11 +120,13 @@ answerTeams cl jRoom = let f = if isJust $ gameInfo jRoom then teamsAtStart . fromJust . gameInfo else teams in answerAllTeams cl $ f jRoom - watchRound cl jRoom = if isNothing $ gameInfo jRoom then + watchRound cl jRoom chans = if isNothing $ gameInfo jRoom then [] else - [AnswerClients [sendChan cl] ["RUN_GAME"], - AnswerClients [sendChan cl] $ "EM" : toEngineMsg "e$spectate 1" : Foldable.toList (roundMsgs . fromJust . gameInfo $ jRoom)] + [AnswerClients [sendChan cl] ["RUN_GAME"] + , AnswerClients chans ["CLIENT_FLAGS", "+g", nick cl] + , ModifyClient (\c -> c{isInGame = True}) + , AnswerClients [sendChan cl] $ "EM" : toEngineMsg "e$spectate 1" : (reverse . roundMsgs . fromJust . gameInfo $ jRoom)] handleCmd_lobby ["JOIN_ROOM", roomName] = @@ -132,13 +135,14 @@ handleCmd_lobby ["FOLLOW", asknick] = do (_, rnc) <- ask + clChan <- liftM sendChan thisClient ci <- clientByNick asknick let ri = clientRoom rnc $ fromJust ci - let clRoom = room rnc ri + let roomName = name $ room rnc ri if isNothing ci || ri == lobbyId then return [] else - handleCmd_lobby ["JOIN_ROOM", name clRoom] + liftM ((:) (AnswerClients [clChan] ["JOINING", roomName])) $ handleCmd_lobby ["JOIN_ROOM", roomName] --------------------------- -- Administrator's stuff -- @@ -150,16 +154,20 @@ return [KickClient $ fromJust kickId | isAdministrator cl && isJust kickId && fromJust kickId /= ci] -handleCmd_lobby ["BAN", banNick, reason] = do +handleCmd_lobby ["BAN", banNick, reason, duration] = do (ci, _) <- ask cl <- thisClient banId <- clientByNick banNick - return [BanClient 60 reason (fromJust banId) | isAdministrator cl && isJust banId && fromJust banId /= ci] + return [BanClient (readInt_ duration) reason (fromJust banId) | isAdministrator cl && isJust banId && fromJust banId /= ci] handleCmd_lobby ["BANIP", ip, reason, duration] = do cl <- thisClient return [BanIP ip (readInt_ duration) reason | isAdministrator cl] +handleCmd_lobby ["BANNICK", n, reason, duration] = do + cl <- thisClient + return [BanNick n (readInt_ duration) reason | isAdministrator cl] + handleCmd_lobby ["BANLIST"] = do cl <- thisClient return [BanList | isAdministrator cl] @@ -196,5 +204,8 @@ cl <- thisClient return [RestartServer | isAdministrator cl] +handleCmd_lobby ["STATS"] = do + cl <- thisClient + return [Stats | isAdministrator cl] handleCmd_lobby _ = return [ProtocolError "Incorrect command (state: in lobby)"] diff -r d5d5e1698554 -r 1dedcc37bfe8 gameServer/HWProtoNEState.hs --- a/gameServer/HWProtoNEState.hs Sun Nov 18 01:06:01 2012 +0400 +++ b/gameServer/HWProtoNEState.hs Fri Feb 22 05:05:32 2013 +0100 @@ -1,4 +1,4 @@ -{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE OverloadedStrings, CPP #-} module HWProtoNEState where import Control.Monad.Reader @@ -14,9 +14,9 @@ handleCmd_NotEntered ["NICK", newNick] = do (ci, irnc) <- ask let cl = irnc `client` ci - if not . B.null $ nick cl then return [ProtocolError "Nickname already chosen"] + if not . B.null $ nick cl then return [ProtocolError $ loc "Nickname already chosen"] else - if illegalName newNick then return [ByeClient "Illegal nickname"] + if illegalName newNick then return [ByeClient $ loc "Illegal nickname"] else return $ ModifyClient (\c -> c{nick = newNick}) : @@ -26,9 +26,9 @@ handleCmd_NotEntered ["PROTO", protoNum] = do (ci, irnc) <- ask let cl = irnc `client` ci - if clientProto cl > 0 then return [ProtocolError "Protocol already known"] + if clientProto cl > 0 then return [ProtocolError $ loc "Protocol already known"] else - if parsedProto == 0 then return [ProtocolError "Bad number"] + if parsedProto == 0 then return [ProtocolError $ loc "Bad number"] else return $ ModifyClient (\c -> c{clientProto = parsedProto}) : @@ -48,4 +48,18 @@ return [ByeClient "Authentication failed"] +#if defined(OFFICIAL_SERVER) +handleCmd_NotEntered ["CHECKER", protoNum, newNick, password] = do + (ci, irnc) <- ask + let cl = irnc `client` ci + + if parsedProto == 0 then return [ProtocolError $ loc "Bad number"] + else + return $ [ + ModifyClient (\c -> c{clientProto = parsedProto, nick = newNick, webPassword = password, isChecker = True}) + , CheckRegistered] + where + parsedProto = readInt_ protoNum +#endif + handleCmd_NotEntered _ = return [ProtocolError "Incorrect command (state: not entered)"] diff -r d5d5e1698554 -r 1dedcc37bfe8 gameServer/NetRoutines.hs --- a/gameServer/NetRoutines.hs Sun Nov 18 01:06:01 2012 +0400 +++ b/gameServer/NetRoutines.hs Fri Feb 22 05:05:32 2013 +0100 @@ -34,6 +34,7 @@ "" "" False + False 0 lobbyId 0 @@ -41,6 +42,9 @@ False False False + False + False + Nothing Nothing 0 ) diff -r d5d5e1698554 -r 1dedcc37bfe8 gameServer/OfficialServer/GameReplayStore.hs --- a/gameServer/OfficialServer/GameReplayStore.hs Sun Nov 18 01:06:01 2012 +0400 +++ b/gameServer/OfficialServer/GameReplayStore.hs Fri Feb 22 05:05:32 2013 +0100 @@ -9,18 +9,57 @@ import Data.Maybe import Data.Unique import Control.Monad +import Data.List +import qualified Data.ByteString as B +import System.Directory --------------- import CoreTypes +import EngineInteraction +pickReplayFile :: Int -> IO String +pickReplayFile p = do + files <- liftM (filter (isSuffixOf ('.' : show p))) $ getDirectoryContents "replays" + if (not $ null files) then + return $ "replays/" ++ head files + else + return "" + saveReplay :: RoomInfo -> IO () saveReplay r = do - time <- getCurrentTime - u <- liftM hashUnique newUnique - let fileName = "replays/" ++ show time ++ "-" ++ show u let gi = fromJust $ gameInfo r - let replayInfo = (teamsAtStart gi, Map.toList $ mapParams r, Map.toList $ params r, roundMsgs gi) - E.catch - (writeFile fileName (show replayInfo)) - (\(e :: IOException) -> warningM "REPLAYS" $ "Couldn't write to " ++ fileName ++ ": " ++ show e) - \ No newline at end of file + when (allPlayersHaveRegisteredAccounts gi) $ do + time <- getCurrentTime + u <- liftM hashUnique newUnique + let fileName = "replays/" ++ show time ++ "-" ++ show u ++ "." ++ show (roomProto r) + let replayInfo = (teamsAtStart gi, Map.toList $ mapParams r, Map.toList $ params r, roundMsgs gi) + E.catch + (writeFile fileName (show replayInfo)) + (\(e :: IOException) -> warningM "REPLAYS" $ "Couldn't write to " ++ fileName ++ ": " ++ show e) + + +loadReplay :: Int -> IO (Maybe CheckInfo, [B.ByteString]) +loadReplay p = E.handle (\(e :: SomeException) -> warningM "REPLAYS" "Problems reading replay" >> return (Nothing, [])) $ do + fileName <- pickReplayFile p + if (not $ null fileName) then + loadFile fileName + else + return (Nothing, []) + where + loadFile :: String -> IO (Maybe CheckInfo, [B.ByteString]) + loadFile fileName = E.handle (\(e :: SomeException) -> + warningM "REPLAYS" ("Problems reading " ++ fileName ++ ": " ++ show e) >> return (Nothing, [])) $ do + (teams, params1, params2, roundMsgs) <- liftM read $ readFile fileName + return $ ( + Just (CheckInfo fileName teams) + , replayToDemo teams (Map.fromList params1) (Map.fromList params2) (reverse roundMsgs) + ) + +moveFailedRecord :: String -> IO () +moveFailedRecord fn = E.handle (\(e :: SomeException) -> warningM "REPLAYS" $ show e) $ + renameFile fn ("failed/" ++ drop 8 fn) + + +moveCheckedRecord :: String -> IO () +moveCheckedRecord fn = E.handle (\(e :: SomeException) -> warningM "REPLAYS" $ show e) $ + renameFile fn ("checked/" ++ drop 8 fn) diff -r d5d5e1698554 -r 1dedcc37bfe8 gameServer/OfficialServer/checker.hs --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gameServer/OfficialServer/checker.hs Fri Feb 22 05:05:32 2013 +0100 @@ -0,0 +1,171 @@ +{-# LANGUAGE CPP, ScopedTypeVariables, OverloadedStrings #-} +module Main where + +import qualified Control.Exception as Exception +import System.IO +import System.Log.Logger +import qualified Data.ConfigFile as CF +import Control.Monad.Error +import System.Directory +import Control.Monad.State +import Control.Concurrent.Chan +import Control.Concurrent +import Network +import Network.BSD +import Network.Socket hiding (recv) +import Network.Socket.ByteString +import qualified Data.ByteString.Char8 as B +import qualified Data.ByteString as BW +import qualified Codec.Binary.Base64 as Base64 +import System.Process +import Data.Maybe +import qualified Data.List as L +#if !defined(mingw32_HOST_OS) +import System.Posix +#endif + +data Message = Packet [B.ByteString] + | CheckFailed B.ByteString + | CheckSuccess [B.ByteString] + deriving Show + +serverAddress = "netserver.hedgewars.org" +protocolNumber = "43" + + +engineListener :: Chan Message -> Handle -> IO () +engineListener coreChan h = do + output <- liftM lines $ hGetContents h + debugM "Engine" $ show output + if isNothing $ L.find start output then + writeChan coreChan $ CheckFailed "No stats msg" + else + writeChan coreChan $ CheckSuccess [] + where + start = flip L.elem ["WINNERS", "DRAW"] + + +checkReplay :: Chan Message -> [B.ByteString] -> IO () +checkReplay coreChan msgs = do + tempDir <- getTemporaryDirectory + (fileName, h) <- openBinaryTempFile tempDir "checker-demo" + B.hPut h . BW.pack . concat . map (fromJust . Base64.decode . B.unpack) $ msgs + hFlush h + hClose h + + (_, Just hOut, _, _) <- createProcess (proc "/usr/home/unC0Rr/Sources/Hedgewars/Releases/0.9.18/bin/hwengine" + ["/usr/home/unC0Rr/.hedgewars" + , "/usr/home/unC0Rr/Sources/Hedgewars/Releases/0.9.18/share/hedgewars/Data" + , fileName + , "--set-audio" + , "0" + , "0" + , "0" + ]) + {std_out = CreatePipe} + hSetBuffering hOut LineBuffering + void $ forkIO $ engineListener coreChan hOut + + +takePacks :: State B.ByteString [[B.ByteString]] +takePacks = do + modify (until (not . B.isPrefixOf pDelim) (B.drop 2)) + packet <- state $ B.breakSubstring pDelim + buf <- get + if B.null buf then put packet >> return [] else + if B.null packet then return [] else do + packets <- takePacks + return (B.splitWith (== '\n') packet : packets) + where + pDelim = "\n\n" + + +recvLoop :: Socket -> Chan Message -> IO () +recvLoop s chan = + ((receiveWithBufferLoop B.empty >> return "Connection closed") + `Exception.catch` (\(e :: Exception.SomeException) -> return . B.pack . show $ e) + ) + >>= disconnected + where + disconnected msg = writeChan chan $ Packet ["BYE", msg] + receiveWithBufferLoop recvBuf = do + recvBS <- recv s 4096 + unless (B.null recvBS) $ do + let (packets, newrecvBuf) = runState takePacks $ B.append recvBuf recvBS + forM_ packets sendPacket + receiveWithBufferLoop $ B.copy newrecvBuf + + sendPacket packet = writeChan chan $ Packet packet + + +session :: B.ByteString -> B.ByteString -> Socket -> IO () +session l p s = do + noticeM "Core" "Connected" + coreChan <- newChan + forkIO $ recvLoop s coreChan + forever $ do + p <- readChan coreChan + case p of + Packet p -> do + debugM "Network" $ "Recv: " ++ show p + onPacket coreChan p + CheckFailed msg -> do + warningM "Check" "Check failed" + answer ["CHECKED", "FAIL", msg] + answer ["READY"] + CheckSuccess msgs -> do + warningM "Check" "Check succeeded" + answer ("CHECKED" : "OK" : msgs) + answer ["READY"] + where + answer :: [B.ByteString] -> IO () + answer p = do + debugM "Network" $ "Send: " ++ show p + sendAll s $ B.unlines p `B.snoc` '\n' + onPacket :: Chan Message -> [B.ByteString] -> IO () + onPacket _ ("CONNECTED":_) = do + answer ["CHECKER", protocolNumber, l, p] + answer ["READY"] + onPacket _ ["PING"] = answer ["PONG"] + onPacket chan ("REPLAY":msgs) = do + checkReplay chan msgs + warningM "Check" "Started check" + onPacket _ ("BYE" : xs) = error $ show xs + onPacket _ _ = return () + + +main :: IO () +main = withSocketsDo $ do +#if !defined(mingw32_HOST_OS) + installHandler sigPIPE Ignore Nothing + installHandler sigCHLD Ignore Nothing +#endif + + updateGlobalLogger "Core" (setLevel DEBUG) + updateGlobalLogger "Network" (setLevel DEBUG) + updateGlobalLogger "Check" (setLevel DEBUG) + updateGlobalLogger "Engine" (setLevel DEBUG) + + Right (login, password) <- runErrorT $ do + d <- liftIO $ getHomeDirectory + conf <- join . liftIO . CF.readfile CF.emptyCP $ d ++ "/.hedgewars/hedgewars.ini" + l <- CF.get conf "net" "nick" + p <- CF.get conf "net" "passwordhash" + return (B.pack l, B.pack p) + + + Exception.bracket + setupConnection + (\s -> noticeM "Core" "Shutting down" >> sClose s) + (session login password) + where + setupConnection = do + noticeM "Core" "Connecting to the server..." + + proto <- getProtocolNumber "tcp" + let hints = defaultHints { addrFlags = [AI_ADDRCONFIG, AI_CANONNAME] } + (addr:_) <- getAddrInfo (Just hints) (Just serverAddress) Nothing + let (SockAddrInet _ host) = addrAddress addr + sock <- socket AF_INET Stream proto + connect sock (SockAddrInet 46631 host) + return sock diff -r d5d5e1698554 -r 1dedcc37bfe8 gameServer/RoomsAndClients.hs --- a/gameServer/RoomsAndClients.hs Sun Nov 18 01:06:01 2012 +0400 +++ b/gameServer/RoomsAndClients.hs Fri Feb 22 05:05:32 2013 +0100 @@ -23,6 +23,7 @@ room'sM, allClientsM, clientsM, + roomsM, roomClientsM, roomClientsIndicesM, withRoomsAndClients, @@ -160,6 +161,9 @@ clientsM :: MRoomsAndClients r c -> IO [c] clientsM (MRoomsAndClients (_, clients)) = indicesM clients >>= mapM (liftM client' . readElem clients) +roomsM :: MRoomsAndClients r c -> IO [r] +roomsM (MRoomsAndClients (rooms, _)) = indicesM rooms >>= mapM (liftM room' . readElem rooms) + roomClientsIndicesM :: MRoomsAndClients r c -> RoomIndex -> IO [ClientIndex] roomClientsIndicesM (MRoomsAndClients (rooms, _)) (RoomIndex ri) = liftM roomClients' (rooms `readElem` ri) diff -r d5d5e1698554 -r 1dedcc37bfe8 gameServer/ServerState.hs --- a/gameServer/ServerState.hs Sun Nov 18 01:06:01 2012 +0400 +++ b/gameServer/ServerState.hs Fri Feb 22 05:05:32 2013 +0100 @@ -5,6 +5,7 @@ ServerState(..), client's, allClientsS, + allRoomsS, roomClientsS, sameProtoClientsS, io @@ -40,6 +41,9 @@ allClientsS :: StateT ServerState IO [ClientInfo] allClientsS = gets roomsClients >>= liftIO . clientsM +allRoomsS :: StateT ServerState IO [RoomInfo] +allRoomsS = gets roomsClients >>= liftIO . roomsM + roomClientsS :: RoomIndex -> StateT ServerState IO [ClientInfo] roomClientsS ri = do rnc <- gets roomsClients @@ -49,6 +53,6 @@ sameProtoClientsS p = liftM f allClientsS where f = filter (\c -> clientProto c == p) - + io :: IO a -> StateT ServerState IO a io = liftIO diff -r d5d5e1698554 -r 1dedcc37bfe8 gameServer/Utils.hs --- a/gameServer/Utils.hs Sun Nov 18 01:06:01 2012 +0400 +++ b/gameServer/Utils.hs Fri Feb 22 05:05:32 2013 +0100 @@ -118,10 +118,10 @@ cutHost = B.intercalate "." . flip (++) ["*","*"] . List.take 2 . B.split '.' caseInsensitiveCompare :: B.ByteString -> B.ByteString -> Bool -caseInsensitiveCompare a b = f a == f b - where - f = map Char.toUpper . UTF8.toString +caseInsensitiveCompare a b = upperCase a == upperCase b +upperCase :: B.ByteString -> B.ByteString +upperCase = UTF8.fromString . map Char.toUpper . UTF8.toString roomInfo :: B.ByteString -> RoomInfo -> [B.ByteString] roomInfo n r = [ @@ -134,3 +134,6 @@ head (Map.findWithDefault ["Default"] "SCHEME" (params r)), head (Map.findWithDefault ["Default"] "AMMO" (params r)) ] + +loc :: B.ByteString -> B.ByteString +loc = id diff -r d5d5e1698554 -r 1dedcc37bfe8 hedgewars/ArgParsers.inc --- a/hedgewars/ArgParsers.inc Sun Nov 18 01:06:01 2012 +0400 +++ b/hedgewars/ArgParsers.inc Fri Feb 22 05:05:32 2013 +0100 @@ -16,232 +16,333 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA *) +procedure GciEasterEgg; +begin + WriteLn(stdout, ' '); + WriteLn(stdout, ' /\\\\\\\\\\\\ /\\\\\\\\\ /\\\\\\\\\\\ '); + WriteLn(stdout, ' /\\\////////// /\\\//////// \/////\\\/// '); + WriteLn(stdout, ' /\\\ /\\\/ \/\\\ '); + WriteLn(stdout, ' \/\\\ /\\\\\\\ /\\\ \/\\\ '); + WriteLn(stdout, ' \/\\\ \/////\\\ \/\\\ \/\\\ '); + WriteLn(stdout, ' \/\\\ \/\\\ \//\\\ \/\\\ '); + WriteLn(stdout, ' \/\\\ \/\\\ \///\\\ \/\\\ '); + WriteLn(stdout, ' \/\\\\\\\\\\\\\/ \////\\\\\\\\\ /\\\\\\\\\\\ '); + WriteLn(stdout, ' \///////////// \///////// \/////////// '); + WriteLn(stdout, ' '); + WriteLn(stdout, ' Command Line Parser Implementation by a Google Code-In Student '); + WriteLn(stdout, ' ASCII Art easter egg idea by @sheepluva '); + WriteLn(stdout, ' '); +end; -procedure internalStartGameWithParameters(); -var tmp: LongInt; +procedure DisplayUsage; +begin + WriteLn(stdout, 'Usage: hwengine [options]'); + WriteLn(stdout, ''); + WriteLn(stdout, 'where [options] can be any of the following:'); + WriteLn(stdout, ' --prefix [path to folder]'); + WriteLn(stdout, ' --user-prefix [path to folder]'); + WriteLn(stdout, ' --locale [name of language file]'); + WriteLn(stdout, ' --nick [string]'); + WriteLn(stdout, ' --fullscreen-width [fullscreen width in pixels]'); + WriteLn(stdout, ' --fullscreen-height [fullscreen height in pixels]'); + WriteLn(stdout, ' --width [window width in pixels]'); + WriteLn(stdout, ' --height [window height in pixels]'); + WriteLn(stdout, ' --volume [sound level]'); + WriteLn(stdout, ' --frame-interval [milliseconds]'); + Writeln(stdout, ' --stereo [value]'); + WriteLn(stdout, ' --raw-quality [flags]'); + WriteLn(stdout, ' --low-quality'); + WriteLn(stdout, ' --nomusic'); + WriteLn(stdout, ' --nosound'); + WriteLn(stdout, ' --fullscreen'); + WriteLn(stdout, ' --showfps'); + WriteLn(stdout, ' --altdmg'); + WriteLn(stdout, ' --stats-only'); + WriteLn(stdout, ' --help'); + WriteLn(stdout, ''); + WriteLn(stdout, 'For more detailed help and examples go to:'); + WriteLn(stdout, 'http://code.google.com/p/hedgewars/wiki/CommandLineOptions'); + GameType:= gmtSyntax; +end; + +procedure setDepth(var paramIndex: LongInt); +begin + WriteLn(stdout, 'WARNING: --depth is a deprecated command, which could be removed in a future version!'); + WriteLn(stdout, ' This option no longer does anything, please consider removing it'); + WriteLn(stdout, ''); + inc(ParamIndex); +end; + +procedure statsOnlyGame; +begin + cOnlyStats:= true; + cReducedQuality:= $FFFFFFFF xor rqLowRes; + SetSound(false); + SetMusic(false); + SetVolume(0); +end; + +procedure setIpcPort(port: LongInt; var wrongParameter:Boolean); begin - UserPathPrefix:= ParamStr(1); - cScreenWidth:= StrToInt(ParamStr(2)); - cScreenHeight:= StrToInt(ParamStr(3)); - cBits:= StrToInt(ParamStr(4)); - ipcPort:= StrToInt(ParamStr(5)); - cFullScreen:= ParamStr(6) = '1'; - SetSound(ParamStr(7) = '1'); - SetMusic(ParamStr(8) = '1'); - SetVolume(StrToInt(ParamStr(9))); - cTimerInterval:= StrToInt(ParamStr(10)); - PathPrefix:= ParamStr(11); - cShowFPS:= ParamStr(12) = '1'; - cAltDamage:= ParamStr(13) = '1'; - UserNick:= DecodeBase64(ParamStr(14)); - cReducedQuality:= StrToInt(ParamStr(15)); - tmp:= StrToInt(ParamStr(16)); + if isInternal then + ipcPort := port + else + begin + WriteLn(stderr, 'ERROR: use of --port is not allowed'); + wrongParameter := true; + end +end; + +function parseNick(nick: String): String; +begin + if isInternal then + parseNick:= DecodeBase64(nick) + else + parseNick:= nick; +end; + +procedure setStereoMode(tmp: LongInt); +begin GrayScale:= false; - if (tmp > 9) and (tmp < 16) then +{$IFDEF USE_S3D_RENDERING} + if (tmp > 6) and (tmp < 13) then begin + // set the gray anaglyph rendering GrayScale:= true; - cStereoMode:= TStereoMode(max(0, min(ord(high(TStereoMode)), tmp-9))) + cStereoMode:= TStereoMode(max(0, min(ord(high(TStereoMode)), tmp-6))) end - else if tmp <= 9 then + else if tmp <= 6 then + // set the fullcolor anaglyph cStereoMode:= TStereoMode(max(0, min(ord(high(TStereoMode)), tmp))) - else + else + // any other mode cStereoMode:= TStereoMode(max(0, min(ord(high(TStereoMode)), tmp-6))); - cLocaleFName:= ParamStr(17); +{$ELSE} + tmp:= tmp; + cStereoMode:= smNone; +{$ENDIF} +end; + +procedure startVideoRecording(var paramIndex: LongInt); +begin + // Silence the hint that appears when USE_VIDEO_RECORDING is not defined + paramIndex:= paramIndex; +{$IFDEF USE_VIDEO_RECORDING} + GameType:= gmtRecord; + inc(paramIndex); + cVideoFramerateNum:= StrToInt(ParamStr(paramIndex)); inc(paramIndex); + cVideoFramerateDen:= StrToInt(ParamStr(paramIndex)); inc(paramIndex); + RecPrefix:= ParamStr(paramIndex); inc(paramIndex); + cAVFormat:= ParamStr(paramIndex); inc(paramIndex); + cVideoCodec:= ParamStr(paramIndex); inc(paramIndex); + cVideoQuality:= StrToInt(ParamStr(paramIndex)); inc(paramIndex); + cAudioCodec:= ParamStr(paramIndex); inc(paramIndex); +{$ENDIF} +end; + +function getLongIntParameter(str:String; var paramIndex:LongInt; var wrongParameter:Boolean): LongInt; +var tmpInt, c: LongInt; +begin + inc(paramIndex); + val(str, tmpInt, c); + wrongParameter:= c <> 0; + if wrongParameter then + WriteLn(stderr, 'ERROR: '+ParamStr(paramIndex-1)+' expects a number, you passed "'+str+'"'); + getLongIntParameter:= tmpInt; +end; + +function getStringParameter(str:String; var paramIndex:LongInt; var wrongParameter:Boolean): String; +begin + inc(paramIndex); + wrongParameter:= (str='') or (Copy(str,1,2) = '--'); + if wrongParameter then + WriteLn(stderr, 'ERROR: '+ParamStr(paramIndex-1)+' expects a string, you passed "'+str+'"'); + getStringParameter:= str; end; -{$IFDEF USE_VIDEO_RECORDING} -procedure internalStartVideoRecordingWithParameters(); + +procedure parseClassicParameter(cmdArray: Array of String; size:LongInt; var paramIndex:LongInt); Forward; + +function parseParameter(cmd:String; arg:String; var paramIndex:LongInt): Boolean; +const videoArray: Array [1..5] of String = ('--fullscreen-width','--fullscreen-height', '--width', '--height', '--depth'); + audioArray: Array [1..3] of String = ('--volume','--nomusic','--nosound'); + otherArray: Array [1..3] of String = ('--locale','--fullscreen','--showfps'); + mediaArray: Array [1..10] of String = ('--fullscreen-width', '--fullscreen-height', '--width', '--height', '--depth', '--volume','--nomusic','--nosound','--locale','--fullscreen'); + allArray: Array [1..14] of String = ('--fullscreen-width','--fullscreen-height', '--width', '--height', '--depth','--volume','--nomusic','--nosound','--locale','--fullscreen','--showfps','--altdmg','--frame-interval','--low-quality'); + reallyAll: array[0..30] of shortstring = ( + '--prefix', '--user-prefix', '--locale', '--fullscreen-width', '--fullscreen-height', '--width', + '--height', '--frame-interval', '--volume','--nomusic', '--nosound', + '--fullscreen', '--showfps', '--altdmg', '--low-quality', '--raw-quality', '--stereo', '--nick', + {deprecated} '--depth', '--set-video', '--set-audio', '--set-other', '--set-multimedia', '--set-everything', + {internal} '--internal', '--port', '--recorder', '--landpreview', + {misc} '--stats-only', '--gci', '--help'); +var cmdIndex: byte; +begin + parseParameter:= false; + cmdIndex:= 0; + + //NOTE: Any update to the list of parameters must be reflected in the case statement below, the reallyAll array above, + // the the DisplayUsage() procedure, the HWForm::getDemoArguments() function, and the online wiki + + while (cmdIndex <= High(reallyAll)) and (cmd <> reallyAll[cmdIndex]) do inc(cmdIndex); + case cmdIndex of + {--prefix} 0 : PathPrefix := getStringParameter (arg, paramIndex, parseParameter); + {--user-prefix} 1 : UserPathPrefix := getStringParameter (arg, paramIndex, parseParameter); + {--locale} 2 : cLocaleFName := getStringParameter (arg, paramIndex, parseParameter); + {--fullscreen-width} 3 : cFullscreenWidth := getLongIntParameter(arg, paramIndex, parseParameter); + {--fullscreen-height} 4 : cFullscreenHeight := getLongIntParameter(arg, paramIndex, parseParameter); + {--width} 5 : cWindowedWidth := getLongIntParameter(arg, paramIndex, parseParameter); + {--height} 6 : cWindowedHeight := getLongIntParameter(arg, paramIndex, parseParameter); + {--frame-interval} 7 : cTimerInterval := getLongIntParameter(arg, paramIndex, parseParameter); + {--volume} 8 : SetVolume ( getLongIntParameter(arg, paramIndex, parseParameter) ); + {--nomusic} 9 : SetMusic ( false ); + {--nosound} 10 : SetSound ( false ); + {--fullscreen} 11 : cFullScreen := true; + {--showfps} 12 : cShowFPS := true; + {--altdmg} 13 : cAltDamage := true; + {--low-quality} 14 : cReducedQuality := $FFFFFFFF xor rqLowRes; + {--raw-quality} 15 : cReducedQuality := getLongIntParameter(arg, paramIndex, parseParameter); + {--stereo} 16 : setStereoMode ( getLongIntParameter(arg, paramIndex, parseParameter) ); + {--nick} 17 : UserNick := parseNick( getStringParameter(arg, paramIndex, parseParameter) ); + {deprecated options} + {--depth} 18 : setDepth(paramIndex); + {--set-video} 19 : parseClassicParameter(videoArray,5,paramIndex); + {--set-audio} 20 : parseClassicParameter(audioArray,3,paramIndex); + {--set-other} 21 : parseClassicParameter(otherArray,3,paramIndex); + {--set-multimedia} 22 : parseClassicParameter(mediaArray,10,paramIndex); + {--set-everything} 23 : parseClassicParameter(allArray,14,paramIndex); + {"internal" options} + {--internal} 24 : {$IFDEF HWLIBRARY}isInternal:= true{$ENDIF}; + {--port} 25 : setIpcPort( getLongIntParameter(arg, paramIndex, parseParameter), parseParameter ); + {--recorder} 26 : startVideoRecording(paramIndex); + {--landpreview} 27 : GameType := gmtLandPreview; + {anything else} + {--stats-only} 28 : statsOnlyGame(); + {--gci} 29 : GciEasterEgg(); + {--help} 30 : DisplayUsage(); + else + begin + //Asusme the first "non parameter" is the replay file, anything else is invalid + if (recordFileName = '') and (Copy(cmd,1,2) <> '--') then + recordFileName := cmd + else + begin + WriteLn(stderr, '"'+cmd+'" is not a valid option'); + parseParameter:= true; + end; + end; + end; +end; + +procedure parseClassicParameter(cmdArray: Array of String; size:LongInt; var paramIndex:LongInt); +var index, tmpInt: LongInt; + isBool, isValid: Boolean; + cmd, arg, newSyntax: String; begin - internalStartGameWithParameters(); - GameType:= gmtRecord; - cVideoFramerateNum:= StrToInt(ParamStr(18)); - cVideoFramerateDen:= StrToInt(ParamStr(19)); - RecPrefix:= ParamStr(20); - cAVFormat:= ParamStr(21); - cVideoCodec:= ParamStr(22); - cVideoQuality:= StrToInt(ParamStr(23)); - cAudioCodec:= ParamStr(24); + WriteLn(stdout, 'WARNING: you are using a deprecated command, which could be removed in a future version!'); + WriteLn(stdout, ' Consider updating to the latest syntax, which is much more flexible!'); + WriteLn(stdout, ' Run `hwegine --help` to learn it!'); + WriteLn(stdout, ''); + + index:= 0; + tmpInt:= 1; + while (index < size) do + begin + newSyntax:= ''; + inc(paramIndex); + cmd:= cmdArray[index]; + arg:= ParamStr(paramIndex); + isValid:= (cmd<>'--depth'); + + // check if the parameter is a boolean one + isBool:= (cmd = '--nomusic') or (cmd = '--nosound') or (cmd = '--fullscreen') or (cmd = '--showfps') or (cmd = '--altdmg'); + if isBool and (arg='0') then + isValid:= false; + if (cmd='--nomusic') or (cmd='--nosound') then + isValid:= not isValid; + + if isValid then + begin + parseParameter(cmd, arg, tmpInt); + newSyntax := newSyntax + cmd + ' '; + if not isBool then + newSyntax := newSyntax + arg + ' '; + end; + inc(index); + end; + + WriteLn(stdout, 'Attempted to automatically convert to the new syntax:'); + WriteLn(stdout, newSyntax); + WriteLn(stdout, ''); +end; + +procedure parseCommandLine{$IFDEF HWLIBRARY}(argc: LongInt; argv: PPChar){$ENDIF}; +var paramIndex: LongInt; + paramTotal: LongInt; + index, nextIndex: LongInt; + wrongParameter: boolean; +//var tmpInt: LongInt; +begin + paramIndex:= {$IFDEF HWLIBRARY}0{$ELSE}1{$ENDIF}; + paramTotal:= {$IFDEF HWLIBRARY}argc-1{$ELSE}ParamCount{$ENDIF}; //-1 because pascal enumeration is inclusive + (* + WriteLn(stdout, 'total parameters: ' + inttostr(paramTotal)); + tmpInt:= 0; + while (tmpInt <= paramTotal) do + begin + WriteLn(stdout, inttostr(tmpInt) + ': ' + {$IFDEF HWLIBRARY}argv[tmpInt]{$ELSE}paramCount(tmpInt){$ENDIF}); + inc(tmpInt); + end; + *) + wrongParameter:= false; + while (paramIndex <= paramTotal) do + begin + // avoid going past the number of paramTotal (esp. w/ library) + index:= paramIndex; + if index = paramTotal then nextIndex:= index + else nextIndex:= index+1; + {$IFDEF HWLIBRARY} + wrongParameter:= parseParameter( argv[index], argv[nextIndex], paramIndex); + {$ELSE} + wrongParameter:= parseParameter( ParamStr(index), ParamStr(nextIndex), paramIndex); + {$ENDIF} + inc(paramIndex); + end; + if wrongParameter = true then + GameType:= gmtSyntax; +end; + +{$IFNDEF HWLIBRARY} +procedure GetParams; +begin + isInternal:= (ParamStr(1) = '--internal'); + + UserPathPrefix := '.'; + PathPrefix := cDefaultPathPrefix; + recordFileName := ''; + parseCommandLine(); + + if (isInternal) and (ParamCount<=1) then + begin + WriteLn(stderr, '--internal should not be manually used'); + GameType := gmtSyntax; + end; + + if (not isInternal) and (recordFileName = '') then + begin + WriteLn(stderr, 'You must specify a replay file'); + GameType := gmtSyntax; + end + else if (recordFileName <> '') then + WriteLn(stdout, 'Attempting to play demo file "' + recordFilename + '"'); + + if (GameType = gmtSyntax) then + WriteLn(stderr, 'Please use --help to see possible arguments and their usage'); + + (* + WriteLn(stdout,'PathPrefix: ' + PathPrefix); + WriteLn(stdout,'UserPathPrefix: ' + UserPathPrefix); + *) end; {$ENDIF} -procedure setVideo(screenWidth: LongInt; screenHeight: LongInt; bitsStr: LongInt); -begin - cScreenWidth:= screenWidth; - cScreenHeight:= screenHeight; - cBits:= bitsStr -end; - -procedure setVideoWithParameters(screenWidthParam: string; screenHeightParam: string; bitsParam: string); -var screenWidthAsInt, screenHeightAsInt, bitsStrAsInt, c: LongInt; -begin - val(screenWidthParam, screenWidthAsInt, c); - val(screenHeightParam, screenHeightAsInt, c); - val(bitsParam, bitsStrAsInt, c); - setVideo(screenWidthAsInt,screenHeightAsInt,bitsStrAsInt) -end; - -procedure setOtherOptions(languageFile: string; fullScreen: boolean); -begin - cLocaleFName:= languageFile; - cFullScreen:= fullScreen -end; - -procedure setShowFPS(showFPS: boolean); -begin - cShowFPS:= showFPS -end; - -procedure setOtherOptionsWithParameters(languageFileParam: string; fullScreenParam: string; showFPSParam: string); -var fullScreen, showFPS: boolean; -begin - fullScreen:= fullScreenParam = '1'; - showFPS:= showFPSParam = '1'; - setOtherOptions(languageFileParam,fullScreen); - setShowFPS(showFPS) -end; - -procedure setAudio(initialVolume: LongInt; musicEnabled: boolean; soundEnabled: boolean); -begin - SetVolume(initialVolume); - SetMusic(musicEnabled); - SetSound(soundEnabled); -end; - -procedure setAudioWithParameters(initialVolumeParam: string; musicEnabledParam: string; soundEnabledParam: string); -var initialVolumeAsInt, c: LongInt; - musicEnabled, soundEnabled: boolean; -begin - val(initialVolumeParam, initialVolumeAsInt, c); - musicEnabled:= musicEnabledParam = '1'; - soundEnabled:= soundEnabledParam = '1'; - setAudio(initialVolumeAsInt,musicEnabled, soundEnabled) -end; - -procedure setMultimediaOptionsWithParameters(screenWidthParam, screenHeightParam, bitsParam: string; - initialVolumeParam, musicEnabledParam, soundEnabledParam: string; - languageFileParam, fullScreenParam: string); -begin - setVideoWithParameters(screenWidthParam,screenHeightParam, bitsParam); - setAudioWithParameters(initialVolumeParam,musicEnabledParam,soundEnabledParam); - setOtherOptions(languageFileParam,fullScreenParam = '1') -end; - -procedure setAltDamageTimerValueAndQuality(altDamage: boolean; timeIterval: LongInt; reducedQuality: boolean); -begin - cAltDamage:= altDamage; - cTimerInterval:= timeIterval; - if (reducedQuality) then //HACK - cReducedQuality:= $FFFFFFFF xor rqLowRes -end; - -procedure setAllOptionsWithParameters(screenWidthParam:string; screenHeightParam:string; bitsParam:string; - initialVolumeParam:string; musicEnabledParam:string; soundEnabledParam:string; - languageFileParam:string; fullScreenParam:string; showFPSParam:string; - altDamageParam:string; timeItervalParam:string; reducedQualityParam: string); -var showFPS, altDamage, reducedQuality: boolean; - timeIterval, c: LongInt; -begin - setMultimediaOptionsWithParameters(screenWidthParam,screenHeightParam, bitsParam, - initialVolumeParam,musicEnabledParam,soundEnabledParam, - languageFileParam,fullScreenParam); - showFPS := showFPSParam = '1'; - setShowFPS(showFPS); - - altDamage:= altDamageParam = '1'; - val(timeItervalParam, timeIterval, c); - reducedQuality:= reducedQualityParam = '1'; - setAltDamageTimerValueAndQuality(altDamage,timeIterval,reducedQuality); -end; - -procedure playReplayFileWithParameters(); -var paramIndex: LongInt; - wrongParameter: boolean; -begin - UserPathPrefix:= ParamStr(1); - PathPrefix:= ParamStr(2); - recordFileName:= ParamStr(3); - paramIndex:= 4; - wrongParameter:= false; - while (paramIndex <= ParamCount) and (not wrongParameter) do - begin - if ParamStr(paramIndex) = '--set-video' then -//--set-video [screen width] [screen height] [color dept] - begin - if(ParamCount-paramIndex < 3) then - begin - wrongParameter:= true; - GameType:= gmtSyntax - end; - setVideoWithParameters(ParamStr(paramIndex+1), ParamStr(paramIndex+2), ParamStr(paramIndex+3)); - paramIndex:= paramIndex + 4 - end - else -//--set-audio [volume] [enable music] [enable sounds] - if ParamStr(paramIndex) = '--set-audio' then - begin - if(ParamCount-paramIndex < 3) then - begin - wrongParameter := true; - GameType:= gmtSyntax - end; - setAudioWithParameters(ParamStr(paramIndex+1),ParamStr(paramIndex+2), ParamStr(paramIndex+3)); - paramIndex:= paramIndex + 4 - end - else -// --set-other [language file] [full screen] [show FPS] - if ParamStr(paramIndex) = '--set-other' then - begin - if(ParamCount-paramIndex < 3) then - begin - wrongParameter:= true; - GameType:= gmtSyntax - end; - setOtherOptionsWithParameters(ParamStr(paramIndex+1),ParamStr(paramIndex+2), ParamStr(paramIndex+3)); - paramIndex:= paramIndex + 4 - end - else -//--set-multimedia [screen width] [screen height] [color dept] [volume] [enable music] [enable sounds] [language file] [full screen] - if ParamStr(paramIndex) = '--set-multimedia' then - begin - if ParamCount-paramIndex < 8 then - begin - wrongParameter:= true; - GameType:= gmtSyntax - end; - setMultimediaOptionsWithParameters(ParamStr(paramIndex+1),ParamStr(paramIndex+2),ParamStr(paramIndex+3), - ParamStr(paramIndex+4),ParamStr(paramIndex+5),ParamStr(paramIndex+6), - ParamStr(paramIndex+7),ParamStr(paramIndex+8)); - paramIndex:= paramIndex + 9 - end - else -//--set-everything [screen width] [screen height] [color dept] [volume] [enable music] [enable sounds] [language file] [full screen] [show FPS] [alternate damage] [timer value] [reduced quality] - if ParamStr(paramIndex) = '--set-everything' then - begin - if ParamCount-paramIndex < 12 then - begin - wrongParameter:= true; - GameType:= gmtSyntax - end; - setAllOptionsWithParameters(ParamStr(paramIndex+1),ParamStr(paramIndex+2),ParamStr(paramIndex+3), - ParamStr(paramIndex+4),ParamStr(paramIndex+5),ParamStr(paramIndex+6), - ParamStr(paramIndex+7),ParamStr(paramIndex+8),ParamStr(paramIndex+9), - ParamStr(paramIndex+10),ParamStr(paramIndex+11),ParamStr(paramIndex+12)); - paramIndex:= paramIndex + 13 - end - else - if ParamStr(paramIndex) = '--stats-only' then - begin - cOnlyStats:= true; - SetSound(false); - SetMusic(false); - cReducedQuality:= $FFFFFFFF xor rqLowRes; // HACK - paramIndex:= paramIndex + 1 - end - else - begin - wrongParameter:= true; - GameType:= gmtSyntax - end - end -end; - diff -r d5d5e1698554 -r 1dedcc37bfe8 hedgewars/CMakeLists.txt --- a/hedgewars/CMakeLists.txt Sun Nov 18 01:06:01 2012 +0400 +++ b/hedgewars/CMakeLists.txt Fri Feb 22 05:05:32 2013 +0100 @@ -4,13 +4,24 @@ find_package(SDL_ttf) find_package(SDL_mixer) -include(${CMAKE_MODULE_PATH}/FindSDL_Extras.cmake) +include(${CMAKE_SOURCE_DIR}/cmake_modules/FindSDL_Extras.cmake) configure_file(${hedgewars_SOURCE_DIR}/hedgewars/config.inc.in ${CMAKE_CURRENT_BINARY_DIR}/config.inc) #SOURCE AND PROGRAMS SECTION -set(hwengine_project ${hedgewars_SOURCE_DIR}/hedgewars/hwengine.pas) -set(engine_output_name "hwengine") +if(${BUILD_ENGINE_LIBRARY}) + set(engine_output_name "${CMAKE_SHARED_LIBRARY_PREFIX}hwengine${CMAKE_SHARED_LIBRARY_SUFFIX}") + set(hwengine_project ${hedgewars_SOURCE_DIR}/hedgewars/hwLibrary.pas) +else() + set(engine_output_name "hwengine${CMAKE_EXECUTABLE_SUFFIX}") + set(hwengine_project ${hedgewars_SOURCE_DIR}/hedgewars/hwengine.pas) +endif() + +if (APPLE) + set(required_fpc_version 2.6) +else() + set(required_fpc_version 2.2) +endif() set(engine_sources ${hwengine_project} @@ -53,7 +64,6 @@ uLandTexture.pas uLocale.pas uMisc.pas - uMobile.pas uPhysFSLayer.pas uRandom.pas uRender.pas @@ -80,53 +90,34 @@ ${CMAKE_CURRENT_BINARY_DIR}/config.inc ) -if(BUILD_ENGINE_LIBRARY) - message(STATUS "Engine will be built as library (experimental)") - set(hwengine_project ${hedgewars_SOURCE_DIR}/hedgewars/hwLibrary.pas) - set(pascal_flags "-dHWLIBRARY" ${pascal_flags}) +if(${BUILD_ENGINE_LIBRARY}) + message(WARNING "Engine will be built as library (experimental)") + list(APPEND pascal_flags "-dHWLIBRARY") # create position independent code, only required for x68_64 builds, similar to -fPIC if(CMAKE_SIZEOF_VOID_P MATCHES "8") - set(pascal_flags "-Cg" ${pascal_flags}) + list(APPEND pascal_flags "-Cg") endif(CMAKE_SIZEOF_VOID_P MATCHES "8") # due to compiler/linker issues on Max OS X 10.6 -k-no_order_inits is needed to avoid linking fail - if(APPLE AND current_macosx_version GREATER "10.5") - set(pascal_flags "-k-no_order_inits" ${pascal_flags}) + if(APPLE AND current_macosx_version VERSION_GREATER "10.5") + list(APPEND pascal_flags "-k-no_order_inits") endif() - - if (APPLE) - set(engine_output_name "hwengine.dylib") - endif (APPLE) -endif(BUILD_ENGINE_LIBRARY) - -# doesn't work for some reason (doesn't find symbols) -#set(pascal_flags "-k${LIBRARY_OUTPUT_PATH}/libphysfs.a" ${pascal_flags}) - -IF(FPC) - set(fpc_executable ${FPC}) -ELSE() - find_program(fpc_executable fpc) -ENDIF() - -if(fpc_executable) - exec_program(${fpc_executable} ARGS "-iV" OUTPUT_VARIABLE fpc_output) -endif(fpc_executable) - -set(noexecstack_flags "-k-z" "-knoexecstack") -file(WRITE ${EXECUTABLE_OUTPUT_PATH}/checkstack.pas "begin end.") - -exec_program(${fpc_executable} ${EXECUTABLE_OUTPUT_PATH} - ARGS ${noexecstack_flags} checkstack.pas - OUTPUT_VARIABLE noout - RETURN_VALUE testnoexecstack - ) - -if(${testnoexecstack}) - set (noexecstack_flags "") -endif(${testnoexecstack}) + set(destination_dir ${target_library_install_dir}) +else(${BUILD_ENGINE_LIBRARY}) + set(destination_dir ${target_binary_install_dir}) +endif(${BUILD_ENGINE_LIBRARY}) +# Check Freepascal version +find_package(Freepascal) + +if (FPC_VERSION VERSION_LESS required_fpc_version) + message(FATAL_ERROR "Freepascal is too old, minimum version required is ${required_fpc_version}") +endif() + + +#DEPENDECIES AND EXECUTABLES SECTION if(APPLE) string(REGEX MATCH "[pP][pP][cC]+" powerpc_build "${CMAKE_OSX_ARCHITECTURES}") string(REGEX MATCH "[iI]386+" i386_build "${CMAKE_OSX_ARCHITECTURES}") @@ -137,68 +128,48 @@ endif() #on OSX we need to provide the SDL_main() function when building as executable - if(NOT BUILD_ENGINE_LIBRARY) + if(NOT ${BUILD_ENGINE_LIBRARY}) #let's look for the installed sdlmain file; if it is not found, let's build our own find_package(SDL REQUIRED) #remove the ";-framework Cocoa" from the SDL_LIBRARY variable - string(REGEX REPLACE "(.*);-.*" "\\1" sdl_dir "${SDL_LIBRARY}") + string(REGEX REPLACE "(.*);-.*" "\\1" sdl_library_only "${SDL_LIBRARY}") #find libsdmain.a - find_file(SDLMAIN_LIB libSDLMain.a PATHS ${sdl_dir}/Resources/) + find_file(SDLMAIN_LIB libSDLMain.a PATHS ${sdl_library_only}/Resources/) if(SDLMAIN_LIB MATCHES "SDLMAIN_LIB-NOTFOUND") include_directories(${SDL_INCLUDE_DIR}) add_library (SDLmain STATIC SDLMain.m) #add a dependency to the hwengine target - set(engine_sources ${engine_sources} SDLmain) + list(APPEND engine_sources SDLmain) set(SDLMAIN_LIB "${LIBRARY_OUTPUT_PATH}/libSDLmain.a") endif() - set(pascal_flags "-k${SDLMAIN_LIB}" ${pascal_flags}) + list(APPEND pascal_flags "-k${SDLMAIN_LIB}") endif() + + #when you have multiple ld installation make sure you get the one bundled with the compiler + get_filename_component(compiler_dir ${CMAKE_C_COMPILER} PATH) + list(APPEND pascal_flags "-FD${compiler_dir}") endif(APPLE) - -#PASCAL DETECTION SECTION -string(REGEX MATCH "[0-9]+\\.[0-9]+\\.[0-9]+" fpc_version "${fpc_output}") - -if(fpc_version) - string(REGEX REPLACE "([0-9]+)\\.[0-9]+\\.[0-9]+" "\\1" fpc_vers_major "${fpc_version}") - string(REGEX REPLACE "[0-9]+\\.([0-9]+)\\.[0-9]+" "\\1" fpc_vers_minor "${fpc_version}") - string(REGEX REPLACE "[0-9]+\\.[0-9]+\\.([0-9]+)" "\\1" fpc_vers_patch "${fpc_version}") - message(STATUS "Found Freepascal: ${fpc_executable} (version ${fpc_vers_major}.${fpc_vers_minor})") - math(EXPR fpc_version "${fpc_vers_major}*10000 + ${fpc_vers_minor}*100 + ${fpc_vers_patch}") - - if(fpc_version LESS "020200") - message(FATAL_ERROR "Minimum required version of FreePascal is 2.2.0") - elseif(APPLE AND (fpc_version LESS "020600")) - message(FATAL_ERROR "Minimum required version of FreePascal is 2.6.0 on Mac OS X") - endif() -else() - message(FATAL_ERROR "No FreePascal compiler found!") -endif() - - -#DEPENDECIES AND EXECUTABLES SECTION if(NOT NOPNG) find_package(PNG) if(${PNG_FOUND}) - set(pascal_flags "-dPNG_SCREENSHOTS" ${pascal_flags}) + list(APPEND pascal_flags "-dPNG_SCREENSHOTS") if(APPLE) # fpc png unit doesn't pull the library (see bug 21833) - set(pascal_flags "-k${PNG_LIBRARY}" ${pascal_flags}) + list(APPEND pascal_flags "-k${PNG_LIBRARY}") endif() else() - message(STATUS "Screenshots will be in BMP format because libpng was not found") + message(WARNING "Screenshots will be in BMP format because libpng was not found") endif() else() message(STATUS "Screenshots will be in BMP format per user request") endif() - #this command is a workaround to some inlining issues present in older FreePascal versions and fixed in 2.6 -if(fpc_version LESS "020600") +if(FPC_VERSION VERSION_LESS "2.6") #under some configurations CMAKE_BUILD_TOOL fails to pass on the jobserver, breaking parallel compilation - #TODO: check if this is needed on windows too if(UNIX) set(SAFE_BUILD_TOOL $(MAKE)) else() @@ -218,44 +189,50 @@ #TODO: convert avwrapper to .pas unit so we can skip this step include_directories(${FFMPEG_INCLUDE_DIR}) - set(pascal_flags "-dUSE_VIDEO_RECORDING" ${pascal_flags}) + list(APPEND pascal_flags "-dUSE_VIDEO_RECORDING") IF (WIN32) # there are some problems with linking our avwrapper as static lib, so link it as shared add_library(avwrapper SHARED avwrapper.c) target_link_libraries(avwrapper ${FFMPEG_LIBRARIES}) - install(PROGRAMS "${EXECUTABLE_OUTPUT_PATH}/${CMAKE_SHARED_LIBRARY_PREFIX}avwrapper${CMAKE_SHARED_LIBRARY_SUFFIX}" DESTINATION ${target_dir}) + install(PROGRAMS "${EXECUTABLE_OUTPUT_PATH}/${CMAKE_SHARED_LIBRARY_PREFIX}avwrapper${CMAKE_SHARED_LIBRARY_SUFFIX}" DESTINATION ${target_library_install_dir}) ELSE() add_library(avwrapper STATIC avwrapper.c) - set(pascal_flags "-k${FFMPEG_LIBAVCODEC}" "-k${FFMPEG_LIBAVFORMAT}" "-k${FFMPEG_LIBAVUTIL}" ${pascal_flags}) + list(APPEND pascal_flags "-k${FFMPEG_LIBAVCODEC}" "-k${FFMPEG_LIBAVFORMAT}" "-k${FFMPEG_LIBAVUTIL}") ENDIF() else() - message(STATUS "Could NOT find FFMPEG/LibAV, video recording will be disabled") + message(WARNING "Could NOT find FFMPEG/LibAV, video recording will be disabled") endif() else() message(STATUS "Video recording disabled by user") endif() -set(fpc_flags ${noexecstack_flags} ${pascal_flags} ${hwengine_project}) -IF(NOT APPLE) +set(fpc_flags ${NOEXECSTACK_FLAGS} ${pascal_flags} ${hwengine_project}) + +if(NOT APPLE) #here is the command for standard executables or for shared library - add_custom_command(OUTPUT "${EXECUTABLE_OUTPUT_PATH}/${engine_output_name}${CMAKE_EXECUTABLE_SUFFIX}" - COMMAND "${fpc_executable}" - ARGS ${fpc_flags} + add_custom_command(OUTPUT "${EXECUTABLE_OUTPUT_PATH}/${engine_output_name}" + COMMAND "${FPC_EXECUTABLE}" + ARGS ${fpc_flags} -o${engine_output_name} MAIN_DEPENDENCY ${hwengine_project} DEPENDS ${engine_sources} ) -ELSE() +else() #these are the dependencies for building a universal binary on Mac OS X foreach (build_arch ${powerpc_build} ${i386_build} ${x86_64_build}) - set(lipo_args_list "${EXECUTABLE_OUTPUT_PATH}/hwengine.${build_arch}" ${lipo_args_list}) + list(APPEND lipo_args_list "${EXECUTABLE_OUTPUT_PATH}/hwengine.${build_arch}") add_custom_command(OUTPUT "${EXECUTABLE_OUTPUT_PATH}/hwengine.${build_arch}" - COMMAND "${fpc_executable}" + COMMAND "${FPC_EXECUTABLE}" ARGS ${fpc_flags} -ohwengine.${build_arch} -P${build_arch} MAIN_DEPENDENCY ${hwengine_project} DEPENDS ${engine_sources} ) add_custom_target(hwengine.${build_arch} ALL DEPENDS "${EXECUTABLE_OUTPUT_PATH}/hwengine.${build_arch}") + add_custom_command(TARGET hwengine.${build_arch} POST_BUILD + COMMAND "install_name_tool" + ARGS -id @executable_path/../Frameworks/${engine_output_name} + ${EXECUTABLE_OUTPUT_PATH}/hwengine.${build_arch} + ) endforeach() add_custom_command(OUTPUT "${EXECUTABLE_OUTPUT_PATH}/${engine_output_name}" @@ -263,29 +240,28 @@ ARGS ${lipo_args_list} -create -output ${EXECUTABLE_OUTPUT_PATH}/${engine_output_name} DEPENDS ${lipo_args_list} ) -ENDIF() +endif() -add_custom_target(${engine_output_name} ALL DEPENDS "${EXECUTABLE_OUTPUT_PATH}/${engine_output_name}${CMAKE_EXECUTABLE_SUFFIX}") +add_custom_target(hwengine ALL DEPENDS "${EXECUTABLE_OUTPUT_PATH}/${engine_output_name}") #when system Lua is not found we need to compile it before engine if(NOT LUA_FOUND) - add_dependencies(${engine_output_name} lua) + add_dependencies(hwengine lua) endif() # compile physfs before engine -add_dependencies(${engine_output_name} physfs) -add_dependencies(${engine_output_name} physfsrwops) +add_dependencies(hwengine physfs) #when ffmpeg/libav is found we need to compile it before engine #TODO: convert avwrapper to .pas unit so we can skip this step if(${FFMPEG_FOUND}) - add_dependencies(${engine_output_name} avwrapper) + add_dependencies(hwengine avwrapper) endif() #this command is a workaround to some inlining issues present in older FreePascal versions and fixed in 2.6 -if((fpc_version LESS "020600") AND (NOVIDEOREC OR NOT ${FFMPEG_FOUND})) - add_dependencies(${engine_output_name} ENGINECLEAN) +if((FPC_VERSION VERSION_LESS "2.6") AND (NOVIDEOREC OR NOT ${FFMPEG_FOUND})) + add_dependencies(hwengine ENGINECLEAN) endif() -install(PROGRAMS "${EXECUTABLE_OUTPUT_PATH}/${engine_output_name}${CMAKE_EXECUTABLE_SUFFIX}" DESTINATION ${target_dir}) +install(PROGRAMS "${EXECUTABLE_OUTPUT_PATH}/${engine_output_name}" DESTINATION ${destination_dir}) diff -r d5d5e1698554 -r 1dedcc37bfe8 hedgewars/GSHandlers.inc --- a/hedgewars/GSHandlers.inc Sun Nov 18 01:06:01 2012 +0400 +++ b/hedgewars/GSHandlers.inc Fri Feb 22 05:05:32 2013 +0100 @@ -298,7 +298,7 @@ procedure doStepBomb(Gear: PGear); var i, x, y: LongInt; - dX, dY: hwFloat; + dX, dY, gdX: hwFloat; vg: PVisualGear; begin AllInactive := false; @@ -338,10 +338,11 @@ begin x := hwRound(Gear^.X); y := hwRound(Gear^.Y); + gdX:= Gear^.dX; doMakeExplosion(x, y, 20, Gear^.Hedgehog, EXPLAutoSound); for i:= 0 to 4 do begin - dX := rndSign(GetRandomf * _0_1) + Gear^.dX / 5; + dX := rndSign(GetRandomf * _0_1) + gdX / 5; dY := (GetRandomf - _3) * _0_08; FollowGear := AddGear(x, y, gtCluster, 0, dX, dY, 25) end @@ -350,10 +351,11 @@ begin x := hwRound(Gear^.X); y := hwRound(Gear^.Y); + gdX:= Gear^.dX; doMakeExplosion(x, y, 75, Gear^.Hedgehog, EXPLAutoSound); for i:= 0 to 5 do begin - dX := rndSign(GetRandomf * _0_1) + Gear^.dX / 5; + dX := rndSign(GetRandomf * _0_1) + gdX / 5; dY := (GetRandomf - _1_5) * _0_3; FollowGear:= AddGear(x, y, gtMelonPiece, 0, dX, dY, 75); FollowGear^.DirAngle := i * 60 @@ -1691,7 +1693,7 @@ end else begin - if (Gear^.Pos <> posCaseHealth) and (GameTicks and $3FF = 0) then // stir it up every second or so + if (Gear^.Pos <> posCaseHealth) and (GameTicks and $1FFF = 0) then // stir 'em up periodically begin gi := GearsList; while gi <> nil do @@ -2223,7 +2225,9 @@ begin doMakeExplosion(hwRound(Gear^.X), hwRound(Gear^.Y), 30, Gear^.Hedgehog, EXPLAutoSound); DeleteGear(Gear); - performRumble(); + with mobileRecord do + if (performRumble <> nil) and (not fastUntilLag) then + performRumble(kSystemSoundID_Vibrate); exit end; if (GameTicks and $3F) = 0 then @@ -2412,7 +2416,7 @@ //////////////////////////////////////////////////////////////////////////////// procedure doStepMortar(Gear: PGear); var - dX, dY: hwFloat; + dX, dY, gdX, gdY: hwFloat; i: LongInt; dxn, dyn: boolean; begin @@ -2423,14 +2427,16 @@ doStepFallingGear(Gear); if (Gear^.State and gstCollision) <> 0 then begin + gdX := Gear^.dX; + gdY := Gear^.dY; doMakeExplosion(hwRound(Gear^.X), hwRound(Gear^.Y), 20, Gear^.Hedgehog, EXPLAutoSound); - Gear^.dX.isNegative := not dxn; - Gear^.dY.isNegative := not dyn; + gdX.isNegative := not dxn; + gdY.isNegative := not dyn; for i:= 0 to 4 do begin - dX := Gear^.dX + (GetRandomf - _0_5) * _0_03; - dY := Gear^.dY + (GetRandomf - _0_5) * _0_03; + dX := gdX + (GetRandomf - _0_5) * _0_03; + dY := gdY + (GetRandomf - _0_5) * _0_03; AddGear(hwRound(Gear^.X), hwRound(Gear^.Y), gtCluster, 0, dX, dY, 25); end; @@ -2456,6 +2462,12 @@ Gear^.AdvBounce:= 1; HHGear := Gear^.Hedgehog^.Gear; + if HHGear = nil then + begin + DeleteGear(Gear); + exit + end; + HHGear^.State := HHGear^.State or gstNoDamage; DeleteCI(HHGear); @@ -4302,7 +4314,9 @@ Gear^.dY.isNegative := not Gear^.dY.isNegative; Gear^.doStep := @doStepSineGunShotWork; - performRumble(); + with mobileRecord do + if (performRumble <> nil) and (not fastUntilLag) then + performRumble(kSystemSoundID_Vibrate); end; //////////////////////////////////////////////////////////////////////////////// @@ -5143,6 +5157,7 @@ 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); + if gi^.Kind = gtGenericFaller then gi^.State:= gi^.State and not gstTmpFlag; gi := gi^.NextGear end; AddPickup(Gear^.Hedgehog^, a, Gear^.Power, hwRound(Gear^.X), hwRound(Gear^.Y)); @@ -5160,8 +5175,17 @@ DeleteGear(Gear); exit end; - -doStepFallingGear(Gear); +if (Gear^.State and gstTmpFlag <> 0) or (GameTicks and $7 = 0) then + begin + doStepFallingGear(Gear); + if (Gear^.State and gstInvisible <> 0) and (GameTicks and $FF = 0) and (hwRound(Gear^.X) < LongInt(leftX)) or (hwRound(Gear^.X) > LongInt(rightX)) or (hwRound(Gear^.Y) < LongInt(topY)) 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; + end end; procedure doStepCreeper(Gear: PGear); @@ -5247,12 +5271,12 @@ //////////////////////////////////////////////////////////////////////////////// procedure doStepKnife(Gear: PGear); -var ox, oy: LongInt; - la: hwFloat; - a: real; +//var ox, oy: LongInt; +// la: hwFloat; +var a: real; begin // Gear is shrunk so it can actually escape the hog without carving into the terrain - if (Gear^.Radius = 6) and (Gear^.CollisionMask = $FFFF) then Gear^.Radius:= 16; + if (Gear^.Radius = 4) and (Gear^.CollisionMask = $FFFF) then Gear^.Radius:= 7; if Gear^.Damage > 100 then Gear^.CollisionMask:= 0 else if Gear^.Damage > 30 then if GetRandom(max(4,18-Gear^.Damage div 10)) < 3 then Gear^.CollisionMask:= 0; @@ -5261,6 +5285,7 @@ if (Gear^.State and gstMoving <> 0) and (Gear^.State and gstCollision = 0) then begin DeleteCI(Gear); + Gear^.Radius:= 7; // used for damage and impact calc. needs balancing I think Gear^.Health:= hwRound(hwSqr((hwAbs(Gear^.dY)+hwAbs(Gear^.dX))*_4)); doStepFallingGear(Gear); @@ -5271,14 +5296,14 @@ end else if (Gear^.CollisionIndex = -1) and (Gear^.Timer = 0) then begin - ox:= 0; oy:= 0; + (*ox:= 0; oy:= 0; if TestCollisionYwithGear(Gear, -1) <> 0 then oy:= -1; if TestCollisionXwithGear(Gear, 1) then ox:= 1; if TestCollisionXwithGear(Gear, -1) then ox:= -1; if TestCollisionYwithGear(Gear, 1) <> 0 then oy:= 1; if Gear^.Health > 0 then PlaySound(sndRopeAttach); -(* + la:= _10000; if (ox <> 0) or (oy <> 0) then la:= CalcSlopeNearGear(Gear, ox, oy); @@ -5296,9 +5321,8 @@ Gear^.dX:= _0; Gear^.dY:= _0; Gear^.State:= Gear^.State and (not gstMoving) or gstCollision; - Gear^.Radius:= 20; + Gear^.Radius:= 16; if Gear^.Health > 0 then AmmoShove(Gear, Gear^.Health, 0); - Gear^.Radius:= 16; Gear^.Health:= 0; Gear^.Timer:= 500; AddGearCI(Gear) diff -r d5d5e1698554 -r 1dedcc37bfe8 hedgewars/SDLh.pas --- a/hedgewars/SDLh.pas Sun Nov 18 01:06:01 2012 +0400 +++ b/hedgewars/SDLh.pas Fri Feb 22 05:05:32 2013 +0100 @@ -42,8 +42,8 @@ {$linklib root} {$ELSE} {$IFNDEF ANDROID} - {$linklib pthread} - {$ENDIF} + {$linklib pthread} + {$ENDIF} {$ENDIF} {$ENDIF} diff -r d5d5e1698554 -r 1dedcc37bfe8 hedgewars/VGSHandlers.inc --- a/hedgewars/VGSHandlers.inc Sun Nov 18 01:06:01 2012 +0400 +++ b/hedgewars/VGSHandlers.inc Fri Feb 22 05:05:32 2013 +0100 @@ -697,7 +697,9 @@ Gear^.doStep:= @doStepBigExplosionWork; if Steps > 1 then Gear^.doStep(Gear, Steps-1); -performRumble(); +with mobileRecord do + if (performRumble <> nil) and (not fastUntilLag) then + performRumble(kSystemSoundID_Vibrate); end; procedure doStepChunk(Gear: PVisualGear; Steps: Longword); diff -r d5d5e1698554 -r 1dedcc37bfe8 hedgewars/avwrapper.c --- a/hedgewars/avwrapper.c Sun Nov 18 01:06:01 2012 +0400 +++ b/hedgewars/avwrapper.c Fri Feb 22 05:05:32 2013 +0100 @@ -22,6 +22,7 @@ #include #include #include "libavformat/avformat.h" +#include "libavutil/mathematics.h" #ifndef AVIO_FLAG_WRITE #define AVIO_FLAG_WRITE AVIO_WRONLY @@ -47,13 +48,6 @@ static int16_t* g_pSamples; static int g_NumSamples; -/* -Initially I wrote code for latest ffmpeg, but on Linux (Ubuntu) -only older version is available from repository. That's why you see here -all of this #if LIBAVCODEC_VERSION_MAJOR < 54. -Actually, it may be possible to remove code for newer version -and use only code for older version. -*/ #if LIBAVCODEC_VERSION_MAJOR < 54 #define OUTBUFFER_SIZE 200000 @@ -65,7 +59,7 @@ static void FatalError(const char* pFmt, ...) { - const char Buffer[1024]; + char Buffer[1024]; va_list VaArgs; va_start(VaArgs, pFmt); @@ -83,7 +77,7 @@ // (there is mutex in AddFileLogRaw). static void LogCallback(void* p, int Level, const char* pFmt, va_list VaArgs) { - const char Buffer[1024]; + char Buffer[1024]; vsnprintf(Buffer, 1024, pFmt, VaArgs); AddFileLogRaw(Buffer); @@ -91,7 +85,7 @@ static void Log(const char* pFmt, ...) { - const char Buffer[1024]; + char Buffer[1024]; va_list VaArgs; va_start(VaArgs, pFmt); @@ -103,7 +97,7 @@ static void AddAudioStream() { -#if LIBAVFORMAT_VERSION_MAJOR >= 54 +#if LIBAVFORMAT_VERSION_MAJOR >= 53 g_pAStream = avformat_new_stream(g_pContainer, g_pACodec); #else g_pAStream = av_new_stream(g_pContainer, 1); @@ -175,7 +169,7 @@ int NumSamples = fread(g_pSamples, 2*g_Channels, g_NumSamples, g_pSoundFile); -#if LIBAVCODEC_VERSION_MAJOR >= 54 +#if LIBAVCODEC_VERSION_MAJOR >= 53 AVFrame* pFrame = NULL; if (NumSamples > 0) { @@ -215,7 +209,7 @@ // add a video output stream static void AddVideoStream() { -#if LIBAVFORMAT_VERSION_MAJOR >= 54 +#if LIBAVFORMAT_VERSION_MAJOR >= 53 g_pVStream = avformat_new_stream(g_pContainer, g_pVCodec); #else g_pVStream = av_new_stream(g_pContainer, 0); @@ -254,7 +248,7 @@ if (g_pFormat->flags & AVFMT_GLOBALHEADER) g_pVideo->flags |= CODEC_FLAG_GLOBAL_HEADER; -#if LIBAVCODEC_VERSION_MAJOR < 54 +#if LIBAVCODEC_VERSION_MAJOR < 53 // for some versions of ffmpeg x264 options must be set explicitly if (strcmp(g_pVCodec->name, "libx264") == 0) { diff -r d5d5e1698554 -r 1dedcc37bfe8 hedgewars/config.inc.in --- a/hedgewars/config.inc.in Sun Nov 18 01:06:01 2012 +0400 +++ b/hedgewars/config.inc.in Fri Feb 22 05:05:32 2013 +0100 @@ -24,3 +24,4 @@ const cNetProtoVersion = ${HEDGEWARS_PROTO_VER}; cVersionString = '${HEDGEWARS_VERSION}'; cLuaLibrary = '${LUA_LIBRARY}'; + cDefaultPathPrefix = '${CMAKE_INSTALL_PREFIX}/${SHAREPATH}/Data'; diff -r d5d5e1698554 -r 1dedcc37bfe8 hedgewars/hwengine.pas --- a/hedgewars/hwengine.pas Sun Nov 18 01:06:01 2012 +0400 +++ b/hedgewars/hwengine.pas Fri Feb 22 05:05:32 2013 +0100 @@ -32,18 +32,19 @@ uses SDLh, uMisc, uConsole, uGame, uConsts, uLand, uAmmos, uVisualGears, uGears, uStore, uWorld, uInputHandler , uSound, uScript, uTeams, uStats, uIO, uLocale, uChat, uAI, uAIMisc, uAILandMarks, uLandTexture, uCollisions , SysUtils, uTypes, uVariables, uCommands, uUtils, uCaptions, uDebug, uCommandHandlers, uLandPainted - , uPhysFSLayer + , uPhysFSLayer, uCursor {$IFDEF USE_VIDEO_RECORDING}, uVideoRec {$ENDIF} {$IFDEF USE_TOUCH_INTERFACE}, uTouch {$ENDIF} {$IFDEF ANDROID}, GLUnit{$ENDIF} ; +var isInternal: Boolean; {$IFDEF HWLIBRARY} procedure preInitEverything(); procedure initEverything(complete:boolean); procedure freeEverything(complete:boolean); -procedure Game(gameArgs: PPChar); cdecl; export; +procedure Game(argc: LongInt; argv: PPChar); cdecl; export; procedure GenLandPreview(port: Longint); cdecl; export; implementation @@ -53,6 +54,8 @@ procedure freeEverything(complete:boolean); forward; {$ENDIF} +{$INCLUDE "ArgParsers.inc"} + /////////////////////////////////////////////////////////////////////////////// function DoTimer(Lag: LongInt): boolean; var s: shortstring; @@ -91,15 +94,15 @@ end; gsConfirm, gsGame: begin - DrawWorld(Lag); + if not cOnlyStats then DrawWorld(Lag); DoGameTick(Lag); - ProcessVisualGears(Lag); + if not cOnlyStats then ProcessVisualGears(Lag); end; gsChat: begin - DrawWorld(Lag); + if not cOnlyStats then DrawWorld(Lag); DoGameTick(Lag); - ProcessVisualGears(Lag); + if not cOnlyStats then ProcessVisualGears(Lag); end; gsExit: begin @@ -109,7 +112,7 @@ exit(false); end; - SwapBuffers; + if not cOnlyStats then SwapBuffers; {$IFDEF USE_VIDEO_RECORDING} if flagPrerecording then @@ -217,7 +220,13 @@ ProcessKey(event.key); SDL_MOUSEBUTTONDOWN: - ProcessMouse(event.button, true); + if GameState = gsConfirm then + begin + resetPosition(); + ParseCommand('quit', true); + end + else + ProcessMouse(event.button, true); SDL_MOUSEBUTTONUP: ProcessMouse(event.button, false); @@ -255,18 +264,24 @@ end; //end case event.type_ of end; //end while SDL_PollEvent(@event) <> 0 do + if (CursorMovementX <> 0) or (CursorMovementY <> 0) then + handlePositionUpdate(CursorMovementX * cameraKeyboardSpeed, CursorMovementY * cameraKeyboardSpeed); + if (cScreenResizeDelay <> 0) and (cScreenResizeDelay < RealTicks) and ((cNewScreenWidth <> cScreenWidth) or (cNewScreenHeight <> cScreenHeight)) then begin cScreenResizeDelay:= 0; - cScreenWidth:= cNewScreenWidth; - cScreenHeight:= cNewScreenHeight; + cWindowedWidth:= cNewScreenWidth; + cWindowedHeight:= cNewScreenHeight; + cScreenWidth:= cWindowedWidth; + cScreenHeight:= cWindowedHeight; ParseCommand('fullscr '+intToStr(LongInt(cFullScreen)), true); WriteLnToConsole('window resize: ' + IntToStr(cScreenWidth) + ' x ' + IntToStr(cScreenHeight)); ScriptOnScreenResize(); InitCameraBorders(); InitTouchInterface(); + SendIPC('W' + IntToStr(cScreenWidth) + 'x' + IntToStr(cScreenHeight)); end; CurrTime:= SDL_GetTicks(); @@ -314,29 +329,16 @@ {$ENDIF} /////////////////////////////////////////////////////////////////////////////// -procedure Game{$IFDEF HWLIBRARY}(gameArgs: PPChar); cdecl; export{$ENDIF}; -var p: TPathType; - s: shortstring; +procedure Game{$IFDEF HWLIBRARY}(argc: LongInt; argv: PPChar); cdecl; export{$ENDIF}; +//var p: TPathType; +var s: shortstring; i: LongInt; begin {$IFDEF HWLIBRARY} preInitEverything(); - cShowFPS:= {$IFDEF DEBUGFILE}true{$ELSE}false{$ENDIF}; - ipcPort:= StrToInt(gameArgs[0]); - cScreenWidth:= StrToInt(gameArgs[1]); - cScreenHeight:= StrToInt(gameArgs[2]); - cReducedQuality:= StrToInt(gameArgs[3]); - cLocaleFName:= gameArgs[4]; - UserNick:= gameArgs[5]; - SetSound(gameArgs[6] = '1'); - SetMusic(gameArgs[7] = '1'); - cAltDamage:= gameArgs[8] = '1'; - PathPrefix:= gameArgs[9]; - UserPathPrefix:= '../Documents'; - recordFileName:= gameArgs[10]; + parseCommandLine(argc, argv); {$ENDIF} initEverything(true); - WriteLnToConsole('Hedgewars ' + cVersionString + ' engine (network protocol: ' + inttostr(cNetProtoVersion) + ')'); AddFileLog('Prefix: "' + PathPrefix +'"'); AddFileLog('UserPrefix: "' + UserPathPrefix +'"'); @@ -345,7 +347,7 @@ AddFileLog(inttostr(i) + ': ' + ParamStr(i)); WriteToConsole('Init SDL... '); - SDLTry(SDL_Init(SDL_INIT_VIDEO or SDL_INIT_NOPARACHUTE) >= 0, true); + if not cOnlyStats then SDLTry(SDL_Init(SDL_INIT_VIDEO or SDL_INIT_NOPARACHUTE) >= 0, true); WriteLnToConsole(msgOK); SDL_EnableUNICODE(1); @@ -437,7 +439,6 @@ begin uUtils.initModule(complete); // opens the debug file, must be the first uVariables.initModule; // inits all global variables - uConsole.initModule; // opens stdout uCommands.initModule; // helps below uCommandHandlers.initModule; // registers all messages from frontend @@ -508,7 +509,6 @@ uCommandHandlers.freeModule; uCommands.freeModule; - uConsole.freeModule; // closes stdout uVariables.freeModule; uUtils.freeModule; // closes debug file end; @@ -536,60 +536,6 @@ end; {$IFNDEF HWLIBRARY} -/////////////////////////////////////////////////////////////////////////////// -procedure DisplayUsage; -var i: LongInt; -begin - WriteLn(stdout, 'Wrong argument format: correct configurations is'); - WriteLn(stdout, ''); - WriteLn(stdout, ' hwengine [options]'); - WriteLn(stdout, ''); - WriteLn(stdout, 'where [options] must be specified either as:'); - WriteLn(stdout, ' --set-video [screen width] [screen height] [color dept]'); - WriteLn(stdout, ' --set-audio [volume] [enable music] [enable sounds]'); - WriteLn(stdout, ' --set-other [language file] [full screen] [show FPS]'); - WriteLn(stdout, ' --set-multimedia [screen width] [screen height] [color dept] [volume] [enable music] [enable sounds] [language file] [full screen]'); - WriteLn(stdout, ' --set-everything [screen width] [screen height] [color dept] [volume] [enable music] [enable sounds] [language file] [full screen] [show FPS] [alternate damage] [timer value] [reduced quality]'); - WriteLn(stdout, ' --stats-only'); - WriteLn(stdout, ''); - WriteLn(stdout, 'Read documentation online at http://code.google.com/p/hedgewars/wiki/CommandLineOptions for more information'); - WriteLn(stdout, ''); - Write(stdout, 'PARSED COMMAND: '); - - for i:=0 to ParamCount do - Write(stdout, ParamStr(i) + ' '); - - WriteLn(stdout, ''); -end; - -/////////////////////////////////////////////////////////////////////////////// -{$INCLUDE "ArgParsers.inc"} - -procedure GetParams; -begin - if (ParamCount < 3) then - GameType:= gmtSyntax - else - if (ParamCount = 3) and (ParamStr(3) = 'landpreview') then - begin - ipcPort:= StrToInt(ParamStr(2)); - GameType:= gmtLandPreview; - end - else - begin - if (ParamCount = 3) and (ParamStr(3) = '--stats-only') then - playReplayFileWithParameters() - else - if ParamCount = cDefaultParamNum then - internalStartGameWithParameters() -{$IFDEF USE_VIDEO_RECORDING} - else if ParamCount = cVideorecParamNum then - internalStartVideoRecordingWithParameters() -{$ENDIF} - else - playReplayFileWithParameters(); - end -end; /////////////////////////////////////////////////////////////////////////////// /////////////////////////////////// m a i n /////////////////////////////////// @@ -600,9 +546,8 @@ if GameType = gmtLandPreview then GenLandPreview() - else if GameType = gmtSyntax then - DisplayUsage() - else Game(); + else if GameType <> gmtSyntax then + Game(); // return 1 when engine is not called correctly halt(LongInt(GameType = gmtSyntax)); diff -r d5d5e1698554 -r 1dedcc37bfe8 hedgewars/options.inc --- a/hedgewars/options.inc Sun Nov 18 01:06:01 2012 +0400 +++ b/hedgewars/options.inc Fri Feb 22 05:05:32 2013 +0100 @@ -43,12 +43,12 @@ {$IFDEF MOBILE} {$DEFINE HWLIBRARY} - {$DEFINE S3D_DISABLED} {$DEFINE GLunit:=gles11} {$DEFINE USE_LANDSCAPE_AMMOMENU} {$DEFINE USE_TOUCH_INTERFACE} {$ELSE} {$DEFINE USE_AM_NUMCOLUMN} + {$DEFINE USE_S3D_RENDERING} {$ENDIF} diff -r d5d5e1698554 -r 1dedcc37bfe8 hedgewars/uAI.pas --- a/hedgewars/uAI.pas Sun Nov 18 01:06:01 2012 +0400 +++ b/hedgewars/uAI.pas Fri Feb 22 05:05:32 2013 +0100 @@ -291,18 +291,13 @@ begin with Stack.States[Pred(Stack.Count)] do begin - if Me^.dX.isNegative then + if (Me^.Message and gmLeft) <> 0 then AddAction(MadeActions, aia_LookRight, 0, 200, 0, 0) else AddAction(MadeActions, aia_LookLeft, 0, 200, 0, 0); AddAction(MadeActions, aia_HJump, 0, 305 + random(50), 0, 0); AddAction(MadeActions, aia_HJump, 0, 350, 0, 0); - - if Me^.dX.isNegative then - AddAction(MadeActions, aia_LookLeft, 0, 200, 0, 0) - else - AddAction(MadeActions, aia_LookRight, 0, 200, 0, 0); end; // but first check walking forward Push(ticks, Stack.States[Pred(Stack.Count)].MadeActions, AltMe, Me^.Message) @@ -318,7 +313,7 @@ if Push(ticks, Actions, AltMe, Me^.Message xor 3) then with Stack.States[Pred(Stack.Count)] do begin - if Me^.dX.isNegative then + if (Me^.Message and gmLeft) <> 0 then AddAction(MadeActions, aia_LookLeft, 0, 200, 0, 0) else AddAction(MadeActions, aia_LookRight, 0, 200, 0, 0); diff -r d5d5e1698554 -r 1dedcc37bfe8 hedgewars/uAIAmmoTests.pas --- a/hedgewars/uAIAmmoTests.pas Sun Nov 18 01:06:01 2012 +0400 +++ b/hedgewars/uAIAmmoTests.pas Fri Feb 22 05:05:32 2013 +0100 @@ -40,6 +40,7 @@ function TestMolotov(Me: PGear; Targ: TPoint; Level: LongInt; var ap: TAttackParams): LongInt; function TestClusterBomb(Me: PGear; Targ: TPoint; Level: LongInt; var ap: TAttackParams): LongInt; function TestWatermelon(Me: PGear; Targ: TPoint; Level: LongInt; var ap: TAttackParams): LongInt; +function TestDrillRocket(Me: PGear; Targ: TPoint; Level: LongInt; var ap: TAttackParams): LongInt; function TestMortar(Me: PGear; Targ: TPoint; Level: LongInt; var ap: TAttackParams): LongInt; function TestShotgun(Me: PGear; Targ: TPoint; Level: LongInt; var ap: TAttackParams): LongInt; function TestDesertEagle(Me: PGear; Targ: TPoint; Level: LongInt; var ap: TAttackParams): LongInt; @@ -91,7 +92,7 @@ (proc: @TestWatermelon; flags: 0), // amWatermelon (proc: nil; flags: 0), // amHellishBomb (proc: nil; flags: 0), // amNapalm - (proc: nil; flags: 0), // amDrill + (proc: @TestDrillRocket; flags: 0), // amDrill (proc: nil; flags: 0), // amBallgun (proc: nil; flags: 0), // amRCPlane (proc: nil; flags: 0), // amLowGravity @@ -115,7 +116,7 @@ (proc: nil; flags: 0), // amDrillStrike (proc: nil; flags: 0), // amSnowball (proc: nil; flags: 0), // amTardis - (proc: nil; flags: 0), // amStructure + //(proc: nil; flags: 0), // amStructure (proc: nil; flags: 0), // amLandGun (proc: nil; flags: 0), // amIceGun (proc: nil; flags: 0) // amKnife @@ -187,6 +188,65 @@ TestBazooka:= valueResult end; + +function TestDrillRocket(Me: PGear; Targ: TPoint; Level: LongInt; var ap: TAttackParams): LongInt; +var Vx, Vy, r, mX, mY: real; + rTime: LongInt; + EX, EY: LongInt; + valueResult: LongInt; + x, y, dX, dY: real; + t: LongInt; + value: LongInt; +begin + mX:= hwFloat2Float(Me^.X); + mY:= hwFloat2Float(Me^.Y); + ap.Time:= 0; + rTime:= 350; + ap.ExplR:= 0; + valueResult:= BadTurn; + repeat + rTime:= rTime + 300 + Level * 50 + random(300); + Vx:= - windSpeed * rTime * 0.5 + (Targ.X + AIrndSign(2) - mX) / rTime; + Vy:= cGravityf * rTime * 0.5 - (Targ.Y - 35 - mY) / rTime; + r:= sqr(Vx) + sqr(Vy); + if not (r > 1) then + begin + x:= mX; + y:= mY; + dX:= Vx; + dY:= -Vy; + t:= rTime; + repeat + x:= x + dX; + y:= y + dY; + dX:= dX + windSpeed; + dY:= dY + cGravityf; + dec(t) + until (((Me = CurrentHedgehog^.Gear) and TestColl(trunc(x), trunc(y), 5)) or + ((Me <> CurrentHedgehog^.Gear) and TestCollExcludingMe(Me, trunc(x), trunc(y), 5))) or (y > cWaterLine); + + EX:= trunc(x); + EY:= trunc(y); + if Level = 1 then + value:= RateExplosion(Me, EX, EY, 101, afTrackFall or afErasesLand) + else value:= RateExplosion(Me, EX, EY, 101); + if value = 0 then + value:= 1024 - Metric(Targ.X, Targ.Y, EX, EY) div 64; + if valueResult <= value then + begin + ap.Angle:= DxDy2AttackAnglef(Vx, Vy) + AIrndSign(random((Level - 1) * 9)); + ap.Power:= trunc(sqrt(r) * cMaxPower) - random((Level - 1) * 17 + 1); + ap.ExplR:= 100; + ap.ExplX:= EX; + ap.ExplY:= EY; + valueResult:= value + end; + end + until rTime > 4250; + TestDrillRocket:= valueResult +end; + + function TestSnowball(Me: PGear; Targ: TPoint; Level: LongInt; var ap: TAttackParams): LongInt; var Vx, Vy, r: real; rTime: LongInt; @@ -1080,7 +1140,7 @@ var i: Longword; v: LongInt; begin -while (not TestColl(hwRound(Gear^.X), hwRound(Gear^.Y), 6)) and (Gear^.Y.Round < LAND_HEIGHT) do +while (not TestColl(hwRound(Gear^.X), hwRound(Gear^.Y), 6)) and (Gear^.Y.Round < LongWord(LAND_HEIGHT)) do Gear^.Y:= Gear^.Y + _1; for i:= 0 to 2040 do diff -r d5d5e1698554 -r 1dedcc37bfe8 hedgewars/uCaptions.pas --- a/hedgewars/uCaptions.pas Sun Nov 18 01:06:01 2012 +0400 +++ b/hedgewars/uCaptions.pas Fri Feb 22 05:05:32 2013 +0100 @@ -44,6 +44,7 @@ procedure AddCaption(s: shortstring; Color: Longword; Group: TCapGroup); begin + if cOnlyStats then exit; if Captions[Group].Text <> s then begin FreeTexture(Captions[Group].Tex); diff -r d5d5e1698554 -r 1dedcc37bfe8 hedgewars/uChat.pas --- a/hedgewars/uChat.pas Sun Nov 18 01:06:01 2012 +0400 +++ b/hedgewars/uChat.pas Fri Feb 22 05:05:32 2013 +0100 @@ -41,6 +41,7 @@ Width: LongInt; s: shortstring; end; + TChatCmd = (quit, pause, finish, fullscreen); var Strs: array[0 .. MaxStrIndex] of TChatLine; MStrs: array[0 .. MaxStrIndex] of shortstring; @@ -52,15 +53,25 @@ ChatReady: boolean; showAll: boolean; -const colors: array[#0..#6] of TSDL_Color = ( - (r:$FF; g:$FF; b:$FF; unused:$FF), // unused, feel free to take it for anything - (r:$FF; g:$FF; b:$FF; unused:$FF), // chat message [White] - (r:$FF; g:$00; b:$FF; unused:$FF), // action message [Purple] - (r:$90; g:$FF; b:$90; unused:$FF), // join/leave message [Lime] - (r:$FF; g:$FF; b:$A0; unused:$FF), // team message [Light Yellow] - (r:$FF; g:$00; b:$00; unused:$FF), // error messages [Red] - (r:$00; g:$FF; b:$FF; unused:$FF) // input line [Light Blue] - ); +const + colors: array[#0..#6] of TSDL_Color = ( + (r:$FF; g:$FF; b:$FF; unused:$FF), // unused, feel free to take it for anything + (r:$FF; g:$FF; b:$FF; unused:$FF), // chat message [White] + (r:$FF; g:$00; b:$FF; unused:$FF), // action message [Purple] + (r:$90; g:$FF; b:$90; unused:$FF), // join/leave message [Lime] + (r:$FF; g:$FF; b:$A0; unused:$FF), // team message [Light Yellow] + (r:$FF; g:$00; b:$00; unused:$FF), // error messages [Red] + (r:$00; g:$FF; b:$FF; unused:$FF) // input line [Light Blue] + ); + ChatCommandz: array [TChatCmd] of record + ChatCmd: string[31]; + ProcedureCallChatCmd: string[31]; + end = ( + (ChatCmd: '/quit'; ProcedureCallChatCmd: 'halt'), + (ChatCmd: '/pause'; ProcedureCallChatCmd: 'pause'), + (ChatCmd: '/finish'; ProcedureCallChatCmd: 'finish'), + (ChatCmd: '/fullscreen'; ProcedureCallChatCmd: 'fullscr') + ); procedure SetLine(var cl: TChatLine; str: shortstring; isInput: boolean); var strSurface, resSurface: PSDL_Surface; @@ -197,6 +208,7 @@ procedure AcceptChatString(s: shortstring); var i: TWave; + j: TChatCmd; c, t: LongInt; x: byte; begin @@ -267,6 +279,13 @@ ParseCommand('/taunt ' + char(i), true); exit end; + + for j:= Low(TChatCmd) to High(TChatCmd) do + if (s = ChatCommandz[j].ChatCmd) then + begin + ParseCommand(ChatCommandz[j].ProcedureCallChatCmd, true); + exit + end; end else ParseCommand('/say ' + s, true); diff -r d5d5e1698554 -r 1dedcc37bfe8 hedgewars/uCommandHandlers.pas --- a/hedgewars/uCommandHandlers.pas Sun Nov 18 01:06:01 2012 +0400 +++ b/hedgewars/uCommandHandlers.pas Fri Feb 22 05:05:32 2013 +0100 @@ -30,6 +30,8 @@ {$IFDEF USE_VIDEO_RECORDING}, uVideoRec {$ENDIF}; var prevGState: TGameState = gsConfirm; + cTagsMasks : array[0..15] of byte = (7, 0, 0, 0, 15, 6, 4, 5, 0, 0, 0, 0, 0, 14, 12, 13); + cTagsMasksNoHealth: array[0..15] of byte = (3, 2, 11, 1, 0, 0, 0, 0, 0, 10, 0, 9, 0, 0, 0, 0); procedure chGenCmd(var s: shortstring); begin @@ -87,11 +89,11 @@ end; procedure chCheckProto(var s: shortstring); -var i, c: LongInt; +var i: LongInt; begin if isDeveloperMode then begin - val(s, i, c); + i:= StrToInt(s); TryDo(i <= cNetProtoVersion, 'Protocol version mismatch: engine is too old (got '+intToStr(i)+', expecting '+intToStr(cNetProtoVersion)+')', true); TryDo(i >= cNetProtoVersion, 'Protocol version mismatch: engine is too new (got '+intToStr(i)+', expecting '+intToStr(cNetProtoVersion)+')', true); end diff -r d5d5e1698554 -r 1dedcc37bfe8 hedgewars/uCommands.pas --- a/hedgewars/uCommands.pas Sun Nov 18 01:06:01 2012 +0400 +++ b/hedgewars/uCommands.pas Fri Feb 22 05:05:32 2013 +0100 @@ -88,12 +88,14 @@ //WriteLnToConsole(CmdStr); if CmdStr[0]=#0 then exit; + +AddFileLog('[Cmd] ' + sanitizeForLog(CmdStr)); + c:= CmdStr[1]; if (c = '/') or (c = '$') then Delete(CmdStr, 1, 1); s:= ''; SplitBySpace(CmdStr, s); -AddFileLog('[Cmd] ' + CmdStr + ' (' + inttostr(length(s)) + ')'); t:= Variables; while t <> nil do diff -r d5d5e1698554 -r 1dedcc37bfe8 hedgewars/uConsole.pas --- a/hedgewars/uConsole.pas Sun Nov 18 01:06:01 2012 +0400 +++ b/hedgewars/uConsole.pas Fri Feb 22 05:05:32 2013 +0100 @@ -21,61 +21,26 @@ unit uConsole; interface -procedure initModule; -procedure freeModule; -procedure WriteToConsole(s: shortstring); -procedure WriteLnToConsole(s: shortstring); -function GetLastConsoleLine: shortstring; -function ShortStringAsPChar(s: shortstring): PChar; - -implementation -uses Types, uVariables, uUtils {$IFDEF ANDROID}, log in 'log.pas'{$ENDIF}; - -const cLinesCount = 8; -var cLineWidth: LongInt; - -type - TTextLine = record - s: shortstring - end; - -var ConsoleLines: array[byte] of TTextLine; - CurrLine: LongInt; - -procedure SetLine(var tl: TTextLine; str: shortstring); -begin -with tl do - s:= str; -end; procedure WriteToConsole(s: shortstring); -{$IFNDEF NOCONSOLE} -var Len: LongInt; - done: boolean; -{$ENDIF} +procedure WriteLnToConsole(s: shortstring); +function ShortStringAsPChar(s: shortstring): PChar; + +var lastConsoleline : shortstring; + +implementation +uses Types, uUtils {$IFDEF ANDROID}, log in 'log.pas'{$ENDIF}; + + +procedure WriteToConsole(s: shortstring); begin {$IFNDEF NOCONSOLE} -AddFileLog('[Con] ' + s); + AddFileLog('[Con] ' + s); {$IFDEF ANDROID} + //TODO integrate this function in the uMobile record Log.__android_log_write(Log.Android_LOG_DEBUG, 'HW_Engine', ShortStringAsPChar('[Con]' + s)); {$ELSE} -Write(stderr, s); -done:= false; - -while not done do - begin - Len:= cLineWidth - Length(ConsoleLines[CurrLine].s); - SetLine(ConsoleLines[CurrLine], ConsoleLines[CurrLine].s + copy(s, 1, Len)); - Delete(s, 1, Len); - if byte(ConsoleLines[CurrLine].s[0]) = cLineWidth then - begin - inc(CurrLine); - if CurrLine = cLinesCount then - CurrLine:= 0; - PByte(@ConsoleLines[CurrLine].s)^:= 0 - end; - done:= (Length(s) = 0); - end; + Write(stderr, s); {$ENDIF} {$ENDIF} end; @@ -83,13 +48,10 @@ procedure WriteLnToConsole(s: shortstring); begin {$IFNDEF NOCONSOLE} -WriteToConsole(s); + WriteToConsole(s); + lastConsoleline:= s; {$IFNDEF ANDROID} -WriteLn(stderr, ''); -inc(CurrLine); -if CurrLine = cLinesCount then - CurrLine:= 0; -PByte(@ConsoleLines[CurrLine].s)^:= 0 + WriteLn(stderr, ''); {$ENDIF} {$ENDIF} end; @@ -102,37 +64,5 @@ ShortStringAsPChar:= @s[1]; end; -function GetLastConsoleLine: shortstring; -var valueStr: shortstring; - i: LongWord; -begin -i:= (CurrLine + cLinesCount - 2) mod cLinesCount; -valueStr:= ConsoleLines[i].s; - -valueStr:= valueStr + #10; - -i:= (CurrLine + cLinesCount - 1) mod cLinesCount; -valueStr:= valueStr + ConsoleLines[i].s; - -GetLastConsoleLine:= valueStr; -end; - -procedure initModule; -var i: LongInt; -begin - CurrLine:= 0; - - // initConsole - cLineWidth:= cScreenWidth div 10; - if cLineWidth > 255 then - cLineWidth:= 255; - for i:= 0 to Pred(cLinesCount) do - PByte(@ConsoleLines[i])^:= 0; -end; - -procedure freeModule; -begin - -end; end. diff -r d5d5e1698554 -r 1dedcc37bfe8 hedgewars/uConsts.pas --- a/hedgewars/uConsts.pas Sun Nov 18 01:06:01 2012 +0400 +++ b/hedgewars/uConsts.pas Fri Feb 22 05:05:32 2013 +0100 @@ -27,8 +27,6 @@ const sfMax = 1000; - cDefaultParamNum = 17; - cVideorecParamNum = cDefaultParamNum + 7; // message constants errmsgCreateSurface = 'Error creating SDL surface'; @@ -45,6 +43,9 @@ msgFailedSize = 'failed due to size'; msgGettingConfig = 'Getting game config...'; + // camera movement multipliers + cameraKeyboardSpeed : ShortInt = 10; + // color constants cWhiteColorChannels : TSDL_Color = (r:$FF; g:$FF; b:$FF; unused:$FF); cNearBlackColorChannels : TSDL_Color = (r:$00; g:$00; b:$10; unused:$FF); @@ -112,9 +113,7 @@ GL_TEXTURE_PRIORITY = $8066; {$ENDIF} - cSendCursorPosTime : LongWord = 50; cVisibleWater : LongInt = 128; - cCursorEdgesDist : LongInt = 100; cTeamHealthWidth : LongInt = 128; cifRandomize = $00000001; @@ -122,8 +121,6 @@ cifMap = $00000002; // either theme or map (or map+theme) cifAllInited = cifRandomize or cifTheme or cifMap; - cTransparentColor: Longword = $00000000; - RGB_LUMINANCE_RED = 0.212671; RGB_LUMINANCE_GREEN = 0.715160; RGB_LUMINANCE_BLUE = 0.072169; @@ -131,18 +128,14 @@ cMaxTeams = 8; cMaxHHIndex = 7; cMaxHHs = 48; - cMaxSpawnPoints = 1024; cMaxEdgePoints = 16384; cHHRadius = 9; cHHStepTicks = 29; - cUsualZ = 500; - cSmokeZ = 499; cHHZ = 1000; cCurrHHZ = Succ(cHHZ); - cOnHHZ = 2000; cBarrelHealth = 60; cShotgunRadius = 22; @@ -152,18 +145,11 @@ cKeyMaxIndex = 1023; cKbdMaxIndex = 65536;//need more room for the modifier keys - cHHFileName = 'Hedgehog'; - cCHFileName = 'Crosshair'; - cThemeCFGFilename = 'theme.cfg'; - cFontBorder = 2; // do not change this value cDefaultZoomLevel = 2.0; - cSendEmptyPacketTime = 1000; - trigTurns = $80000001; - // game flags gfAny = $FFFFFFFF; gfOneClanMode = $00000001; // used in trainings @@ -290,40 +276,8 @@ NoPointX = Low(LongInt); cTargetPointRef : TPoint = (X: NoPointX; Y: 0); - // hog tag mask - htNone = $00; - htTeamName = $01; - htName = $02; - htHealth = $04; - htTransparent = $08; - - AMAnimDuration = 200; - AMHidden = 0;//AMState values - AMShowingUp = 1; - AMShowing = 2; - AMHiding = 3; + kSystemSoundID_Vibrate = $00000FFF; - AMTypeMaskX = $00000001; - AMTypeMaskY = $00000002; - AMTypeMaskAlpha = $00000004; - AMTypeMaskSlide = $00000008; - -{$IFDEF MOBILE} - AMSlotSize = 48; - AMTITLE = 30; -{$ELSE} - AMSlotSize = 32; -{$ENDIF} - AMSlotPadding = (AMSlotSize - 32) shr 1; - -{$IFDEF USE_TOUCH_INTERFACE} - FADE_ANIM_TIME = 500; - MOVE_ANIM_TIME = 500; -{$ENDIF} - - cTagsMasks : array[0..15] of byte = (7, 0, 0, 0, 15, 6, 4, 5, 0, 0, 0, 0, 0, 14, 12, 13); - cTagsMasksNoHealth: array[0..15] of byte = (3, 2, 11, 1, 0, 0, 0, 0, 0, 10, 0, 9, 0, 0, 0, 0); - implementation end. diff -r d5d5e1698554 -r 1dedcc37bfe8 hedgewars/uCursor.pas --- a/hedgewars/uCursor.pas Sun Nov 18 01:06:01 2012 +0400 +++ b/hedgewars/uCursor.pas Fri Feb 22 05:05:32 2013 +0100 @@ -3,7 +3,9 @@ interface procedure init; +procedure resetPosition; procedure updatePosition; +procedure handlePositionUpdate(x, y: LongInt); implementation @@ -11,6 +13,11 @@ procedure init; begin + resetPosition(); +end; + +procedure resetPosition; +begin SDL_WarpMouse(cScreenWidth div 2, cScreenHeight div 2); end; @@ -18,15 +25,20 @@ var x, y: LongInt; begin SDL_GetMouseState(@x, @y); - + if(x <> cScreenWidth div 2) or (y <> cScreenHeight div 2) then - begin - CursorPoint.X:= CursorPoint.X + x - cScreenWidth div 2; - CursorPoint.Y:= CursorPoint.Y - y + cScreenHeight div 2; + begin + handlePositionUpdate(x - cScreenWidth div 2, y - cScreenHeight div 2); if cHasFocus then SDL_WarpMouse(cScreenWidth div 2, cScreenHeight div 2); - end + end +end; + +procedure handlePositionUpdate(x, y: LongInt); +begin + CursorPoint.X:= CursorPoint.X + x; + CursorPoint.Y:= CursorPoint.Y - y; end; end. diff -r d5d5e1698554 -r 1dedcc37bfe8 hedgewars/uDebug.pas --- a/hedgewars/uDebug.pas Sun Nov 18 01:06:01 2012 +0400 +++ b/hedgewars/uDebug.pas Fri Feb 22 05:05:32 2013 +0100 @@ -34,7 +34,7 @@ WriteLnToConsole(Msg); if isFatalError then begin - ParseCommand('fatal ' + GetLastConsoleLine, true); + ParseCommand('fatal ' + lastConsoleline, true); SDL_Quit; halt(1) end diff -r d5d5e1698554 -r 1dedcc37bfe8 hedgewars/uGame.pas --- a/hedgewars/uGame.pas Sun Nov 18 01:06:01 2012 +0400 +++ b/hedgewars/uGame.pas Fri Feb 22 05:05:32 2013 +0100 @@ -26,21 +26,24 @@ //////////////////// implementation //////////////////// -uses uInputHandler, uTeams, uIO, uAI, uGears, uSound, uMobile, +uses uInputHandler, uTeams, uIO, uAI, uGears, uSound, uLocale, uCaptions, uVisualGears, uTypes, uVariables, uCommands, uConsts {$IFDEF USE_TOUCH_INTERFACE}, uTouch{$ENDIF}; procedure DoGameTick(Lag: LongInt); -var i: LongInt; +var i,j : LongInt; + s: shortstring; begin if isPaused then exit; + if (not CurrentTeam^.ExtDriven) then begin NetGetNextCmd; // its for the case of receiving "/say" message isInLag:= false; - SendKeepAliveMessage(Lag) + FlushMessages(Lag) end; + if GameType <> gmtRecord then begin if Lag > 100 then @@ -50,17 +53,33 @@ if (GameType = gmtDemo) then if isSpeed then - begin + begin i:= RealTicks-SpeedStart; if i < 2000 then Lag:= Lag*5 else if i < 4000 then Lag:= Lag*10 else if i < 6000 then Lag:= Lag*20 else if i < 8000 then Lag:= Lag*40 else Lag:= Lag*80; - end - else - if cOnlyStats then - Lag:= High(LongInt); + end + else if cOnlyStats then + Lag:= High(LongInt) + end; +inc(SoundTimerTicks, Lag); +if SoundTimerTicks >= 50 then + begin + SoundTimerTicks:= 0; + if cVolumeDelta <> 0 then + begin + j:= Volume; + i:= ChangeVolume(cVolumeDelta); + if isAudioMuted and (j<>i) then + AddCaption(trmsg[sidMute], cWhiteColor, capgrpVolume) + else if not isAudioMuted then + begin + str(i, s); + AddCaption(Format(trmsg[sidVolume], s), cWhiteColor, capgrpVolume) + end + end; end; PlayNextVoice; i:= 1; @@ -97,7 +116,9 @@ AddVisualGear(0, 0, vgtTeamHealthSorter); AddVisualGear(0, 0, vgtSmoothWindBar); {$IFDEF IPHONEOS}InitIPC;{$ENDIF} - uMobile.SaveLoadingEnded(); + with mobileRecord do + if SaveLoadingEnded <> nil then + SaveLoadingEnded(); end; end else ProcessGears diff -r d5d5e1698554 -r 1dedcc37bfe8 hedgewars/uGears.pas --- a/hedgewars/uGears.pas Sun Nov 18 01:06:01 2012 +0400 +++ b/hedgewars/uGears.pas Fri Feb 22 05:05:32 2013 +0100 @@ -56,8 +56,8 @@ implementation -uses uStore, uSound, uTeams, uRandom, uCollisions, uIO, uLandGraphics, - uLocale, uAI, uAmmos, uStats, uVisualGears, uScript, GLunit, uMobile, uVariables, +uses uStore, uSound, uTeams, uRandom, uCollisions, uIO, uLandGraphics, {$IFDEF SDL13}uTouch,{$ENDIF} + uLocale, uAI, uAmmos, uStats, uVisualGears, uScript, GLunit, uVariables, uCommands, uUtils, uTextures, uRenderUtils, uGearsRender, uCaptions, uDebug, uLandTexture, uGearsHedgehog, uGearsUtils, uGearsList, uGearsHandlers, uGearsHandlersRope; @@ -78,6 +78,7 @@ stSpawn, stNTurn); upd: Longword; snowLeft,snowRight: LongInt; + NewTurnTick: LongWord; //SDMusic: shortstring; // For better maintainability the step handlers of gears are stored in @@ -189,6 +190,16 @@ i, AliveCount: LongInt; s: shortstring; begin +ScriptCall('onGameTick'); +if GameTicks mod 20 = 0 then ScriptCall('onGameTick20'); +if GameTicks = NewTurnTick then + begin + ScriptCall('onNewTurn'); +{$IFDEF SDL13} + uTouch.NewTurnBeginning(); +{$ENDIF} + end; + PrvInactive:= AllInactive; AllInactive:= true; @@ -383,7 +394,8 @@ SwitchHedgehog; AfterSwitchHedgehog; - bBetweenTurns:= false + bBetweenTurns:= false; + NewTurnTick:= GameTicks + 1 end; step:= Low(step) end; @@ -430,8 +442,7 @@ if TurnTimeLeft > 0 then if CurrentHedgehog^.Gear <> nil then - if ((CurrentHedgehog^.Gear^.State and gstAttacking) = 0) - and (not isInMultiShoot) then + if ((CurrentHedgehog^.Gear^.State and gstAttacking) = 0) then begin if (TurnTimeLeft = 5000) and (cHedgehogTurnTime >= 10000) @@ -470,8 +481,6 @@ 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) end; @@ -643,7 +652,7 @@ if (GameFlags and gfArtillery) <> 0 then cArtillery:= true; -for i:= GetRandom(10)+30 downto 0 do +for i:= (LAND_WIDTH*LAND_HEIGHT) div 524288+2 downto 0 do begin rx:= GetRandom(rightX-leftX)+leftX; ry:= GetRandom(LAND_HEIGHT-topY)+topY; @@ -677,8 +686,8 @@ gtKnife, gtCase, gtTarget, - gtExplosives, - gtStructure: begin + gtExplosives: begin//, +// gtStructure: begin //addFileLog('ShotgunShot radius: ' + inttostr(Gear^.Radius) + ', t^.Radius = ' + inttostr(t^.Radius) + ', distance = ' + inttostr(dist) + ', dmg = ' + inttostr(dmg)); dmg:= 0; r:= Gear^.Radius + t^.Radius; @@ -777,8 +786,8 @@ gtKnife, gtTarget, gtCase, - gtExplosives, - gtStructure: + gtExplosives: //, + //gtStructure: begin if (Ammo^.Kind = gtDrill) then begin @@ -906,10 +915,6 @@ inc(Count) end; end; - // unC0Rr, while it is true user can watch value on map screen, IMO this (and check above) should be enforced in UI - // - is there a good place to put values for the different widgets to check? Right now they are kind of disconnected. - //it would be nice if divide teams, forts mode and hh per map could all be checked by the team widget, or maybe disable start button - TryDo(Count <= MaxHedgehogs, 'Too many hedgehogs for this map! (max # is ' + inttostr(MaxHedgehogs) + ')', true); while (Count > 0) do begin i:= GetRandom(Count); @@ -1367,7 +1372,7 @@ @doStepNapalmBomb, @doStepSnowball, @doStepSnowflake, - @doStepStructure, + //@doStepStructure, @doStepLandGun, @doStepTardis, @doStepIceGun, @@ -1400,6 +1405,7 @@ upd:= 0; //SDMusic:= 'hell.ogg'; + NewTurnTick:= $FFFFFFFF; end; procedure freeModule; diff -r d5d5e1698554 -r 1dedcc37bfe8 hedgewars/uGearsHandlersRope.pas --- a/hedgewars/uGearsHandlersRope.pas Sun Nov 18 01:06:01 2012 +0400 +++ b/hedgewars/uGearsHandlersRope.pas Fri Feb 22 05:05:32 2013 +0100 @@ -165,12 +165,12 @@ if ((Gear^.Message and gmDown) <> 0) and (Gear^.Elasticity < Gear^.Friction) then if not (TestCollisionXwithGear(HHGear, hwSign(ropeDx)) - or (TestCollisionYwithGear(HHGear, hwSign(ropeDy)) <> 0)) then + or ((ropeDy.QWordValue <> 0) and TestCollisionYwithXYShift(HHGear, 0, 1, hwSign(ropeDy)))) then Gear^.Elasticity := Gear^.Elasticity + _1_2; if ((Gear^.Message and gmUp) <> 0) and (Gear^.Elasticity > _30) then if not (TestCollisionXwithGear(HHGear, -hwSign(ropeDx)) - or (TestCollisionYwithGear(HHGear, -hwSign(ropeDy)) <> 0)) then + or ((ropeDy.QWordValue <> 0) and TestCollisionYwithXYShift(HHGear, 0, 1, -hwSign(ropeDy)))) then Gear^.Elasticity := Gear^.Elasticity - _1_2; HHGear^.X := Gear^.X + mdX * Gear^.Elasticity; @@ -196,10 +196,10 @@ ly := hwRound(ny); if ((ly and LAND_HEIGHT_MASK) = 0) and ((lx and LAND_WIDTH_MASK) = 0) and ((Land[ly, lx] and $FF00) <> 0) then begin - ny := _1 / Distance(ropeDx, ropeDy); + tx := _1 / Distance(ropeDx, ropeDy); // old rope pos - nx := ropeDx * ny; - ny := ropeDy * ny; + nx := ropeDx * tx; + ny := ropeDy * tx; with RopePoints.ar[RopePoints.Count] do begin @@ -210,7 +210,7 @@ b := (nx * HHGear^.dY) > (ny * HHGear^.dX); dLen := len end; - + with RopePoints.rounded[RopePoints.Count] do begin X := hwRound(Gear^.X); @@ -264,7 +264,7 @@ HHGear^.dX := -_0_6 * HHGear^.dX; haveCollision := true end; - if TestCollisionYwithGear(HHGear, hwSign(HHGear^.dY)) <> 0 then + if TestCollisionYwithXYShift(HHGear, 0, 1, hwSign(HHGear^.dY)) then begin HHGear^.dY := -_0_6 * HHGear^.dY; haveCollision := true diff -r d5d5e1698554 -r 1dedcc37bfe8 hedgewars/uGearsHedgehog.pas --- a/hedgewars/uGearsHedgehog.pas Sun Nov 18 01:06:01 2012 +0400 +++ b/hedgewars/uGearsHedgehog.pas Fri Feb 22 05:05:32 2013 +0100 @@ -103,6 +103,13 @@ LoadHedgehogHat(HHGear^.Hedgehog^, 'Reserved/chef') else if prevAmmo = amKnife then LoadHedgehogHat(HHGear^.Hedgehog^, Hat); + end; + // Try again in the next slot + if CurAmmoType = prevAmmo then + begin + if slot >= cMaxSlotIndex then slot:= 0 else inc(slot); + HHGear^.MsgParam:= slot; + ChangeAmmo(HHGear) end end end; @@ -204,9 +211,7 @@ and ((TargetPoint.X <> NoPointX) or ((Ammoz[CurAmmoType].Ammo.Propz and ammoprop_NeedTarget) = 0)) then begin State:= State or gstAttacking; - if Power = cMaxPower then - Message:= Message and (not gmAttack) - else if (Ammoz[CurAmmoType].Ammo.Propz and ammoprop_Power) = 0 then + if (Power = cMaxPower) or ((Ammoz[CurAmmoType].Ammo.Propz and ammoprop_Power) = 0) then Message:= Message and (not gmAttack) else begin @@ -217,44 +222,44 @@ end; inc(Power) end; - if ((Message and gmAttack) <> 0) then - exit; + if ((Message and gmAttack) <> 0) then + exit; - if (Ammoz[CurAmmoType].Ammo.Propz and ammoprop_Power) <> 0 then - begin - StopSound(sndThrowPowerUp); - PlaySound(sndThrowRelease); - end; + if (Ammoz[CurAmmoType].Ammo.Propz and ammoprop_Power) <> 0 then + begin + StopSound(sndThrowPowerUp); + PlaySound(sndThrowRelease); + end; - xx:= SignAs(AngleSin(Angle), dX); - yy:= -AngleCos(Angle); + xx:= SignAs(AngleSin(Angle), dX); + yy:= -AngleCos(Angle); - lx:= X + int2hwfloat(round(GetLaunchX(CurAmmoType, hwSign(dX), Angle))); - ly:= Y + int2hwfloat(round(GetLaunchY(CurAmmoType, Angle))); + lx:= X + int2hwfloat(round(GetLaunchX(CurAmmoType, hwSign(dX), Angle))); + ly:= Y + int2hwfloat(round(GetLaunchY(CurAmmoType, Angle))); - if ((Gear^.State and gstHHHJump) <> 0) and (not cArtillery) then - xx:= - xx; - if Ammoz[CurAmmoType].Ammo.AttackVoice <> sndNone then - AddVoice(Ammoz[CurAmmoType].Ammo.AttackVoice, CurrentTeam^.voicepack); + if ((Gear^.State and gstHHHJump) <> 0) and (not cArtillery) then + xx:= - xx; + if Ammoz[CurAmmoType].Ammo.AttackVoice <> sndNone then + AddVoice(Ammoz[CurAmmoType].Ammo.AttackVoice, CurrentTeam^.voicepack); // Initiating alt attack - if (CurAmmoGear <> nil) - and ((Ammoz[CurAmmoGear^.AmmoType].Ammo.Propz and ammoprop_AltAttack) <> 0) - and ((Gear^.Message and gmLJump) <> 0) - and ((Ammoz[CurAmmoType].Ammo.Propz and ammoprop_AltUse) <> 0) then - begin - newDx:= dX; - newDy:= dY; - altUse:= true - end - else - begin - newDx:= xx*Power/cPowerDivisor; - newDy:= yy*Power/cPowerDivisor; - altUse:= false - end; + if (CurAmmoGear <> nil) + and ((Ammoz[CurAmmoGear^.AmmoType].Ammo.Propz and ammoprop_AltAttack) <> 0) + and ((Gear^.Message and gmLJump) <> 0) + and ((Ammoz[CurAmmoType].Ammo.Propz and ammoprop_AltUse) <> 0) then + begin + newDx:= dX; + newDy:= dY; + altUse:= true + end + else + begin + newDx:= xx*Power/cPowerDivisor; + newDy:= yy*Power/cPowerDivisor; + altUse:= false + end; - case CurAmmoType of + case CurAmmoType of amGrenade: newGear:= AddGear(hwRound(lx), hwRound(ly), gtGrenade, 0, newDx, newDy, CurWeapon^.Timer); amMolotov: newGear:= AddGear(hwRound(lx), hwRound(ly), gtMolotov, 0, newDx, newDy, 0); amClusterBomb: newGear:= AddGear(hwRound(lx), hwRound(ly), gtClusterBomb, 0, newDx, newDy, CurWeapon^.Timer); @@ -274,7 +279,7 @@ amKnife: begin newGear:= AddGear(hwRound(lx), hwRound(ly), gtKnife, 0, xx*Power/cPowerDivisor, yy*Power/cPowerDivisor, 0); newGear^.State:= newGear^.State or gstMoving; - newGear^.Radius:= 6 // temporarily shrink so it doesn't instantly embed in the ground + newGear^.Radius:= 4 // temporarily shrink so it doesn't instantly embed in the ground end; amDEagle: newGear:= AddGear(hwRound(lx + xx * cHHRadius), hwRound(ly + yy * cHHRadius), gtDEagleShot, 0, xx * _0_5, yy * _0_5, 0); amSineGun: newGear:= AddGear(hwRound(lx + xx * cHHRadius), hwRound(ly + yy * cHHRadius), gtSineGunShot, 0, xx * _0_5, yy * _0_5, 0); @@ -358,7 +363,7 @@ Unplaced:= true; X:= _0; Y:= _0; - newGear:= AddGear(TargetPoint.X, 0, gtPiano, 0, _0, _0, 0); + newGear:= AddGear(TargetPoint.X, -1024, gtPiano, 0, _0, _0, 0); PauseMusic end; amFlamethrower: newGear:= AddGear(hwRound(X), hwRound(Y), gtFlamethrower, 0, xx * _0_5, yy * _0_5, 0); @@ -367,102 +372,102 @@ newGear:= AddGear(hwRound(lx), hwRound(ly), gtResurrector, 0, _0, _0, 0); newGear^.SoundChannel := LoopSound(sndResurrector); end; - amStructure: newGear:= AddGear(hwRound(lx) + hwSign(dX) * 7, hwRound(ly), gtStructure, gstWait, SignAs(_0_02, dX), _0, 3000); + //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); - end; - if altUse and (newGear <> nil) then - begin - newGear^.dX:= newDx / newGear^.Density; - newGear^.dY:= newDY / newGear^.Density - end; + end; + if altUse and (newGear <> nil) then + begin + newGear^.dX:= newDx / newGear^.Density; + newGear^.dY:= newDY / newGear^.Density + end; - case CurAmmoType of - amGrenade, amMolotov, - amClusterBomb, amGasBomb, - amBazooka, amSnowball, - amBee, amSMine, - amMortar, amWatermelon, - amHellishBomb, amDrill: FollowGear:= newGear; + case CurAmmoType of + amGrenade, amMolotov, + amClusterBomb, amGasBomb, + amBazooka, amSnowball, + amBee, amSMine, + amMortar, amWatermelon, + amHellishBomb, amDrill: FollowGear:= newGear; - amShotgun, amPickHammer, - amRope, amDEagle, - amSineGun, amSniperRifle, - amFirePunch, amWhip, - amHammer, amBaseballBat, - amParachute, amBlowTorch, - amGirder, amTeleport, - amSwitch, amRCPlane, - amKamikaze, amCake, - amSeduction, amBallgun, - amJetpack, amBirdy, - amFlamethrower, amLandGun, - amResurrector, amStructure, - amTardis, amPiano, - amIceGun: CurAmmoGear:= newGear; - end; + amShotgun, amPickHammer, + amRope, amDEagle, + amSineGun, amSniperRifle, + amFirePunch, amWhip, + amHammer, amBaseballBat, + amParachute, amBlowTorch, + amGirder, amTeleport, + amSwitch, amRCPlane, + amKamikaze, amCake, + amSeduction, amBallgun, + amJetpack, amBirdy, + amFlamethrower, amLandGun, + amResurrector, //amStructure, + amTardis, amPiano, + amIceGun: CurAmmoGear:= newGear; + end; if ((CurAmmoType = amMine) or (CurAmmoType = amSMine)) and (GameFlags and gfInfAttack <> 0) then newGear^.FlightTime:= GameTicks + 1000 else if CurAmmoType = amDrill then newGear^.FlightTime:= GameTicks + 250; - if Ammoz[CurAmmoType].Ammo.Propz and ammoprop_NeedTarget <> 0 then - begin - newGear^.Target.X:= TargetPoint.X; - newGear^.Target.Y:= TargetPoint.Y - end; - if (newGear <> nil) and (newGear^.CollisionMask and $80 <> 0) then newGear^.CollisionMask:= newGear^.CollisionMask and (not $80); + if Ammoz[CurAmmoType].Ammo.Propz and ammoprop_NeedTarget <> 0 then + begin + newGear^.Target.X:= TargetPoint.X; + newGear^.Target.Y:= TargetPoint.Y + end; + if (newGear <> nil) and (newGear^.CollisionMask and $80 <> 0) then newGear^.CollisionMask:= newGear^.CollisionMask and (not $80); - // Clear FollowGear if using on a rope/parachute/saucer etc so focus stays with the hog's movement - if altUse then - FollowGear:= nil; + // Clear FollowGear if using on a rope/parachute/saucer etc so focus stays with the hog's movement + if altUse then + FollowGear:= nil; - if (newGear <> nil) and ((Ammoz[newGear^.AmmoType].Ammo.Propz and ammoprop_SetBounce) <> 0) then - begin - elastic:= int2hwfloat(CurWeapon^.Bounciness) / _1000; + if (newGear <> nil) and ((Ammoz[newGear^.AmmoType].Ammo.Propz and ammoprop_SetBounce) <> 0) then + begin + elastic:= int2hwfloat(CurWeapon^.Bounciness) / _1000; - if elastic < _1 then - newGear^.Elasticity:= newGear^.Elasticity * elastic - else if elastic > _1 then - newGear^.Elasticity:= _1 - ((_1-newGear^.Elasticity) / elastic); -(* Experimented with friction modifier. Didn't seem helpful - fric:= int2hwfloat(CurWeapon^.Bounciness) / _250; - if fric < _1 then newGear^.Friction:= newGear^.Friction * fric - else if fric > _1 then newGear^.Friction:= _1 - ((_1-newGear^.Friction) / fric)*) - end; + if elastic < _1 then + newGear^.Elasticity:= newGear^.Elasticity * elastic + else if elastic > _1 then + newGear^.Elasticity:= _1 - ((_1-newGear^.Elasticity) / elastic); + (* Experimented with friction modifier. Didn't seem helpful + fric:= int2hwfloat(CurWeapon^.Bounciness) / _250; + if fric < _1 then newGear^.Friction:= newGear^.Friction * fric + else if fric > _1 then newGear^.Friction:= _1 - ((_1-newGear^.Friction) / fric)*) + end; - uStats.AmmoUsed(CurAmmoType); + uStats.AmmoUsed(CurAmmoType); - if not (SpeechText = '') then - begin - speech:= AddVisualGear(0, 0, vgtSpeechBubble); - if speech <> nil then + if not (SpeechText = '') then begin - speech^.Text:= SpeechText; - speech^.Hedgehog:= Gear^.Hedgehog; - speech^.FrameTicks:= SpeechType; + speech:= AddVisualGear(0, 0, vgtSpeechBubble); + if speech <> nil then + begin + speech^.Text:= SpeechText; + speech^.Hedgehog:= Gear^.Hedgehog; + speech^.FrameTicks:= SpeechType; + end; + SpeechText:= '' end; - SpeechText:= '' - end; - Power:= 0; - if (CurAmmoGear <> nil) - and ((Ammoz[CurAmmoType].Ammo.Propz and ammoprop_AltUse) = 0){check for dropping ammo from rope} then - begin - Message:= Message or gmAttack; - CurAmmoGear^.Message:= Message + Power:= 0; + if (CurAmmoGear <> nil) + and ((Ammoz[CurAmmoType].Ammo.Propz and ammoprop_AltUse) = 0){check for dropping ammo from rope} then + begin + if CurAmmoType = amRope then Message:= Message or gmAttack; + CurAmmoGear^.Message:= Message + end + else + begin + if not CurrentTeam^.ExtDriven + and ((Ammoz[CurAmmoType].Ammo.Propz and ammoprop_Power) <> 0) then + SendIPC(_S'a'); + AfterAttack; + end end - else - begin - if not CurrentTeam^.ExtDriven - and ((Ammoz[CurAmmoType].Ammo.Propz and ammoprop_Power) <> 0) then - SendIPC(_S'a'); - AfterAttack; - end - end - else - Message:= Message and (not gmAttack); + else + Message:= Message and (not gmAttack); end; TargetPoint.X := NoPointX; ScriptCall('onHogAttack'); @@ -641,9 +646,10 @@ gi := GearsList; while gi <> nil do begin - if gi^.Kind = gtGenericFaller then + if (gi^.Kind = gtGenericFaller) and (gi^.State and gstInvisible <> 0) then begin gi^.Active:= true; + gi^.State:= gi^.State or gstTmpFlag; gi^.X:= int2hwFloat(GetRandom(rightX-leftX)+leftX); gi^.Y:= int2hwFloat(GetRandom(LAND_HEIGHT-topY)+topY); gi^.dX:= _90-(GetRandomf*_360); @@ -992,16 +998,25 @@ Hedgehog: PHedgehog; begin Hedgehog:= HHGear^.Hedgehog; +// Some weapons, deagle in particular, wouldn't play so nice in infinite attack mode if hogs were still moving. Most likely scenario +// is trying to shoot them twice while rolling. This is mostly about not wasting ammo, but shouldn't apply to gears not using AmmoShove (portal +// Should we rethink AmmoShove? Presumably we'd need a way of knowing if current gear had already attacked a gear +if isInMultiShoot and not AllInactive and (Hedgehog^.CurAmmoType in [amShotgun, amDEagle, amSniperRifle]) then HHGear^.Message:= HHGear^.Message and not gmAttack; +(* if isInMultiShoot then HHGear^.Message:= 0; +*) -if ((Ammoz[CurrentHedgehog^.CurAmmoType].Ammo.Propz and ammoprop_Utility) <> 0) and isInMultiShoot then +(*if ((Ammoz[CurrentHedgehog^.CurAmmoType].Ammo.Propz and ammoprop_Utility) <> 0) and isInMultiShoot then AllInactive:= true else if not isInMultiShoot then - AllInactive:= false; + AllInactive:= false;*) + AllInactive:= false; if (TurnTimeLeft = 0) or (HHGear^.Damage > 0) then begin + if (Hedgehog^.CurAmmoType = amKnife) then + LoadHedgehogHat(Hedgehog^, Hedgehog^.Hat); if TagTurnTimeLeft = 0 then TagTurnTimeLeft:= TurnTimeLeft; TurnTimeLeft:= 0; @@ -1078,7 +1093,6 @@ exit end; -if not isInMultiShoot then HedgehogChAngle(HHGear); if (HHGear^.State and gstMoving) <> 0 then @@ -1114,7 +1128,7 @@ exit end; - if not isInMultiShoot and (Hedgehog^.Gear <> nil) then + if Hedgehog^.Gear <> nil then begin if GHStepTicks > 0 then dec(GHStepTicks); diff -r d5d5e1698554 -r 1dedcc37bfe8 hedgewars/uGearsList.pas --- a/hedgewars/uGearsList.pas Sun Nov 18 01:06:01 2012 +0400 +++ b/hedgewars/uGearsList.pas Fri Feb 22 05:05:32 2013 +0100 @@ -35,8 +35,83 @@ uTextures, uScript, uRenderUtils, uAI, uCollisions, uGearsRender, uGearsUtils, uDebug; +const + GearKindAmmoTypeMap : array [TGearType] of TAmmoType = ( +(* gtFlame *) amNothing +(* gtHedgehog *) , amNothing +(* gtMine *) , amMine +(* gtCase *) , amNothing +(* gtExplosives *) , amNothing +(* gtGrenade *) , amGrenade +(* gtShell *) , amBazooka +(* gtGrave *) , amNothing +(* gtBee *) , amBee +(* gtShotgunShot *) , amShotgun +(* gtPickHammer *) , amPickHammer +(* gtRope *) , amRope +(* gtDEagleShot *) , amDEagle +(* gtDynamite *) , amDynamite +(* gtClusterBomb *) , amClusterBomb +(* gtCluster *) , amClusterBomb +(* gtShover *) , amBaseballBat // Shover is only used for baseball bat right now +(* gtFirePunch *) , amFirePunch +(* gtATStartGame *) , amNothing +(* gtATFinishGame *) , amNothing +(* gtParachute *) , amParachute +(* gtAirAttack *) , amAirAttack +(* gtAirBomb *) , amAirAttack +(* gtBlowTorch *) , amBlowTorch +(* gtGirder *) , amGirder +(* gtTeleport *) , amTeleport +(* gtSwitcher *) , amSwitch +(* gtTarget *) , amNothing +(* gtMortar *) , amMortar +(* gtWhip *) , amWhip +(* gtKamikaze *) , amKamikaze +(* gtCake *) , amCake +(* gtSeduction *) , amSeduction +(* gtWatermelon *) , amWatermelon +(* gtMelonPiece *) , amWatermelon +(* gtHellishBomb *) , amHellishBomb +(* gtWaterUp *) , amNothing +(* gtDrill *) , amDrill +(* gtBallGun *) , amBallgun +(* gtBall *) , amBallgun +(* gtRCPlane *) , amRCPlane +(*gtSniperRifleShot *) , amSniperRifle +(* gtJetpack *) , amJetpack +(* gtMolotov *) , amMolotov +(* gtBirdy *) , amBirdy +(* gtEgg *) , amBirdy +(* gtPortal *) , amPortalGun +(* gtPiano *) , amPiano +(* gtGasBomb *) , amGasBomb +(* gtSineGunShot *) , amSineGun +(* gtFlamethrower *) , amFlamethrower +(* gtSMine *) , amSMine +(* gtPoisonCloud *) , amNothing +(* gtHammer *) , amHammer +(* gtHammerHit *) , amHammer +(* gtResurrector *) , amResurrector +(* gtPoisonCloud *) , amNothing +(* gtSnowball *) , amSnowball +(* gtFlake *) , amNothing +//(* gtStructure *) , amStructure // TODO - This will undoubtedly change once there is more than one structure +(* gtLandGun *) , amLandGun +(* gtTardis *) , amTardis +(* gtIceGun *) , amIceGun +(* gtAddAmmo *) , amNothing +(* gtGenericFaller *) , amNothing +(* gtKnife *) , amKnife + ); + + var GCounter: LongWord = 0; // this does not get re-initialized, but should be harmless +const + cUsualZ = 500; + cOnHHZ = 2000; + procedure InsertGearToList(Gear: PGear); var tmp, ptmp: PGear; begin @@ -252,7 +327,7 @@ end; gtKnife: begin gear^.Density:= _4; - gear^.Radius:= 16 + gear^.Radius:= 7 end; gtCase: begin gear^.ImpactSound:= sndGraveImpact; @@ -461,6 +536,7 @@ gear^.Radius:= 5; gear^.Density:= _1_5; end; +{ gtStructure: begin gear^.Elasticity:= _0_55; gear^.Friction:= _0_995; @@ -471,6 +547,7 @@ gear^.Tag:= TotalRounds + 3; gear^.Pos:= 1; end; +} gtIceGun: gear^.Health:= 1000; gtGenericFaller:begin gear^.AdvBounce:= 1; diff -r d5d5e1698554 -r 1dedcc37bfe8 hedgewars/uGearsRender.pas --- a/hedgewars/uGearsRender.pas Sun Nov 18 01:06:01 2012 +0400 +++ b/hedgewars/uGearsRender.pas Fri Feb 22 05:05:32 2013 +0100 @@ -39,6 +39,14 @@ implementation uses uRender, uUtils, uVariables, uAmmos, Math, uVisualGears; +const + // hog tag mask + //htNone = $00; + htTeamName = $01; + htName = $02; + htHealth = $04; + htTransparent = $08; + procedure DrawRopeLinesRQ(Gear: PGear); begin with RopePoints do @@ -1098,8 +1106,8 @@ startX:= max(max(LAND_WIDTH,4096) + 1024, endX + 2048) else startX:= max(-max(LAND_WIDTH,4096) - 1024, endX - 2048); - startY:= endY - 256; - DrawTextureF(SpritesData[sprBirdy].Texture, 1, startX + WorldDx + LongInt(round((endX - startX) * (-power(2, -10 * LongInt(Gear^.Timer)/2000) + 1))), startY + WorldDy + LongInt(round((endY - startY) * sqrt(1 - power((LongInt(Gear^.Timer)/2000)-1, 2)))), ((Gear^.Pos shr 6) or (RealTicks shr 8)) mod 2, Gear^.Tag, 75, 75); + startY:= endY - 1024; + DrawTextureF(SpritesData[sprBirdy].Texture, min(Gear^.Timer/750,1), startX + WorldDx + LongInt(round((endX - startX) * (-power(2, -10 * LongInt(Gear^.Timer)/2000) + 1))), startY + WorldDy + LongInt(round((endY - startY) * sqrt(1 - power((LongInt(Gear^.Timer)/2000)-1, 2)))), ((Gear^.Pos shr 6) or (RealTicks shr 8)) mod 2, Gear^.Tag, 75, 75); end else // Disappearing begin @@ -1109,8 +1117,8 @@ endX:= max(max(LAND_WIDTH,4096) + 1024, startX + 2048) else endX:= max(-max(LAND_WIDTH,4096) - 1024, startX - 2048); - endY:= startY + 256; - DrawTextureF(SpritesData[sprBirdy].Texture, 1, startX + WorldDx + LongInt(round((endX - startX) * power(2, 10 * (LongInt(Gear^.Timer)/2000 - 1)))) + hwRound(Gear^.dX * Gear^.Timer), startY + WorldDy + LongInt(round((endY - startY) * cos(LongInt(Gear^.Timer)/2000 * (Pi/2)) - (endY - startY))) + hwRound(Gear^.dY * Gear^.Timer), ((Gear^.Pos shr 6) or (RealTicks shr 8)) mod 2, Gear^.Tag, 75, 75); + endY:= startY + 1024; + DrawTextureF(SpritesData[sprBirdy].Texture, min((2000-Gear^.Timer)/750,1), startX + WorldDx + LongInt(round((endX - startX) * power(2, 10 * (LongInt(Gear^.Timer)/2000 - 1)))) + hwRound(Gear^.dX * Gear^.Timer), startY + WorldDy + LongInt(round((endY - startY) * cos(LongInt(Gear^.Timer)/2000 * (Pi/2)) - (endY - startY))) + hwRound(Gear^.dY * Gear^.Timer), ((Gear^.Pos shr 6) or (RealTicks shr 8)) mod 2, Gear^.Tag, 75, 75); end; end else @@ -1178,7 +1186,7 @@ if Gear^.FlightTime > 0 then Tint($FF, $FF, $FF, $FF); end; - gtStructure: DrawSprite(sprTarget, x - 16, y - 16, 0); + //gtStructure: DrawSprite(sprTarget, x - 16, y - 16, 0); gtTardis: if Gear^.Pos <> 4 then begin if Gear^.Pos = 2 then diff -r d5d5e1698554 -r 1dedcc37bfe8 hedgewars/uGearsUtils.pas --- a/hedgewars/uGearsUtils.pas Sun Nov 18 01:06:01 2012 +0400 +++ b/hedgewars/uGearsUtils.pas Fri Feb 22 05:05:32 2013 +0100 @@ -106,8 +106,8 @@ gtTarget, gtFlame, gtKnife, - gtExplosives, - gtStructure: begin + gtExplosives: begin //, + //gtStructure: begin // Run the calcs only once we know we have a type that will need damage tdX:= Gear^.X-fX; tdY:= Gear^.Y-fY; @@ -243,8 +243,8 @@ end; uStats.HedgehogDamaged(Gear, AttackerHog, Damage, false); end; - end - else if Gear^.Kind <> gtStructure then // not gtHedgehog nor gtStructure + end else + //else if Gear^.Kind <> gtStructure then // not gtHedgehog nor gtStructure Gear^.Hedgehog:= AttackerHog; inc(Gear^.Damage, Damage); diff -r d5d5e1698554 -r 1dedcc37bfe8 hedgewars/uIO.pas --- a/hedgewars/uIO.pas Sun Nov 18 01:06:01 2012 +0400 +++ b/hedgewars/uIO.pas Fri Feb 22 05:05:32 2013 +0100 @@ -30,7 +30,7 @@ procedure SendIPCXY(cmd: char; X, Y: LongInt); procedure SendIPCRaw(p: pointer; len: Longword); procedure SendIPCAndWaitReply(s: shortstring); -procedure SendKeepAliveMessage(Lag: Longword); +procedure FlushMessages(Lag: Longword); procedure LoadRecordFromFile(fileName: shortstring); procedure SendStat(sit: TStatInfoType; s: shortstring); procedure IPCWaitPongEvent; @@ -41,6 +41,10 @@ implementation uses uConsole, uConsts, uVariables, uCommands, uUtils, uDebug; +const + cSendEmptyPacketTime = 1000; + cSendBufferSize = 1024; + type PCmd = ^TCmd; TCmd = packed record Next: PCmd; @@ -60,7 +64,11 @@ headcmd: PCmd; lastcmd: PCmd; - SendEmptyPacketTicks: LongWord; + flushDelayTicks: LongWord; + sendBuffer: record + buf: array[0..Pred(cSendBufferSize)] of byte; + count: Word; + end; function AddCmd(Time: Word; str: shortstring): PCmd; var command: PCmd; @@ -121,6 +129,7 @@ 'E': OutError(copy(s, 2, Length(s) - 1), true); 'W': OutError(copy(s, 2, Length(s) - 1), false); 'M': ParseCommand('landcheck ' + s, true); + 'o': if fastUntilLag then ParseCommand('forcequit', true); 'T': case s[2] of 'L': GameType:= gmtLocal; 'D': GameType:= gmtDemo; @@ -135,7 +144,7 @@ else loTicks:= SDLNet_Read16(@s[byte(s[0]) - 1]); AddCmd(loTicks, s); - AddFileLog('[IPC in] '+s[1]+' ticks '+IntToStr(lastcmd^.loTime)); + AddFileLog('[IPC in] ' + sanitizeCharForLog(s[1]) + ' ticks ' + IntToStr(lastcmd^.loTime)); end end; @@ -210,19 +219,39 @@ SendIPCRaw(@buf[0], length(buf) + 1) end; +function isSyncedCommand(c: char): boolean; +begin + isSyncedCommand:= (c in ['+', '#', 'L', 'l', 'R', 'r', 'U', 'u', 'D', 'd', 'Z', 'z', 'A', 'a', 'S', 'j', 'J', ',', 'c', 's', 'b', 'F', 'N', 'p', 'P', 'w', 't', 'h', '1', '2', '3', '4', '5']) or ((c >= #128) and (c <= char(128 + cMaxSlotIndex))) +end; + +procedure flushBuffer(); +begin + SDLNet_TCP_Send(IPCSock, @sendBuffer.buf, sendBuffer.count); + flushDelayTicks:= 0; + sendBuffer.count:= 0 +end; procedure SendIPC(s: shortstring); begin if IPCSock <> nil then begin - SendEmptyPacketTicks:= 0; - if s[0]>#251 then + if s[0] > #251 then s[0]:= #251; SDLNet_Write16(GameTicks, @s[Succ(byte(s[0]))]); - AddFileLog('[IPC out] '+ s[1]); + + AddFileLog('[IPC out] '+ sanitizeCharForLog(s[1])); inc(s[0], 2); - SDLNet_TCP_Send(IPCSock, @s, Succ(byte(s[0]))) + + if isSyncedCommand(s[1]) then + begin + if sendBuffer.count + byte(s[0]) >= cSendBufferSize then + flushBuffer(); + + Move(s, sendBuffer.buf[sendBuffer.count], byte(s[0]) + 1); + inc(sendBuffer.count, byte(s[0]) + 1) + end else + SDLNet_TCP_Send(IPCSock, @s, Succ(byte(s[0]))) end end; @@ -237,10 +266,10 @@ procedure SendIPCXY(cmd: char; X, Y: LongInt); var s: shortstring; begin -s[0]:= #5; +s[0]:= #9; s[1]:= cmd; SDLNet_Write32(X, @s[2]); -SDLNet_Write32(Y, @s[4]); +SDLNet_Write32(Y, @s[6]); SendIPC(s) end; @@ -260,11 +289,16 @@ IPCWaitPongEvent end; -procedure SendKeepAliveMessage(Lag: Longword); +procedure FlushMessages(Lag: Longword); begin -inc(SendEmptyPacketTicks, Lag); -if (SendEmptyPacketTicks >= cSendEmptyPacketTime) then - SendIPC(_S'+') +inc(flushDelayTicks, Lag); +if (flushDelayTicks >= cSendEmptyPacketTime) then + begin + if sendBuffer.count = 0 then + SendIPC(_S'+'); + + flushBuffer() + end end; procedure NetGetNextCmd; @@ -335,10 +369,12 @@ // these are equations solved for CursorPoint // SDLNet_Read16(@(headcmd^.X)) == CursorPoint.X - WorldDx; // SDLNet_Read16(@(headcmd^.Y)) == cScreenHeight - CursorPoint.Y - WorldDy; - if not (CurrentTeam^.ExtDriven and bShowAmmoMenu) then + if CurrentTeam^.ExtDriven then begin - CursorPoint.X:= LongInt(SDLNet_Read32(@(headcmd^.X))) + WorldDx; - CursorPoint.Y:= cScreenHeight - LongInt(SDLNet_Read32(@(headcmd^.Y))) - WorldDy + TargetCursorPoint.X:= LongInt(SDLNet_Read32(@(headcmd^.X))) + WorldDx; + TargetCursorPoint.Y:= cScreenHeight - LongInt(SDLNet_Read32(@(headcmd^.Y))) - WorldDy; + if not bShowAmmoMenu and autoCameraOn then + CursorPoint:= TargetCursorPoint end end; 'w': ParseCommand('setweap ' + headcmd^.str[2], true); @@ -428,7 +464,8 @@ SocketString:= ''; hiTicks:= 0; - SendEmptyPacketTicks:= 0; + flushDelayTicks:= 0; + sendBuffer.count:= 0; end; procedure freeModule; diff -r d5d5e1698554 -r 1dedcc37bfe8 hedgewars/uInputHandler.pas --- a/hedgewars/uInputHandler.pas Sun Nov 18 01:06:01 2012 +0400 +++ b/hedgewars/uInputHandler.pas Fri Feb 22 05:05:32 2013 +0100 @@ -39,6 +39,7 @@ procedure SetBinds(var binds: TBinds); procedure SetDefaultBinds; +procedure chDefaultBind(var id: shortstring); procedure ControllerInit; procedure ControllerAxisEvent(joy, axis: Byte; value: Integer); @@ -60,6 +61,17 @@ quitKeyCode, closeKeyCode: Byte; KeyNames: array [0..cKeyMaxIndex] of string[15]; CurrentBinds: TBinds; + ControllerNumControllers: Integer; + ControllerEnabled: Integer; + ControllerNumAxes: array[0..5] of Integer; + //ControllerNumBalls: array[0..5] of Integer; + ControllerNumHats: array[0..5] of Integer; + ControllerNumButtons: array[0..5] of Integer; + //ControllerAxes: array[0..5] of array[0..19] of Integer; + //ControllerBalls: array[0..5] of array[0..19] of array[0..1] of Integer; + //ControllerHats: array[0..5] of array[0..19] of Byte; + //ControllerButtons: array[0..5] of array[0..19] of Byte; + usingDBinds: boolean; function KeyNameToCode(name: shortstring): LongInt; inline; begin @@ -319,9 +331,9 @@ binds:= binds; // avoid hint CurrentBinds:= DefaultBinds; {$ELSE} -for t:= 0 to cKbdMaxIndex do - if (CurrentBinds[t] <> binds[t]) and tkbd[t] then - ProcessKey(t, False); + for t:= 0 to cKbdMaxIndex do + if (CurrentBinds[t] <> binds[t]) and tkbd[t] then + ProcessKey(t, False); CurrentBinds:= binds; {$ENDIF} @@ -343,7 +355,7 @@ var Controller: array [0..5] of PSDL_Joystick; procedure ControllerInit; -var i, j: Integer; +var j: Integer; begin ControllerEnabled:= 0; {$IFDEF IPHONE} @@ -388,18 +400,18 @@ if ControllerNumButtons[j] > 20 then ControllerNumButtons[j]:= 20; - // reset all buttons/axes + (*// reset all buttons/axes for i:= 0 to pred(ControllerNumAxes[j]) do ControllerAxes[j][i]:= 0; - (*for i:= 0 to pred(ControllerNumBalls[j]) do + for i:= 0 to pred(ControllerNumBalls[j]) do begin ControllerBalls[j][i][0]:= 0; ControllerBalls[j][i][1]:= 0; - end;*) + end; for i:= 0 to pred(ControllerNumHats[j]) do ControllerHats[j][i]:= SDL_HAT_CENTERED; for i:= 0 to pred(ControllerNumButtons[j]) do - ControllerButtons[j][i]:= 0; + ControllerButtons[j][i]:= 0;*) end; end; // enable event generation/controller updating @@ -440,8 +452,45 @@ ProcessKey(k + ControllerNumAxes[joy]*2 + ControllerNumHats[joy]*4 + button, pressed); end; +// Bind that isn't a team bind, but overrides defaultbinds. +// When first called, DefaultBinds is cleared, because we assume we are getting a full list of dbinds. +procedure chDefaultBind(var id: shortstring); +var KeyName, Modifier, tmp: shortstring; + b: LongInt; +begin +KeyName:= ''; +Modifier:= ''; + +if (not usingDBinds) then + begin + usingDBinds:= true; + FillByte(DefaultBinds, SizeOf(DefaultBinds), 0); + end; + +if (Pos('mod:', id) <> 0) then + begin + tmp:= ''; + SplitBySpace(id, tmp); + Modifier:= id; + id:= tmp; + end; + +SplitBySpace(id, KeyName); +if KeyName[1]='"' then + Delete(KeyName, 1, 1); +if KeyName[byte(KeyName[0])]='"' then + Delete(KeyName, byte(KeyName[0]), 1); +b:= KeyNameToCode(id, Modifier); +if b = 0 then + OutError(errmsgUnknownVariable + ' "' + id + '"', false) +else + DefaultBinds[b]:= KeyName; +end; + procedure initModule; begin + usingDBinds:= false; + RegisterVariable('dbind', @chDefaultBind, true ); end; procedure freeModule; diff -r d5d5e1698554 -r 1dedcc37bfe8 hedgewars/uLand.pas --- a/hedgewars/uLand.pas Sun Nov 18 01:06:01 2012 +0400 +++ b/hedgewars/uLand.pas Fri Feb 22 05:05:32 2013 +0100 @@ -31,7 +31,7 @@ implementation uses uConsole, uStore, uRandom, uLandObjects, uIO, uLandTexture, SysUtils, uVariables, uUtils, uCommands, adler32, uDebug, uLandPainted, uTextures, - uLandGenMaze, uLandOutline; + uLandGenMaze, uLandOutline, uPhysFSLayer; var digest: shortstring; @@ -423,26 +423,26 @@ end; procedure LoadMapConfig; -var f: textfile; +var f: PFSFile; s: shortstring; begin s:= cPathz[ptMapCurrent] + '/map.cfg'; WriteLnToConsole('Fetching map HH limit'); -{$I-} -Assign(f, s); -filemode:= 0; // readonly -Reset(f); -if IOResult <> 0 then + +f:= pfsOpenRead(s); +if f <> nil then begin - s:= cPathz[ptMissionMaps] + '/' + ExtractFileName(cPathz[ptMapCurrent]) + '/map.cfg'; - Assign(f, s); - Reset(f); + pfsReadLn(f, s); + if not pfsEof(f) then + begin + pfsReadLn(f, s); + val(s, MaxHedgehogs) + end; + + pfsClose(f) end; -Readln(f); -if not eof(f) then - Readln(f, MaxHedgehogs); -{$I+} + if (MaxHedgehogs = 0) then MaxHedgehogs:= 18; end; @@ -523,7 +523,6 @@ procedure LoadMap; var tmpsurf: PSDL_Surface; - s: shortstring; mapName: shortstring = ''; begin WriteLnToConsole('Loading land from file...'); @@ -596,7 +595,7 @@ begin map:= cPathz[ptMapCurrent] + '/map.png'; mask:= cPathz[ptMapCurrent] + '/mask.png'; - if (not(FileExists(map)) and FileExists(mask)) then + if (not(pfsExists(map)) and pfsExists(mask)) then begin maskOnly:= true; LoadMask; @@ -631,7 +630,7 @@ if Land[y, x] <> 0 then begin inc(c); - if c > 1000 then // avoid accidental triggering + if c > LongWord((LAND_WIDTH div 2)) then // avoid accidental triggering begin hasBorder:= true; break; diff -r d5d5e1698554 -r 1dedcc37bfe8 hedgewars/uLandObjects.pas --- a/hedgewars/uLandObjects.pas Sun Nov 18 01:06:01 2012 +0400 +++ b/hedgewars/uLandObjects.pas Fri Feb 22 05:05:32 2013 +0100 @@ -37,6 +37,7 @@ const MaxRects = 512; MAXOBJECTRECTS = 16; MAXTHEMEOBJECTS = 32; + cThemeCFGFilename = 'theme.cfg'; type TRectsArray = array[0..MaxRects] of TSDL_Rect; PRectArray = ^TRectsArray; diff -r d5d5e1698554 -r 1dedcc37bfe8 hedgewars/uLandOutline.pas --- a/hedgewars/uLandOutline.pas Sun Nov 18 01:06:01 2012 +0400 +++ b/hedgewars/uLandOutline.pas Fri Feb 22 05:05:32 2013 +0100 @@ -27,6 +27,9 @@ end end; +const + cMaxEdgePoints = 16384; + procedure Push(_xl, _xr, _y, _dir: LongInt); begin TryDo(Stack.Count <= 8192, 'FillLand: stack overflow', true); diff -r d5d5e1698554 -r 1dedcc37bfe8 hedgewars/uLandTexture.pas --- a/hedgewars/uLandTexture.pas Sun Nov 18 01:06:01 2012 +0400 +++ b/hedgewars/uLandTexture.pas Fri Feb 22 05:05:32 2013 +0100 @@ -66,6 +66,7 @@ procedure UpdateLandTexture(X, Width, Y, Height: LongInt; landAdded: boolean); var tx, ty: Longword; begin + if cOnlyStats then exit; if (Width <= 0) or (Height <= 0) then exit; TryDo((X >= 0) and (X < LAND_WIDTH), 'UpdateLandTexture: wrong X parameter', true); @@ -93,6 +94,7 @@ var x, y, ty, tx, lx, ly : LongWord; isEmpty: boolean; begin + if cOnlyStats then exit; (* if LandTextures[0, 0].tex = nil then for x:= 0 to LANDTEXARW -1 do diff -r d5d5e1698554 -r 1dedcc37bfe8 hedgewars/uLocale.pas --- a/hedgewars/uLocale.pas Sun Nov 18 01:06:01 2012 +0400 +++ b/hedgewars/uLocale.pas Fri Feb 22 05:05:32 2013 +0100 @@ -40,14 +40,12 @@ trevt_n: array[TEventId] of integer; procedure LoadLocale(FileName: shortstring); -var s: shortstring; +var s: ansistring = ''; f: pfsFile; a, b, c: LongInt; first: array[TEventId] of boolean; e: TEventId; - loaded: boolean; begin -loaded:= false; for e:= Low(TEventId) to High(TEventId) do first[e]:= true; @@ -58,7 +56,7 @@ begin while not pfsEof(f) do begin - pfsReadLn(f, s); + pfsReadLnA(f, s); if Length(s) = 0 then continue; if (s[1] < '0') or (s[1] > '9') then diff -r d5d5e1698554 -r 1dedcc37bfe8 hedgewars/uMobile.pas --- a/hedgewars/uMobile.pas Sun Nov 18 01:06:01 2012 +0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,110 +0,0 @@ -(* - * Hedgewars, a free turn based strategy game - * Copyright (c) 2004-2012 Andrey Korotaev - * - * 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"} - -(* - * This unit contains a lot of useful functions when hw is running on mobile - * Unlike HwLibrary when you declare functions that you will call from your code, - * here you need to provide functions that Pascall code will call. - *) - -unit uMobile; -interface - -function isPhone: Boolean; inline; -function getScreenDPI: Double; inline; -procedure performRumble; inline; - -procedure GameLoading; inline; -procedure GameLoaded; inline; -procedure SaveLoadingEnded; inline; - -implementation -uses uVariables, uConsole, SDLh; - -// add here any external call that you need -{$IFDEF IPHONEOS} -(* iOS calls written in ObjcExports.m *) -procedure startLoadingIndicator; cdecl; external; -procedure stopLoadingIndicator; cdecl; external; -procedure saveFinishedSynching; cdecl; external; -function isApplePhone: Boolean; cdecl; external; -procedure AudioServicesPlaySystemSound(num: LongInt); cdecl; external; -{$ENDIF} - -// this function is just to determine whether we are running on a limited screen device -function isPhone: Boolean; inline; -begin - isPhone:= false; -{$IFDEF IPHONEOS} - isPhone:= isApplePhone(); -{$ENDIF} -{$IFDEF ANDROID} - //nasty nasty hack. TODO: implement callback to java to have a unified way of determining if it is a tablet - if (cScreenWidth < 1000) and (cScreenHeight < 500) then - isPhone:= true; -{$ENDIF} -end; - -function getScreenDPI: Double; inline; -begin -{$IFDEF ANDROID} -// getScreenDPI:= Android_JNI_getDensity(); - getScreenDPI:= 1; -{$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} -begin - // do not vibrate while synchronising a demo/save - if not fastUntilLag then - begin -{$IFDEF IPHONEOS} - AudioServicesPlaySystemSound(kSystemSoundID_Vibrate); -{$ENDIF} - end; -end; - -procedure GameLoading; inline; -begin -{$IFDEF IPHONEOS} - startLoadingIndicator(); -{$ENDIF} -end; - -procedure GameLoaded; inline; -begin -{$IFDEF IPHONEOS} - stopLoadingIndicator(); -{$ENDIF} -end; - -procedure SaveLoadingEnded; inline; -begin -{$IFDEF IPHONEOS} - saveFinishedSynching(); -{$ENDIF} -end; - - -end. diff -r d5d5e1698554 -r 1dedcc37bfe8 hedgewars/uPhysFSLayer.pas --- a/hedgewars/uPhysFSLayer.pas Sun Nov 18 01:06:01 2012 +0400 +++ b/hedgewars/uPhysFSLayer.pas Fri Feb 22 05:05:32 2013 +0100 @@ -1,10 +1,22 @@ unit uPhysFSLayer; -{$LINKLIB ../bin/libphysfs.a} -{$LINKLIB ../bin/libphysfsrwops.a} +interface +uses SDLh, LuaPas; -interface -uses SDLh; +{$IFDEF ANDROID} + {$linklib physfs} +{$ELSE} + {$IFDEF DARWIN} + {$LINKFRAMEWORK IOKit} + {$ENDIF} +{$ENDIF} + +const +{$IFDEF WIN32} + PhysfsLibName = 'libphysfs'; +{$ELSE} + PhysfsLibName = 'physfs'; +{$ENDIF} procedure initModule; procedure freeModule; @@ -18,27 +30,31 @@ function pfsClose(f: PFSFile): boolean; procedure pfsReadLn(f: PFSFile; var s: shortstring); +procedure pfsReadLnA(f: PFSFile; var s: ansistring); function pfsBlockRead(f: PFSFile; buf: pointer; size: Int64): Int64; function pfsEOF(f: PFSFile): boolean; function pfsExists(fname: shortstring): boolean; -implementation -uses uUtils, uVariables; +function physfsReader(L: Plua_State; f: PFSFile; sz: Psize_t) : PChar; cdecl; external PhysfsLibName; +procedure physfsReaderSetBuffer(buf: pointer); cdecl; external PhysfsLibName; -function PHYSFS_init(argv0: PChar) : LongInt; cdecl; external; -function PHYSFS_deinit() : LongInt; cdecl; external; -function PHYSFSRWOPS_openRead(fname: PChar): PSDL_RWops; cdecl; external; -function PHYSFSRWOPS_openWrite(fname: PChar): PSDL_RWops; cdecl; external; +implementation +uses uUtils, uVariables, sysutils; -function PHYSFS_mount(newDir, mountPoint: PChar; appendToPath: LongBool) : LongInt; cdecl; external; -function PHYSFS_openRead(fname: PChar): PFSFile; cdecl; external; -function PHYSFS_eof(f: PFSFile): LongBool; cdecl; external; -function PHYSFS_readBytes(f: PFSFile; buffer: pointer; len: Int64): Int64; cdecl; external; -function PHYSFS_close(f: PFSFile): LongBool; cdecl; external; -function PHYSFS_exists(fname: PChar): LongBool; cdecl; external; +function PHYSFS_init(argv0: PChar) : LongInt; cdecl; external PhysfsLibName; +function PHYSFS_deinit() : LongInt; cdecl; external PhysfsLibName; +function PHYSFSRWOPS_openRead(fname: PChar): PSDL_RWops; cdecl ; external PhysfsLibName; +function PHYSFSRWOPS_openWrite(fname: PChar): PSDL_RWops; cdecl; external PhysfsLibName; -procedure hedgewarsMountPackages(); cdecl; external; +function PHYSFS_mount(newDir, mountPoint: PChar; appendToPath: LongBool) : LongInt; cdecl; external PhysfsLibName; +function PHYSFS_openRead(fname: PChar): PFSFile; cdecl; external PhysfsLibName; +function PHYSFS_eof(f: PFSFile): LongBool; cdecl; external PhysfsLibName; +function PHYSFS_readBytes(f: PFSFile; buffer: pointer; len: Int64): Int64; cdecl; external PhysfsLibName; +function PHYSFS_close(f: PFSFile): LongBool; cdecl; external PhysfsLibName; +function PHYSFS_exists(fname: PChar): LongBool; cdecl; external PhysfsLibName; + +procedure hedgewarsMountPackages(); cdecl; external PhysfsLibName; function rwopsOpenRead(fname: shortstring): PSDL_RWops; begin @@ -84,6 +100,28 @@ end end; +procedure pfsReadLnA(f: PFSFile; var s: ansistring); +var c: char; + b: shortstring; +begin +s:= ''; +b[0]:= #0; + +while (PHYSFS_readBytes(f, @c, 1) = 1) and (c <> #10) do + if (c <> #13) then + begin + inc(b[0]); + b[byte(b[0])]:= c; + if b[0] = #255 then + begin + s:= s + b; + b[0]:= #0 + end + end; + +s:= s + b +end; + function pfsBlockRead(f: PFSFile; buf: pointer; size: Int64): Int64; var r: Int64; begin @@ -97,8 +135,16 @@ procedure initModule; var i: LongInt; + cPhysfsId: shortstring; begin - i:= PHYSFS_init(Str2PChar(ParamStr(0))); +{$IFDEF HWLIBRARY} + //TODO: http://icculus.org/pipermail/physfs/2011-August/001006.html + cPhysfsId:= GetCurrentDir() + {$IFDEF DARWIN}'/Hedgewars.app/Contents/MacOS/' + {$ENDIF} ' hedgewars'; +{$ELSE} + cPhysfsId:= ParamStr(0); +{$ENDIF} + + i:= PHYSFS_init(Str2PChar(cPhysfsId)); AddFileLog('[PhysFS] init: ' + inttostr(i)); i:= PHYSFS_mount(Str2PChar(PathPrefix), nil, true); diff -r d5d5e1698554 -r 1dedcc37bfe8 hedgewars/uRender.pas --- a/hedgewars/uRender.pas Sun Nov 18 01:06:01 2012 +0400 +++ b/hedgewars/uRender.pas Fri Feb 22 05:05:32 2013 +0100 @@ -55,6 +55,12 @@ implementation uses uVariables; +{$IFDEF USE_TOUCH_INTERFACE} +const + FADE_ANIM_TIME = 500; + MOVE_ANIM_TIME = 500; +{$ENDIF} + var LastTint: LongWord = 0; procedure DrawSpriteFromRect(Sprite: TSprite; r: TSDL_Rect; X, Y, Height, Position: LongInt); diff -r d5d5e1698554 -r 1dedcc37bfe8 hedgewars/uScript.pas --- a/hedgewars/uScript.pas Sun Nov 18 01:06:01 2012 +0400 +++ b/hedgewars/uScript.pas Fri Feb 22 05:05:32 2013 +0100 @@ -37,6 +37,7 @@ procedure ScriptLoad(name : shortstring); procedure ScriptOnGameInit; procedure ScriptOnScreenResize; +procedure ScriptSetInteger(name : shortstring; value : LongInt); procedure ScriptCall(fname : shortstring); function ScriptCall(fname : shortstring; par1: LongInt) : LongInt; @@ -224,6 +225,35 @@ lc_hidemission:= 0; end; +function lc_enablegameflags(L : Plua_State) : LongInt; Cdecl; +var i : integer; +begin + for i:= 1 to lua_gettop(L) do + if (GameFlags and lua_tointeger(L, i)) = 0 then + GameFlags := GameFlags + LongWord(lua_tointeger(L, i)); + ScriptSetInteger('GameFlags', GameFlags); + lc_enablegameflags:= 0; +end; + +function lc_disablegameflags(L : Plua_State) : LongInt; Cdecl; +var i : integer; +begin + for i:= 1 to lua_gettop(L) do + if (GameFlags and lua_tointeger(L, i)) <> 0 then + GameFlags := GameFlags - LongWord(lua_tointeger(L, i)); + ScriptSetInteger('GameFlags', GameFlags); + lc_disablegameflags:= 0; +end; + +function lc_cleargameflags(L : Plua_State) : LongInt; Cdecl; +begin + // Silence hint + L:= L; + GameFlags:= 0; + ScriptSetInteger('GameFlags', GameFlags); + lc_cleargameflags:= 0; +end; + function lc_addcaption(L : Plua_State) : LongInt; Cdecl; begin if lua_gettop(L) = 1 then @@ -690,7 +720,7 @@ else begin gear := GearByUID(lua_tointeger(L, 1)); - if (gear <> nil) and (gear^.Kind = gtHedgehog) and (gear^.Hedgehog <> nil) then + if (gear <> nil) and ((gear^.Kind = gtHedgehog) or (gear^.Kind = gtGrave)) and (gear^.Hedgehog <> nil) then lua_pushinteger(L, gear^.Hedgehog^.BotLevel) else lua_pushnil(L); @@ -723,7 +753,7 @@ else begin gear:= GearByUID(lua_tointeger(L, 1)); - if (gear <> nil) and (gear^.Kind = gtHedgehog) and (gear^.Hedgehog <> nil) then + if (gear <> nil) and ((gear^.Kind = gtHedgehog) or (gear^.Kind = gtGrave)) and (gear^.Hedgehog <> nil) then begin lua_pushinteger(L, gear^.Hedgehog^.Team^.Clan^.ClanIndex) end @@ -805,7 +835,7 @@ else begin gear:= GearByUID(lua_tointeger(L, 1)); - if (gear <> nil) and (gear^.Kind = gtHedgehog) and (gear^.Hedgehog <> nil) then + if (gear <> nil) and ((gear^.Kind = gtHedgehog) or (gear^.Kind = gtGrave)) and (gear^.Hedgehog <> nil) then begin lua_pushstring(L, str2pchar(gear^.Hedgehog^.Team^.TeamName)) end @@ -826,7 +856,7 @@ else begin gear:= GearByUID(lua_tointeger(L, 1)); - if (gear <> nil) and (gear^.Kind = gtHedgehog) and (gear^.Hedgehog <> nil) then + if (gear <> nil) and ((gear^.Kind = gtHedgehog) or (gear^.Kind = gtGrave)) and (gear^.Hedgehog <> nil) then begin lua_pushstring(L, str2pchar(gear^.Hedgehog^.Name)) end @@ -1251,7 +1281,7 @@ function lc_endgame(L : Plua_State) : LongInt; Cdecl; begin L:= L; // avoid compiler hint - GameState:= gsExit; + AddGear(0, 0, gtATFinishGame, 0, _0, _0, 3000); lc_endgame:= 0 end; @@ -1648,7 +1678,7 @@ LuaError('Lua: Wrong number of parameters passed to GetHogHat!') else begin gear := GearByUID(lua_tointeger(L, 1)); - if (gear <> nil) and (gear^.Kind = gtHedgehog) and (gear^.Hedgehog <> nil) then + if (gear <> nil) and ((gear^.Kind = gtHedgehog) or (gear^.Kind = gtGrave)) and (gear^.Hedgehog <> nil) then lua_pushstring(L, str2pchar(gear^.Hedgehog^.Hat)) else lua_pushnil(L); @@ -1735,8 +1765,7 @@ end; function lc_restorehog(L: Plua_State): LongInt; Cdecl; -var hog: PHedgehog; - i, h: LongInt; +var i, h: LongInt; uid: LongWord; begin if lua_gettop(L) <> 1 then @@ -1980,9 +2009,6 @@ // custom script loader via physfs, passed to lua_load const BUFSIZE = 1024; -var physfsReaderBuffer: pointer; external; -function physfsReader(L: Plua_State; f: PFSFile; sz: Psize_t) : PChar; cdecl; external; - procedure ScriptLoad(name : shortstring); var ret : LongInt; @@ -1998,7 +2024,7 @@ if f = nil then exit; -physfsReaderBuffer:= @buf; +physfsReaderSetBuffer(@buf); ret:= lua_load(luaState, @physfsReader, f, Str2PChar(s)); pfsClose(f); @@ -2020,7 +2046,6 @@ begin ScriptSetInteger('TurnTimeLeft', TurnTimeLeft); ScriptSetInteger('GameTime', GameTicks); -ScriptSetInteger('RealTime', RealTicks); ScriptSetInteger('TotalRounds', TotalRounds); ScriptSetInteger('WaterLine', cWaterLine); if GameTicks = 0 then @@ -2322,6 +2347,7 @@ ScriptSetInteger('gstHHGone' ,$00100000); ScriptSetInteger('gstInvisible' ,$00200000); +// ai hints ScriptSetInteger('aihUsualProcessing' ,$00000000); ScriptSetInteger('aihDoesntMatter' ,$00000001); @@ -2337,6 +2363,9 @@ lua_register(luaState, _P'GetInputMask', @lc_getinputmask); lua_register(luaState, _P'SetInputMask', @lc_setinputmask); lua_register(luaState, _P'AddGear', @lc_addgear); +lua_register(luaState, _P'EnableGameFlags', @lc_enablegameflags); +lua_register(luaState, _P'DisableGameFlags', @lc_disablegameflags); +lua_register(luaState, _P'ClearGameFlags', @lc_cleargameflags); lua_register(luaState, _P'DeleteGear', @lc_deletegear); lua_register(luaState, _P'AddVisualGear', @lc_addvisualgear); lua_register(luaState, _P'DeleteVisualGear', @lc_deletevisualgear); diff -r d5d5e1698554 -r 1dedcc37bfe8 hedgewars/uSound.pas --- a/hedgewars/uSound.pas Sun Nov 18 01:06:01 2012 +0400 +++ b/hedgewars/uSound.pas Fri Feb 22 05:05:32 2013 +0100 @@ -21,7 +21,7 @@ unit uSound; (* * This unit controls the sounds and music of the game. - * Doesn't really do anything if isSoundEnabled = false. + * Doesn't really do anything if isSoundEnabled = false and isMusicEnabled = false * * There are three basic types of sound controls: * Music - The background music of the game: @@ -105,12 +105,13 @@ function AskForVoicepack(name: shortstring): Pointer; +var Volume: LongInt; + SoundTimerTicks: Longword; implementation -uses uVariables, uConsole, uUtils, uCommands, uDebug, uPhysFSLayer; +uses uVariables, uConsole, uCommands, uDebug, uPhysFSLayer; const chanTPU = 32; -var Volume: LongInt; - cInitVolume: LongInt; +var cInitVolume: LongInt; previousVolume: LongInt; // cached volume value lastChan: array [TSound] of LongInt; voicepacks: array[0..cMaxTeams] of TVoicepack; @@ -120,6 +121,136 @@ isMusicEnabled: boolean; isSoundEnabled: boolean; isSEBackup: boolean; + VoiceList : array[0..7] of TVoice = ( + ( snd: sndNone; voicepack: nil), + ( snd: sndNone; voicepack: nil), + ( snd: sndNone; voicepack: nil), + ( snd: sndNone; voicepack: nil), + ( snd: sndNone; voicepack: nil), + ( snd: sndNone; voicepack: nil), + ( snd: sndNone; voicepack: nil), + ( snd: sndNone; voicepack: nil)); + Soundz: array[TSound] of record + FileName: string[31]; + Path : TPathType; + end = ( + (FileName: ''; Path: ptNone ),// sndNone + (FileName: 'grenadeimpact.ogg'; Path: ptSounds),// sndGrenadeImpact + (FileName: 'explosion.ogg'; Path: ptSounds),// sndExplosion + (FileName: 'throwpowerup.ogg'; Path: ptSounds),// sndThrowPowerUp + (FileName: 'throwrelease.ogg'; Path: ptSounds),// sndThrowRelease + (FileName: 'splash.ogg'; Path: ptSounds),// sndSplash + (FileName: 'shotgunreload.ogg'; Path: ptSounds),// sndShotgunReload + (FileName: 'shotgunfire.ogg'; Path: ptSounds),// sndShotgunFire + (FileName: 'graveimpact.ogg'; Path: ptSounds),// sndGraveImpact + (FileName: 'mineimpact.ogg'; Path: ptSounds),// sndMineImpact + (FileName: 'minetick.ogg'; Path: ptSounds),// sndMineTicks + (FileName: 'Droplet1.ogg'; Path: ptSounds),// sndMudballImpact + (FileName: 'pickhammer.ogg'; Path: ptSounds),// sndPickhammer + (FileName: 'gun.ogg'; Path: ptSounds),// sndGun + (FileName: 'bee.ogg'; Path: ptSounds),// sndBee + (FileName: 'Jump1.ogg'; Path: ptVoices),// sndJump1 + (FileName: 'Jump2.ogg'; Path: ptVoices),// sndJump2 + (FileName: 'Jump3.ogg'; Path: ptVoices),// sndJump3 + (FileName: 'Yessir.ogg'; Path: ptVoices),// sndYesSir + (FileName: 'Laugh.ogg'; Path: ptVoices),// sndLaugh + (FileName: 'Illgetyou.ogg'; Path: ptVoices),// sndIllGetYou + (FileName: 'JustYouWait.ogg'; Path: ptVoices),// sndJustYouWait + (FileName: 'Incoming.ogg'; Path: ptVoices),// sndIncoming + (FileName: 'Missed.ogg'; Path: ptVoices),// sndMissed + (FileName: 'Stupid.ogg'; Path: ptVoices),// sndStupid + (FileName: 'Firstblood.ogg'; Path: ptVoices),// sndFirstBlood + (FileName: 'Boring.ogg'; Path: ptVoices),// sndBoring + (FileName: 'Byebye.ogg'; Path: ptVoices),// sndByeBye + (FileName: 'Sameteam.ogg'; Path: ptVoices),// sndSameTeam + (FileName: 'Nutter.ogg'; Path: ptVoices),// sndNutter + (FileName: 'Reinforcements.ogg'; Path: ptVoices),// sndReinforce + (FileName: 'Traitor.ogg'; Path: ptVoices),// sndTraitor + (FileName: 'Youllregretthat.ogg'; Path: ptVoices),// sndRegret + (FileName: 'Enemydown.ogg'; Path: ptVoices),// sndEnemyDown + (FileName: 'Coward.ogg'; Path: ptVoices),// sndCoward + (FileName: 'Hurry.ogg'; Path: ptVoices),// sndHurry + (FileName: 'Watchit.ogg'; Path: ptVoices),// sndWatchIt + (FileName: 'Kamikaze.ogg'; Path: ptVoices),// sndKamikaze + (FileName: 'cake2.ogg'; Path: ptSounds),// sndCake + (FileName: 'Ow1.ogg'; Path: ptVoices),// sndOw1 + (FileName: 'Ow2.ogg'; Path: ptVoices),// sndOw2 + (FileName: 'Ow3.ogg'; Path: ptVoices),// sndOw3 + (FileName: 'Ow4.ogg'; Path: ptVoices),// sndOw4 + (FileName: 'Firepunch1.ogg'; Path: ptVoices),// sndFirepunch1 + (FileName: 'Firepunch2.ogg'; Path: ptVoices),// sndFirepunch2 + (FileName: 'Firepunch3.ogg'; Path: ptVoices),// sndFirepunch3 + (FileName: 'Firepunch4.ogg'; Path: ptVoices),// sndFirepunch4 + (FileName: 'Firepunch5.ogg'; Path: ptVoices),// sndFirepunch5 + (FileName: 'Firepunch6.ogg'; Path: ptVoices),// sndFirepunch6 + (FileName: 'Melon.ogg'; Path: ptVoices),// sndMelon + (FileName: 'Hellish.ogg'; Path: ptSounds),// sndHellish + (FileName: 'Yoohoo.ogg'; Path: ptSounds),// sndYoohoo + (FileName: 'rcplane.ogg'; Path: ptSounds),// sndRCPlane + (FileName: 'whipcrack.ogg'; Path: ptSounds),// sndWhipCrack + (FileName:'ride_of_the_valkyries.ogg'; Path: ptSounds),// sndRideOfTheValkyries + (FileName: 'denied.ogg'; Path: ptSounds),// sndDenied + (FileName: 'placed.ogg'; Path: ptSounds),// sndPlaced + (FileName: 'baseballbat.ogg'; Path: ptSounds),// sndBaseballBat + (FileName: 'steam.ogg'; Path: ptSounds),// sndVaporize + (FileName: 'warp.ogg'; Path: ptSounds),// sndWarp + (FileName: 'suddendeath.ogg'; Path: ptSounds),// sndSuddenDeath + (FileName: 'mortar.ogg'; Path: ptSounds),// sndMortar + (FileName: 'shutterclick.ogg'; Path: ptSounds),// sndShutter + (FileName: 'homerun.ogg'; Path: ptSounds),// sndHomerun + (FileName: 'molotov.ogg'; Path: ptSounds),// sndMolotov + (FileName: 'Takecover.ogg'; Path: ptVoices),// sndCover + (FileName: 'Uh-oh.ogg'; Path: ptVoices),// sndUhOh + (FileName: 'Oops.ogg'; Path: ptVoices),// sndOops + (FileName: 'Nooo.ogg'; Path: ptVoices),// sndNooo + (FileName: 'Hello.ogg'; Path: ptVoices),// sndHello + (FileName: 'ropeshot.ogg'; Path: ptSounds),// sndRopeShot + (FileName: 'ropeattach.ogg'; Path: ptSounds),// sndRopeAttach + (FileName: 'roperelease.ogg'; Path: ptSounds),// sndRopeRelease + (FileName: 'switchhog.ogg'; Path: ptSounds),// sndSwitchHog + (FileName: 'Victory.ogg'; Path: ptVoices),// sndVictory + (FileName: 'Flawless.ogg'; Path: ptVoices),// sndFlawless + (FileName: 'sniperreload.ogg'; Path: ptSounds),// sndSniperReload + (FileName: 'steps.ogg'; Path: ptSounds),// sndSteps + (FileName: 'lowgravity.ogg'; Path: ptSounds),// sndLowGravity + (FileName: 'hell_growl.ogg'; Path: ptSounds),// sndHellishImpact1 + (FileName: 'hell_ooff.ogg'; Path: ptSounds),// sndHellishImpact2 + (FileName: 'hell_ow.ogg'; Path: ptSounds),// sndHellishImpact3 + (FileName: 'hell_ugh.ogg'; Path: ptSounds),// sndHellishImpact4 + (FileName: 'melonimpact.ogg'; Path: ptSounds),// sndMelonImpact + (FileName: 'Droplet1.ogg'; Path: ptSounds),// sndDroplet1 + (FileName: 'Droplet2.ogg'; Path: ptSounds),// sndDroplet2 + (FileName: 'Droplet3.ogg'; Path: ptSounds),// sndDroplet3 + (FileName: 'egg.ogg'; Path: ptSounds),// sndEggBreak + (FileName: 'drillgun.ogg'; Path: ptSounds),// sndDrillRocket + (FileName: 'PoisonCough.ogg'; Path: ptVoices),// sndPoisonCough + (FileName: 'PoisonMoan.ogg'; Path: ptVoices),// sndPoisonMoan + (FileName: 'BirdyLay.ogg'; Path: ptSounds),// sndBirdyLay + (FileName: 'Whistle.ogg'; Path: ptSounds),// sndWhistle + (FileName: 'beewater.ogg'; Path: ptSounds),// sndBeeWater + (FileName: '1C.ogg'; Path: ptSounds),// sndPiano0 + (FileName: '2D.ogg'; Path: ptSounds),// sndPiano1 + (FileName: '3E.ogg'; Path: ptSounds),// sndPiano2 + (FileName: '4F.ogg'; Path: ptSounds),// sndPiano3 + (FileName: '5G.ogg'; Path: ptSounds),// sndPiano4 + (FileName: '6A.ogg'; Path: ptSounds),// sndPiano5 + (FileName: '7B.ogg'; Path: ptSounds),// sndPiano6 + (FileName: '8C.ogg'; Path: ptSounds),// sndPiano7 + (FileName: '9D.ogg'; Path: ptSounds),// sndPiano8 + (FileName: 'skip.ogg'; Path: ptSounds),// sndSkip + (FileName: 'sinegun.ogg'; Path: ptSounds),// sndSineGun + (FileName: 'Ooff1.ogg'; Path: ptVoices),// sndOoff1 + (FileName: 'Ooff2.ogg'; Path: ptVoices),// sndOoff2 + (FileName: 'Ooff3.ogg'; Path: ptVoices),// sndOoff3 + (FileName: 'hammer.ogg'; Path: ptSounds),// sndWhack + (FileName: 'Comeonthen.ogg'; Path: ptVoices),// sndComeonthen + (FileName: 'parachute.ogg'; Path: ptSounds),// sndParachute + (FileName: 'bump.ogg'; Path: ptSounds),// sndBump + (FileName: 'hogchant3.ogg'; Path: ptSounds),// sndResurrector + (FileName: 'plane.ogg'; Path: ptSounds),// sndPlane + (FileName: 'TARDIS.ogg'; Path: ptSounds) // sndTardis + ); + function AskForVoicepack(name: shortstring): Pointer; @@ -157,19 +288,24 @@ procedure InitSound; const channels: LongInt = {$IFDEF MOBILE}1{$ELSE}2{$ENDIF}; +var success: boolean; begin - if not isSoundEnabled then + if not (isSoundEnabled or isMusicEnabled) then exit; WriteToConsole('Init sound...'); - isSoundEnabled:= SDL_InitSubSystem(SDL_INIT_AUDIO) >= 0; + success:= SDL_InitSubSystem(SDL_INIT_AUDIO) >= 0; - if isSoundEnabled then - isSoundEnabled:= Mix_OpenAudio(44100, $8010, channels, 1024) = 0; + if success then + success:= Mix_OpenAudio(44100, $8010, channels, 1024) = 0; - if isSoundEnabled then + if success then WriteLnToConsole(msgOK) else + begin WriteLnToConsole(msgFailed); + isSoundEnabled:= false; + isMusicEnabled:= false; + end; WriteToConsole('Init SDL_mixer... '); SDLTry(Mix_Init(MIX_INIT_OGG) <> 0, true); @@ -256,7 +392,7 @@ if (voicepack^.chunks[snd] = nil) and (Soundz[snd].Path = ptVoices) and (Soundz[snd].FileName <> '') then begin s:= cPathz[Soundz[snd].Path] + '/' + voicepack^.name + '/' + Soundz[snd].FileName; - if (not FileExists(s)) and (snd in [sndFirePunch2, sndFirePunch3, sndFirePunch4, sndFirePunch5, sndFirePunch6]) then + if (not pfsExists(s)) and (snd in [sndFirePunch2, sndFirePunch3, sndFirePunch4, sndFirePunch5, sndFirePunch6]) then s:= cPathz[Soundz[sndFirePunch1].Path] + '/' + voicepack^.name + '/' + Soundz[snd].FileName; WriteToConsole(msgLoading + s + ' '); voicepack^.chunks[snd]:= Mix_LoadWAV_RW(rwopsOpenRead(s), 1); @@ -289,7 +425,7 @@ if (snd = sndVictory) or (snd = sndFlawless) then begin Mix_FadeOutChannel(-1, 800); - for i:= 0 to 7 do + for i:= 0 to High(VoiceList) do VoiceList[i].snd:= sndNone; LastVoice.snd:= sndNone; end; @@ -311,7 +447,7 @@ if (not isSoundEnabled) or fastUntilLag or ((LastVoice.snd <> sndNone) and (lastChan[LastVoice.snd] <> -1) and (Mix_Playing(lastChan[LastVoice.snd]) <> 0)) then exit; i:= 0; - while (i<8) and (VoiceList[i].snd = sndNone) do + while (i sndNone) then @@ -413,7 +549,7 @@ procedure PlayMusic; var s: shortstring; begin - if (not isSoundEnabled) or (MusicFN = '') or (not isMusicEnabled) then + if (MusicFN = '') or (not isMusicEnabled) then exit; s:= '/Music/' + MusicFN; @@ -434,7 +570,7 @@ function ChangeVolume(voldelta: LongInt): LongInt; begin ChangeVolume:= 0; - if (not isSoundEnabled) or ((voldelta = 0) and (not (cInitVolume = 0))) then + if not (isSoundEnabled or isMusicEnabled) or ((voldelta = 0) and (not (cInitVolume = 0))) then exit; inc(Volume, voldelta); @@ -474,7 +610,7 @@ procedure MuteAudio; begin - if not isSoundEnabled then + if not (isSoundEnabled or isMusicEnabled) then exit; if (isAudioMuted) then @@ -577,6 +713,7 @@ isAudioMuted:= false; isSEBackup:= isSoundEnabled; Volume:= 0; + SoundTimerTicks:= 0; defVoicepack:= AskForVoicepack('Default'); for i:= Low(TSound) to High(TSound) do @@ -589,7 +726,7 @@ voicepacks[t].chunks[i]:= nil; (* on MOBILE SDL_mixer has to be compiled against Tremor (USE_OGG_TREMOR) - or sound files bigger than 32k will lockup the game *) + or sound files bigger than 32k will lockup the game on slow cpu *) for i:= Low(TSound) to High(TSound) do defVoicepack^.chunks[i]:= nil; @@ -597,7 +734,7 @@ procedure freeModule; begin - if isSoundEnabled then + if isSoundEnabled or isMusicEnabled then ReleaseSound(true); end; diff -r d5d5e1698554 -r 1dedcc37bfe8 hedgewars/uStore.pas --- a/hedgewars/uStore.pas Sun Nov 18 01:06:01 2012 +0400 +++ b/hedgewars/uStore.pas Fri Feb 22 05:05:32 2013 +0100 @@ -33,7 +33,7 @@ procedure FinishProgress; function LoadImage(const filename: shortstring; imageFlags: LongInt): PSDL_Surface; -// loads an image from the game's data files +// loads an image from the games data files function LoadDataImage(const path: TPathType; const filename: shortstring; imageFlags: LongInt): PSDL_Surface; // like LoadDataImage but uses altPath as fallback-path if file not found/loadable in path function LoadDataImageAltPath(const path, altPath: TPathType; const filename: shortstring; imageFlags: LongInt): PSDL_Surface; @@ -56,7 +56,7 @@ procedure SwapBuffers; {$IFDEF USE_VIDEO_RECORDING}cdecl{$ELSE}inline{$ENDIF}; implementation -uses uMisc, uConsole, uMobile, uVariables, uUtils, uTextures, uRender, uRenderUtils, uCommands +uses uMisc, uConsole, uVariables, uUtils, uTextures, uRender, uRenderUtils, uCommands , uPhysFSLayer , uDebug {$IFDEF USE_CONTEXT_RESTORE}, uWorld{$ENDIF} @@ -71,6 +71,13 @@ {$ELSE} SDLPrimSurface: PSDL_Surface; {$ENDIF} + squaresize : LongInt; + numsquares : LongInt; + ProgrTex: PTexture; + +const + cHHFileName = 'Hedgehog'; + cCHFileName = 'Crosshair'; function WriteInRect(Surface: PSDL_Surface; X, Y: LongInt; Color: LongWord; Font: THWFont; s: ansistring): TSDL_Rect; var w, h: LongInt; @@ -148,6 +155,7 @@ texsurf, flagsurf, iconsurf: PSDL_Surface; foundBot: boolean; begin + if cOnlyStats then exit; r.x:= 0; r.y:= 0; drY:= - 4; @@ -436,7 +444,7 @@ IMG_Quit(); end; -{$IF NOT DEFINED(S3D_DISABLED) OR DEFINED(USE_VIDEO_RECORDING)} +{$IF DEFINED(USE_S3D_RENDERING) OR DEFINED(USE_VIDEO_RECORDING)} procedure CreateFramebuffer(var frame, depth, tex: GLuint); begin glGenFramebuffersEXT(1, @frame); @@ -538,8 +546,8 @@ if defaultFrame <> 0 then DeleteFramebuffer(defaultFrame, depthv, texv); {$ENDIF} -{$IFNDEF S3D_DISABLED} - if (cStereoMode = smHorizontal) or (cStereoMode = smVertical) or (cStereoMode = smAFR) then +{$IFDEF USE_S3D_RENDERING} + if (cStereoMode = smHorizontal) or (cStereoMode = smVertical) then begin DeleteFramebuffer(framel, depthl, texl); DeleteFramebuffer(framer, depthr, texr); @@ -575,7 +583,7 @@ if ((imageFlags and ifIgnoreCaps) = 0) and ((tmpsurf^.w > MaxTextureSize) or (tmpsurf^.h > MaxTextureSize)) then begin SDL_FreeSurface(tmpsurf); - OutError(msgFailedSize, (imageFlags and ifCritical) <> 0); + OutError(msgFailedSize, ((not cOnlyStats) and ((imageFlags and ifCritical) <> 0))); // dummy surface to replace non-critical textures that failed to load due to their size LoadImage:= SDL_CreateRGBSurface(SDL_SWSURFACE, 2, 2, 32, RMask, GMask, BMask, AMask); exit; @@ -597,6 +605,8 @@ begin // check for file in user dir (never critical) tmpsurf:= LoadImage(cPathz[path] + '/' + filename, imageFlags); + + LoadDataImage:= tmpsurf; end; @@ -804,8 +814,8 @@ end; {$ENDIF} -{$IFNDEF S3D_DISABLED} - if (cStereoMode = smHorizontal) or (cStereoMode = smVertical) or (cStereoMode = smAFR) then +{$IFDEF USE_S3D_RENDERING} + if (cStereoMode = smHorizontal) or (cStereoMode = smVertical) then begin // prepare left and right frame buffers and associated textures if glLoadExtension('GL_EXT_framebuffer_object') then @@ -867,6 +877,7 @@ var r: TSDL_Rect; texsurf: PSDL_Surface; begin + if cOnlyStats then exit; if Step = 0 then begin WriteToConsole(msgLoading + 'progress sprite: '); @@ -877,8 +888,10 @@ squaresize:= texsurf^.w shr 1; numsquares:= texsurf^.h div squaresize; SDL_FreeSurface(texsurf); - - uMobile.GameLoading(); + with mobileRecord do + if GameLoading <> nil then + GameLoading(); + end; TryDo(ProgrTex <> nil, 'Error - Progress Texure is nil!', true); @@ -901,7 +914,9 @@ procedure FinishProgress; begin - uMobile.GameLoaded(); + with mobileRecord do + if GameLoaded <> nil then + GameLoaded(); WriteLnToConsole('Freeing progress surface... '); FreeTexture(ProgrTex); ProgrTex:= nil; @@ -1121,10 +1136,25 @@ {$IFNDEF DARWIN}ico: PSDL_Surface;{$ENDIF} {$IFDEF SDL13}x, y: LongInt;{$ENDIF} begin + if cOnlyStats then + begin + MaxTextureSize:= 1024; + exit + end; if Length(s) = 0 then - cFullScreen:= (not cFullScreen) + cFullScreen:= (not cFullScreen) + else cFullScreen:= s = '1'; + + if cFullScreen then + begin + cScreenWidth:= cFullscreenWidth; + cScreenHeight:= cFullscreenHeight; + end else - cFullScreen:= s = '1'; + begin + cScreenWidth:= cWindowedWidth; + cScreenHeight:= cWindowedHeight; + end; AddFileLog('Preparing to change video parameters...'); {$IFDEF SDL13} @@ -1202,22 +1232,25 @@ if SDLwindow = nil then if cFullScreen then - SDLwindow:= SDL_CreateWindow('Hedgewars', x, y, cOrigScreenWidth, cOrigScreenHeight, flags or SDL_WINDOW_FULLSCREEN) + SDLwindow:= SDL_CreateWindow('Hedgewars', x, y, cScreenWidth, cScreenHeight, flags or SDL_WINDOW_FULLSCREEN) else + begin SDLwindow:= SDL_CreateWindow('Hedgewars', x, y, cScreenWidth, cScreenHeight, flags); + end; SDLTry(SDLwindow <> nil, true); {$ELSE} flags:= SDL_OPENGL or SDL_RESIZABLE; if cFullScreen then + begin flags:= flags or SDL_FULLSCREEN; - + end; if not cOnlyStats then begin {$IFDEF WIN32} s:= SDL_getenv('SDL_VIDEO_CENTERED'); SDL_putenv('SDL_VIDEO_CENTERED=1'); {$ENDIF} - SDLPrimSurface:= SDL_SetVideoMode(cScreenWidth, cScreenHeight, cBits, flags); + SDLPrimSurface:= SDL_SetVideoMode(cScreenWidth, cScreenHeight, 0, flags); SDLTry(SDLPrimSurface <> nil, true); {$IFDEF WIN32}SDL_putenv(str2pchar('SDL_VIDEO_CENTERED=' + s));{$ENDIF} end; diff -r d5d5e1698554 -r 1dedcc37bfe8 hedgewars/uTeams.pas --- a/hedgewars/uTeams.pas Sun Nov 18 01:06:01 2012 +0400 +++ b/hedgewars/uTeams.pas Fri Feb 22 05:05:32 2013 +0100 @@ -40,12 +40,13 @@ procedure SwitchCurrentHedgehog(newHog: PHedgehog); implementation -uses uLocale, uAmmos, uChat, uVariables, uUtils, uIO, uCaptions, uCommands, uDebug, uScript, +uses uLocale, uAmmos, uChat, uVariables, uUtils, uIO, uCaptions, uCommands, uDebug, uGearsUtils, uGearsList {$IFDEF USE_TOUCH_INTERFACE}, uTouch{$ENDIF}; var MaxTeamHealth: LongInt; GameOver: boolean; + NextClan: boolean; function CheckForWin: boolean; var AliveClan: PClan; @@ -302,7 +303,10 @@ else AddVoice(sndJustYouWait, CurrentTeam^.voicepack) end else + begin + GetRandom(2); // needed to avoid extdriven desync AddVoice(sndYesSir, CurrentTeam^.voicepack); + end; if cHedgehogTurnTime < 1000000 then ReadyTimeLeft:= cReadyDelay; AddCaption(Format(shortstring(trmsg[sidReady]), CurrentTeam^.TeamName), cWhiteColor, capgrpGameState) @@ -317,16 +321,11 @@ end; ReadyTimeLeft:= 0 end; - -{$IFDEF SDL13} -uTouch.NewTurnBeginning(); -{$ENDIF} -ScriptCall('onNewTurn'); end; function AddTeam(TeamColor: Longword): PTeam; var team: PTeam; - c: LongInt; + c, t: LongInt; begin TryDo(TeamsCount < cMaxTeams, 'Too many teams', true); New(team); @@ -339,6 +338,9 @@ TeamsArray[TeamsCount]:= team; inc(TeamsCount); +for t:= 0 to cKbdMaxIndex do + team^.Binds[t]:= ''; + c:= Pred(ClansCount); while (c >= 0) and (ClansArray[c]^.Color <> TeamColor) do dec(c); if c < 0 then @@ -501,7 +503,6 @@ procedure chAddHH(var id: shortstring); var s: shortstring; Gear: PGear; - c: LongInt; begin s:= ''; if (not isDeveloperMode) or (CurrentTeam = nil) then @@ -510,10 +511,10 @@ begin SplitBySpace(id, s); SwitchCurrentHedgehog(@Hedgehogs[HedgehogsNumber]); - val(id, CurrentHedgehog^.BotLevel, c); + CurrentHedgehog^.BotLevel:= StrToInt(id); Gear:= AddGear(0, 0, gtHedgehog, 0, _0, _0, 0); SplitBySpace(s, id); - val(s, Gear^.Health, c); + Gear^.Health:= StrToInt(s); TryDo(Gear^.Health > 0, 'Invalid hedgehog health', true); Gear^.Hedgehog^.Team:= CurrentTeam; if (GameFlags and gfSharedAmmo) <> 0 then @@ -534,7 +535,6 @@ procedure chAddTeam(var s: shortstring); var Color: Longword; - c: LongInt; ts, cs: shortstring; begin cs:= ''; @@ -543,7 +543,7 @@ begin SplitBySpace(s, cs); SplitBySpace(cs, ts); - val(cs, Color, c); + Color:= StrToInt(cs); TryDo(Color <> 0, 'Error: black team color', true); // color is always little endian so the mask must be constant also in big endian archs @@ -560,16 +560,16 @@ procedure chSetHHCoords(var x: shortstring); var y: shortstring; - t, c: Longint; + t: Longint; begin -y:= ''; -if (not isDeveloperMode) or (CurrentHedgehog = nil) or (CurrentHedgehog^.Gear = nil) then - exit; -SplitBySpace(x, y); -val(x, t, c); -CurrentHedgehog^.Gear^.X:= int2hwFloat(t); -val(y, t, c); -CurrentHedgehog^.Gear^.Y:= int2hwFloat(t) + y:= ''; + if (not isDeveloperMode) or (CurrentHedgehog = nil) or (CurrentHedgehog^.Gear = nil) then + exit; + SplitBySpace(x, y); + t:= StrToInt(x); + CurrentHedgehog^.Gear^.X:= int2hwFloat(t); + t:= StrToInt(y); + CurrentHedgehog^.Gear^.Y:= int2hwFloat(t) end; procedure chBind(var id: shortstring); diff -r d5d5e1698554 -r 1dedcc37bfe8 hedgewars/uTextures.pas --- a/hedgewars/uTextures.pas Sun Nov 18 01:06:01 2012 +0400 +++ b/hedgewars/uTextures.pas Fri Feb 22 05:05:32 2013 +0100 @@ -126,6 +126,7 @@ tmpp: pointer; fromP4, toP4: PLongWordArray; begin +if cOnlyStats then exit(nil); new(Surface2Tex); Surface2Tex^.PrevTexture:= nil; Surface2Tex^.NextTexture:= nil; diff -r d5d5e1698554 -r 1dedcc37bfe8 hedgewars/uTouch.pas --- a/hedgewars/uTouch.pas Sun Nov 18 01:06:01 2012 +0400 +++ b/hedgewars/uTouch.pas Fri Feb 22 05:05:32 2013 +0100 @@ -22,7 +22,7 @@ interface -uses SysUtils, uConsole, uVariables, SDLh, uFloat, uConsts, uCommands, GLUnit, uTypes, uCaptions, uAmmos, uWorld, uMobile; +uses SysUtils, uConsole, uVariables, SDLh, uFloat, uConsts, uCommands, GLUnit, uTypes, uCaptions, uAmmos, uWorld; procedure initModule; @@ -558,7 +558,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(uMobile.getScreenDPI * 10))); + WriteLnToConsole(inttostr(x) + ' ' + inttostr(y) + ' ' + inttostr(round(mobileRecord.getScreenDPI() * 10))); end; function isOnCurrentHog(finger: TTouch_Data): boolean; @@ -640,7 +640,7 @@ for index := 0 to High(fingers) do fingers[index].id := nilFingerId; - rectSize:= round(baseRectSize * uMobile.getScreenDPI); + rectSize:= round(baseRectSize * mobileRecord.getScreenDPI()); halfRectSize:= rectSize shl 1; end; diff -r d5d5e1698554 -r 1dedcc37bfe8 hedgewars/uTypes.pas --- a/hedgewars/uTypes.pas Sun Nov 18 01:06:01 2012 +0400 +++ b/hedgewars/uTypes.pas Fri Feb 22 05:05:32 2013 +0100 @@ -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, // 61 + gtNapalmBomb, gtSnowball, gtFlake, {gtStructure,} gtLandGun, gtTardis, // 61 gtIceGun, gtAddAmmo, gtGenericFaller, gtKnife); // 65 // Gears that are _only_ of visual nature (e.g. background stuff, visual effects, speechbubbles, etc.) @@ -151,7 +151,7 @@ amRCPlane, amLowGravity, amExtraDamage, amInvulnerable, amExtraTime, // 35 amLaserSight, amVampiric, amSniperRifle, amJetpack, amMolotov, amBirdy, amPortalGun, // 42 amPiano, amGasBomb, amSineGun, amFlamethrower, amSMine, amHammer, // 48 - amResurrector, amDrillStrike, amSnowball, amTardis, amStructure, amLandGun, amIceGun, amKnife); // 54 + amResurrector, amDrillStrike, amSnowball, amTardis, {amStructure,} amLandGun, amIceGun, amKnife); // 54 // Different kind of crates that e.g. hedgehogs can pick up TCrateType = (HealthCrate, AmmoCrate, UtilityCrate); @@ -169,7 +169,7 @@ TWave = (waveRollup, waveSad, waveWave, waveHurrah, waveLemonade, waveShrug, waveJuggle); TRenderMode = (rmDefault, rmLeftEye, rmRightEye); - TStereoMode = (smNone, smRedCyan, smCyanRed, smRedBlue, smBlueRed, smRedGreen, smGreenRed, smHorizontal, smVertical, smAFR); + TStereoMode = (smNone, smRedCyan, smCyanRed, smRedBlue, smBlueRed, smRedGreen, smGreenRed, smHorizontal, smVertical); THHFont = record Handle: PTTF_Font; @@ -399,6 +399,18 @@ Flawless: boolean; end; + cdeclPtr = procedure; cdecl; + cdeclIntPtr = procedure(num: LongInt); cdecl; + functionDoublePtr = function: Double; + + TMobileRecord = record + getScreenDPI: functionDoublePtr; + PerformRumble: cdeclIntPtr; + GameLoading: cdeclPtr; + GameLoaded: cdeclPtr; + SaveLoadingEnded: cdeclPtr; + end; + TAmmoStrId = (sidGrenade, sidClusterBomb, sidBazooka, sidBee, sidShotgun, sidPickHammer, sidSkip, sidRope, sidMine, sidDEagle, sidDynamite, sidBaseballBat, sidFirePunch, sidSeconds, @@ -411,7 +423,7 @@ sidMolotov, sidBirdy, sidPortalGun, sidPiano, sidGasBomb, sidSineGun, sidFlamethrower,sidSMine, sidHammer, sidResurrector, sidDrillStrike, sidSnowball, sidNothing, sidTardis, - sidStructure, sidLandGun, sidIceGun, sidKnife); + {sidStructure,} sidLandGun, sidIceGun, sidKnife); TMsgStrId = (sidStartFight, sidDraw, sidWinner, sidVolume, sidPaused, sidConfirm, sidSuddenDeath, sidRemaining, sidFuel, sidSync, diff -r d5d5e1698554 -r 1dedcc37bfe8 hedgewars/uUtils.pas --- a/hedgewars/uUtils.pas Sun Nov 18 01:06:01 2012 +0400 +++ b/hedgewars/uUtils.pas Fri Feb 22 05:05:32 2013 +0100 @@ -73,6 +73,20 @@ procedure WriteLn(var f: textfile; s: shortstring); {$ENDIF} +function isPhone: Boolean; inline; +function getScreenDPI: Double; inline; //cdecl; external; + +{$IFDEF IPHONEOS} +procedure startLoadingIndicator; cdecl; external; +procedure stopLoadingIndicator; cdecl; external; +procedure saveFinishedSynching; cdecl; external; +function isApplePhone: Boolean; cdecl; external; +procedure AudioServicesPlaySystemSound(num: LongInt); cdecl; external; +{$ENDIF} + +function sanitizeForLog(s: shortstring): shortstring; +function sanitizeCharForLog(c: char): shortstring; + procedure initModule(isNotPreview: boolean); procedure freeModule; @@ -177,7 +191,11 @@ function StrToInt(s: shortstring): LongInt; var c: LongInt; begin -val(s, StrToInt, c) +val(s, StrToInt, c); +{$IFDEF DEBUGFILE} +if c <> 0 then + writeln(f, 'Error at position ' + IntToStr(c) + ' : ' + s[c]) +{$ENDIF} end; function FloatToStr(n: hwFloat): shortstring; @@ -401,10 +419,60 @@ end; {$ENDIF} +// this function is just to determine whether we are running on a limited screen device +function isPhone: Boolean; inline; +begin + isPhone:= false; +{$IFDEF IPHONEOS} + isPhone:= isApplePhone(); +{$ENDIF} +{$IFDEF ANDROID} + //nasty nasty hack. TODO: implement callback to java to have a unified way of determining if it is a tablet + if (cScreenWidth < 1000) and (cScreenHeight < 500) then + isPhone:= true; +{$ENDIF} +end; + +//This dummy function should be reimplemented (externally). +function getScreenDPI: Double; inline; +begin +{$IFDEF ANDROID} +// getScreenDPI:= Android_JNI_getDensity(); + getScreenDPI:= 1; +{$ELSE} + getScreenDPI:= 1; +{$ENDIF} +end; + +function sanitizeForLog(s: shortstring): shortstring; +var i: byte; + r: shortstring; +begin + r[0]:= s[0]; + for i:= 1 to length(s) do + if (s[i] < #32) or (s[i] > #127) then + r[i]:= '?' + else + r[i]:= s[i]; + + sanitizeForLog:= r +end; + +function sanitizeCharForLog(c: char): shortstring; +var r: shortstring; +begin + if (c < #32) or (c > #127) then + r:= '#' + inttostr(byte(c)) + else + r:= c; + + sanitizeCharForLog:= r +end; + procedure initModule(isNotPreview: boolean); {$IFDEF DEBUGFILE} var logfileBase: shortstring; -{$IFNDEF MOBILE}var i: LongInt;{$ENDIF} + i: LongInt; {$ENDIF} begin {$IFDEF DEBUGFILE} @@ -421,28 +489,24 @@ InitCriticalSection(logMutex); {$ENDIF} {$I-} -{$IFDEF MOBILE} - {$IFDEF IPHONEOS} Assign(f, UserPathPrefix + '/hw-' + logfileBase + '.log'); {$ENDIF} - {$IFDEF ANDROID} Assign(f,pathPrefix + '/' + logfileBase + '.log'); {$ENDIF} - Rewrite(f); -{$ELSE} + f:= stderr; // if everything fails, write to stderr if (UserPathPrefix <> '') then begin - i:= 0; - while(i < 7) do + // create directory if it doesn't exist + if not FileExists(UserPathPrefix + '/Logs/') then + CreateDir(UserPathPrefix + '/Logs/'); + + // if log is locked, write to the next one + i:= 0; + while(i < 7) do begin - assign(f, UserPathPrefix + '/Logs/' + logfileBase + inttostr(i) + '.log'); - rewrite(f); - if IOResult = 0 then - break; - inc(i) + assign(f, UserPathPrefix + '/Logs/' + logfileBase + inttostr(i) + '.log'); + if IOResult = 0 then + break; + inc(i) end; - if i = 7 then - f:= stderr; // if everything fails, write to stderr - end - else - f:= stderr; -{$ENDIF} + end; + Rewrite(f); {$I+} {$ENDIF} diff -r d5d5e1698554 -r 1dedcc37bfe8 hedgewars/uVariables.pas --- a/hedgewars/uVariables.pas Sun Nov 18 01:06:01 2012 +0400 +++ b/hedgewars/uVariables.pas Fri Feb 22 05:05:32 2013 +0100 @@ -21,20 +21,21 @@ unit uVariables; interface -uses SDLh, uTypes, uFloat, GLunit, uConsts, Math, uMobile, uUtils; +uses SDLh, uTypes, uFloat, GLunit, uConsts, Math, uUtils; var /////// init flags /////// cMinScreenWidth : LongInt; cMinScreenHeight : LongInt; + cFullscreenWidth : LongInt; + cFullscreenHeight : LongInt; + cWindowedWidth : LongInt; + cWindowedHeight : LongInt; cScreenWidth : LongInt; cScreenHeight : LongInt; - cOrigScreenWidth : LongInt; - cOrigScreenHeight : LongInt; cNewScreenWidth : LongInt; cNewScreenHeight : LongInt; cScreenResizeDelay : LongWord; - cBits : LongInt; ipcPort : Word; cFullScreen : boolean; cLocaleFName : shortstring; @@ -157,7 +158,6 @@ cVampiric : boolean; cArtillery : boolean; WeaponTooltipTex: PTexture; - AmmoMenuTex : PTexture; AmmoMenuInvalidated: boolean; AmmoRect : TSDL_Rect; HHTexture : PTexture; @@ -177,8 +177,9 @@ SDWaterColorArray : array[0..3] of HwColor4f; SDTint : LongInt; - CursorPoint : TPoint; - TargetPoint : TPoint; + TargetCursorPoint : TPoint; + CursorPoint : TPoint; + TargetPoint : TPoint; ScreenFade : TScreenFade; ScreenFadeValue : LongInt; @@ -196,17 +197,10 @@ LuaTemplateNumber : LongWord; - VoiceList : array[0..7] of TVoice = ( - ( snd: sndNone; voicepack: nil), - ( snd: sndNone; voicepack: nil), - ( snd: sndNone; voicepack: nil), - ( snd: sndNone; voicepack: nil), - ( snd: sndNone; voicepack: nil), - ( snd: sndNone; voicepack: nil), - ( snd: sndNone; voicepack: nil), - ( snd: sndNone; voicepack: nil)); LastVoice : TVoice = ( snd: sndNone; voicepack: nil ); + mobileRecord: TMobileRecord; + ///////////////////////////////////// //Buttons {$IFDEF USE_TOUCH_INTERFACE} @@ -690,126 +684,6 @@ (Sprite: sprJuggle; FramesCount: 49; Interval: 38; cmd: '/juggle'; Voice: sndNone; VoiceDelay: 0) ); - Soundz: array[TSound] of record - FileName: string[31]; - Path : TPathType; - end = ( - (FileName: ''; Path: ptNone ),// sndNone - (FileName: 'grenadeimpact.ogg'; Path: ptSounds),// sndGrenadeImpact - (FileName: 'explosion.ogg'; Path: ptSounds),// sndExplosion - (FileName: 'throwpowerup.ogg'; Path: ptSounds),// sndThrowPowerUp - (FileName: 'throwrelease.ogg'; Path: ptSounds),// sndThrowRelease - (FileName: 'splash.ogg'; Path: ptSounds),// sndSplash - (FileName: 'shotgunreload.ogg'; Path: ptSounds),// sndShotgunReload - (FileName: 'shotgunfire.ogg'; Path: ptSounds),// sndShotgunFire - (FileName: 'graveimpact.ogg'; Path: ptSounds),// sndGraveImpact - (FileName: 'mineimpact.ogg'; Path: ptSounds),// sndMineImpact - (FileName: 'minetick.ogg'; Path: ptSounds),// sndMineTicks - (FileName: 'Droplet1.ogg'; Path: ptSounds),// sndMudballImpact - (FileName: 'pickhammer.ogg'; Path: ptSounds),// sndPickhammer - (FileName: 'gun.ogg'; Path: ptSounds),// sndGun - (FileName: 'bee.ogg'; Path: ptSounds),// sndBee - (FileName: 'Jump1.ogg'; Path: ptVoices),// sndJump1 - (FileName: 'Jump2.ogg'; Path: ptVoices),// sndJump2 - (FileName: 'Jump3.ogg'; Path: ptVoices),// sndJump3 - (FileName: 'Yessir.ogg'; Path: ptVoices),// sndYesSir - (FileName: 'Laugh.ogg'; Path: ptVoices),// sndLaugh - (FileName: 'Illgetyou.ogg'; Path: ptVoices),// sndIllGetYou - (FileName: 'JustYouWait.ogg'; Path: ptVoices),// sndJustYouWait - (FileName: 'Incoming.ogg'; Path: ptVoices),// sndIncoming - (FileName: 'Missed.ogg'; Path: ptVoices),// sndMissed - (FileName: 'Stupid.ogg'; Path: ptVoices),// sndStupid - (FileName: 'Firstblood.ogg'; Path: ptVoices),// sndFirstBlood - (FileName: 'Boring.ogg'; Path: ptVoices),// sndBoring - (FileName: 'Byebye.ogg'; Path: ptVoices),// sndByeBye - (FileName: 'Sameteam.ogg'; Path: ptVoices),// sndSameTeam - (FileName: 'Nutter.ogg'; Path: ptVoices),// sndNutter - (FileName: 'Reinforcements.ogg'; Path: ptVoices),// sndReinforce - (FileName: 'Traitor.ogg'; Path: ptVoices),// sndTraitor - (FileName: 'Youllregretthat.ogg'; Path: ptVoices),// sndRegret - (FileName: 'Enemydown.ogg'; Path: ptVoices),// sndEnemyDown - (FileName: 'Coward.ogg'; Path: ptVoices),// sndCoward - (FileName: 'Hurry.ogg'; Path: ptVoices),// sndHurry - (FileName: 'Watchit.ogg'; Path: ptVoices),// sndWatchIt - (FileName: 'Kamikaze.ogg'; Path: ptVoices),// sndKamikaze - (FileName: 'cake2.ogg'; Path: ptSounds),// sndCake - (FileName: 'Ow1.ogg'; Path: ptVoices),// sndOw1 - (FileName: 'Ow2.ogg'; Path: ptVoices),// sndOw2 - (FileName: 'Ow3.ogg'; Path: ptVoices),// sndOw3 - (FileName: 'Ow4.ogg'; Path: ptVoices),// sndOw4 - (FileName: 'Firepunch1.ogg'; Path: ptVoices),// sndFirepunch1 - (FileName: 'Firepunch2.ogg'; Path: ptVoices),// sndFirepunch2 - (FileName: 'Firepunch3.ogg'; Path: ptVoices),// sndFirepunch3 - (FileName: 'Firepunch4.ogg'; Path: ptVoices),// sndFirepunch4 - (FileName: 'Firepunch5.ogg'; Path: ptVoices),// sndFirepunch5 - (FileName: 'Firepunch6.ogg'; Path: ptVoices),// sndFirepunch6 - (FileName: 'Melon.ogg'; Path: ptVoices),// sndMelon - (FileName: 'Hellish.ogg'; Path: ptSounds),// sndHellish - (FileName: 'Yoohoo.ogg'; Path: ptSounds),// sndYoohoo - (FileName: 'rcplane.ogg'; Path: ptSounds),// sndRCPlane - (FileName: 'whipcrack.ogg'; Path: ptSounds),// sndWhipCrack - (FileName:'ride_of_the_valkyries.ogg'; Path: ptSounds),// sndRideOfTheValkyries - (FileName: 'denied.ogg'; Path: ptSounds),// sndDenied - (FileName: 'placed.ogg'; Path: ptSounds),// sndPlaced - (FileName: 'baseballbat.ogg'; Path: ptSounds),// sndBaseballBat - (FileName: 'steam.ogg'; Path: ptSounds),// sndVaporize - (FileName: 'warp.ogg'; Path: ptSounds),// sndWarp - (FileName: 'suddendeath.ogg'; Path: ptSounds),// sndSuddenDeath - (FileName: 'mortar.ogg'; Path: ptSounds),// sndMortar - (FileName: 'shutterclick.ogg'; Path: ptSounds),// sndShutter - (FileName: 'homerun.ogg'; Path: ptSounds),// sndHomerun - (FileName: 'molotov.ogg'; Path: ptSounds),// sndMolotov - (FileName: 'Takecover.ogg'; Path: ptVoices),// sndCover - (FileName: 'Uh-oh.ogg'; Path: ptVoices),// sndUhOh - (FileName: 'Oops.ogg'; Path: ptVoices),// sndOops - (FileName: 'Nooo.ogg'; Path: ptVoices),// sndNooo - (FileName: 'Hello.ogg'; Path: ptVoices),// sndHello - (FileName: 'ropeshot.ogg'; Path: ptSounds),// sndRopeShot - (FileName: 'ropeattach.ogg'; Path: ptSounds),// sndRopeAttach - (FileName: 'roperelease.ogg'; Path: ptSounds),// sndRopeRelease - (FileName: 'switchhog.ogg'; Path: ptSounds),// sndSwitchHog - (FileName: 'Victory.ogg'; Path: ptVoices),// sndVictory - (FileName: 'Flawless.ogg'; Path: ptVoices),// sndFlawless - (FileName: 'sniperreload.ogg'; Path: ptSounds),// sndSniperReload - (FileName: 'steps.ogg'; Path: ptSounds),// sndSteps - (FileName: 'lowgravity.ogg'; Path: ptSounds),// sndLowGravity - (FileName: 'hell_growl.ogg'; Path: ptSounds),// sndHellishImpact1 - (FileName: 'hell_ooff.ogg'; Path: ptSounds),// sndHellishImpact2 - (FileName: 'hell_ow.ogg'; Path: ptSounds),// sndHellishImpact3 - (FileName: 'hell_ugh.ogg'; Path: ptSounds),// sndHellishImpact4 - (FileName: 'melonimpact.ogg'; Path: ptSounds),// sndMelonImpact - (FileName: 'Droplet1.ogg'; Path: ptSounds),// sndDroplet1 - (FileName: 'Droplet2.ogg'; Path: ptSounds),// sndDroplet2 - (FileName: 'Droplet3.ogg'; Path: ptSounds),// sndDroplet3 - (FileName: 'egg.ogg'; Path: ptSounds),// sndEggBreak - (FileName: 'drillgun.ogg'; Path: ptSounds),// sndDrillRocket - (FileName: 'PoisonCough.ogg'; Path: ptVoices),// sndPoisonCough - (FileName: 'PoisonMoan.ogg'; Path: ptVoices),// sndPoisonMoan - (FileName: 'BirdyLay.ogg'; Path: ptSounds),// sndBirdyLay - (FileName: 'Whistle.ogg'; Path: ptSounds),// sndWhistle - (FileName: 'beewater.ogg'; Path: ptSounds),// sndBeeWater - (FileName: '1C.ogg'; Path: ptSounds),// sndPiano0 - (FileName: '2D.ogg'; Path: ptSounds),// sndPiano1 - (FileName: '3E.ogg'; Path: ptSounds),// sndPiano2 - (FileName: '4F.ogg'; Path: ptSounds),// sndPiano3 - (FileName: '5G.ogg'; Path: ptSounds),// sndPiano4 - (FileName: '6A.ogg'; Path: ptSounds),// sndPiano5 - (FileName: '7B.ogg'; Path: ptSounds),// sndPiano6 - (FileName: '8C.ogg'; Path: ptSounds),// sndPiano7 - (FileName: '9D.ogg'; Path: ptSounds),// sndPiano8 - (FileName: 'skip.ogg'; Path: ptSounds),// sndSkip - (FileName: 'sinegun.ogg'; Path: ptSounds),// sndSineGun - (FileName: 'Ooff1.ogg'; Path: ptVoices),// sndOoff1 - (FileName: 'Ooff2.ogg'; Path: ptVoices),// sndOoff2 - (FileName: 'Ooff3.ogg'; Path: ptVoices),// sndOoff3 - (FileName: 'hammer.ogg'; Path: ptSounds),// sndWhack - (FileName: 'Comeonthen.ogg'; Path: ptVoices),// sndComeonthen - (FileName: 'parachute.ogg'; Path: ptSounds),// sndParachute - (FileName: 'bump.ogg'; Path: ptSounds),// sndBump - (FileName: 'hogchant3.ogg'; Path: ptSounds),// sndResurrector - (FileName: 'plane.ogg'; Path: ptSounds),// sndPlane - (FileName: 'TARDIS.ogg'; Path: ptSounds) // sndTardis - ); var Ammoz: array [TAmmoType] of record NameId: TAmmoStrId; @@ -2257,6 +2131,7 @@ ejectY: 0), // Structure +{ (NameId: sidStructure; NameTex: nil; Probability: 0; @@ -2282,6 +2157,7 @@ PosSprite: sprWater; ejectX: 0; ejectY: 0), +} // Land Gun (NameId: sidLandGun; @@ -2359,76 +2235,6 @@ ejectY: 0) ); -const - GearKindAmmoTypeMap : array [TGearType] of TAmmoType = ( -(* gtFlame *) amNothing -(* gtHedgehog *) , amNothing -(* gtMine *) , amMine -(* gtCase *) , amNothing -(* gtExplosives *) , amNothing -(* gtGrenade *) , amGrenade -(* gtShell *) , amBazooka -(* gtGrave *) , amNothing -(* gtBee *) , amBee -(* gtShotgunShot *) , amShotgun -(* gtPickHammer *) , amPickHammer -(* gtRope *) , amRope -(* gtDEagleShot *) , amDEagle -(* gtDynamite *) , amDynamite -(* gtClusterBomb *) , amClusterBomb -(* gtCluster *) , amClusterBomb -(* gtShover *) , amBaseballBat // Shover is only used for baseball bat right now -(* gtFirePunch *) , amFirePunch -(* gtATStartGame *) , amNothing -(* gtATFinishGame *) , amNothing -(* gtParachute *) , amParachute -(* gtAirAttack *) , amAirAttack -(* gtAirBomb *) , amAirAttack -(* gtBlowTorch *) , amBlowTorch -(* gtGirder *) , amGirder -(* gtTeleport *) , amTeleport -(* gtSwitcher *) , amSwitch -(* gtTarget *) , amNothing -(* gtMortar *) , amMortar -(* gtWhip *) , amWhip -(* gtKamikaze *) , amKamikaze -(* gtCake *) , amCake -(* gtSeduction *) , amSeduction -(* gtWatermelon *) , amWatermelon -(* gtMelonPiece *) , amWatermelon -(* gtHellishBomb *) , amHellishBomb -(* gtWaterUp *) , amNothing -(* gtDrill *) , amDrill -(* gtBallGun *) , amBallgun -(* gtBall *) , amBallgun -(* gtRCPlane *) , amRCPlane -(*gtSniperRifleShot *) , amSniperRifle -(* gtJetpack *) , amJetpack -(* gtMolotov *) , amMolotov -(* gtBirdy *) , amBirdy -(* gtEgg *) , amBirdy -(* gtPortal *) , amPortalGun -(* gtPiano *) , amPiano -(* gtGasBomb *) , amGasBomb -(* gtSineGunShot *) , amSineGun -(* gtFlamethrower *) , amFlamethrower -(* gtSMine *) , amSMine -(* gtPoisonCloud *) , amNothing -(* gtHammer *) , amHammer -(* gtHammerHit *) , amHammer -(* gtResurrector *) , amResurrector -(* gtPoisonCloud *) , amNothing -(* gtSnowball *) , amSnowball -(* gtFlake *) , amNothing -(* gtStructure *) , amStructure // TODO - This will undoubtedly change once there is more than one structure -(* gtLandGun *) , amLandGun -(* gtTardis *) , amTardis -(* gtIceGun *) , amIceGun -(* gtAddAmmo *) , amNothing -(* gtGenericFaller *) , amNothing -(* gtKnife *) , amKnife - ); - var Land: TCollisionArray; LandPixels: TLandArray; @@ -2462,7 +2268,6 @@ LocalTeam: LongInt; // last non-bot, non-extdriven clan first team LocalAmmo: LongInt; // last non-bot, non-extdriven clan's first team's ammo index, updated to next upcoming hog for per-hog-ammo CurMinAngle, CurMaxAngle: Longword; - NextClan: boolean; FollowGear: PGear; WindBarWidth: LongInt; @@ -2473,13 +2278,9 @@ WaterColor, DeepWaterColor: TSDL_Color; SkyColor, RQSkyColor, SDSkyColor: TSDL_Color; SkyOffset: LongInt; - HorizontOffset: LongInt; {$IFDEF COUNTTICKS} cntTicks: LongWord; {$ENDIF} - cOffsetY: LongInt; - AFRToggle: Boolean; - bAFRRight: Boolean; PauseTexture, @@ -2488,9 +2289,6 @@ cScaleFactor: GLfloat; SupportNPOTT: Boolean; Step: LongInt; - squaresize : LongInt; - numsquares : LongInt; - ProgrTex: PTexture; MissionIcons: PSDL_Surface; ropeIconTex: PTexture; @@ -2502,24 +2300,12 @@ defaultFrame, depthv: GLuint; texv: GLuint; - VisualGearLayers: array[0..6] of PVisualGear; lastVisualGearByUID: PVisualGear; vobFrameTicks, vobFramesCount, vobCount: Longword; vobVelocity, vobFallSpeed: LongInt; vobSDFrameTicks, vobSDFramesCount, vobSDCount: Longword; vobSDVelocity, vobSDFallSpeed: LongInt; - ControllerNumControllers: Integer; - ControllerEnabled: Integer; - ControllerNumAxes: array[0..5] of Integer; - //ControllerNumBalls: array[0..5] of Integer; - ControllerNumHats: array[0..5] of Integer; - ControllerNumButtons: array[0..5] of Integer; - ControllerAxes: array[0..5] of array[0..19] of Integer; - //ControllerBalls: array[0..5] of array[0..19] of array[0..1] of Integer; - ControllerHats: array[0..5] of array[0..19] of Byte; - ControllerButtons: array[0..5] of array[0..19] of Byte; - DefaultBinds : TBinds; lastTurnChecksum : Longword; @@ -2541,9 +2327,13 @@ begin // initialisation flags - they are going to be overwritten by program args - cScreenWidth := 1024; - cScreenHeight := 768; - cBits := 32; + cFullscreenWidth := 0; + cFullscreenHeight := 0; + cWindowedWidth := 1024; + cWindowedHeight := 768; + cScreenWidth := cWindowedWidth; + cScreenHeight := cWindowedHeight; + cShowFPS := false; cAltDamage := true; cTimerInterval := 8; @@ -2559,6 +2349,7 @@ GrayScale := false; PathPrefix := './'; GameType := gmtLocal; + cOnlyStats := False; {$IFDEF USE_VIDEO_RECORDING} RecPrefix := ''; @@ -2579,7 +2370,6 @@ cFlattenFlakes := false; cFlattenClouds := false; - cOnlyStats := False; lastVisualGearByUID := nil; lastGearByUID := nil; cReadyDelay := 5000; @@ -2724,19 +2514,37 @@ vobSDVelocity:= 15; vobSDFallSpeed:= 250; - cMinScreenWidth:= min(cScreenWidth, 640); - cMinScreenHeight:= min(cScreenHeight, 480); - cOrigScreenWidth:= cScreenWidth; - cOrigScreenHeight:= cScreenHeight; + cMinScreenWidth := min(cScreenWidth, 640); + cMinScreenHeight := min(cScreenHeight, 480); cNewScreenWidth := cScreenWidth; cNewScreenHeight := cScreenHeight; cScreenResizeDelay := 0; + // make sure fullscreen resolution is always initialised somehow + if cFullscreenWidth = 0 then + cFullscreenWidth:= min(cWindowedWidth, 640); + if cFullscreenHeight = 0 then + cFullscreenHeight:= min(cWindowedHeight, 480); + + LuaGoals:= ''; cMapName:= ''; LuaTemplateNumber:= 0; + + mobileRecord.getScreenDPI:= @getScreenDPI; //TODO: define external function. + {$IFDEF IPHONEOS} + mobileRecord.PerformRumble:= @AudioServicesPlaySystemSound; + mobileRecord.GameLoading:= @startLoadingIndicator; + mobileRecord.GameLoaded:= @stopLoadingIndicator; + mobileRecord.SaveLoadingEnded:= @saveFinishedSynching; + {$ELSE} + mobileRecord.PerformRumble:= nil; + mobileRecord.GameLoading:= nil; + mobileRecord.GameLoaded:= nil; + mobileRecord.SaveLoadingEnded:= nil; + {$ENDIF} end; procedure freeModule; diff -r d5d5e1698554 -r 1dedcc37bfe8 hedgewars/uVideoRec.pas --- a/hedgewars/uVideoRec.pas Sun Nov 18 01:06:01 2012 +0400 +++ b/hedgewars/uVideoRec.pas Fri Feb 22 05:05:32 2013 +0100 @@ -30,11 +30,6 @@ {$IFNDEF WIN32} {$LINKLIB ../bin/libavwrapper.a} {$ENDIF} -{$IFDEF DARWIN} - {$LINKLIB bz2} - {$LINKFRAMEWORK CoreVideo} - {$LINKFRAMEWORK VideoDecodeAcceleration} -{$ENDIF} interface @@ -201,7 +196,7 @@ end; function LoadNextCameraPosition(out newRealTicks, newGameTicks: LongInt): Boolean; -var frame: TFrame; +var frame: TFrame = (realTicks: 0; gameTicks: 0; CamX: 0; CamY: 0; zoom: 0); begin // we need to skip or duplicate frames to match target framerate while Int64(curTime)*cVideoFramerateNum <= Int64(numFrames)*cVideoFramerateDen*1000 do @@ -249,9 +244,12 @@ var inF, outF: file; buffer: array[0..1023] of byte; result: LongInt; + i: integer; begin {$IOCHECKS OFF} - result:= 0; // avoid compiler hint + result:= 0; // avoid compiler hint and warning + for i:= 0 to 1023 do + buffer[i]:= 0; Assign(inF, src); Reset(inF, 1); diff -r d5d5e1698554 -r 1dedcc37bfe8 hedgewars/uVisualGears.pas --- a/hedgewars/uVisualGears.pas Sun Nov 18 01:06:01 2012 +0400 +++ b/hedgewars/uVisualGears.pas Fri Feb 22 05:05:32 2013 +0100 @@ -53,10 +53,13 @@ procedure KickFlakes(Radius, X, Y: LongInt); implementation -uses uSound, uMobile, uVariables, uTextures, uRender, Math, uRenderUtils, uStore, uUtils; +uses uSound, uVariables, uTextures, uRender, Math, uRenderUtils, uStore, uUtils; -const cExplFrameTicks = 110; +const + cExplFrameTicks = 110; + //cSmokeZ = 499; var VGCounter: LongWord; + VisualGearLayers: array[0..6] of PVisualGear; // For better maintainability the step handlers of visual gears are stored // in a separate file. diff -r d5d5e1698554 -r 1dedcc37bfe8 hedgewars/uWorld.pas --- a/hedgewars/uWorld.pas Sun Nov 18 01:06:01 2012 +0400 +++ b/hedgewars/uWorld.pas Fri Feb 22 05:05:32 2013 +0100 @@ -60,7 +60,6 @@ , uCaptions , uCursor , uCommands - , uMobile {$IFDEF USE_VIDEO_RECORDING} , uVideoRec {$ENDIF} @@ -75,8 +74,7 @@ timeTexture: PTexture; FPS: Longword; CountTicks: Longword; - SoundTimerTicks: Longword; - prevPoint: TPoint; + prevPoint, prevTargetPoint: TPoint; amSel: TAmmoType = amNothing; missionTex: PTexture; missionTimer: LongInt; @@ -84,6 +82,9 @@ isFirstFrame: boolean; AMAnimType: LongInt; recTexture: PTexture; + AmmoMenuTex : PTexture; + HorizontOffset: LongInt; + cOffsetY: LongInt; const cStereo_Sky = 0.0500; cStereo_Horizon = 0.0250; @@ -93,6 +94,27 @@ cStereo_Water_near = 0.0025; cStereo_Outside = -0.0400; + AMAnimDuration = 200; + AMHidden = 0;//AMState values + AMShowingUp = 1; + AMShowing = 2; + AMHiding = 3; + + AMTypeMaskX = $00000001; + AMTypeMaskY = $00000002; + AMTypeMaskAlpha = $00000004; + //AMTypeMaskSlide = $00000008; + +{$IFDEF MOBILE} + AMSlotSize = 48; +{$ELSE} + AMSlotSize = 32; +{$ENDIF} + AMSlotPadding = (AMSlotSize - 32) shr 1; + + cSendCursorPosTime = 50; + cCursorEdgesDist = 100; + // helper functions to create the goal/game mode string function AddGoal(s: ansistring; gf: longword; si: TGoalStrId; i: LongInt): ansistring; var t: ansistring; @@ -199,6 +221,8 @@ uCursor.init(); prevPoint.X:= 0; prevPoint.Y:= cScreenHeight div 2; +prevTargetPoint.X:= 0; +prevTargetPoint.Y:= 0; WorldDx:= -(LAND_WIDTH div 2) + cScreenWidth div 2; WorldDy:= -(LAND_HEIGHT - (playHeight div 2)) + (cScreenHeight div 2); @@ -220,7 +244,7 @@ {$IFDEF USE_TOUCH_INTERFACE} //positioning of the buttons -buttonScale:= uMobile.getScreenDPI/cDefaultZoomLevel; +buttonScale:= mobileRecord.getScreenDPI()/cDefaultZoomLevel; with JumpWidget do @@ -618,6 +642,7 @@ AMShiftX:= AMShiftTargetX; AMShiftY:= AMShiftTargetY; prevPoint:= CursorPoint; + prevTargetPoint:= TargetCursorPoint; AMState:= AMHidden; end; end; @@ -961,16 +986,7 @@ glClear(GL_COLOR_BUFFER_BIT); DrawWorldStereo(Lag, rmDefault) end -{$IFNDEF S3D_DISABLED} - else if (cStereoMode = smAFR) then - begin - AFRToggle:= not AFRToggle; - glClear(GL_COLOR_BUFFER_BIT); - if AFRToggle then - DrawWorldStereo(Lag, rmLeftEye) - else - DrawWorldStereo(Lag, rmRightEye) - end +{$IFDEF USE_S3D_RENDERING} else if (cStereoMode = smHorizontal) or (cStereoMode = smVertical) then begin // create left fb @@ -1074,7 +1090,7 @@ procedure ChangeDepth(rm: TRenderMode; d: GLfloat); begin -{$IFDEF S3D_DISABLED} +{$IFNDEF USE_S3D_RENDERING} rm:= rm; d:= d; // avoid hint exit; {$ELSE} @@ -1092,7 +1108,7 @@ procedure ResetDepth(rm: TRenderMode); begin -{$IFDEF S3D_DISABLED} +{$IFNDEF USE_S3D_RENDERING} rm:= rm; // avoid hint exit; {$ELSE} @@ -1497,22 +1513,8 @@ if fpsTexture <> nil then DrawTexture((cScreenWidth shr 1) - 60 - offsetY, offsetX, fpsTexture); end; - - // lag warning (?) - inc(SoundTimerTicks, Lag); 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; - if isAudioMuted then - AddCaption(trmsg[sidMute], cWhiteColor, capgrpVolume) -end; if GameState = gsConfirm then DrawTextureCentered(0, (cScreenHeight shr 1), ConfirmTexture); @@ -1615,6 +1617,7 @@ begin if not bShowAmmoMenu then begin + if not CurrentTeam^.ExtDriven then TargetCursorPoint:= CursorPoint; with CurrentHedgehog^ do if (Gear <> nil) and ((Gear^.State and gstHHChooseTarget) <> 0) then begin @@ -1623,9 +1626,9 @@ i:= GetCurAmmoEntry(CurrentHedgehog^)^.Pos; with Ammoz[CurAmmoType] do if PosCount > 1 then - DrawSprite(PosSprite, CursorPoint.X - (SpritesData[PosSprite].Width shr 1), cScreenHeight - CursorPoint.Y - (SpritesData[PosSprite].Height shr 1),i); + DrawSprite(PosSprite, TargetCursorPoint.X - (SpritesData[PosSprite].Width shr 1), cScreenHeight - TargetCursorPoint.Y - (SpritesData[PosSprite].Height shr 1),i); end; - DrawSprite(sprArrow, CursorPoint.X, cScreenHeight - CursorPoint.Y, (RealTicks shr 6) mod 8) + DrawSprite(sprArrow, TargetCursorPoint.X, cScreenHeight - TargetCursorPoint.Y, (RealTicks shr 6) mod 8) end end; isFirstFrame:= false @@ -1637,7 +1640,7 @@ var EdgesDist, wdy, shs,z, amNumOffsetX, amNumOffsetY: LongInt; begin {$IFNDEF MOBILE} -if (not (CurrentTeam^.ExtDriven and isCursorVisible and (not bShowAmmoMenu))) and cHasFocus and (GameState <> gsConfirm) then +if (not (CurrentTeam^.ExtDriven and isCursorVisible and (not bShowAmmoMenu) and autoCameraOn)) and cHasFocus and (GameState <> gsConfirm) then uCursor.updatePosition(); {$ENDIF} z:= round(200/zoom); @@ -1708,7 +1711,8 @@ EdgesDist:= cGearScrEdgesDist; // this generates the border around the screen that moves the camera when cursor is near it -if isCursorVisible or ((FollowGear <> nil) and autoCameraOn) then +if (CurrentTeam^.ExtDriven and isCursorVisible and autoCameraOn) or + (not CurrentTeam^.ExtDriven and isCursorVisible) or ((FollowGear <> nil) and autoCameraOn) then begin if CursorPoint.X < - cScreenWidth div 2 + EdgesDist then begin diff -r d5d5e1698554 -r 1dedcc37bfe8 misc/Android.mk --- a/misc/Android.mk Sun Nov 18 01:06:01 2012 +0400 +++ b/misc/Android.mk Fri Feb 22 05:05:32 2013 +0100 @@ -4,3 +4,4 @@ include $(MISC_DIR)/libfreetype/Android.mk include $(MISC_DIR)/liblua/Android.mk include $(MISC_DIR)/libtremor/Android.mk +include $(MISC_DIR)/physfs/Android.mk diff -r d5d5e1698554 -r 1dedcc37bfe8 misc/liblua/CMakeLists.txt --- a/misc/liblua/CMakeLists.txt Sun Nov 18 01:06:01 2012 +0400 +++ b/misc/liblua/CMakeLists.txt Fri Feb 22 05:05:32 2013 +0100 @@ -9,7 +9,7 @@ set(LUA_LIBRARY lua.dll) set_target_properties(lua PROPERTIES PREFIX "") - install(TARGETS lua RUNTIME DESTINATION ${target_dir}) + install(TARGETS lua RUNTIME DESTINATION ${target_library_install_dir}) else(WIN32) add_definitions(-DLUA_USE_LINUX) add_library(lua STATIC ${lua_src}) diff -r d5d5e1698554 -r 1dedcc37bfe8 misc/libopenalbridge/CMakeLists.txt --- a/misc/libopenalbridge/CMakeLists.txt Sun Nov 18 01:06:01 2012 +0400 +++ b/misc/libopenalbridge/CMakeLists.txt Fri Feb 22 05:05:32 2013 +0100 @@ -30,7 +30,7 @@ if(WIN32) if(MSVC) - SET_TARGET_PROPERTIES(openalbridge PROPERTIES LINK_FLAGS /DEF:openalbridge.def) + set_target_properties(openalbridge PROPERTIES LINK_FLAGS /DEF:openalbridge.def) endif(MSVC) #install it in the executable directory install(TARGETS openalbridge DESTINATION bin) diff -r d5d5e1698554 -r 1dedcc37bfe8 misc/physfs/Android.mk --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/misc/physfs/Android.mk Fri Feb 22 05:05:32 2013 +0100 @@ -0,0 +1,1 @@ +include $(call all-subdir-makefiles) diff -r d5d5e1698554 -r 1dedcc37bfe8 misc/physfs/CMakeLists.txt --- a/misc/physfs/CMakeLists.txt Sun Nov 18 01:06:01 2012 +0400 +++ b/misc/physfs/CMakeLists.txt Fri Feb 22 05:05:32 2013 +0100 @@ -3,60 +3,65 @@ # # Please see the file LICENSE.txt in the source's root directory. -CMAKE_MINIMUM_REQUIRED(VERSION 2.4) - -PROJECT(PhysicsFS) -SET(PHYSFS_VERSION 2.1.0) +## lines starting with '##' are lines overridden/modified/added by Hedgewars configuration +##CMAKE_MINIMUM_REQUIRED(VERSION 2.4) +##PROJECT(PhysicsFS) +set(PHYSFS_VERSION 2.1.0) # Increment this if/when we break backwards compatibility. -SET(PHYSFS_SOVERSION 1) +set(PHYSFS_SOVERSION 1) # I hate that they define "WIN32" ... we're about to move to Win64...I hope! -IF(WIN32 AND NOT WINDOWS) - SET(WINDOWS TRUE) -ENDIF(WIN32 AND NOT WINDOWS) +if(WIN32 AND NOT WINDOWS) + set(WINDOWS TRUE) +endif(WIN32 AND NOT WINDOWS) # Bleh, let's do it for "APPLE" too. -IF(APPLE AND NOT MACOSX) - SET(MACOSX TRUE) -ENDIF(APPLE AND NOT MACOSX) +if(APPLE AND NOT MACOSX) + set(MACOSX TRUE) +endif(APPLE AND NOT MACOSX) # For now, Haiku and BeOS are the same, as far as the build system cares. -IF(HAIKU AND NOT BEOS) - SET(BEOS TRUE) -ENDIF(HAIKU AND NOT BEOS) +if(HAIKU AND NOT BEOS) + set(BEOS TRUE) +endif(HAIKU AND NOT BEOS) -IF(CMAKE_SYSTEM_NAME STREQUAL "SunOS") - SET(SOLARIS TRUE) -ENDIF(CMAKE_SYSTEM_NAME STREQUAL "SunOS") +if(CMAKE_SYSTEM_NAME STREQUAL "SunOS") + set(SOLARIS TRUE) +endif(CMAKE_SYSTEM_NAME STREQUAL "SunOS") + +include(CheckIncludeFile) +include(CheckLibraryExists) +include(CheckCSourceCompiles) -INCLUDE(CheckIncludeFile) -INCLUDE(CheckLibraryExists) -INCLUDE(CheckCSourceCompiles) - -INCLUDE_DIRECTORIES(./src) +## SDL is needed by extra +find_package(SDL REQUIRED) +include_directories(${CMAKE_CURRENT_SOURCE_DIR}/src) ## +include_directories(${SDL_INCLUDE_DIR}) ## +include_directories(${LUA_INCLUDE_DIR}) ## -IF(MACOSX) +if(MACOSX) # Fallback to older OS X on PowerPC to support wider range of systems... - IF(CMAKE_OSX_ARCHITECTURES MATCHES ppc) - ADD_DEFINITIONS(-DMAC_OS_X_VERSION_MIN_REQUIRED=1020) - SET(OTHER_LDFLAGS ${OTHER_LDFLAGS} " -mmacosx-version-min=10.2") - ENDIF(CMAKE_OSX_ARCHITECTURES MATCHES ppc) + if(CMAKE_OSX_ARCHITECTURES MATCHES ppc) + add_definitions(-DMAC_OS_X_VERSION_MIN_REQUIRED=1020) + set(OTHER_LDFLAGS ${OTHER_LDFLAGS} " -mmacosx-version-min=10.2") + endif(CMAKE_OSX_ARCHITECTURES MATCHES ppc) # Need these everywhere... - ADD_DEFINITIONS(-fno-common) - SET(OTHER_LDFLAGS ${OTHER_LDFLAGS} "-framework Carbon -framework IOKit") -ENDIF(MACOSX) + add_definitions(-fno-common) + find_library(iokit_framework NAMES IOKit) + list(APPEND OTHER_LDFLAGS ${iokit_framework}) +endif(MACOSX) # Add some gcc-specific command lines. -IF(CMAKE_COMPILER_IS_GNUCC) +if(CMAKE_COMPILER_IS_GNUCC) # Always build with debug symbols...you can strip it later. - ADD_DEFINITIONS(-g -pipe -Werror -fsigned-char) + add_definitions(-g -pipe -Werror -fsigned-char) # Stupid BeOS generates warnings in the system headers. - IF(NOT BEOS) - ADD_DEFINITIONS(-Wall) - ENDIF(NOT BEOS) + if(NOT BEOS) + add_definitions(-Wall) + endif(NOT BEOS) CHECK_C_SOURCE_COMPILES(" #if ((defined(__GNUC__)) && (__GNUC__ >= 4)) @@ -66,31 +71,31 @@ #endif " PHYSFS_IS_GCC4) - IF(PHYSFS_IS_GCC4) + if(PHYSFS_IS_GCC4) # Not supported on several operating systems at this time. - IF(NOT SOLARIS AND NOT WINDOWS) - ADD_DEFINITIONS(-fvisibility=hidden) - ENDIF(NOT SOLARIS AND NOT WINDOWS) - ENDIF(PHYSFS_IS_GCC4) + if(NOT SOLARIS AND NOT WINDOWS) + add_definitions(-fvisibility=hidden) + endif(NOT SOLARIS AND NOT WINDOWS) + endif(PHYSFS_IS_GCC4) # Don't use -rpath. - SET(CMAKE_SKIP_RPATH ON CACHE BOOL "Skip RPATH" FORCE) -ENDIF(CMAKE_COMPILER_IS_GNUCC) + set(CMAKE_SKIP_RPATH ON CACHE BOOL "Skip RPATH" FORCE) +endif(CMAKE_COMPILER_IS_GNUCC) -IF(CMAKE_C_COMPILER_ID STREQUAL "SunPro") - ADD_DEFINITIONS(-erroff=E_EMPTY_TRANSLATION_UNIT) - ADD_DEFINITIONS(-xldscope=hidden) -ENDIF(CMAKE_C_COMPILER_ID STREQUAL "SunPro") +if(CMAKE_C_COMPILER_ID STREQUAL "SunPro") + add_definitions(-erroff=E_EMPTY_TRANSLATION_UNIT) + add_definitions(-xldscope=hidden) +endif(CMAKE_C_COMPILER_ID STREQUAL "SunPro") -IF(MSVC) +if(MSVC) # VS.NET 8.0 got really really anal about strcpy, etc, which even if we # cleaned up our code, zlib, etc still use...so disable the warning. - ADD_DEFINITIONS(-D_CRT_SECURE_NO_WARNINGS=1) -ENDIF(MSVC) + add_definitions(-D_CRT_SECURE_NO_WARNINGS=1) +endif(MSVC) + # Basic chunks of source code ... - -SET(LZMA_SRCS +set(LZMA_SRCS src/lzma/C/7zCrc.c src/lzma/C/Archive/7z/7zBuffer.c src/lzma/C/Archive/7z/7zDecode.c @@ -104,20 +109,28 @@ src/lzma/C/Compress/Lzma/LzmaDecode.c ) -IF(BEOS) +if(BEOS) # We add this explicitly, since we don't want CMake to think this # is a C++ project unless we're on BeOS. - SET(PHYSFS_BEOS_SRCS src/platform_beos.cpp) - FIND_LIBRARY(BE_LIBRARY be) - FIND_LIBRARY(ROOT_LIBRARY root) - SET(OPTIONAL_LIBRARY_LIBS ${OPTIONAL_LIBRARY_LIBS} ${BE_LIBRARY} ${ROOT_LIBRARY}) -ENDIF(BEOS) + set(PHYSFS_BEOS_SRCS src/platform_beos.cpp) + find_library(BE_LIBRARY be) + find_library(ROOT_LIBRARY root) + set(optionAL_LIBRARY_LIBS ${optionAL_LIBRARY_LIBS} ${BE_LIBRARY} ${ROOT_LIBRARY}) +endif(BEOS) + +## extra functions needed by Hedgewars +## TODO: maybe it's better to have them in a separate library? +set(PHYSFS_HEDGE_SRCS + extras/physfsrwops.c + extras/physfslualoader.c + extras/hwpacksmounter.c +) # Almost everything is "compiled" here, but things that don't apply to the # build are #ifdef'd out. This is to make it easy to embed PhysicsFS into # another project or bring up a new build system: just compile all the source # code and #define the things you want. -SET(PHYSFS_SRCS +set(PHYSFS_SRCS src/physfs.c src/physfs_byteorder.c src/physfs_unicode.c @@ -136,28 +149,29 @@ src/archiver_zip.c src/archiver_iso9660.c ${PHYSFS_BEOS_SRCS} + ${PHYSFS_HEDGE_SRCS} ## ) # platform layers ... -IF(UNIX) - IF(BEOS) - SET(PHYSFS_HAVE_CDROM_SUPPORT TRUE) - SET(PHYSFS_HAVE_THREAD_SUPPORT TRUE) - SET(HAVE_PTHREAD_H TRUE) - ELSE(BEOS) +if(UNIX) + if(BEOS) + set(PHYSFS_HAVE_CDROM_SUPPORT TRUE) + set(PHYSFS_HAVE_THREAD_SUPPORT TRUE) + set(HAVE_PTHREAD_H TRUE) + else(BEOS) CHECK_INCLUDE_FILE(sys/ucred.h HAVE_UCRED_H) - IF(HAVE_UCRED_H) - ADD_DEFINITIONS(-DPHYSFS_HAVE_SYS_UCRED_H=1) - SET(PHYSFS_HAVE_CDROM_SUPPORT TRUE) - ENDIF(HAVE_UCRED_H) + if(HAVE_UCRED_H) + add_definitions(-DPHYSFS_HAVE_SYS_UCRED_H=1) + set(PHYSFS_HAVE_CDROM_SUPPORT TRUE) + endif(HAVE_UCRED_H) CHECK_INCLUDE_FILE(mntent.h HAVE_MNTENT_H) - IF(HAVE_MNTENT_H) - ADD_DEFINITIONS(-DPHYSFS_HAVE_MNTENT_H=1) - SET(PHYSFS_HAVE_CDROM_SUPPORT TRUE) - ENDIF(HAVE_MNTENT_H) + if(HAVE_MNTENT_H) + add_definitions(-DPHYSFS_HAVE_MNTENT_H=1) + set(PHYSFS_HAVE_CDROM_SUPPORT TRUE) + endif(HAVE_MNTENT_H) # !!! FIXME: Solaris fails this, because mnttab.h implicitly # !!! FIXME: depends on other system headers. :( @@ -168,379 +182,134 @@ int main(int argc, char **argv) { return 0; } " HAVE_SYS_MNTTAB_H) - IF(HAVE_SYS_MNTTAB_H) - ADD_DEFINITIONS(-DPHYSFS_HAVE_SYS_MNTTAB_H=1) - SET(PHYSFS_HAVE_CDROM_SUPPORT TRUE) - ENDIF(HAVE_SYS_MNTTAB_H) + if(HAVE_SYS_MNTTAB_H) + add_definitions(-DPHYSFS_HAVE_SYS_MNTTAB_H=1) + set(PHYSFS_HAVE_CDROM_SUPPORT TRUE) + endif(HAVE_SYS_MNTTAB_H) CHECK_INCLUDE_FILE(pthread.h HAVE_PTHREAD_H) - IF(HAVE_PTHREAD_H) - SET(PHYSFS_HAVE_THREAD_SUPPORT TRUE) - ENDIF(HAVE_PTHREAD_H) - ENDIF(BEOS) -ENDIF(UNIX) + if(HAVE_PTHREAD_H) + set(PHYSFS_HAVE_THREAD_SUPPORT TRUE) + endif(HAVE_PTHREAD_H) + endif(BEOS) +endif(UNIX) -IF(WINDOWS) - SET(PHYSFS_HAVE_CDROM_SUPPORT TRUE) - SET(PHYSFS_HAVE_THREAD_SUPPORT TRUE) -ENDIF(WINDOWS) +if(WINDOWS) + set(PHYSFS_HAVE_CDROM_SUPPORT TRUE) + set(PHYSFS_HAVE_THREAD_SUPPORT TRUE) +endif(WINDOWS) -IF(NOT PHYSFS_HAVE_CDROM_SUPPORT) - ADD_DEFINITIONS(-DPHYSFS_NO_CDROM_SUPPORT=1) - MESSAGE(WARNING " ***") - MESSAGE(WARNING " *** There is no CD-ROM support in this build!") - MESSAGE(WARNING " *** PhysicsFS will just pretend there are no discs.") - MESSAGE(WARNING " *** This may be fine, depending on how PhysicsFS is used,") - MESSAGE(WARNING " *** but is this what you REALLY wanted?") - MESSAGE(WARNING " *** (Maybe fix CMakeLists.txt, or write a platform driver?)") - MESSAGE(WARNING " ***") -ENDIF(NOT PHYSFS_HAVE_CDROM_SUPPORT) +if(NOT PHYSFS_HAVE_CDROM_SUPPORT) + add_definitions(-DPHYSFS_NO_CDROM_SUPPORT=1) + message(WARNING " ***") + message(WARNING " *** There is no CD-ROM support in this build!") + message(WARNING " *** PhysicsFS will just pretend there are no discs.") + message(WARNING " *** This may be fine, depending on how PhysicsFS is used,") + message(WARNING " *** but is this what you REALLY wanted?") + message(WARNING " *** (Maybe fix CMakeLists.txt, or write a platform driver?)") + message(WARNING " ***") +endif(NOT PHYSFS_HAVE_CDROM_SUPPORT) -IF(PHYSFS_HAVE_THREAD_SUPPORT) - ADD_DEFINITIONS(-D_REENTRANT -D_THREAD_SAFE) -ELSE(PHYSFS_HAVE_THREAD_SUPPORT) - ADD_DEFINITIONS(-DPHYSFS_NO_THREAD_SUPPORT=1) - MESSAGE(WARNING " ***") - MESSAGE(WARNING " *** There is no thread support in this build!") - MESSAGE(WARNING " *** PhysicsFS will NOT be reentrant!") - MESSAGE(WARNING " *** This may be fine, depending on how PhysicsFS is used,") - MESSAGE(WARNING " *** but is this what you REALLY wanted?") - MESSAGE(WARNING " *** (Maybe fix CMakeLists.txt, or write a platform driver?)") - MESSAGE(WARNING " ***") -ENDIF(PHYSFS_HAVE_THREAD_SUPPORT) +if(PHYSFS_HAVE_THREAD_SUPPORT) + add_definitions(-D_REENTRANT -D_THREAD_SAFE) +else(PHYSFS_HAVE_THREAD_SUPPORT) + add_definitions(-DPHYSFS_NO_THREAD_SUPPORT=1) + message(WARNING " ***") + message(WARNING " *** There is no thread support in this build!") + message(WARNING " *** PhysicsFS will NOT be reentrant!") + message(WARNING " *** This may be fine, depending on how PhysicsFS is used,") + message(WARNING " *** but is this what you REALLY wanted?") + message(WARNING " *** (Maybe fix CMakeLists.txt, or write a platform driver?)") + message(WARNING " ***") +endif(PHYSFS_HAVE_THREAD_SUPPORT) # Archivers ... -OPTION(PHYSFS_ARCHIVE_ZIP "Enable ZIP support" TRUE) -IF(PHYSFS_ARCHIVE_ZIP) - ADD_DEFINITIONS(-DPHYSFS_SUPPORTS_ZIP=1) -ENDIF(PHYSFS_ARCHIVE_ZIP) +option(PHYSFS_ARCHIVE_ZIP "Enable ZIP support" TRUE) +if(PHYSFS_ARCHIVE_ZIP) + add_definitions(-DPHYSFS_SUPPORTS_ZIP=1) + set(PHYSFS_FEATURES "ZIP") +endif(PHYSFS_ARCHIVE_ZIP) -OPTION(PHYSFS_ARCHIVE_7Z "Enable 7zip support" FALSE) -IF(PHYSFS_ARCHIVE_7Z) - ADD_DEFINITIONS(-DPHYSFS_SUPPORTS_7Z=1) - # !!! FIXME: rename to 7z.c? - SET(PHYSFS_SRCS ${PHYSFS_SRCS} ${LZMA_SRCS}) -ENDIF(PHYSFS_ARCHIVE_7Z) +option(PHYSFS_ARCHIVE_7Z "Enable 7zip support" FALSE) +if(PHYSFS_ARCHIVE_7Z) + add_definitions(-DPHYSFS_SUPPORTS_7Z=1) + list(APPEND PHYSFS_SRCS ${LZMA_SRCS}) + set(PHYSFS_FEATURES "${PHYSFS_FEATURES} 7zip") +endif(PHYSFS_ARCHIVE_7Z) -OPTION(PHYSFS_ARCHIVE_GRP "Enable Build Engine GRP support" TRUE) -IF(PHYSFS_ARCHIVE_GRP) - ADD_DEFINITIONS(-DPHYSFS_SUPPORTS_GRP=1) -ENDIF(PHYSFS_ARCHIVE_GRP) +option(PHYSFS_ARCHIVE_GRP "Enable Build Engine GRP support" TRUE) +if(PHYSFS_ARCHIVE_GRP) + add_definitions(-DPHYSFS_SUPPORTS_GRP=1) + set(PHYSFS_FEATURES "${PHYSFS_FEATURES} GRP") +endif(PHYSFS_ARCHIVE_GRP) -OPTION(PHYSFS_ARCHIVE_WAD "Enable Doom WAD support" TRUE) -IF(PHYSFS_ARCHIVE_WAD) - ADD_DEFINITIONS(-DPHYSFS_SUPPORTS_WAD=1) -ENDIF(PHYSFS_ARCHIVE_WAD) +option(PHYSFS_ARCHIVE_WAD "Enable Doom WAD support" TRUE) +if(PHYSFS_ARCHIVE_WAD) + add_definitions(-DPHYSFS_SUPPORTS_WAD=1) + set(PHYSFS_FEATURES "${PHYSFS_FEATURES} WAD") +endif(PHYSFS_ARCHIVE_WAD) -OPTION(PHYSFS_ARCHIVE_HOG "Enable Descent I/II HOG support" TRUE) -IF(PHYSFS_ARCHIVE_HOG) - ADD_DEFINITIONS(-DPHYSFS_SUPPORTS_HOG=1) -ENDIF(PHYSFS_ARCHIVE_HOG) +option(PHYSFS_ARCHIVE_HOG "Enable Descent I/II HOG support" TRUE) +if(PHYSFS_ARCHIVE_HOG) + add_definitions(-DPHYSFS_SUPPORTS_HOG=1) + set(PHYSFS_FEATURES "${PHYSFS_FEATURES} HOG") +endif(PHYSFS_ARCHIVE_HOG) -OPTION(PHYSFS_ARCHIVE_MVL "Enable Descent I/II MVL support" TRUE) -IF(PHYSFS_ARCHIVE_MVL) - ADD_DEFINITIONS(-DPHYSFS_SUPPORTS_MVL=1) -ENDIF(PHYSFS_ARCHIVE_MVL) +option(PHYSFS_ARCHIVE_MVL "Enable Descent I/II MVL support" TRUE) +if(PHYSFS_ARCHIVE_MVL) + add_definitions(-DPHYSFS_SUPPORTS_MVL=1) + set(PHYSFS_FEATURES "${PHYSFS_FEATURES} MVL") +endif(PHYSFS_ARCHIVE_MVL) -OPTION(PHYSFS_ARCHIVE_QPAK "Enable Quake I/II QPAK support" TRUE) -IF(PHYSFS_ARCHIVE_QPAK) - ADD_DEFINITIONS(-DPHYSFS_SUPPORTS_QPAK=1) -ENDIF(PHYSFS_ARCHIVE_QPAK) +option(PHYSFS_ARCHIVE_QPAK "Enable Quake I/II QPAK support" TRUE) +if(PHYSFS_ARCHIVE_QPAK) + add_definitions(-DPHYSFS_SUPPORTS_QPAK=1) + set(PHYSFS_FEATURES "${PHYSFS_FEATURES} QPAK") +endif(PHYSFS_ARCHIVE_QPAK) -OPTION(PHYSFS_ARCHIVE_ISO9660 "Enable ISO9660 support" TRUE) -IF(PHYSFS_ARCHIVE_ISO9660) - ADD_DEFINITIONS(-DPHYSFS_SUPPORTS_ISO9660=1) -ENDIF(PHYSFS_ARCHIVE_ISO9660) - +option(PHYSFS_ARCHIVE_ISO9660 "Enable ISO9660 support" TRUE) +if(PHYSFS_ARCHIVE_ISO9660) + add_definitions(-DPHYSFS_SUPPORTS_ISO9660=1) + set(PHYSFS_FEATURES "${PHYSFS_FEATURES} CD-ROM") +endif(PHYSFS_ARCHIVE_ISO9660) -OPTION(PHYSFS_BUILD_STATIC "Build static library" TRUE) -IF(PHYSFS_BUILD_STATIC) - ADD_LIBRARY(physfs STATIC ${PHYSFS_SRCS}) - SET_TARGET_PROPERTIES(physfs PROPERTIES OUTPUT_NAME "physfs") - SET(PHYSFS_LIB_TARGET physfs) - SET(PHYSFS_INSTALL_TARGETS ${PHYSFS_INSTALL_TARGETS} ";physfs") -ENDIF(PHYSFS_BUILD_STATIC) +##as needed by Hedgewars configuration +if(WINDOWS) + option(PHYSFS_BUILD_STATIC "Build static library" FALSE) + option(PHYSFS_BUILD_SHARED "Build shared library" TRUE) + list(APPEND OTHER_LDFLAGS ${SDL_LIBRARY}) +else(WINDOWS) + option(PHYSFS_BUILD_STATIC "Build static library" TRUE) + option(PHYSFS_BUILD_SHARED "Build shared library" FALSE) +endif(WINDOWS) -#OPTION(PHYSFS_BUILD_SHARED "Build shared library" FALSE) -#IF(PHYSFS_BUILD_SHARED) -# ADD_LIBRARY(physfs SHARED ${PHYSFS_SRCS}) -# SET_TARGET_PROPERTIES(physfs PROPERTIES VERSION ${PHYSFS_VERSION}) -# SET_TARGET_PROPERTIES(physfs PROPERTIES SOVERSION ${PHYSFS_SOVERSION}) -# TARGET_LINK_LIBRARIES(physfs ${OPTIONAL_LIBRARY_LIBS} ${OTHER_LDFLAGS}) -# SET(PHYSFS_LIB_TARGET physfs) -# SET(PHYSFS_INSTALL_TARGETS ${PHYSFS_INSTALL_TARGETS} ";physfs") -#ENDIF(PHYSFS_BUILD_SHARED) +if(PHYSFS_BUILD_STATIC) + add_library(physfs STATIC ${PHYSFS_SRCS}) + set_target_properties(physfs PROPERTIES OUTPUT_NAME "physfs") +endif(PHYSFS_BUILD_STATIC) -IF(NOT PHYSFS_BUILD_SHARED AND NOT PHYSFS_BUILD_STATIC) - MESSAGE(FATAL "Both shared and static libraries are disabled!") -ENDIF(NOT PHYSFS_BUILD_SHARED AND NOT PHYSFS_BUILD_STATIC) +if(PHYSFS_BUILD_SHARED) + add_library(physfs SHARED ${PHYSFS_SRCS}) + set_target_properties(physfs PROPERTIES VERSION ${PHYSFS_VERSION}) + set_target_properties(physfs PROPERTIES SOVERSION ${PHYSFS_SOVERSION}) + target_link_libraries(physfs ${optionAL_LIBRARY_LIBS} ${OTHER_LDFLAGS}) + install(TARGETS physfs RUNTIME DESTINATION ${target_library_install_dir}) ## +endif(PHYSFS_BUILD_SHARED) + +if(NOT PHYSFS_BUILD_SHARED AND NOT PHYSFS_BUILD_STATIC) + message(FATAL "Both shared and static libraries are disabled!") +endif(NOT PHYSFS_BUILD_SHARED AND NOT PHYSFS_BUILD_STATIC) # CMake FAQ says I need this... -IF(PHYSFS_BUILD_SHARED AND PHYSFS_BUILD_STATIC) - SET_TARGET_PROPERTIES(physfs PROPERTIES CLEAN_DIRECT_OUTPUT 1) - SET_TARGET_PROPERTIES(physfs-static PROPERTIES CLEAN_DIRECT_OUTPUT 1) -ENDIF(PHYSFS_BUILD_SHARED AND PHYSFS_BUILD_STATIC) - -OPTION(PHYSFS_BUILD_TEST "Build stdio test program." FALSE) -MARK_AS_ADVANCED(PHYSFS_BUILD_TEST) -IF(PHYSFS_BUILD_TEST) - FIND_PATH(READLINE_H readline/readline.h) - FIND_PATH(HISTORY_H readline/history.h) - IF(READLINE_H AND HISTORY_H) - FIND_LIBRARY(CURSES_LIBRARY NAMES curses ncurses) - SET(CMAKE_REQUIRED_LIBRARIES ${CURSES_LIBRARY}) - FIND_LIBRARY(READLINE_LIBRARY readline) - IF(READLINE_LIBRARY) - SET(HAVE_SYSTEM_READLINE TRUE) - SET(TEST_PHYSFS_LIBS ${TEST_PHYSFS_LIBS} ${READLINE_LIBRARY} ${CURSES_LIBRARY}) - INCLUDE_DIRECTORIES(${READLINE_H} ${HISTORY_H}) - ADD_DEFINITIONS(-DPHYSFS_HAVE_READLINE=1) - ENDIF(READLINE_LIBRARY) - ENDIF(READLINE_H AND HISTORY_H) - ADD_EXECUTABLE(test_physfs test/test_physfs.c) - TARGET_LINK_LIBRARIES(test_physfs ${PHYSFS_LIB_TARGET} ${TEST_PHYSFS_LIBS} ${OTHER_LDFLAGS}) - SET(PHYSFS_INSTALL_TARGETS ${PHYSFS_INSTALL_TARGETS} ";test_physfs") -ENDIF(PHYSFS_BUILD_TEST) +if(PHYSFS_BUILD_SHARED AND PHYSFS_BUILD_STATIC) + set_target_properties(physfs PROPERTIES CLEAN_DIRECT_OUTPUT 1) +endif(PHYSFS_BUILD_SHARED AND PHYSFS_BUILD_STATIC) -# Scripting language bindings... - -#CMake's SWIG support is basically useless. -#FIND_PACKAGE(SWIG) - -OPTION(PHYSFS_BUILD_SWIG "Build ${_LANG} bindings." FALSE) -MARK_AS_ADVANCED(PHYSFS_BUILD_SWIG) - -FIND_PROGRAM(SWIG swig DOC "Path to swig command line app: http://swig.org/") -IF(NOT SWIG) - MESSAGE(STATUS "SWIG not found. You won't be able to build scripting language bindings.") -ELSE(NOT SWIG) - MARK_AS_ADVANCED(SWIG) - IF(DEFINED CMAKE_BUILD_TYPE) - IF((NOT CMAKE_BUILD_TYPE STREQUAL "") AND (NOT CMAKE_BUILD_TYPE STREQUAL "Debug")) - IF(CMAKE_BUILD_TYPE STREQUAL "MinSizeRel") - SET(SWIG_OPT_CFLAGS "-small") - ELSE(CMAKE_BUILD_TYPE STREQUAL "MinSizeRel") - SET(SWIG_OPT_CFLAGS "-O") - ENDIF(CMAKE_BUILD_TYPE STREQUAL "MinSizeRel") - ENDIF((NOT CMAKE_BUILD_TYPE STREQUAL "") AND (NOT CMAKE_BUILD_TYPE STREQUAL "Debug")) - ENDIF(DEFINED CMAKE_BUILD_TYPE) - - SET(SWIG_OUTPUT_DIR "${CMAKE_CURRENT_BINARY_DIR}/physfs-swig-bindings") - - MACRO(CONFIGURE_SWIG_BINDING _LANG _INSTALLPATH _EXTRAOUTPUTS _EXTRACFLAGS _EXTRALDFLAGS) - STRING(TOUPPER "${_LANG}" _UPPERLANG) - STRING(TOLOWER "${_LANG}" _LOWERLANG) - SET(_TARGET "physfs-${_LOWERLANG}") - SET(_TARGETDIR "${SWIG_OUTPUT_DIR}/${_LOWERLANG}") - - IF(NOT EXISTS "${_TARGETDIR}") - FILE(MAKE_DIRECTORY "${_TARGETDIR}") - ENDIF(NOT EXISTS "${_TARGETDIR}") - - IF(PHYSFS_BUILD_${_UPPERLANG}) - ADD_CUSTOM_COMMAND( - OUTPUT "${_TARGETDIR}/${_TARGET}.c" ${_EXTRAOUTPUTS} - MAIN_DEPENDENCY "${CMAKE_CURRENT_SOURCE_DIR}/extras/physfs-swig.i" - COMMAND "${SWIG}" - ARGS ${SWIG_OPT_CFLAGS} -${_LOWERLANG} -outdir "${_TARGETDIR}" -o "${_TARGETDIR}/${_TARGET}.c" "${CMAKE_CURRENT_SOURCE_DIR}/extras/physfs-swig.i" - COMMENT "Generating ${_LANG} bindings..." - ) - - ADD_LIBRARY(${_TARGET} SHARED "${_TARGETDIR}/${_TARGET}.c") - TARGET_LINK_LIBRARIES(${_TARGET} ${PHYSFS_LIB_TARGET}) - SET_TARGET_PROPERTIES(${_TARGET} PROPERTIES - COMPILE_FLAGS "${_EXTRACFLAGS}" - LINK_FLAGS "${_EXTRALDFLAGS}" - LIBRARY_OUTPUT_NAME "physfs" - LIBRARY_OUTPUT_DIRECTORY "${_TARGETDIR}" - CLEAN_DIRECT_OUTPUT 1 - ) - INSTALL(TARGETS ${_TARGET} LIBRARY DESTINATION "${_INSTALLPATH}") - MESSAGE(STATUS "${_LANG} bindings configured!") - ELSE(PHYSFS_BUILD_${_UPPERLANG}) - MESSAGE(STATUS "Couldn't figure out ${_LANG} configuration. Skipping ${_LANG} bindings.") - ENDIF(PHYSFS_BUILD_${_UPPERLANG}) - ENDMACRO(CONFIGURE_SWIG_BINDING) - - MACRO(ADD_SCRIPT_BINDING_OPTION _VAR _LANG _DEFVAL) - SET(BUILDSWIGVAL ${_DEFVAL}) - IF(NOT PHYSFS_BUILD_SWIG) - SET(BUILDSWIGVAL FALSE) - ENDIF(NOT PHYSFS_BUILD_SWIG) - OPTION(${_VAR} "Build ${_LANG} bindings." ${BUILDSWIGVAL}) - MARK_AS_ADVANCED(${_VAR}) - ENDMACRO(ADD_SCRIPT_BINDING_OPTION) - - ADD_SCRIPT_BINDING_OPTION(PHYSFS_BUILD_PERL "Perl" TRUE) - ADD_SCRIPT_BINDING_OPTION(PHYSFS_BUILD_RUBY "Ruby" TRUE) -ENDIF(NOT SWIG) - -IF(PHYSFS_BUILD_PERL) - MESSAGE(STATUS "Configuring Perl bindings...") - FIND_PROGRAM(PERL perl DOC "Path to perl command line app: http://perl.org/") - IF(NOT PERL) - MESSAGE(STATUS "Perl not found. You won't be able to build perl bindings.") - SET(PHYSFS_BUILD_PERL FALSE) - ENDIF(NOT PERL) - MARK_AS_ADVANCED(PERL) - - MACRO(GET_PERL_CONFIG _KEY _VALUE) - IF(PHYSFS_BUILD_PERL) - MESSAGE(STATUS "Figuring out perl config value '${_KEY}' ...") - EXECUTE_PROCESS( - COMMAND ${PERL} -w -e "use Config; print \$Config{${_KEY}};" - RESULT_VARIABLE GET_PERL_CONFIG_RC - OUTPUT_VARIABLE ${_VALUE} - ) - IF(NOT GET_PERL_CONFIG_RC EQUAL 0) - MESSAGE(STATUS "Perl executable ('${PERL}') reported failure: ${GET_PERL_CONFIG_RC}") - SET(PHYSFS_BUILD_PERL FALSE) - ENDIF(NOT GET_PERL_CONFIG_RC EQUAL 0) - IF(NOT ${_VALUE}) - MESSAGE(STATUS "Perl executable ('${PERL}') didn't have a value for '${_KEY}'") - SET(PHYSFS_BUILD_PERL FALSE) - ENDIF(NOT ${_VALUE}) - - IF(PHYSFS_BUILD_PERL) - MESSAGE(STATUS "Perl says: '${${_VALUE}}'.") - ENDIF(PHYSFS_BUILD_PERL) - ENDIF(PHYSFS_BUILD_PERL) - ENDMACRO(GET_PERL_CONFIG) - - # !!! FIXME: installsitearch might be the wrong location. - GET_PERL_CONFIG("archlibexp" PERL_INCLUDE_PATH) - GET_PERL_CONFIG("ccflags" PERL_CCFLAGS) - GET_PERL_CONFIG("ldflags" PERL_LDFLAGS) - GET_PERL_CONFIG("installsitearch" PERL_INSTALL_PATH) +## removed install, language bindings and test program +## simplified configuration output - # !!! FIXME: this test for Mac OS X is wrong. - IF(MACOSX) - GET_PERL_CONFIG("libperl" PERL_LIBPERL) - SET(TMPLIBPERL "${PERL_LIBPERL}") - STRING(REGEX REPLACE "^lib" "" TMPLIBPERL "${TMPLIBPERL}") - STRING(REGEX REPLACE "\\.so$" "" TMPLIBPERL "${TMPLIBPERL}") - STRING(REGEX REPLACE "\\.dylib$" "" TMPLIBPERL "${TMPLIBPERL}") - STRING(REGEX REPLACE "\\.dll$" "" TMPLIBPERL "${TMPLIBPERL}") - IF(NOT "${TMPLIBPERL}" STREQUAL "${PERL_LIBPERL}") - MESSAGE(STATUS "Stripped '${PERL_LIBPERL}' down to '${TMPLIBPERL}'.") - SET(PERL_LIBPERL "${TMPLIBPERL}") - ENDIF(NOT "${TMPLIBPERL}" STREQUAL "${PERL_LIBPERL}") - SET(PERL_LIBPERL "-l${PERL_LIBPERL}") - ENDIF(MACOSX) - - CONFIGURE_SWIG_BINDING(Perl "${PERL_INSTALL_PATH}" "${SWIG_OUTPUT_DIR}/perl/physfs.pm" "\"-I${PERL_INCLUDE_PATH}/CORE\" ${PERL_CCFLAGS} -w" "\"-L${PERL_INCLUDE_PATH}/CORE\" ${PERL_LIBPERL} ${PERL_LDFLAGS}") - INSTALL(FILES "${SWIG_OUTPUT_DIR}/perl/physfs.pm" DESTINATION "${PERL_INSTALL_PATH}") - INSTALL( - FILES test/test_physfs.pl - DESTINATION bin - PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE - GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE - ) -ENDIF(PHYSFS_BUILD_PERL) - -# !!! FIXME: lots of cut-and-paste from perl bindings. -IF(PHYSFS_BUILD_RUBY) - MESSAGE(STATUS "Configuring Ruby bindings...") - FIND_PROGRAM(RUBY ruby DOC "Path to ruby command line app: http://ruby-lang.org/") - IF(NOT RUBY) - MESSAGE(STATUS "Ruby not found. You won't be able to build ruby bindings.") - SET(PHYSFS_BUILD_RUBY FALSE) - ENDIF(NOT RUBY) - MARK_AS_ADVANCED(RUBY) - - MACRO(GET_RUBY_CONFIG _KEY _VALUE) - IF(PHYSFS_BUILD_RUBY) - MESSAGE(STATUS "Figuring out ruby config value '${_KEY}' ...") - EXECUTE_PROCESS( - COMMAND ${RUBY} -e "require 'rbconfig'; puts RbConfig::CONFIG['${_KEY}'];" - RESULT_VARIABLE GET_RUBY_CONFIG_RC - OUTPUT_VARIABLE ${_VALUE} - OUTPUT_STRIP_TRAILING_WHITESPACE - ) - IF(NOT GET_RUBY_CONFIG_RC EQUAL 0) - MESSAGE(STATUS "Ruby executable ('${RUBY}') reported failure: ${GET_RUBY_CONFIG_RC}") - SET(PHYSFS_BUILD_RUBY FALSE) - ENDIF(NOT GET_RUBY_CONFIG_RC EQUAL 0) - IF(NOT ${_VALUE}) - MESSAGE(STATUS "Ruby executable ('${RUBY}') didn't have a value for '${_KEY}'") - SET(PHYSFS_BUILD_RUBY FALSE) - ENDIF(NOT ${_VALUE}) - - IF(PHYSFS_BUILD_RUBY) - MESSAGE(STATUS "Ruby says: '${${_VALUE}}'.") - ENDIF(PHYSFS_BUILD_RUBY) - ENDIF(PHYSFS_BUILD_RUBY) - ENDMACRO(GET_RUBY_CONFIG) +message(STATUS "PhysicsFS will build with ${PHYSFS_FEATURES} support") - GET_RUBY_CONFIG("archdir" RUBY_INCLUDE_PATH) - GET_RUBY_CONFIG("CFLAGS" RUBY_CCFLAGS) - GET_RUBY_CONFIG("LDFLAGS" RUBY_LDFLAGS) - GET_RUBY_CONFIG("sitearchdir" RUBY_INSTALL_PATH) - GET_RUBY_CONFIG("LIBRUBYARG_SHARED" RUBY_LIBRUBY) - GET_RUBY_CONFIG("libdir" RUBY_LIBDIR) - - CONFIGURE_SWIG_BINDING(Ruby "${RUBY_INSTALL_PATH}" "" "\"-I${RUBY_INCLUDE_PATH}\" ${RUBY_CCFLAGS} -w" "\"-L${RUBY_LIBDIR}\" ${RUBY_LIBRUBY} ${RUBY_LDFLAGS}") - SET_TARGET_PROPERTIES(physfs-ruby PROPERTIES PREFIX "") - INSTALL( - FILES test/test_physfs.rb - DESTINATION bin - PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE - GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE - ) -ENDIF(PHYSFS_BUILD_RUBY) - - -INSTALL(TARGETS ${PHYSFS_INSTALL_TARGETS} - RUNTIME DESTINATION bin - LIBRARY DESTINATION lib${LIB_SUFFIX} - ARCHIVE DESTINATION lib${LIB_SUFFIX}) -INSTALL(FILES src/physfs.h DESTINATION include) - -IF(UNIX) - SET(PHYSFS_TARBALL "${CMAKE_CURRENT_SOURCE_DIR}/../physfs-${PHYSFS_VERSION}.tar.gz") - ADD_CUSTOM_TARGET( - dist - hg archive -t tgz "${PHYSFS_TARBALL}" - WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" - COMMENT "Building source tarball '${PHYSFS_TARBALL}'..." - ) -# ADD_CUSTOM_TARGET( -# uninstall -# "${CMAKE_CURRENT_SOURCE_DIR}/extras/uninstall.sh" -# WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}" -# COMMENT "Uninstall the project..." -# ) -ENDIF(UNIX) - -MACRO(MESSAGE_BOOL_OPTION _NAME _VALUE) - IF(${_VALUE}) - MESSAGE(STATUS " ${_NAME}: enabled") - ELSE(${_VALUE}) - MESSAGE(STATUS " ${_NAME}: disabled") - ENDIF(${_VALUE}) -ENDMACRO(MESSAGE_BOOL_OPTION) - -MESSAGE(STATUS "PhysicsFS will build with the following options:") -MESSAGE_BOOL_OPTION("ZIP support" PHYSFS_ARCHIVE_ZIP) -MESSAGE_BOOL_OPTION("7zip support" PHYSFS_ARCHIVE_7Z) -MESSAGE_BOOL_OPTION("GRP support" PHYSFS_ARCHIVE_GRP) -MESSAGE_BOOL_OPTION("WAD support" PHYSFS_ARCHIVE_WAD) -MESSAGE_BOOL_OPTION("HOG support" PHYSFS_ARCHIVE_HOG) -MESSAGE_BOOL_OPTION("MVL support" PHYSFS_ARCHIVE_MVL) -MESSAGE_BOOL_OPTION("QPAK support" PHYSFS_ARCHIVE_QPAK) -MESSAGE_BOOL_OPTION("CD-ROM drive support" PHYSFS_HAVE_CDROM_SUPPORT) -MESSAGE_BOOL_OPTION("Thread safety" PHYSFS_HAVE_THREAD_SUPPORT) -MESSAGE_BOOL_OPTION("Build static library" PHYSFS_BUILD_STATIC) -MESSAGE_BOOL_OPTION("Build shared library" PHYSFS_BUILD_SHARED) -MESSAGE_BOOL_OPTION("Build Perl bindings" PHYSFS_BUILD_PERL) -MESSAGE_BOOL_OPTION("Build Ruby bindings" PHYSFS_BUILD_RUBY) -MESSAGE_BOOL_OPTION("Build stdio test program" PHYSFS_BUILD_TEST) -IF(PHYSFS_BUILD_TEST) - MESSAGE_BOOL_OPTION(" Use readline in test program" HAVE_SYSTEM_READLINE) -ENDIF(PHYSFS_BUILD_TEST) - -# end of CMakeLists.txt ... - diff -r d5d5e1698554 -r 1dedcc37bfe8 misc/physfs/Xcode/Physfs.xcodeproj/project.pbxproj --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/misc/physfs/Xcode/Physfs.xcodeproj/project.pbxproj Fri Feb 22 05:05:32 2013 +0100 @@ -0,0 +1,354 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 45; + objects = { + +/* Begin PBXBuildFile section */ + 610FB79016613776002FB2A7 /* archiver_dir.c in Sources */ = {isa = PBXBuildFile; fileRef = 610FB77916613776002FB2A7 /* archiver_dir.c */; }; + 610FB79116613776002FB2A7 /* archiver_grp.c in Sources */ = {isa = PBXBuildFile; fileRef = 610FB77A16613776002FB2A7 /* archiver_grp.c */; }; + 610FB79216613776002FB2A7 /* archiver_hog.c in Sources */ = {isa = PBXBuildFile; fileRef = 610FB77B16613776002FB2A7 /* archiver_hog.c */; }; + 610FB79316613776002FB2A7 /* archiver_iso9660.c in Sources */ = {isa = PBXBuildFile; fileRef = 610FB77C16613776002FB2A7 /* archiver_iso9660.c */; }; + 610FB79416613776002FB2A7 /* archiver_lzma.c in Sources */ = {isa = PBXBuildFile; fileRef = 610FB77D16613776002FB2A7 /* archiver_lzma.c */; }; + 610FB79516613776002FB2A7 /* archiver_mvl.c in Sources */ = {isa = PBXBuildFile; fileRef = 610FB77E16613776002FB2A7 /* archiver_mvl.c */; }; + 610FB79616613776002FB2A7 /* archiver_qpak.c in Sources */ = {isa = PBXBuildFile; fileRef = 610FB77F16613776002FB2A7 /* archiver_qpak.c */; }; + 610FB79716613776002FB2A7 /* archiver_unpacked.c in Sources */ = {isa = PBXBuildFile; fileRef = 610FB78016613776002FB2A7 /* archiver_unpacked.c */; }; + 610FB79816613776002FB2A7 /* archiver_wad.c in Sources */ = {isa = PBXBuildFile; fileRef = 610FB78116613776002FB2A7 /* archiver_wad.c */; }; + 610FB79916613776002FB2A7 /* archiver_zip.c in Sources */ = {isa = PBXBuildFile; fileRef = 610FB78216613776002FB2A7 /* archiver_zip.c */; }; + 610FB79A16613776002FB2A7 /* physfs_byteorder.c in Sources */ = {isa = PBXBuildFile; fileRef = 610FB78316613776002FB2A7 /* physfs_byteorder.c */; }; + 610FB79B16613776002FB2A7 /* physfs_casefolding.h in Headers */ = {isa = PBXBuildFile; fileRef = 610FB78416613776002FB2A7 /* physfs_casefolding.h */; }; + 610FB79C16613776002FB2A7 /* physfs_internal.h in Headers */ = {isa = PBXBuildFile; fileRef = 610FB78516613776002FB2A7 /* physfs_internal.h */; }; + 610FB79D16613776002FB2A7 /* physfs_miniz.h in Headers */ = {isa = PBXBuildFile; fileRef = 610FB78616613776002FB2A7 /* physfs_miniz.h */; }; + 610FB79E16613776002FB2A7 /* physfs_platforms.h in Headers */ = {isa = PBXBuildFile; fileRef = 610FB78716613776002FB2A7 /* physfs_platforms.h */; }; + 610FB79F16613776002FB2A7 /* physfs_unicode.c in Sources */ = {isa = PBXBuildFile; fileRef = 610FB78816613776002FB2A7 /* physfs_unicode.c */; }; + 610FB7A016613776002FB2A7 /* physfs.c in Sources */ = {isa = PBXBuildFile; fileRef = 610FB78916613776002FB2A7 /* physfs.c */; }; + 610FB7A116613776002FB2A7 /* physfs.h in Headers */ = {isa = PBXBuildFile; fileRef = 610FB78A16613776002FB2A7 /* physfs.h */; }; + 610FB7A216613776002FB2A7 /* platform_beos.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 610FB78B16613776002FB2A7 /* platform_beos.cpp */; }; + 610FB7A316613776002FB2A7 /* platform_macosx.c in Sources */ = {isa = PBXBuildFile; fileRef = 610FB78C16613776002FB2A7 /* platform_macosx.c */; }; + 610FB7A416613776002FB2A7 /* platform_posix.c in Sources */ = {isa = PBXBuildFile; fileRef = 610FB78D16613776002FB2A7 /* platform_posix.c */; }; + 610FB7A516613776002FB2A7 /* platform_unix.c in Sources */ = {isa = PBXBuildFile; fileRef = 610FB78E16613776002FB2A7 /* platform_unix.c */; }; + 610FB7A616613776002FB2A7 /* platform_windows.c in Sources */ = {isa = PBXBuildFile; fileRef = 610FB78F16613776002FB2A7 /* platform_windows.c */; }; + 610FB7AE16613813002FB2A7 /* hwpacksmounter.c in Sources */ = {isa = PBXBuildFile; fileRef = 610FB7A916613813002FB2A7 /* hwpacksmounter.c */; }; + 610FB7AF16613813002FB2A7 /* hwpacksmounter.h in Headers */ = {isa = PBXBuildFile; fileRef = 610FB7AA16613813002FB2A7 /* hwpacksmounter.h */; }; + 610FB7B016613813002FB2A7 /* physfslualoader.c in Sources */ = {isa = PBXBuildFile; fileRef = 610FB7AB16613813002FB2A7 /* physfslualoader.c */; }; + 610FB7B116613813002FB2A7 /* physfsrwops.c in Sources */ = {isa = PBXBuildFile; fileRef = 610FB7AC16613813002FB2A7 /* physfsrwops.c */; }; + 610FB7B216613813002FB2A7 /* physfsrwops.h in Headers */ = {isa = PBXBuildFile; fileRef = 610FB7AD16613813002FB2A7 /* physfsrwops.h */; }; + AA747D9F0F9514B9006C5449 /* Physfs_Prefix.pch in Headers */ = {isa = PBXBuildFile; fileRef = AA747D9E0F9514B9006C5449 /* Physfs_Prefix.pch */; }; + AACBBE4A0F95108600F1A2B1 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AACBBE490F95108600F1A2B1 /* Foundation.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 610FB77916613776002FB2A7 /* archiver_dir.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = archiver_dir.c; path = ../src/archiver_dir.c; sourceTree = SOURCE_ROOT; }; + 610FB77A16613776002FB2A7 /* archiver_grp.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = archiver_grp.c; path = ../src/archiver_grp.c; sourceTree = SOURCE_ROOT; }; + 610FB77B16613776002FB2A7 /* archiver_hog.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = archiver_hog.c; path = ../src/archiver_hog.c; sourceTree = SOURCE_ROOT; }; + 610FB77C16613776002FB2A7 /* archiver_iso9660.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = archiver_iso9660.c; path = ../src/archiver_iso9660.c; sourceTree = SOURCE_ROOT; }; + 610FB77D16613776002FB2A7 /* archiver_lzma.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = archiver_lzma.c; path = ../src/archiver_lzma.c; sourceTree = SOURCE_ROOT; }; + 610FB77E16613776002FB2A7 /* archiver_mvl.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = archiver_mvl.c; path = ../src/archiver_mvl.c; sourceTree = SOURCE_ROOT; }; + 610FB77F16613776002FB2A7 /* archiver_qpak.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = archiver_qpak.c; path = ../src/archiver_qpak.c; sourceTree = SOURCE_ROOT; }; + 610FB78016613776002FB2A7 /* archiver_unpacked.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = archiver_unpacked.c; path = ../src/archiver_unpacked.c; sourceTree = SOURCE_ROOT; }; + 610FB78116613776002FB2A7 /* archiver_wad.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = archiver_wad.c; path = ../src/archiver_wad.c; sourceTree = SOURCE_ROOT; }; + 610FB78216613776002FB2A7 /* archiver_zip.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = archiver_zip.c; path = ../src/archiver_zip.c; sourceTree = SOURCE_ROOT; }; + 610FB78316613776002FB2A7 /* physfs_byteorder.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = physfs_byteorder.c; path = ../src/physfs_byteorder.c; sourceTree = SOURCE_ROOT; }; + 610FB78416613776002FB2A7 /* physfs_casefolding.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = physfs_casefolding.h; path = ../src/physfs_casefolding.h; sourceTree = SOURCE_ROOT; }; + 610FB78516613776002FB2A7 /* physfs_internal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = physfs_internal.h; path = ../src/physfs_internal.h; sourceTree = SOURCE_ROOT; }; + 610FB78616613776002FB2A7 /* physfs_miniz.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = physfs_miniz.h; path = ../src/physfs_miniz.h; sourceTree = SOURCE_ROOT; }; + 610FB78716613776002FB2A7 /* physfs_platforms.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = physfs_platforms.h; path = ../src/physfs_platforms.h; sourceTree = SOURCE_ROOT; }; + 610FB78816613776002FB2A7 /* physfs_unicode.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = physfs_unicode.c; path = ../src/physfs_unicode.c; sourceTree = SOURCE_ROOT; }; + 610FB78916613776002FB2A7 /* physfs.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = physfs.c; path = ../src/physfs.c; sourceTree = SOURCE_ROOT; }; + 610FB78A16613776002FB2A7 /* physfs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = physfs.h; path = ../src/physfs.h; sourceTree = SOURCE_ROOT; }; + 610FB78B16613776002FB2A7 /* platform_beos.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = platform_beos.cpp; path = ../src/platform_beos.cpp; sourceTree = SOURCE_ROOT; }; + 610FB78C16613776002FB2A7 /* platform_macosx.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = platform_macosx.c; path = ../src/platform_macosx.c; sourceTree = SOURCE_ROOT; }; + 610FB78D16613776002FB2A7 /* platform_posix.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = platform_posix.c; path = ../src/platform_posix.c; sourceTree = SOURCE_ROOT; }; + 610FB78E16613776002FB2A7 /* platform_unix.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = platform_unix.c; path = ../src/platform_unix.c; sourceTree = SOURCE_ROOT; }; + 610FB78F16613776002FB2A7 /* platform_windows.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = platform_windows.c; path = ../src/platform_windows.c; sourceTree = SOURCE_ROOT; }; + 610FB7A916613813002FB2A7 /* hwpacksmounter.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = hwpacksmounter.c; path = ../extras/hwpacksmounter.c; sourceTree = SOURCE_ROOT; }; + 610FB7AA16613813002FB2A7 /* hwpacksmounter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = hwpacksmounter.h; path = ../extras/hwpacksmounter.h; sourceTree = SOURCE_ROOT; }; + 610FB7AB16613813002FB2A7 /* physfslualoader.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = physfslualoader.c; path = ../extras/physfslualoader.c; sourceTree = SOURCE_ROOT; }; + 610FB7AC16613813002FB2A7 /* physfsrwops.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = physfsrwops.c; path = ../extras/physfsrwops.c; sourceTree = SOURCE_ROOT; }; + 610FB7AD16613813002FB2A7 /* physfsrwops.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = physfsrwops.h; path = ../extras/physfsrwops.h; sourceTree = SOURCE_ROOT; }; + AA747D9E0F9514B9006C5449 /* Physfs_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Physfs_Prefix.pch; sourceTree = SOURCE_ROOT; }; + AACBBE490F95108600F1A2B1 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; + D2AAC07E0554694100DB518D /* libPhysfs.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libPhysfs.a; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + D2AAC07C0554694100DB518D /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + AACBBE4A0F95108600F1A2B1 /* Foundation.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 034768DFFF38A50411DB9C8B /* Products */ = { + isa = PBXGroup; + children = ( + D2AAC07E0554694100DB518D /* libPhysfs.a */, + ); + name = Products; + sourceTree = ""; + }; + 0867D691FE84028FC02AAC07 /* Physfs */ = { + isa = PBXGroup; + children = ( + 08FB77AEFE84172EC02AAC07 /* Sources */, + 610FB77116613730002FB2A7 /* Extras */, + 32C88DFF0371C24200C91783 /* Other Sources */, + 0867D69AFE84028FC02AAC07 /* Frameworks */, + 034768DFFF38A50411DB9C8B /* Products */, + ); + name = Physfs; + sourceTree = ""; + }; + 0867D69AFE84028FC02AAC07 /* Frameworks */ = { + isa = PBXGroup; + children = ( + AACBBE490F95108600F1A2B1 /* Foundation.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + 08FB77AEFE84172EC02AAC07 /* Sources */ = { + isa = PBXGroup; + children = ( + 610FB77916613776002FB2A7 /* archiver_dir.c */, + 610FB77A16613776002FB2A7 /* archiver_grp.c */, + 610FB77B16613776002FB2A7 /* archiver_hog.c */, + 610FB77C16613776002FB2A7 /* archiver_iso9660.c */, + 610FB77D16613776002FB2A7 /* archiver_lzma.c */, + 610FB77E16613776002FB2A7 /* archiver_mvl.c */, + 610FB77F16613776002FB2A7 /* archiver_qpak.c */, + 610FB78016613776002FB2A7 /* archiver_unpacked.c */, + 610FB78116613776002FB2A7 /* archiver_wad.c */, + 610FB78216613776002FB2A7 /* archiver_zip.c */, + 610FB78316613776002FB2A7 /* physfs_byteorder.c */, + 610FB78416613776002FB2A7 /* physfs_casefolding.h */, + 610FB78516613776002FB2A7 /* physfs_internal.h */, + 610FB78616613776002FB2A7 /* physfs_miniz.h */, + 610FB78716613776002FB2A7 /* physfs_platforms.h */, + 610FB78816613776002FB2A7 /* physfs_unicode.c */, + 610FB78916613776002FB2A7 /* physfs.c */, + 610FB78A16613776002FB2A7 /* physfs.h */, + 610FB78B16613776002FB2A7 /* platform_beos.cpp */, + 610FB78C16613776002FB2A7 /* platform_macosx.c */, + 610FB78D16613776002FB2A7 /* platform_posix.c */, + 610FB78E16613776002FB2A7 /* platform_unix.c */, + 610FB78F16613776002FB2A7 /* platform_windows.c */, + ); + name = Sources; + sourceTree = ""; + }; + 32C88DFF0371C24200C91783 /* Other Sources */ = { + isa = PBXGroup; + children = ( + AA747D9E0F9514B9006C5449 /* Physfs_Prefix.pch */, + ); + name = "Other Sources"; + sourceTree = ""; + }; + 610FB77116613730002FB2A7 /* Extras */ = { + isa = PBXGroup; + children = ( + 610FB7A916613813002FB2A7 /* hwpacksmounter.c */, + 610FB7AA16613813002FB2A7 /* hwpacksmounter.h */, + 610FB7AB16613813002FB2A7 /* physfslualoader.c */, + 610FB7AC16613813002FB2A7 /* physfsrwops.c */, + 610FB7AD16613813002FB2A7 /* physfsrwops.h */, + ); + name = Extras; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXHeadersBuildPhase section */ + D2AAC07A0554694100DB518D /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + AA747D9F0F9514B9006C5449 /* Physfs_Prefix.pch in Headers */, + 610FB79B16613776002FB2A7 /* physfs_casefolding.h in Headers */, + 610FB79C16613776002FB2A7 /* physfs_internal.h in Headers */, + 610FB79D16613776002FB2A7 /* physfs_miniz.h in Headers */, + 610FB79E16613776002FB2A7 /* physfs_platforms.h in Headers */, + 610FB7A116613776002FB2A7 /* physfs.h in Headers */, + 610FB7AF16613813002FB2A7 /* hwpacksmounter.h in Headers */, + 610FB7B216613813002FB2A7 /* physfsrwops.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXHeadersBuildPhase section */ + +/* Begin PBXNativeTarget section */ + D2AAC07D0554694100DB518D /* Physfs */ = { + isa = PBXNativeTarget; + buildConfigurationList = 1DEB921E08733DC00010E9CD /* Build configuration list for PBXNativeTarget "Physfs" */; + buildPhases = ( + D2AAC07A0554694100DB518D /* Headers */, + D2AAC07B0554694100DB518D /* Sources */, + D2AAC07C0554694100DB518D /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Physfs; + productName = Physfs; + productReference = D2AAC07E0554694100DB518D /* libPhysfs.a */; + productType = "com.apple.product-type.library.static"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 0867D690FE84028FC02AAC07 /* Project object */ = { + isa = PBXProject; + buildConfigurationList = 1DEB922208733DC00010E9CD /* Build configuration list for PBXProject "Physfs" */; + compatibilityVersion = "Xcode 3.1"; + developmentRegion = English; + hasScannedForEncodings = 1; + knownRegions = ( + English, + Japanese, + French, + German, + ); + mainGroup = 0867D691FE84028FC02AAC07 /* Physfs */; + productRefGroup = 034768DFFF38A50411DB9C8B /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + D2AAC07D0554694100DB518D /* Physfs */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXSourcesBuildPhase section */ + D2AAC07B0554694100DB518D /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 610FB79016613776002FB2A7 /* archiver_dir.c in Sources */, + 610FB79116613776002FB2A7 /* archiver_grp.c in Sources */, + 610FB79216613776002FB2A7 /* archiver_hog.c in Sources */, + 610FB79316613776002FB2A7 /* archiver_iso9660.c in Sources */, + 610FB79416613776002FB2A7 /* archiver_lzma.c in Sources */, + 610FB79516613776002FB2A7 /* archiver_mvl.c in Sources */, + 610FB79616613776002FB2A7 /* archiver_qpak.c in Sources */, + 610FB79716613776002FB2A7 /* archiver_unpacked.c in Sources */, + 610FB79816613776002FB2A7 /* archiver_wad.c in Sources */, + 610FB79916613776002FB2A7 /* archiver_zip.c in Sources */, + 610FB79A16613776002FB2A7 /* physfs_byteorder.c in Sources */, + 610FB79F16613776002FB2A7 /* physfs_unicode.c in Sources */, + 610FB7A016613776002FB2A7 /* physfs.c in Sources */, + 610FB7A216613776002FB2A7 /* platform_beos.cpp in Sources */, + 610FB7A316613776002FB2A7 /* platform_macosx.c in Sources */, + 610FB7A416613776002FB2A7 /* platform_posix.c in Sources */, + 610FB7A516613776002FB2A7 /* platform_unix.c in Sources */, + 610FB7A616613776002FB2A7 /* platform_windows.c in Sources */, + 610FB7AE16613813002FB2A7 /* hwpacksmounter.c in Sources */, + 610FB7B016613813002FB2A7 /* physfslualoader.c in Sources */, + 610FB7B116613813002FB2A7 /* physfsrwops.c in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 1DEB921F08733DC00010E9CD /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ARCHS = "$(ARCHS_STANDARD_32_BIT)"; + COPY_PHASE_STRIP = NO; + DSTROOT = /tmp/Physfs.dst; + GCC_DYNAMIC_NO_PIC = NO; + GCC_ENABLE_FIX_AND_CONTINUE = YES; + GCC_MODEL_TUNING = G5; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = Physfs_Prefix.pch; + INSTALL_PATH = /usr/local/lib; + PRODUCT_NAME = Physfs; + }; + name = Debug; + }; + 1DEB922008733DC00010E9CD /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ARCHS = "$(ARCHS_STANDARD_32_BIT)"; + DSTROOT = /tmp/Physfs.dst; + GCC_MODEL_TUNING = G5; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = Physfs_Prefix.pch; + INSTALL_PATH = /usr/local/lib; + PRODUCT_NAME = Physfs; + }; + name = Release; + }; + 1DEB922308733DC00010E9CD /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ARCHS = "$(ARCHS_STANDARD_32_BIT)"; + GCC_C_LANGUAGE_STANDARD = c99; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + HEADER_SEARCH_PATHS = ( + "\"$(SRCROOT)/../../liblua\"", + "\"$(SRCROOT)/../../../../Library/SDL/include\"", + ); + OTHER_LDFLAGS = "-ObjC"; + PREBINDING = NO; + SDKROOT = iphoneos; + }; + name = Debug; + }; + 1DEB922408733DC00010E9CD /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ARCHS = "$(ARCHS_STANDARD_32_BIT)"; + GCC_C_LANGUAGE_STANDARD = c99; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + HEADER_SEARCH_PATHS = ( + "\"$(SRCROOT)/../../liblua\"", + "\"$(SRCROOT)/../../../../Library/SDL/include\"", + ); + OTHER_LDFLAGS = "-ObjC"; + PREBINDING = NO; + SDKROOT = iphoneos; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 1DEB921E08733DC00010E9CD /* Build configuration list for PBXNativeTarget "Physfs" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 1DEB921F08733DC00010E9CD /* Debug */, + 1DEB922008733DC00010E9CD /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 1DEB922208733DC00010E9CD /* Build configuration list for PBXProject "Physfs" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 1DEB922308733DC00010E9CD /* Debug */, + 1DEB922408733DC00010E9CD /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 0867D690FE84028FC02AAC07 /* Project object */; +} diff -r d5d5e1698554 -r 1dedcc37bfe8 misc/physfs/Xcode/Physfs_Prefix.pch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/misc/physfs/Xcode/Physfs_Prefix.pch Fri Feb 22 05:05:32 2013 +0100 @@ -0,0 +1,7 @@ +// +// Prefix header for all source files of the 'CocoaTouchStaticLibrary' target in the 'CocoaTouchStaticLibrary' project. +// + +#ifdef __OBJC__ + #import +#endif diff -r d5d5e1698554 -r 1dedcc37bfe8 misc/physfs/extras/CMakeLists.txt --- a/misc/physfs/extras/CMakeLists.txt Sun Nov 18 01:06:01 2012 +0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,9 +0,0 @@ -find_package(SDL REQUIRED) - -include_directories(${SDL_INCLUDE_DIR}) -include_directories(${CMAKE_SOURCE_DIR}/misc/liblua) -include_directories(${CMAKE_SOURCE_DIR}/misc/physfs/src) - -add_library(physfsrwops STATIC physfsrwops.c physfslualoader.c hwpacksmounter.c) - -add_dependencies(physfsrwops lua) diff -r d5d5e1698554 -r 1dedcc37bfe8 misc/physfs/extras/hwpacksmounter.c --- a/misc/physfs/extras/hwpacksmounter.c Sun Nov 18 01:06:01 2012 +0400 +++ b/misc/physfs/extras/hwpacksmounter.c Fri Feb 22 05:05:32 2013 +0100 @@ -1,11 +1,10 @@ #include #include #include -#include #include "hwpacksmounter.h" -void hedgewarsMountPackages() +PHYSFS_DECL void hedgewarsMountPackages() { char ** filesList = PHYSFS_enumerateFiles("/"); char **i; diff -r d5d5e1698554 -r 1dedcc37bfe8 misc/physfs/extras/hwpacksmounter.h --- a/misc/physfs/extras/hwpacksmounter.h Sun Nov 18 01:06:01 2012 +0400 +++ b/misc/physfs/extras/hwpacksmounter.h Fri Feb 22 05:05:32 2013 +0100 @@ -1,11 +1,13 @@ #ifndef HEDGEWARS_PACKAGES_MOUNTER_H #define HEDGEWARS_PACKAGES_MOUNTER_H +#include "physfs.h" + #ifdef __cplusplus extern "C" { #endif -void hedgewarsMountPackages(); +PHYSFS_DECL void hedgewarsMountPackages(); #ifdef __cplusplus diff -r d5d5e1698554 -r 1dedcc37bfe8 misc/physfs/extras/physfslualoader.c --- a/misc/physfs/extras/physfslualoader.c Sun Nov 18 01:06:01 2012 +0400 +++ b/misc/physfs/extras/physfslualoader.c Fri Feb 22 05:05:32 2013 +0100 @@ -1,11 +1,11 @@ -#include -#include +#include "lua.h" +#include "physfs.h" #define BUFSIZE 1024 -void * physfsReaderBuffer; +void *physfsReaderBuffer; -const char * physfsReader(lua_State *L, PHYSFS_File *f, size_t *size) +PHYSFS_DECL const char * physfsReader(lua_State *L, PHYSFS_File *f, size_t *size) { if(PHYSFS_eof(f)) @@ -22,3 +22,9 @@ return physfsReaderBuffer; } } + +PHYSFS_DECL void physfsReaderSetBuffer(void *buffer) +{ + physfsReaderBuffer = buffer; +} + diff -r d5d5e1698554 -r 1dedcc37bfe8 misc/physfs/src/Android.mk --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/misc/physfs/src/Android.mk Fri Feb 22 05:05:32 2013 +0100 @@ -0,0 +1,32 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) + +LOCAL_MODULE := physfs + +LOCAL_CFLAGS := -O2 -DPHYSFS_NO_CDROM_SUPPORT + +LOCAL_C_INCLUDES := $(LOCAL_PATH) $(MISC_DIR)/liblua $(MISC_DIR)/liblua $(JNI_DIR)/SDL/include + +LOCAL_SRC_FILES := physfs.c \ + physfs_byteorder.c \ + physfs_unicode.c \ + platform_posix.c \ + platform_unix.c \ + platform_macosx.c \ + platform_windows.c \ + archiver_dir.c \ + archiver_grp.c \ + archiver_hog.c \ + archiver_lzma.c \ + archiver_mvl.c \ + archiver_qpak.c \ + archiver_wad.c \ + archiver_zip.c \ + ../extras/hwpacksmounter.c \ + ../extras/physfslualoader.c \ + ../extras/physfsrwops.c \ + +LOCAL_SHARED_LIBRARIES += SDL lua + +include $(BUILD_SHARED_LIBRARY) diff -r d5d5e1698554 -r 1dedcc37bfe8 misc/winutils/Hedgewars.lnk Binary file misc/winutils/Hedgewars.lnk has changed diff -r d5d5e1698554 -r 1dedcc37bfe8 misc/winutils/include/GL/glut.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/misc/winutils/include/GL/glut.h Fri Feb 22 05:05:32 2013 +0100 @@ -0,0 +1,716 @@ +#ifndef __glut_h__ +#define __glut_h__ + +/* Copyright (c) Mark J. Kilgard, 1994, 1995, 1996, 1998. */ + +/* This program is freely distributable without licensing fees and is + provided without guarantee or warrantee expressed or implied. This + program is -not- in the public domain. */ + +#if defined(_WIN32) + +/* GLUT 3.7 now tries to avoid including + to avoid name space pollution, but Win32's + needs APIENTRY and WINGDIAPI defined properly. */ +# if 0 + /* This would put tons of macros and crap in our clean name space. */ +# define WIN32_LEAN_AND_MEAN +# include +# else + /* XXX This is from Win32's */ +# ifndef APIENTRY +# define GLUT_APIENTRY_DEFINED +# if (_MSC_VER >= 800) || defined(_STDCALL_SUPPORTED) || defined(__BORLANDC__) || defined(__LCC__) +# define APIENTRY __stdcall +# else +# define APIENTRY +# endif +# endif + /* XXX This is from Win32's */ +# ifndef CALLBACK +# if (defined(_M_MRX000) || defined(_M_IX86) || defined(_M_ALPHA) || defined(_M_PPC)) && !defined(MIDL_PASS) || defined(__LCC__) +# define CALLBACK __stdcall +# else +# define CALLBACK +# endif +# endif + /* XXX Hack for lcc compiler. It doesn't support __declspec(dllimport), just __stdcall. */ +# if defined( __LCC__ ) +# undef WINGDIAPI +# define WINGDIAPI __stdcall +# else + /* XXX This is from Win32's and */ +# ifndef WINGDIAPI +# define GLUT_WINGDIAPI_DEFINED +# define WINGDIAPI __declspec(dllimport) +# endif +# endif + /* XXX This is from Win32's */ +# ifndef _WCHAR_T_DEFINED +typedef unsigned short wchar_t; +# define _WCHAR_T_DEFINED +# endif +# endif + +/* To disable automatic library usage for GLUT, define GLUT_NO_LIB_PRAGMA + in your compile preprocessor options. */ +# if !defined(GLUT_BUILDING_LIB) && !defined(GLUT_NO_LIB_PRAGMA) +# pragma comment (lib, "winmm.lib") /* link with Windows MultiMedia lib */ +/* To enable automatic SGI OpenGL for Windows library usage for GLUT, + define GLUT_USE_SGI_OPENGL in your compile preprocessor options. */ +# ifdef GLUT_USE_SGI_OPENGL +# pragma comment (lib, "opengl.lib") /* link with SGI OpenGL for Windows lib */ +# pragma comment (lib, "glu.lib") /* link with SGI OpenGL Utility lib */ +# pragma comment (lib, "glut.lib") /* link with Win32 GLUT for SGI OpenGL lib */ +# else +# pragma comment (lib, "opengl32.lib") /* link with Microsoft OpenGL lib */ +# pragma comment (lib, "glu32.lib") /* link with Microsoft OpenGL Utility lib */ +# pragma comment (lib, "glut32.lib") /* link with Win32 GLUT lib */ +# endif +# endif + +/* To disable supression of annoying warnings about floats being promoted + to doubles, define GLUT_NO_WARNING_DISABLE in your compile preprocessor + options. */ +# ifndef GLUT_NO_WARNING_DISABLE +# pragma warning (disable:4244) /* Disable bogus VC++ 4.2 conversion warnings. */ +# pragma warning (disable:4305) /* VC++ 5.0 version of above warning. */ +# endif + +/* Win32 has an annoying issue where there are multiple C run-time + libraries (CRTs). If the executable is linked with a different CRT + from the GLUT DLL, the GLUT DLL will not share the same CRT static + data seen by the executable. In particular, atexit callbacks registered + in the executable will not be called if GLUT calls its (different) + exit routine). GLUT is typically built with the + "/MD" option (the CRT with multithreading DLL support), but the Visual + C++ linker default is "/ML" (the single threaded CRT). + + One workaround to this issue is requiring users to always link with + the same CRT as GLUT is compiled with. That requires users supply a + non-standard option. GLUT 3.7 has its own built-in workaround where + the executable's "exit" function pointer is covertly passed to GLUT. + GLUT then calls the executable's exit function pointer to ensure that + any "atexit" calls registered by the application are called if GLUT + needs to exit. + + Note that the __glut*WithExit routines should NEVER be called directly. + To avoid the atexit workaround, #define GLUT_DISABLE_ATEXIT_HACK. */ + +/* XXX This is from Win32's */ +# if !defined(_MSC_VER) && !defined(__cdecl) + /* Define __cdecl for non-Microsoft compilers. */ +# define __cdecl +# define GLUT_DEFINED___CDECL +# endif +# ifndef _CRTIMP +# ifdef _NTSDK + /* Definition compatible with NT SDK */ +# define _CRTIMP +# else + /* Current definition */ +# ifdef _DLL +# define _CRTIMP __declspec(dllimport) +# else +# define _CRTIMP +# endif +# endif +# define GLUT_DEFINED__CRTIMP +# endif + +/* GLUT API entry point declarations for Win32. */ +# ifdef GLUT_BUILDING_LIB +# define GLUTAPI __declspec(dllexport) +# else +# ifdef _DLL +# define GLUTAPI __declspec(dllimport) +# else +# define GLUTAPI extern +# endif +# endif + +/* GLUT callback calling convention for Win32. */ +# define GLUTCALLBACK __cdecl + +#endif /* _WIN32 */ + +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +#if defined(_WIN32) +# ifndef GLUT_BUILDING_LIB +extern _CRTIMP void __cdecl exit(int); +# endif +#else +/* non-Win32 case. */ +/* Define APIENTRY and CALLBACK to nothing if we aren't on Win32. */ +# define APIENTRY +# define GLUT_APIENTRY_DEFINED +# define CALLBACK +/* Define GLUTAPI and GLUTCALLBACK as below if we aren't on Win32. */ +# define GLUTAPI extern +# define GLUTCALLBACK +/* Prototype exit for the non-Win32 case (see above). */ +extern void exit(int); +#endif + +/** + GLUT API revision history: + + GLUT_API_VERSION is updated to reflect incompatible GLUT + API changes (interface changes, semantic changes, deletions, + or additions). + + GLUT_API_VERSION=1 First public release of GLUT. 11/29/94 + + GLUT_API_VERSION=2 Added support for OpenGL/GLX multisampling, + extension. Supports new input devices like tablet, dial and button + box, and Spaceball. Easy to query OpenGL extensions. + + GLUT_API_VERSION=3 glutMenuStatus added. + + GLUT_API_VERSION=4 glutInitDisplayString, glutWarpPointer, + glutBitmapLength, glutStrokeLength, glutWindowStatusFunc, dynamic + video resize subAPI, glutPostWindowRedisplay, glutKeyboardUpFunc, + glutSpecialUpFunc, glutIgnoreKeyRepeat, glutSetKeyRepeat, + glutJoystickFunc, glutForceJoystickFunc (NOT FINALIZED!). +**/ +#ifndef GLUT_API_VERSION /* allow this to be overriden */ +#define GLUT_API_VERSION 3 +#endif + +/** + GLUT implementation revision history: + + GLUT_XLIB_IMPLEMENTATION is updated to reflect both GLUT + API revisions and implementation revisions (ie, bug fixes). + + GLUT_XLIB_IMPLEMENTATION=1 mjk's first public release of + GLUT Xlib-based implementation. 11/29/94 + + GLUT_XLIB_IMPLEMENTATION=2 mjk's second public release of + GLUT Xlib-based implementation providing GLUT version 2 + interfaces. + + GLUT_XLIB_IMPLEMENTATION=3 mjk's GLUT 2.2 images. 4/17/95 + + GLUT_XLIB_IMPLEMENTATION=4 mjk's GLUT 2.3 images. 6/?/95 + + GLUT_XLIB_IMPLEMENTATION=5 mjk's GLUT 3.0 images. 10/?/95 + + GLUT_XLIB_IMPLEMENTATION=7 mjk's GLUT 3.1+ with glutWarpPoitner. 7/24/96 + + GLUT_XLIB_IMPLEMENTATION=8 mjk's GLUT 3.1+ with glutWarpPoitner + and video resize. 1/3/97 + + GLUT_XLIB_IMPLEMENTATION=9 mjk's GLUT 3.4 release with early GLUT 4 routines. + + GLUT_XLIB_IMPLEMENTATION=11 Mesa 2.5's GLUT 3.6 release. + + GLUT_XLIB_IMPLEMENTATION=12 mjk's GLUT 3.6 release with early GLUT 4 routines + signal handling. + + GLUT_XLIB_IMPLEMENTATION=13 mjk's GLUT 3.7 beta with GameGLUT support. + + GLUT_XLIB_IMPLEMENTATION=14 mjk's GLUT 3.7 beta with f90gl friend interface. + + GLUT_XLIB_IMPLEMENTATION=15 mjk's GLUT 3.7 beta sync'ed with Mesa +**/ +#ifndef GLUT_XLIB_IMPLEMENTATION /* Allow this to be overriden. */ +#define GLUT_XLIB_IMPLEMENTATION 15 +#endif + +/* Display mode bit masks. */ +#define GLUT_RGB 0 +#define GLUT_RGBA GLUT_RGB +#define GLUT_INDEX 1 +#define GLUT_SINGLE 0 +#define GLUT_DOUBLE 2 +#define GLUT_ACCUM 4 +#define GLUT_ALPHA 8 +#define GLUT_DEPTH 16 +#define GLUT_STENCIL 32 +#if (GLUT_API_VERSION >= 2) +#define GLUT_MULTISAMPLE 128 +#define GLUT_STEREO 256 +#endif +#if (GLUT_API_VERSION >= 3) +#define GLUT_LUMINANCE 512 +#endif + +/* Mouse buttons. */ +#define GLUT_LEFT_BUTTON 0 +#define GLUT_MIDDLE_BUTTON 1 +#define GLUT_RIGHT_BUTTON 2 + +/* Mouse button state. */ +#define GLUT_DOWN 0 +#define GLUT_UP 1 + +#if (GLUT_API_VERSION >= 2) +/* function keys */ +#define GLUT_KEY_F1 1 +#define GLUT_KEY_F2 2 +#define GLUT_KEY_F3 3 +#define GLUT_KEY_F4 4 +#define GLUT_KEY_F5 5 +#define GLUT_KEY_F6 6 +#define GLUT_KEY_F7 7 +#define GLUT_KEY_F8 8 +#define GLUT_KEY_F9 9 +#define GLUT_KEY_F10 10 +#define GLUT_KEY_F11 11 +#define GLUT_KEY_F12 12 +/* directional keys */ +#define GLUT_KEY_LEFT 100 +#define GLUT_KEY_UP 101 +#define GLUT_KEY_RIGHT 102 +#define GLUT_KEY_DOWN 103 +#define GLUT_KEY_PAGE_UP 104 +#define GLUT_KEY_PAGE_DOWN 105 +#define GLUT_KEY_HOME 106 +#define GLUT_KEY_END 107 +#define GLUT_KEY_INSERT 108 +#endif + +/* Entry/exit state. */ +#define GLUT_LEFT 0 +#define GLUT_ENTERED 1 + +/* Menu usage state. */ +#define GLUT_MENU_NOT_IN_USE 0 +#define GLUT_MENU_IN_USE 1 + +/* Visibility state. */ +#define GLUT_NOT_VISIBLE 0 +#define GLUT_VISIBLE 1 + +/* Window status state. */ +#define GLUT_HIDDEN 0 +#define GLUT_FULLY_RETAINED 1 +#define GLUT_PARTIALLY_RETAINED 2 +#define GLUT_FULLY_COVERED 3 + +/* Color index component selection values. */ +#define GLUT_RED 0 +#define GLUT_GREEN 1 +#define GLUT_BLUE 2 + +#if defined(_WIN32) +/* Stroke font constants (use these in GLUT program). */ +#define GLUT_STROKE_ROMAN ((void*)0) +#define GLUT_STROKE_MONO_ROMAN ((void*)1) + +/* Bitmap font constants (use these in GLUT program). */ +#define GLUT_BITMAP_9_BY_15 ((void*)2) +#define GLUT_BITMAP_8_BY_13 ((void*)3) +#define GLUT_BITMAP_TIMES_ROMAN_10 ((void*)4) +#define GLUT_BITMAP_TIMES_ROMAN_24 ((void*)5) +#if (GLUT_API_VERSION >= 3) +#define GLUT_BITMAP_HELVETICA_10 ((void*)6) +#define GLUT_BITMAP_HELVETICA_12 ((void*)7) +#define GLUT_BITMAP_HELVETICA_18 ((void*)8) +#endif +#else +/* Stroke font opaque addresses (use constants instead in source code). */ +GLUTAPI void *glutStrokeRoman; +GLUTAPI void *glutStrokeMonoRoman; + +/* Stroke font constants (use these in GLUT program). */ +#define GLUT_STROKE_ROMAN (&glutStrokeRoman) +#define GLUT_STROKE_MONO_ROMAN (&glutStrokeMonoRoman) + +/* Bitmap font opaque addresses (use constants instead in source code). */ +GLUTAPI void *glutBitmap9By15; +GLUTAPI void *glutBitmap8By13; +GLUTAPI void *glutBitmapTimesRoman10; +GLUTAPI void *glutBitmapTimesRoman24; +GLUTAPI void *glutBitmapHelvetica10; +GLUTAPI void *glutBitmapHelvetica12; +GLUTAPI void *glutBitmapHelvetica18; + +/* Bitmap font constants (use these in GLUT program). */ +#define GLUT_BITMAP_9_BY_15 (&glutBitmap9By15) +#define GLUT_BITMAP_8_BY_13 (&glutBitmap8By13) +#define GLUT_BITMAP_TIMES_ROMAN_10 (&glutBitmapTimesRoman10) +#define GLUT_BITMAP_TIMES_ROMAN_24 (&glutBitmapTimesRoman24) +#if (GLUT_API_VERSION >= 3) +#define GLUT_BITMAP_HELVETICA_10 (&glutBitmapHelvetica10) +#define GLUT_BITMAP_HELVETICA_12 (&glutBitmapHelvetica12) +#define GLUT_BITMAP_HELVETICA_18 (&glutBitmapHelvetica18) +#endif +#endif + +/* glutGet parameters. */ +#define GLUT_WINDOW_X ((GLenum) 100) +#define GLUT_WINDOW_Y ((GLenum) 101) +#define GLUT_WINDOW_WIDTH ((GLenum) 102) +#define GLUT_WINDOW_HEIGHT ((GLenum) 103) +#define GLUT_WINDOW_BUFFER_SIZE ((GLenum) 104) +#define GLUT_WINDOW_STENCIL_SIZE ((GLenum) 105) +#define GLUT_WINDOW_DEPTH_SIZE ((GLenum) 106) +#define GLUT_WINDOW_RED_SIZE ((GLenum) 107) +#define GLUT_WINDOW_GREEN_SIZE ((GLenum) 108) +#define GLUT_WINDOW_BLUE_SIZE ((GLenum) 109) +#define GLUT_WINDOW_ALPHA_SIZE ((GLenum) 110) +#define GLUT_WINDOW_ACCUM_RED_SIZE ((GLenum) 111) +#define GLUT_WINDOW_ACCUM_GREEN_SIZE ((GLenum) 112) +#define GLUT_WINDOW_ACCUM_BLUE_SIZE ((GLenum) 113) +#define GLUT_WINDOW_ACCUM_ALPHA_SIZE ((GLenum) 114) +#define GLUT_WINDOW_DOUBLEBUFFER ((GLenum) 115) +#define GLUT_WINDOW_RGBA ((GLenum) 116) +#define GLUT_WINDOW_PARENT ((GLenum) 117) +#define GLUT_WINDOW_NUM_CHILDREN ((GLenum) 118) +#define GLUT_WINDOW_COLORMAP_SIZE ((GLenum) 119) +#if (GLUT_API_VERSION >= 2) +#define GLUT_WINDOW_NUM_SAMPLES ((GLenum) 120) +#define GLUT_WINDOW_STEREO ((GLenum) 121) +#endif +#if (GLUT_API_VERSION >= 3) +#define GLUT_WINDOW_CURSOR ((GLenum) 122) +#endif +#define GLUT_SCREEN_WIDTH ((GLenum) 200) +#define GLUT_SCREEN_HEIGHT ((GLenum) 201) +#define GLUT_SCREEN_WIDTH_MM ((GLenum) 202) +#define GLUT_SCREEN_HEIGHT_MM ((GLenum) 203) +#define GLUT_MENU_NUM_ITEMS ((GLenum) 300) +#define GLUT_DISPLAY_MODE_POSSIBLE ((GLenum) 400) +#define GLUT_INIT_WINDOW_X ((GLenum) 500) +#define GLUT_INIT_WINDOW_Y ((GLenum) 501) +#define GLUT_INIT_WINDOW_WIDTH ((GLenum) 502) +#define GLUT_INIT_WINDOW_HEIGHT ((GLenum) 503) +#define GLUT_INIT_DISPLAY_MODE ((GLenum) 504) +#if (GLUT_API_VERSION >= 2) +#define GLUT_ELAPSED_TIME ((GLenum) 700) +#endif +#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 13) +#define GLUT_WINDOW_FORMAT_ID ((GLenum) 123) +#endif + +#if (GLUT_API_VERSION >= 2) +/* glutDeviceGet parameters. */ +#define GLUT_HAS_KEYBOARD ((GLenum) 600) +#define GLUT_HAS_MOUSE ((GLenum) 601) +#define GLUT_HAS_SPACEBALL ((GLenum) 602) +#define GLUT_HAS_DIAL_AND_BUTTON_BOX ((GLenum) 603) +#define GLUT_HAS_TABLET ((GLenum) 604) +#define GLUT_NUM_MOUSE_BUTTONS ((GLenum) 605) +#define GLUT_NUM_SPACEBALL_BUTTONS ((GLenum) 606) +#define GLUT_NUM_BUTTON_BOX_BUTTONS ((GLenum) 607) +#define GLUT_NUM_DIALS ((GLenum) 608) +#define GLUT_NUM_TABLET_BUTTONS ((GLenum) 609) +#endif +#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 13) +#define GLUT_DEVICE_IGNORE_KEY_REPEAT ((GLenum) 610) +#define GLUT_DEVICE_KEY_REPEAT ((GLenum) 611) +#define GLUT_HAS_JOYSTICK ((GLenum) 612) +#define GLUT_OWNS_JOYSTICK ((GLenum) 613) +#define GLUT_JOYSTICK_BUTTONS ((GLenum) 614) +#define GLUT_JOYSTICK_AXES ((GLenum) 615) +#define GLUT_JOYSTICK_POLL_RATE ((GLenum) 616) +#endif + +#if (GLUT_API_VERSION >= 3) +/* glutLayerGet parameters. */ +#define GLUT_OVERLAY_POSSIBLE ((GLenum) 800) +#define GLUT_LAYER_IN_USE ((GLenum) 801) +#define GLUT_HAS_OVERLAY ((GLenum) 802) +#define GLUT_TRANSPARENT_INDEX ((GLenum) 803) +#define GLUT_NORMAL_DAMAGED ((GLenum) 804) +#define GLUT_OVERLAY_DAMAGED ((GLenum) 805) + +#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 9) +/* glutVideoResizeGet parameters. */ +#define GLUT_VIDEO_RESIZE_POSSIBLE ((GLenum) 900) +#define GLUT_VIDEO_RESIZE_IN_USE ((GLenum) 901) +#define GLUT_VIDEO_RESIZE_X_DELTA ((GLenum) 902) +#define GLUT_VIDEO_RESIZE_Y_DELTA ((GLenum) 903) +#define GLUT_VIDEO_RESIZE_WIDTH_DELTA ((GLenum) 904) +#define GLUT_VIDEO_RESIZE_HEIGHT_DELTA ((GLenum) 905) +#define GLUT_VIDEO_RESIZE_X ((GLenum) 906) +#define GLUT_VIDEO_RESIZE_Y ((GLenum) 907) +#define GLUT_VIDEO_RESIZE_WIDTH ((GLenum) 908) +#define GLUT_VIDEO_RESIZE_HEIGHT ((GLenum) 909) +#endif + +/* glutUseLayer parameters. */ +#define GLUT_NORMAL ((GLenum) 0) +#define GLUT_OVERLAY ((GLenum) 1) + +/* glutGetModifiers return mask. */ +#define GLUT_ACTIVE_SHIFT 1 +#define GLUT_ACTIVE_CTRL 2 +#define GLUT_ACTIVE_ALT 4 + +/* glutSetCursor parameters. */ +/* Basic arrows. */ +#define GLUT_CURSOR_RIGHT_ARROW 0 +#define GLUT_CURSOR_LEFT_ARROW 1 +/* Symbolic cursor shapes. */ +#define GLUT_CURSOR_INFO 2 +#define GLUT_CURSOR_DESTROY 3 +#define GLUT_CURSOR_HELP 4 +#define GLUT_CURSOR_CYCLE 5 +#define GLUT_CURSOR_SPRAY 6 +#define GLUT_CURSOR_WAIT 7 +#define GLUT_CURSOR_TEXT 8 +#define GLUT_CURSOR_CROSSHAIR 9 +/* Directional cursors. */ +#define GLUT_CURSOR_UP_DOWN 10 +#define GLUT_CURSOR_LEFT_RIGHT 11 +/* Sizing cursors. */ +#define GLUT_CURSOR_TOP_SIDE 12 +#define GLUT_CURSOR_BOTTOM_SIDE 13 +#define GLUT_CURSOR_LEFT_SIDE 14 +#define GLUT_CURSOR_RIGHT_SIDE 15 +#define GLUT_CURSOR_TOP_LEFT_CORNER 16 +#define GLUT_CURSOR_TOP_RIGHT_CORNER 17 +#define GLUT_CURSOR_BOTTOM_RIGHT_CORNER 18 +#define GLUT_CURSOR_BOTTOM_LEFT_CORNER 19 +/* Inherit from parent window. */ +#define GLUT_CURSOR_INHERIT 100 +/* Blank cursor. */ +#define GLUT_CURSOR_NONE 101 +/* Fullscreen crosshair (if available). */ +#define GLUT_CURSOR_FULL_CROSSHAIR 102 +#endif + +/* GLUT initialization sub-API. */ +GLUTAPI void APIENTRY glutInit(int *argcp, char **argv); +#if defined(_WIN32) && !defined(GLUT_DISABLE_ATEXIT_HACK) +GLUTAPI void APIENTRY __glutInitWithExit(int *argcp, char **argv, void (__cdecl *exitfunc)(int)); +#ifndef GLUT_BUILDING_LIB +static void APIENTRY glutInit_ATEXIT_HACK(int *argcp, char **argv) { __glutInitWithExit(argcp, argv, exit); } +#define glutInit glutInit_ATEXIT_HACK +#endif +#endif +GLUTAPI void APIENTRY glutInitDisplayMode(unsigned int mode); +#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 9) +GLUTAPI void APIENTRY glutInitDisplayString(const char *string); +#endif +GLUTAPI void APIENTRY glutInitWindowPosition(int x, int y); +GLUTAPI void APIENTRY glutInitWindowSize(int width, int height); +GLUTAPI void APIENTRY glutMainLoop(void); + +/* GLUT window sub-API. */ +GLUTAPI int APIENTRY glutCreateWindow(const char *title); +#if defined(_WIN32) && !defined(GLUT_DISABLE_ATEXIT_HACK) +GLUTAPI int APIENTRY __glutCreateWindowWithExit(const char *title, void (__cdecl *exitfunc)(int)); +#ifndef GLUT_BUILDING_LIB +static int APIENTRY glutCreateWindow_ATEXIT_HACK(const char *title) { return __glutCreateWindowWithExit(title, exit); } +#define glutCreateWindow glutCreateWindow_ATEXIT_HACK +#endif +#endif +GLUTAPI int APIENTRY glutCreateSubWindow(int win, int x, int y, int width, int height); +GLUTAPI void APIENTRY glutDestroyWindow(int win); +GLUTAPI void APIENTRY glutPostRedisplay(void); +#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 11) +GLUTAPI void APIENTRY glutPostWindowRedisplay(int win); +#endif +GLUTAPI void APIENTRY glutSwapBuffers(void); +GLUTAPI int APIENTRY glutGetWindow(void); +GLUTAPI void APIENTRY glutSetWindow(int win); +GLUTAPI void APIENTRY glutSetWindowTitle(const char *title); +GLUTAPI void APIENTRY glutSetIconTitle(const char *title); +GLUTAPI void APIENTRY glutPositionWindow(int x, int y); +GLUTAPI void APIENTRY glutReshapeWindow(int width, int height); +GLUTAPI void APIENTRY glutPopWindow(void); +GLUTAPI void APIENTRY glutPushWindow(void); +GLUTAPI void APIENTRY glutIconifyWindow(void); +GLUTAPI void APIENTRY glutShowWindow(void); +GLUTAPI void APIENTRY glutHideWindow(void); +#if (GLUT_API_VERSION >= 3) +GLUTAPI void APIENTRY glutFullScreen(void); +GLUTAPI void APIENTRY glutSetCursor(int cursor); +#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 9) +GLUTAPI void APIENTRY glutWarpPointer(int x, int y); +#endif + +/* GLUT overlay sub-API. */ +GLUTAPI void APIENTRY glutEstablishOverlay(void); +GLUTAPI void APIENTRY glutRemoveOverlay(void); +GLUTAPI void APIENTRY glutUseLayer(GLenum layer); +GLUTAPI void APIENTRY glutPostOverlayRedisplay(void); +#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 11) +GLUTAPI void APIENTRY glutPostWindowOverlayRedisplay(int win); +#endif +GLUTAPI void APIENTRY glutShowOverlay(void); +GLUTAPI void APIENTRY glutHideOverlay(void); +#endif + +/* GLUT menu sub-API. */ +GLUTAPI int APIENTRY glutCreateMenu(void (GLUTCALLBACK *func)(int)); +#if defined(_WIN32) && !defined(GLUT_DISABLE_ATEXIT_HACK) +GLUTAPI int APIENTRY __glutCreateMenuWithExit(void (GLUTCALLBACK *func)(int), void (__cdecl *exitfunc)(int)); +#ifndef GLUT_BUILDING_LIB +static int APIENTRY glutCreateMenu_ATEXIT_HACK(void (GLUTCALLBACK *func)(int)) { return __glutCreateMenuWithExit(func, exit); } +#define glutCreateMenu glutCreateMenu_ATEXIT_HACK +#endif +#endif +GLUTAPI void APIENTRY glutDestroyMenu(int menu); +GLUTAPI int APIENTRY glutGetMenu(void); +GLUTAPI void APIENTRY glutSetMenu(int menu); +GLUTAPI void APIENTRY glutAddMenuEntry(const char *label, int value); +GLUTAPI void APIENTRY glutAddSubMenu(const char *label, int submenu); +GLUTAPI void APIENTRY glutChangeToMenuEntry(int item, const char *label, int value); +GLUTAPI void APIENTRY glutChangeToSubMenu(int item, const char *label, int submenu); +GLUTAPI void APIENTRY glutRemoveMenuItem(int item); +GLUTAPI void APIENTRY glutAttachMenu(int button); +GLUTAPI void APIENTRY glutDetachMenu(int button); + +/* GLUT window callback sub-API. */ +GLUTAPI void APIENTRY glutDisplayFunc(void (GLUTCALLBACK *func)(void)); +GLUTAPI void APIENTRY glutReshapeFunc(void (GLUTCALLBACK *func)(int width, int height)); +GLUTAPI void APIENTRY glutKeyboardFunc(void (GLUTCALLBACK *func)(unsigned char key, int x, int y)); +GLUTAPI void APIENTRY glutMouseFunc(void (GLUTCALLBACK *func)(int button, int state, int x, int y)); +GLUTAPI void APIENTRY glutMotionFunc(void (GLUTCALLBACK *func)(int x, int y)); +GLUTAPI void APIENTRY glutPassiveMotionFunc(void (GLUTCALLBACK *func)(int x, int y)); +GLUTAPI void APIENTRY glutEntryFunc(void (GLUTCALLBACK *func)(int state)); +GLUTAPI void APIENTRY glutVisibilityFunc(void (GLUTCALLBACK *func)(int state)); +GLUTAPI void APIENTRY glutIdleFunc(void (GLUTCALLBACK *func)(void)); +GLUTAPI void APIENTRY glutTimerFunc(unsigned int millis, void (GLUTCALLBACK *func)(int value), int value); +GLUTAPI void APIENTRY glutMenuStateFunc(void (GLUTCALLBACK *func)(int state)); +#if (GLUT_API_VERSION >= 2) +GLUTAPI void APIENTRY glutSpecialFunc(void (GLUTCALLBACK *func)(int key, int x, int y)); +GLUTAPI void APIENTRY glutSpaceballMotionFunc(void (GLUTCALLBACK *func)(int x, int y, int z)); +GLUTAPI void APIENTRY glutSpaceballRotateFunc(void (GLUTCALLBACK *func)(int x, int y, int z)); +GLUTAPI void APIENTRY glutSpaceballButtonFunc(void (GLUTCALLBACK *func)(int button, int state)); +GLUTAPI void APIENTRY glutButtonBoxFunc(void (GLUTCALLBACK *func)(int button, int state)); +GLUTAPI void APIENTRY glutDialsFunc(void (GLUTCALLBACK *func)(int dial, int value)); +GLUTAPI void APIENTRY glutTabletMotionFunc(void (GLUTCALLBACK *func)(int x, int y)); +GLUTAPI void APIENTRY glutTabletButtonFunc(void (GLUTCALLBACK *func)(int button, int state, int x, int y)); +#if (GLUT_API_VERSION >= 3) +GLUTAPI void APIENTRY glutMenuStatusFunc(void (GLUTCALLBACK *func)(int status, int x, int y)); +GLUTAPI void APIENTRY glutOverlayDisplayFunc(void (GLUTCALLBACK *func)(void)); +#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 9) +GLUTAPI void APIENTRY glutWindowStatusFunc(void (GLUTCALLBACK *func)(int state)); +#endif +#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 13) +GLUTAPI void APIENTRY glutKeyboardUpFunc(void (GLUTCALLBACK *func)(unsigned char key, int x, int y)); +GLUTAPI void APIENTRY glutSpecialUpFunc(void (GLUTCALLBACK *func)(int key, int x, int y)); +GLUTAPI void APIENTRY glutJoystickFunc(void (GLUTCALLBACK *func)(unsigned int buttonMask, int x, int y, int z), int pollInterval); +#endif +#endif +#endif + +/* GLUT color index sub-API. */ +GLUTAPI void APIENTRY glutSetColor(int, GLfloat red, GLfloat green, GLfloat blue); +GLUTAPI GLfloat APIENTRY glutGetColor(int ndx, int component); +GLUTAPI void APIENTRY glutCopyColormap(int win); + +/* GLUT state retrieval sub-API. */ +GLUTAPI int APIENTRY glutGet(GLenum type); +GLUTAPI int APIENTRY glutDeviceGet(GLenum type); +#if (GLUT_API_VERSION >= 2) +/* GLUT extension support sub-API */ +GLUTAPI int APIENTRY glutExtensionSupported(const char *name); +#endif +#if (GLUT_API_VERSION >= 3) +GLUTAPI int APIENTRY glutGetModifiers(void); +GLUTAPI int APIENTRY glutLayerGet(GLenum type); +#endif + +/* GLUT font sub-API */ +GLUTAPI void APIENTRY glutBitmapCharacter(void *font, int character); +GLUTAPI int APIENTRY glutBitmapWidth(void *font, int character); +GLUTAPI void APIENTRY glutStrokeCharacter(void *font, int character); +GLUTAPI int APIENTRY glutStrokeWidth(void *font, int character); +#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 9) +GLUTAPI int APIENTRY glutBitmapLength(void *font, const unsigned char *string); +GLUTAPI int APIENTRY glutStrokeLength(void *font, const unsigned char *string); +#endif + +/* GLUT pre-built models sub-API */ +GLUTAPI void APIENTRY glutWireSphere(GLdouble radius, GLint slices, GLint stacks); +GLUTAPI void APIENTRY glutSolidSphere(GLdouble radius, GLint slices, GLint stacks); +GLUTAPI void APIENTRY glutWireCone(GLdouble base, GLdouble height, GLint slices, GLint stacks); +GLUTAPI void APIENTRY glutSolidCone(GLdouble base, GLdouble height, GLint slices, GLint stacks); +GLUTAPI void APIENTRY glutWireCube(GLdouble size); +GLUTAPI void APIENTRY glutSolidCube(GLdouble size); +GLUTAPI void APIENTRY glutWireTorus(GLdouble innerRadius, GLdouble outerRadius, GLint sides, GLint rings); +GLUTAPI void APIENTRY glutSolidTorus(GLdouble innerRadius, GLdouble outerRadius, GLint sides, GLint rings); +GLUTAPI void APIENTRY glutWireDodecahedron(void); +GLUTAPI void APIENTRY glutSolidDodecahedron(void); +GLUTAPI void APIENTRY glutWireTeapot(GLdouble size); +GLUTAPI void APIENTRY glutSolidTeapot(GLdouble size); +GLUTAPI void APIENTRY glutWireOctahedron(void); +GLUTAPI void APIENTRY glutSolidOctahedron(void); +GLUTAPI void APIENTRY glutWireTetrahedron(void); +GLUTAPI void APIENTRY glutSolidTetrahedron(void); +GLUTAPI void APIENTRY glutWireIcosahedron(void); +GLUTAPI void APIENTRY glutSolidIcosahedron(void); + +#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 9) +/* GLUT video resize sub-API. */ +GLUTAPI int APIENTRY glutVideoResizeGet(GLenum param); +GLUTAPI void APIENTRY glutSetupVideoResizing(void); +GLUTAPI void APIENTRY glutStopVideoResizing(void); +GLUTAPI void APIENTRY glutVideoResize(int x, int y, int width, int height); +GLUTAPI void APIENTRY glutVideoPan(int x, int y, int width, int height); + +/* GLUT debugging sub-API. */ +GLUTAPI void APIENTRY glutReportErrors(void); +#endif + +#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 13) +/* GLUT device control sub-API. */ +/* glutSetKeyRepeat modes. */ +#define GLUT_KEY_REPEAT_OFF 0 +#define GLUT_KEY_REPEAT_ON 1 +#define GLUT_KEY_REPEAT_DEFAULT 2 + +/* Joystick button masks. */ +#define GLUT_JOYSTICK_BUTTON_A 1 +#define GLUT_JOYSTICK_BUTTON_B 2 +#define GLUT_JOYSTICK_BUTTON_C 4 +#define GLUT_JOYSTICK_BUTTON_D 8 + +GLUTAPI void APIENTRY glutIgnoreKeyRepeat(int ignore); +GLUTAPI void APIENTRY glutSetKeyRepeat(int repeatMode); +GLUTAPI void APIENTRY glutForceJoystickFunc(void); + +/* GLUT game mode sub-API. */ +/* glutGameModeGet. */ +#define GLUT_GAME_MODE_ACTIVE ((GLenum) 0) +#define GLUT_GAME_MODE_POSSIBLE ((GLenum) 1) +#define GLUT_GAME_MODE_WIDTH ((GLenum) 2) +#define GLUT_GAME_MODE_HEIGHT ((GLenum) 3) +#define GLUT_GAME_MODE_PIXEL_DEPTH ((GLenum) 4) +#define GLUT_GAME_MODE_REFRESH_RATE ((GLenum) 5) +#define GLUT_GAME_MODE_DISPLAY_CHANGED ((GLenum) 6) + +GLUTAPI void APIENTRY glutGameModeString(const char *string); +GLUTAPI int APIENTRY glutEnterGameMode(void); +GLUTAPI void APIENTRY glutLeaveGameMode(void); +GLUTAPI int APIENTRY glutGameModeGet(GLenum mode); +#endif + +#ifdef __cplusplus +} + +#endif + +#ifdef GLUT_APIENTRY_DEFINED +# undef GLUT_APIENTRY_DEFINED +# undef APIENTRY +#endif + +#ifdef GLUT_WINGDIAPI_DEFINED +# undef GLUT_WINGDIAPI_DEFINED +# undef WINGDIAPI +#endif + +#ifdef GLUT_DEFINED___CDECL +# undef GLUT_DEFINED___CDECL +# undef __cdecl +#endif + +#ifdef GLUT_DEFINED__CRTIMP +# undef GLUT_DEFINED__CRTIMP +# undef _CRTIMP +#endif + +#endif /* __glut_h__ */ diff -r d5d5e1698554 -r 1dedcc37bfe8 misc/winutils/include/SDL_net.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/misc/winutils/include/SDL_net.h Fri Feb 22 05:05:32 2013 +0100 @@ -0,0 +1,449 @@ +/* + SDL_net: An example cross-platform network library for use with SDL + Copyright (C) 1997-2012 Sam Lantinga + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + 3. This notice may not be removed or altered from any source distribution. +*/ + +/* $Id$ */ + +#ifndef _SDL_NET_H +#define _SDL_NET_H + +#include "SDL.h" +#include "SDL_endian.h" +#include "SDL_version.h" +#include "begin_code.h" + + + +/* Set up for C function definitions, even when using C++ */ +#ifdef __cplusplus +extern "C" { +#endif + +/* Printable format: "%d.%d.%d", MAJOR, MINOR, PATCHLEVEL +*/ +#define SDL_NET_MAJOR_VERSION 1 +#define SDL_NET_MINOR_VERSION 2 +#define SDL_NET_PATCHLEVEL 8 + +/* This macro can be used to fill a version structure with the compile-time + * version of the SDL_net library. + */ +#define SDL_NET_VERSION(X) \ +{ \ + (X)->major = SDL_NET_MAJOR_VERSION; \ + (X)->minor = SDL_NET_MINOR_VERSION; \ + (X)->patch = SDL_NET_PATCHLEVEL; \ +} + +/* This function gets the version of the dynamically linked SDL_net library. + it should NOT be used to fill a version structure, instead you should + use the SDL_NET_VERSION() macro. + */ +extern DECLSPEC const SDL_version * SDLCALL SDLNet_Linked_Version(void); + +/* Initialize/Cleanup the network API + SDL must be initialized before calls to functions in this library, + because this library uses utility functions from the SDL library. +*/ +extern DECLSPEC int SDLCALL SDLNet_Init(void); +extern DECLSPEC void SDLCALL SDLNet_Quit(void); + +/***********************************************************************/ +/* IPv4 hostname resolution API */ +/***********************************************************************/ + +typedef struct { + Uint32 host; /* 32-bit IPv4 host address */ + Uint16 port; /* 16-bit protocol port */ +} IPaddress; + +/* Resolve a host name and port to an IP address in network form. + If the function succeeds, it will return 0. + If the host couldn't be resolved, the host portion of the returned + address will be INADDR_NONE, and the function will return -1. + If 'host' is NULL, the resolved host will be set to INADDR_ANY. + */ +#ifndef INADDR_ANY +#define INADDR_ANY 0x00000000 +#endif +#ifndef INADDR_NONE +#define INADDR_NONE 0xFFFFFFFF +#endif +#ifndef INADDR_BROADCAST +#define INADDR_BROADCAST 0xFFFFFFFF +#endif +extern DECLSPEC int SDLCALL SDLNet_ResolveHost(IPaddress *address, const char *host, Uint16 port); + +/* Resolve an ip address to a host name in canonical form. + If the ip couldn't be resolved, this function returns NULL, + otherwise a pointer to a static buffer containing the hostname + is returned. Note that this function is not thread-safe. +*/ +extern DECLSPEC const char * SDLCALL SDLNet_ResolveIP(const IPaddress *ip); + +/* Get the addresses of network interfaces on this system. + This returns the number of addresses saved in 'addresses' + */ +extern DECLSPEC int SDLCALL SDLNet_GetLocalAddresses(IPaddress *addresses, int maxcount); + +/***********************************************************************/ +/* TCP network API */ +/***********************************************************************/ + +typedef struct _TCPsocket *TCPsocket; + +/* Open a TCP network socket + If ip.host is INADDR_NONE or INADDR_ANY, this creates a local server + socket on the given port, otherwise a TCP connection to the remote + host and port is attempted. The address passed in should already be + swapped to network byte order (addresses returned from + SDLNet_ResolveHost() are already in the correct form). + The newly created socket is returned, or NULL if there was an error. +*/ +extern DECLSPEC TCPsocket SDLCALL SDLNet_TCP_Open(IPaddress *ip); + +/* Accept an incoming connection on the given server socket. + The newly created socket is returned, or NULL if there was an error. +*/ +extern DECLSPEC TCPsocket SDLCALL SDLNet_TCP_Accept(TCPsocket server); + +/* Get the IP address of the remote system associated with the socket. + If the socket is a server socket, this function returns NULL. +*/ +extern DECLSPEC IPaddress * SDLCALL SDLNet_TCP_GetPeerAddress(TCPsocket sock); + +/* Send 'len' bytes of 'data' over the non-server socket 'sock' + This function returns the actual amount of data sent. If the return value + is less than the amount of data sent, then either the remote connection was + closed, or an unknown socket error occurred. +*/ +extern DECLSPEC int SDLCALL SDLNet_TCP_Send(TCPsocket sock, const void *data, + int len); + +/* Receive up to 'maxlen' bytes of data over the non-server socket 'sock', + and store them in the buffer pointed to by 'data'. + This function returns the actual amount of data received. If the return + value is less than or equal to zero, then either the remote connection was + closed, or an unknown socket error occurred. +*/ +extern DECLSPEC int SDLCALL SDLNet_TCP_Recv(TCPsocket sock, void *data, int maxlen); + +/* Close a TCP network socket */ +extern DECLSPEC void SDLCALL SDLNet_TCP_Close(TCPsocket sock); + + +/***********************************************************************/ +/* UDP network API */ +/***********************************************************************/ + +/* The maximum channels on a a UDP socket */ +#define SDLNET_MAX_UDPCHANNELS 32 +/* The maximum addresses bound to a single UDP socket channel */ +#define SDLNET_MAX_UDPADDRESSES 4 + +typedef struct _UDPsocket *UDPsocket; +typedef struct { + int channel; /* The src/dst channel of the packet */ + Uint8 *data; /* The packet data */ + int len; /* The length of the packet data */ + int maxlen; /* The size of the data buffer */ + int status; /* packet status after sending */ + IPaddress address; /* The source/dest address of an incoming/outgoing packet */ +} UDPpacket; + +/* Allocate/resize/free a single UDP packet 'size' bytes long. + The new packet is returned, or NULL if the function ran out of memory. + */ +extern DECLSPEC UDPpacket * SDLCALL SDLNet_AllocPacket(int size); +extern DECLSPEC int SDLCALL SDLNet_ResizePacket(UDPpacket *packet, int newsize); +extern DECLSPEC void SDLCALL SDLNet_FreePacket(UDPpacket *packet); + +/* Allocate/Free a UDP packet vector (array of packets) of 'howmany' packets, + each 'size' bytes long. + A pointer to the first packet in the array is returned, or NULL if the + function ran out of memory. + */ +extern DECLSPEC UDPpacket ** SDLCALL SDLNet_AllocPacketV(int howmany, int size); +extern DECLSPEC void SDLCALL SDLNet_FreePacketV(UDPpacket **packetV); + + +/* Open a UDP network socket + If 'port' is non-zero, the UDP socket is bound to a local port. + The 'port' should be given in native byte order, but is used + internally in network (big endian) byte order, in addresses, etc. + This allows other systems to send to this socket via a known port. +*/ +extern DECLSPEC UDPsocket SDLCALL SDLNet_UDP_Open(Uint16 port); + +/* Set the percentage of simulated packet loss for packets sent on the socket. +*/ +extern DECLSPEC void SDLCALL SDLNet_UDP_SetPacketLoss(UDPsocket sock, int percent); + +/* Bind the address 'address' to the requested channel on the UDP socket. + If the channel is -1, then the first unbound channel will be bound with + the given address as it's primary address. + If the channel is already bound, this new address will be added to the + list of valid source addresses for packets arriving on the channel. + If the channel is not already bound, then the address becomes the primary + address, to which all outbound packets on the channel are sent. + This function returns the channel which was bound, or -1 on error. +*/ +extern DECLSPEC int SDLCALL SDLNet_UDP_Bind(UDPsocket sock, int channel, const IPaddress *address); + +/* Unbind all addresses from the given channel */ +extern DECLSPEC void SDLCALL SDLNet_UDP_Unbind(UDPsocket sock, int channel); + +/* Get the primary IP address of the remote system associated with the + socket and channel. If the channel is -1, then the primary IP port + of the UDP socket is returned -- this is only meaningful for sockets + opened with a specific port. + If the channel is not bound and not -1, this function returns NULL. + */ +extern DECLSPEC IPaddress * SDLCALL SDLNet_UDP_GetPeerAddress(UDPsocket sock, int channel); + +/* Send a vector of packets to the the channels specified within the packet. + If the channel specified in the packet is -1, the packet will be sent to + the address in the 'src' member of the packet. + Each packet will be updated with the status of the packet after it has + been sent, -1 if the packet send failed. + This function returns the number of packets sent. +*/ +extern DECLSPEC int SDLCALL SDLNet_UDP_SendV(UDPsocket sock, UDPpacket **packets, int npackets); + +/* Send a single packet to the specified channel. + If the channel specified in the packet is -1, the packet will be sent to + the address in the 'src' member of the packet. + The packet will be updated with the status of the packet after it has + been sent. + This function returns 1 if the packet was sent, or 0 on error. + + NOTE: + The maximum size of the packet is limited by the MTU (Maximum Transfer Unit) + of the transport medium. It can be as low as 250 bytes for some PPP links, + and as high as 1500 bytes for ethernet. +*/ +extern DECLSPEC int SDLCALL SDLNet_UDP_Send(UDPsocket sock, int channel, UDPpacket *packet); + +/* Receive a vector of pending packets from the UDP socket. + The returned packets contain the source address and the channel they arrived + on. If they did not arrive on a bound channel, the the channel will be set + to -1. + The channels are checked in highest to lowest order, so if an address is + bound to multiple channels, the highest channel with the source address + bound will be returned. + This function returns the number of packets read from the network, or -1 + on error. This function does not block, so can return 0 packets pending. +*/ +extern DECLSPEC int SDLCALL SDLNet_UDP_RecvV(UDPsocket sock, UDPpacket **packets); + +/* Receive a single packet from the UDP socket. + The returned packet contains the source address and the channel it arrived + on. If it did not arrive on a bound channel, the the channel will be set + to -1. + The channels are checked in highest to lowest order, so if an address is + bound to multiple channels, the highest channel with the source address + bound will be returned. + This function returns the number of packets read from the network, or -1 + on error. This function does not block, so can return 0 packets pending. +*/ +extern DECLSPEC int SDLCALL SDLNet_UDP_Recv(UDPsocket sock, UDPpacket *packet); + +/* Close a UDP network socket */ +extern DECLSPEC void SDLCALL SDLNet_UDP_Close(UDPsocket sock); + + +/***********************************************************************/ +/* Hooks for checking sockets for available data */ +/***********************************************************************/ + +typedef struct _SDLNet_SocketSet *SDLNet_SocketSet; + +/* Any network socket can be safely cast to this socket type */ +typedef struct _SDLNet_GenericSocket { + int ready; +} *SDLNet_GenericSocket; + +/* Allocate a socket set for use with SDLNet_CheckSockets() + This returns a socket set for up to 'maxsockets' sockets, or NULL if + the function ran out of memory. + */ +extern DECLSPEC SDLNet_SocketSet SDLCALL SDLNet_AllocSocketSet(int maxsockets); + +/* Add a socket to a set of sockets to be checked for available data */ +#define SDLNet_TCP_AddSocket(set, sock) \ + SDLNet_AddSocket(set, SDL_reinterpret_cast(SDLNet_GenericSocket, sock)) +#define SDLNet_UDP_AddSocket(set, sock) \ + SDLNet_AddSocket(set, SDL_reinterpret_cast(SDLNet_GenericSocket, sock)) +extern DECLSPEC int SDLCALL SDLNet_AddSocket(SDLNet_SocketSet set, SDLNet_GenericSocket sock); + +/* Remove a socket from a set of sockets to be checked for available data */ +#define SDLNet_TCP_DelSocket(set, sock) \ + SDLNet_DelSocket(set, SDL_reinterpret_cast(SDLNet_GenericSocket, sock)) +#define SDLNet_UDP_DelSocket(set, sock) \ + SDLNet_DelSocket(set, SDL_reinterpret_cast(SDLNet_GenericSocket, sock)) +extern DECLSPEC int SDLCALL SDLNet_DelSocket(SDLNet_SocketSet set, SDLNet_GenericSocket sock); + +/* This function checks to see if data is available for reading on the + given set of sockets. If 'timeout' is 0, it performs a quick poll, + otherwise the function returns when either data is available for + reading, or the timeout in milliseconds has elapsed, which ever occurs + first. This function returns the number of sockets ready for reading, + or -1 if there was an error with the select() system call. +*/ +extern DECLSPEC int SDLCALL SDLNet_CheckSockets(SDLNet_SocketSet set, Uint32 timeout); + +/* After calling SDLNet_CheckSockets(), you can use this function on a + socket that was in the socket set, to find out if data is available + for reading. +*/ +#define SDLNet_SocketReady(sock) \ + ((sock != NULL) && SDL_reinterpret_cast(SDLNet_GenericSocket, sock)->ready) + +/* Free a set of sockets allocated by SDL_NetAllocSocketSet() */ +extern DECLSPEC void SDLCALL SDLNet_FreeSocketSet(SDLNet_SocketSet set); + + +/***********************************************************************/ +/* Platform-independent data conversion functions */ +/***********************************************************************/ + +/* Write a 16/32 bit value to network packet buffer */ +extern DECLSPEC void SDLCALL SDLNet_Write16(Uint16 value, void *area); +extern DECLSPEC void SDLCALL SDLNet_Write32(Uint32 value, void *area); + +/* Read a 16/32 bit value from network packet buffer */ +extern DECLSPEC Uint16 SDLCALL SDLNet_Read16(void *area); +extern DECLSPEC Uint32 SDLCALL SDLNet_Read32(void *area); + +/***********************************************************************/ +/* Error reporting functions */ +/***********************************************************************/ + +/* We'll use SDL's functions for error reporting */ +#define SDLNet_SetError SDL_SetError +#define SDLNet_GetError SDL_GetError + +/* I'm eventually going to try to disentangle SDL_net from SDL, thus making + SDL_net an independent X-platform networking toolkit. Not today though.... + +extern no_parse_DECLSPEC void SDLCALL SDLNet_SetError(const char *fmt, ...); +extern no_parse_DECLSPEC char * SDLCALL SDLNet_GetError(void); +*/ + + +/* Inline macro functions to read/write network data */ + +/* Warning, some systems have data access alignment restrictions */ +#if defined(sparc) || defined(mips) +#define SDL_DATA_ALIGNED 1 +#endif +#ifndef SDL_DATA_ALIGNED +#define SDL_DATA_ALIGNED 0 +#endif + +/* Write a 16 bit value to network packet buffer */ +#if !SDL_DATA_ALIGNED +#define SDLNet_Write16(value, areap) \ + (*SDL_reinterpret_cast(Uint16 *, areap) = SDL_SwapBE16(value)) +#else +#if SDL_BYTEORDER == SDL_BIG_ENDIAN +#define SDLNet_Write16(value, areap) \ +do \ +{ \ + Uint8 *area = SDL_reinterpret_cast(Uint8 *, areap); \ + area[0] = (value >> 8) & 0xFF; \ + area[1] = value & 0xFF; \ +} while ( 0 ) +#else +#define SDLNet_Write16(value, areap) \ +do \ +{ \ + Uint8 *area = SDL_reinterpret_cast(Uint8 *, areap); \ + area[1] = (value >> 8) & 0xFF; \ + area[0] = value & 0xFF; \ +} while ( 0 ) +#endif +#endif /* !SDL_DATA_ALIGNED */ + +/* Write a 32 bit value to network packet buffer */ +#if !SDL_DATA_ALIGNED +#define SDLNet_Write32(value, areap) \ + *SDL_reinterpret_cast(Uint32 *, areap) = SDL_SwapBE32(value); +#else +#if SDL_BYTEORDER == SDL_BIG_ENDIAN +#define SDLNet_Write32(value, areap) \ +do \ +{ \ + Uint8 *area = SDL_reinterpret_cast(Uint8 *, areap); \ + area[0] = (value >> 24) & 0xFF; \ + area[1] = (value >> 16) & 0xFF; \ + area[2] = (value >> 8) & 0xFF; \ + area[3] = value & 0xFF; \ +} while ( 0 ) +#else +#define SDLNet_Write32(value, areap) \ +do \ +{ \ + Uint8 *area = SDL_reinterpret_cast(Uint8 *, areap); \ + area[3] = (value >> 24) & 0xFF; \ + area[2] = (value >> 16) & 0xFF; \ + area[1] = (value >> 8) & 0xFF; \ + area[0] = value & 0xFF; \ +} while ( 0 ) +#endif +#endif /* !SDL_DATA_ALIGNED */ + +/* Read a 16 bit value from network packet buffer */ +#if !SDL_DATA_ALIGNED +#define SDLNet_Read16(areap) \ + (SDL_SwapBE16(*SDL_reinterpret_cast(Uint16 *, areap))) +#else +#if SDL_BYTEORDER == SDL_BIG_ENDIAN +#define SDLNet_Read16(areap) \ + (((SDL_reinterpret_cast(Uint8 *, areap))[0] << 8) | (SDL_reinterpret_cast(Uint8 *, areap))[1] << 0) +#else +#define SDLNet_Read16(areap) \ + (((SDL_reinterpret_cast(Uint8 *, areap))[1] << 8) | (SDL_reinterpret_cast(Uint8 *, areap))[0] << 0) +#endif +#endif /* !SDL_DATA_ALIGNED */ + +/* Read a 32 bit value from network packet buffer */ +#if !SDL_DATA_ALIGNED +#define SDLNet_Read32(areap) \ + (SDL_SwapBE32(*SDL_reinterpret_cast(Uint32 *, areap))) +#else +#if SDL_BYTEORDER == SDL_BIG_ENDIAN +#define SDLNet_Read32(areap) \ + (((SDL_reinterpret_cast(Uint8 *, areap))[0] << 24) | ((SDL_reinterpret_cast(Uint8 *, areap))[1] << 16) | \ + ((SDL_reinterpret_cast(Uint8 *, areap))[2] << 8) | (SDL_reinterpret_cast(Uint8 *, areap))[3] << 0) +#else +#define SDLNet_Read32(areap) \ + (((SDL_reinterpret_cast(Uint8 *, areap))[3] << 24) | ((SDL_reinterpret_cast(Uint8 *, areap))[2] << 16) | \ + ((SDL_reinterpret_cast(Uint8 *, areap))[1] << 8) | (SDL_reinterpret_cast(Uint8 *, areap))[0] << 0) +#endif +#endif /* !SDL_DATA_ALIGNED */ + +/* Ends C function definitions when using C++ */ +#ifdef __cplusplus +} +#endif +#include "close_code.h" + +#endif /* _SDL_NET_H */ diff -r d5d5e1698554 -r 1dedcc37bfe8 misc/winutils/lib/libSDL.la --- a/misc/winutils/lib/libSDL.la Sun Nov 18 01:06:01 2012 +0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,41 +0,0 @@ -# libSDL.la - a libtool library file -# Generated by ltmain.sh (GNU libtool) 2.2.6 -# -# Please DO NOT delete this file! -# It is necessary for linking the library. - -# The name that we can dlopen(3). -dlname='../bin/SDL.dll' - -# Names of this library. -library_names='libSDL.dll.a' - -# The name of the static archive. -old_library='libSDL.a' - -# Linker flags that can not go in dependency_libs. -inherited_linker_flags='' - -# Libraries that this one depends upon. -dependency_libs=' -luser32 -lgdi32 -lwinmm -ldxguid' - -# Names of additional weak libraries provided by this library -weak_library_names='' - -# Version information for libSDL. -current=11 -age=11 -revision=3 - -# Is this an already installed library? -installed=yes - -# Should we warn about portability when linking against -modules? -shouldnotlink=no - -# Files to dlopen/dlpreopen -dlopen='' -dlpreopen='' - -# Directory that this library needs to be installed in: -libdir='/usr/local/lib' diff -r d5d5e1698554 -r 1dedcc37bfe8 misc/winutils/lib/libSDL_net.dll.a Binary file misc/winutils/lib/libSDL_net.dll.a has changed diff -r d5d5e1698554 -r 1dedcc37bfe8 misc/xfire/Xfire Game SDK.url --- a/misc/xfire/Xfire Game SDK.url Sun Nov 18 01:06:01 2012 +0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,5 +0,0 @@ -[{000214A0-0000-0000-C000-000000000046}] -Prop3=19,2 -[InternetShortcut] -URL=http://www.xfire.com/cms/xf_game_sdk -IDList= diff -r d5d5e1698554 -r 1dedcc37bfe8 misc/xfire/license.txt --- a/misc/xfire/license.txt Sun Nov 18 01:06:01 2012 +0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,103 +0,0 @@ -Terms and Conditions -AGREEMENT BETWEEN USER AND XFIRE INC. -This is a legal agreement between you and Xfire Inc. ("Xfire") with respect to your access and use of the Xfire Service, which may also include Xfire software, content and related documentation and information (collectively, the "Service"). You must accept without modification all of the terms, conditions, and notices contained in these Terms of Use in order to access and/or use the Service (collectively, the "Terms of Use" or "Agreement"). If you do not accept these Terms of Use in their entirety, you may not access or use the Service. - -Portions of the Service may be governed by posted guidelines, rules, or other terms and conditions. All such guidelines, rules, terms and conditions are hereby incorporated by reference into these Terms of Use. In the event of a conflict between such other guidelines, rules, terms and conditions and these Terms of Use, the Terms of Use shall control, except that the Xfire Service Privacy Policy, referenced below, supersedes any conflicting language in these Terms of Use and/or any other guidelines, rules, terms and conditions published in connection with the Service with respect to the subject matter covered by such privacy policy. - -MODIFICATION OF THESE TERMS OF USE; UPDATES -Xfire may change the Terms of Use at any time and such changes shall be effective immediately. You are responsible for regularly reviewing the Terms of Use. The most recent version of the Terms of Use can be found at http://www.xfire.com/xf/terms.php. Your continued use of the Service affirms your agreement to the Terms of Use and any changes. - -Xfire is not obligated to provide updates or improvements to the Service. However, if Xfire, in its sole discretion, updates or improves the Service, these Terms of Use shall apply to such updates and improvements unless expressly noted otherwise. - -CLIENT SOFTWARE USE LIMITATION -YOU MAY ONLY USE XFIRE CLIENT SOFTWARE OR AUTHORIZED THIRD-PARTY SOFTWARE TO ACCESS AND/OR USE THE SERVICE. You may not use any software or services in conjunction with the Xfire software or authorized third-party software which modifies or reroutes, or attempts to modify or reroute, the Service. You may not authorize any third party to access and/or use the Service on your behalf using any automated process such as a BOT, a spider or periodic caching of information stored by the Xfire Service on your behalf without a separate written agreement with Xfire. You may not use any software or hardware that reduces the number of users directly accessing or using the Service (sometimes called 'multiplexing' or 'pooling' software or hardware). - -You may not modify, copy, distribute, transmit, display, perform, reproduce, publish, license, create derivative works from, transfer, or sell any information, software, products or services that are part of the Service except as expressly provided in these Terms of Use. - -NO UNLAWFUL OR PROHIBITED USE; RESPONSIBILITY FOR YOUR ACCOUNT -As a condition of your use of the Service, you will not use the Service for any purpose that is unlawful or prohibited by these Terms of Use. You may not use the Service in any manner that could damage, disable, overburden, or impair the Service or interfere with any other party's use and enjoyment of it. You may not attempt to gain unauthorized access to any account, computer systems or networks associated with the Service or to otherwise interfere with or disrupt any accounts, computer systems or networks connected to the Service. You may not obtain or attempt to obtain any materials or information through any means not intentionally made available or provided for through the Service. You may not use access to the Service to obtain information necessary for you to design, develop or update unauthorized software that you use or provide to others to use to access the Service. You may not charge others to use the Service either directly or indirectly without the express written agreement of Xfire. -Subject to these Terms of Use, you may use the Service within your commercial organization, but you may not use the Service to advertise or offer to buy or sell any goods or services, or to run a business or commercial entity without the express written agreement of Xfire. -You agree to use the Service only to send, receive, and transfer appropriate messages and material. By way of example, and not as a limitation, you agree that when using the Service, you will not: - - - Use the Service in connection with surveys, contests, pyramid schemes, chain letters, junk email, spamming or any duplicative, bulk or unsolicited messages (commercial or otherwise). - - Defame, abuse, harass, stalk, threaten or otherwise violate the legal rights (such as rights of privacy and publicity) of others. - - Create a false identity for the purpose of misleading others. - - Publish, transfer, distribute or disseminate any inappropriate, profane, defamatory, obscene, indecent or unlawful topic, name, material or information. - - Transfer, stream, or otherwise make available, files or other material that contain images, photographs, software or other material protected by intellectual property laws, including, by way of example, and not as limitation, copyright or trademark laws (or by rights of privacy or publicity) unless you own or control the rights thereto or have received all necessary consents to do the same. - - Use any material or information, including images or photographs, which is made available through the Service in any manner that infringes any copyright, trademark, patent, trade secret, or other proprietary right of any party. - - Transfer, stream or otherwise make available, files or other material that contain viruses, Trojan horses, worms, time bombs, cancelbots, corrupted files, or any other similar software or programs that may damage the operation of another's computer or property of another. - - Download any file or other material transferred by another user of the Service that you know, or reasonably should know, cannot be legally distributed in such manner. - - Use, download or otherwise copy, or provide (whether or not for a fee) to a person or entity any directory of users of the Service or other user or usage information or any portion thereof. - - Falsify or delete any author attributions, legal or other proper notices or proprietary designations or labels of the origin or source of software or other material contained in a file that is transferred. - - Violate any code of conduct or other guidelines which may be applicable to the Service. - - Use any portion of the Service to harvest or otherwise collect information about others, including e-mail addresses. - -Xfire reserves the right at all times to monitor communications on the Service and disclose any information Xfire deems necessary to (i) ensure your compliance with this Agreement; (ii) satisfy any applicable law, regulation or legal process; or (iii) protect the rights, property, and interests of Xfire, its employees or the public. Xfire also reserves the right to edit, refuse to transfer or to remove any information or materials, in whole or in part, in Xfire's sole discretion. - -Always use caution when giving out any personally identifiable information about yourself or your children in the Service. Xfire does not control or endorse the content, messages or information exchanged by means of the Service and, therefore, Xfire specifically disclaims any liability with regard to the Service and any actions resulting from your participation in the Service. - -You are responsible for all activities that occur in your Service account. You agree to notify Xfire immediately of any unauthorized use of your account or breach in security known to you related to the Service. - - -PRIVACY -See the Xfire Service Privacy Statement at http://www.xfire.com/xf/privacy.php for disclosures relating to the collection and use of your information. - - -INTERACTION WITH THIRD PARTY SITES AND SERVICES -The Service may allow you to interact with third-party Web sites and Web services ("Link(s)"). The Links are not under the control of Xfire and Xfire is not responsible for the contents of any Links, including without limitation any link contained in a Link, or any changes or updates to a Link. Xfire is not responsible for any form of transmission received from any Link, nor is Xfire responsible if the Link is not working appropriately. Xfire is providing these Links to you only as a convenience, and the inclusion of any Link does not imply endorsement by Xfire of the Link or any association with its operators. You are responsible for viewing and abiding by any privacy statements and terms of use posted in connection with the Links. - -You are solely responsible for any dealings with third parties (including advertisers) who support the Service, including the delivery of and payment for goods and services. - -TERMS OF USE FOR SERVICE-ENABLED PROPERTIES -For the terms and conditions governing your use of any Xfire or authorized third party Web site or service that enables you to use the Service other than the Service itself ("Service-Enabled Properties"), please refer to the applicable Terms of Use for such Service-Enabled Properties. - -SOFTWARE AND CONTENT AVAILABLE ON THE SERVICE -All Xfire content and software (if any) that is made available to view and/or download in connection with the Service ("Software") is owned by and is the copyrighted work of Xfire and/or its suppliers and is licensed, not sold. Your use of the Software is governed by the terms of the license agreement, if any, which accompanies or is included with the Software ("License Agreement"). You may not install or use any Software that is accompanied by or includes a License Agreement unless you first agree to the License Agreement terms. For any Software not accompanied by a license agreement, Xfire hereby grants to you, the user, a non-exclusive, revocable, personal, non-transferable license to use the Software solely in connection with the Service in accordance with these Terms of Use. You may not lend, lease, rent or sublicense the Software or any aspect of the Service. - -You will not disassemble, decompile, or reverse engineer the Software. All Software is protected by copyright laws and international treaty provisions. Any unauthorized reproduction or redistribution of the Software is expressly prohibited by law, and may result in severe civil and criminal penalties. WITHOUT LIMITING THE FOREGOING, COPYING OR REPRODUCTION OF THE SOFTWARE TO ANY OTHER SERVER OR LOCATION FOR FURTHER REPRODUCTION OR REDISTRIBUTION IS EXPRESSLY PROHIBITED. THE SOFTWARE IS WARRANTED, IF AT ALL, ONLY ACCORDING TO THE TERMS OF THE LICENSE AGREEMENT. You acknowledge that the Software, and any accompanying documentation and/or technical information, is subject to applicable export control laws and regulations of the U.S.A. You agree not to export or re-export the Software, directly or indirectly, to any countries that are subject to U.S.A. export restrictions. - -Your license to use the Software with the Service terminates when you terminate your use of the Service. Your license to use the Software with the Service may also terminate if Xfire, in its sole discretion, modifies the Service to no longer support such Software. - -NO WARRANTIES; LIABILITY DISCLAIMER; EXCLUSIVE REMEDY -XFIRE PROVIDES THE SERVICE AND THE SOFTWARE "AS IS," "WITH ALL FAULTS" AND "AS AVAILABLE," AND THE ENTIRE RISK AS TO SATISFACTORY QUALITY, PERFORMANCE, ACCURACY, AND EFFORT IS WITH YOU. XFIRE, ITS AFFILIATES, ITS RESELLERS, DISTRIBUTORS, SERVICE PROVIDERS AND/OR SUPPLIERS (COLLECTIVELY, THE "XFIRE PARTIES") MAKE NO WARRANTIES. THE XFIRE PARTIES DISCLAIM ANY AND ALL WARRANTIES, EXPRESS, STATUTORY AND IMPLIED, INCLUDING WITHOUT LIMITATION (1) WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, WORKMANLIKE EFFORT, ACCURACY, TITLE, QUIET ENJOYMENT, NO ENCUMBRANCES, NO LIENS AND NON-INFRINGEMENT, (2) WARRANTIES ARISING THROUGH COURSE OF DEALING OR USAGE OF TRADE, AND (3) WARRANTIES THAT ACCESS TO OR USE OF THE SERVICE WILL BE UNINTERRUPTED OR ERROR-FREE. THERE ARE NO WARRANTIES THAT EXTEND BEYOND THE FACE OF THIS AGREEMENT. XFIRE MAY CHANGE THE SERVICE OR THE FEATURES IN ANY WAY, AND AT ANY TIME AND FOR ANY REASON. - -IN NO EVENT SHALL ANY OF THE XFIRE PARTIES BE LIABLE FOR ANY DIRECT, INDIRECT, CONSEQUENTIAL, SPECIAL, INCIDENTAL, OR PUNITIVE DAMAGES ARISING OUT OF, BASED ON, OR RESULTING FROM THIS AGREEMENT OR YOUR USE OF THE SERVICE, INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF USE, DATA OR PROFITS, WITH THE DELAY OR INABILITY TO USE THE SERVICE, THE PROVISION OF OR FAILURE TO PROVIDE SUPPORT SERVICES, OR FOR ANY INFORMATION, SOFTWARE, PRODUCTS, OR SERVICES OBTAINED THROUGH THE SERVICE, OR OTHERWISE ARISING OUT OF THE USE OF THE SERVICE, WHETHER BASED ON CONTRACT, TORT, NEGLIGENCE, STRICT LIABILITY OR OTHERWISE, EVEN IF XFIREOR ANY OF ITS SUPPLIERS HAS BEEN ADVISED OF THE POSSIBILITY OF DAMAGES. BECAUSE SOME STATES/JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES, THE ABOVE LIMITATION MAY NOT APPLY TO YOU. - -IF YOU ARE DISSATISFIED WITH ANY PORTION OF THE SERVICE, OR WITH ANY OF THESE TERMS OF USE, YOUR SOLE AND EXCLUSIVE REMEDY IS TO DISCONTINUE USING THE SERVICE. - -INDEMNITY -You agree to indemnify and hold Xfire, its officers, and employees, harmless from any claim or demand, including reasonable attorneys' fees, made by any third party due to or arising out of your use of the Services, the violation of these Terms of Use by you, or the infringement by you, or other user of the Services using your computer or identity, of any intellectual property or other right of any person or entity. - -CUSTOMER SUPPORT -Xfire may, but is not required to, provide you with customer support ("Support"). Unless you have entered into a separate written support agreement with Xfire with respect to the Service, Xfire may terminate any Support it provides at any time in its sole discretion. - -Authorized third-party software that uses the Service is not supported by Xfire and you should contact the provider of such software for support, if any. - -TERMINATION/ACCESS RESTRICTION -Unless you, or a third party on your behalf, have entered into a separate written agreement with Xfire that modifies these Terms of Use, Xfire reserves the right, in its sole discretion, to terminate your access to and use of the Service or any portion thereof at any time, without notice. Also, unless you or a third party on your behalf have entered into a separate agreement with Xfire, Xfire may terminate or suspend your access to the Service for inactivity, which is defined as failing to log onto the Service for an extended period of time, as determined by Xfire. -ELECTRONIC NOTICES -You consent to Xfire providing you any information regarding the Service in electronic form. Xfire may provide such information to you via e-mail at the e-mail address you specified when you registered for the Service, by instant message to your account, or by access to a Xfire web site. As long as you access and use the Service, you will have the necessary software and hardware to receive such notices. If you do not consent to receive any notices electronically, you must discontinue your use of the Service. - -GENERAL -If you reside in the United States, claims for enforcement, breach or violation of duties or rights under these Terms of Use are governed by the laws of the State of California, without reference to conflict of laws principles. All other claims, including, without limitation, claims under or for violation of state consumer protection laws, unfair competition laws, and in tort, are governed by the laws of your state of residence in the United States. If you reside outside of the United States, these Terms of Use are governed by the laws of the State of California, without reference to conflict of laws principles. You hereby irrevocably consent to the exclusive jurisdiction and venue of courts in San Mateo County, California, U.S.A. in all disputes arising out of or relating to the use of the Service. - -YOU AND XFIRE AGREE THAT ANY CAUSE OF ACTION ARISING OUT OF OR RELATED TO THE SERVICE MUST COMMENCE WITHIN ONE (1) YEAR AFTER THE CAUSE OF ACTION ACCRUES. OTHERWISE, SUCH CAUSE OF ACTION IS PERMANENTLY BARRED. - -Xfire may have patents, patent applications, trademarks, copyrights, or other intellectual property rights covering subject matter in any Web pages that are part of the Service. Except as expressly provided in these Terms of Use, the furnishing of such Web pages to you does not give you any license to these patents, trademarks, copyrights, or other intellectual property. Any rights not expressly granted herein are reserved. - -June 2004 - - - diff -r d5d5e1698554 -r 1dedcc37bfe8 misc/xfire/xfiregameclient.cpp --- a/misc/xfire/xfiregameclient.cpp Sun Nov 18 01:06:01 2012 +0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,121 +0,0 @@ -/* This file is NOT open source. See "license.txt" to read the full license provided with the Xfire SDK. */ - -#define WIN32_LEAN_AND_MEAN -#include -#include - -#include "xfiregameclient.h" - -static HMODULE g_toucan_dll = NULL; -static void HelperInit(); -static HMODULE HelperGetToucanDLL(); - -typedef int (*XfireSetCustomGameDataAFunction)(int , const char **, const char **); -typedef int (*XfireSetCustomGameDataWFunction)(int , const wchar_t **, const wchar_t **); -typedef int (*XfireSetCustomGameDataUTF8Function)(int , const char **, const char **); - -static XfireSetCustomGameDataAFunction ptr_XfireSetCustomGameDataA = NULL; -static XfireSetCustomGameDataWFunction ptr_XfireSetCustomGameDataW = NULL; -static XfireSetCustomGameDataUTF8Function ptr_XfireSetCustomGameDataUTF8 = NULL; - -/* make sure we are going to call the ANSI version */ -#ifdef MODULEENTRY32 -#undef MODULEENTRY32 -#endif - -#ifdef Module32First -#undef Module32First -#endif - -#ifdef Module32Next -#undef Module32Next -#endif - - -int XfireIsLoaded() -{ - HelperInit(); - if (ptr_XfireSetCustomGameDataA && - ptr_XfireSetCustomGameDataW && - ptr_XfireSetCustomGameDataUTF8) - return 1; - return 0; -} - -int XfireSetCustomGameDataA(int num_keys, const char **keys, const char **values) -{ - HelperInit(); - if (ptr_XfireSetCustomGameDataA) - return ptr_XfireSetCustomGameDataA(num_keys, keys, values); - return 1; -} - -int XfireSetCustomGameDataW(int num_keys, const wchar_t **keys, const wchar_t **values) -{ - HelperInit(); - if (ptr_XfireSetCustomGameDataW) - return ptr_XfireSetCustomGameDataW(num_keys, keys, values); - return 1; -} - -int XfireSetCustomGameDataUTF8(int num_keys, const char **keys, const char **values) -{ - HelperInit(); - if (ptr_XfireSetCustomGameDataUTF8) - return ptr_XfireSetCustomGameDataUTF8(num_keys, keys, values); - return 1; -} - -/* ------------------------------------------------------------------------- */ -static void HelperInit() -{ - if (!ptr_XfireSetCustomGameDataA || - !ptr_XfireSetCustomGameDataW || - !ptr_XfireSetCustomGameDataUTF8) - { - HMODULE toucan_dll = HelperGetToucanDLL(); - if (toucan_dll) - { - ptr_XfireSetCustomGameDataA = (XfireSetCustomGameDataAFunction)::GetProcAddress(toucan_dll, "ToucanSendGameClientDataA_V1"); - ptr_XfireSetCustomGameDataW = (XfireSetCustomGameDataWFunction)::GetProcAddress(toucan_dll, "ToucanSendGameClientDataW_V1"); - ptr_XfireSetCustomGameDataUTF8 = (XfireSetCustomGameDataUTF8Function)::GetProcAddress(toucan_dll, "ToucanSendGameClientDataUTF8_V1"); - } - } -} - - -static HMODULE HelperGetToucanDLL() -{ - if (g_toucan_dll) - return g_toucan_dll; - - /* - ** We need to enumerate the DLLs loaded to find toucan dll. - ** This is done because the toucan dll changes with each update. - ** The toucan dll has the following format. "xfire_toucan_{BUILD_NUMBER}.dll" - ** We simply try to find a dll w/ the prefix "xfire_toucan" - */ - HANDLE snapshot_handle = CreateToolhelp32Snapshot(TH32CS_SNAPMODULE, GetCurrentProcessId()); - if (snapshot_handle != INVALID_HANDLE_VALUE) - { - MODULEENTRY32 module_entry; - module_entry.dwSize = sizeof(MODULEENTRY32); - - BOOL result = Module32First(snapshot_handle, &module_entry); - char module_name[] = "xfire_toucan"; - DWORD module_name_len = sizeof(module_name)-1; - while (result) - { - if (CompareStringA(LOCALE_USER_DEFAULT, NORM_IGNORECASE, module_entry.szModule, module_name_len, module_name, module_name_len) == CSTR_EQUAL) - { - g_toucan_dll = module_entry.hModule; - break; - } - result = Module32Next(snapshot_handle, &module_entry); - } - - CloseHandle(snapshot_handle); - } - - return g_toucan_dll; -} diff -r d5d5e1698554 -r 1dedcc37bfe8 misc/xfire/xfiregameclient.h --- a/misc/xfire/xfiregameclient.h Sun Nov 18 01:06:01 2012 +0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,49 +0,0 @@ -/* This file is NOT open source. See "license.txt" to read the full license provided with the Xfire SDK. */ - -#ifndef __XFIREGAMECLIENT_H__ -#define __XFIREGAMECLIENT_H__ - -#ifdef __cplusplus -extern "C" { -#endif - -/* -** XfireIsLoaded() -** -** returns 1 if application can talk to Xfire, 0 otherwise -*/ -int XfireIsLoaded(); - -/* -** XfireSetCustomGameDataA() -** -** ANSI version to tell xfire of custom game data -*/ -int XfireSetCustomGameDataA(int num_keys, const char **keys, const char **values); - -/* -** XfireSetCustomGameDataA() -** -** UNICODE version to tell xfire of custom game data -*/ -int XfireSetCustomGameDataW(int num_keys, const wchar_t **keys, const wchar_t **values); - -/* -** XfireSetCustomGameDataUTF8() -** -** UTF8 version to tell xfire of custom game data -*/ -int XfireSetCustomGameDataUTF8(int num_keys, const char **keys, const char **values); - -#ifdef UNICODE -#define XfireSetCustomGameData XfireSetCustomGameDataW -#else -#define XfireSetCustomGameData XfireSetCustomGameDataA -#endif - - -#ifdef __cplusplus -} -#endif - -#endif /* __XFIREGAMECLIENT_H__ */ diff -r d5d5e1698554 -r 1dedcc37bfe8 project_files/Android-build/CMakeLists.txt --- a/project_files/Android-build/CMakeLists.txt Sun Nov 18 01:06:01 2012 +0400 +++ b/project_files/Android-build/CMakeLists.txt Fri Feb 22 05:05:32 2013 +0100 @@ -18,7 +18,7 @@ find_program(ANT ant DOC "Path to the java package creator: ant") if(NOT EXISTS ${ANT}) - MESSAGE(FATAL_ERROR "Couldn't detect the Ant build tool") + message(FATAL_ERROR "Couldn't detect the Ant build tool") endif() if(NOT ANDROID_NDK) @@ -26,9 +26,9 @@ endif() if(IS_DIRECTORY "${ANDROID_NDK}") - MESSAGE(STATUS "Detected the android NDK directory at: " ${ANDROID_NDK}) + message(STATUS "Detected the android NDK directory at: " ${ANDROID_NDK}) else () - MESSAGE(FATAL_ERROR "Couldn't detect the Android NDK directory") + message(FATAL_ERROR "Couldn't detect the Android NDK directory") endif() if(NOT ANDROID_NDK_TOOLCHAINDIR) @@ -39,9 +39,9 @@ endif() if(IS_DIRECTORY "${ANDROID_NDK_TOOLCHAINDIR}") - MESSAGE(STATUS "Detected the Android NDK toolchain at: ${ANDROID_NDK_TOOLCHAINDIR}") + message(STATUS "Detected the Android NDK toolchain at: ${ANDROID_NDK_TOOLCHAINDIR}") else () - MESSAGE(FATAL_ERROR "Couldn't detect the Android NDK toolchain directory: ${ANDROID_NDK_TOOLCHAINDIR}") + message(FATAL_ERROR "Couldn't detect the Android NDK toolchain directory: ${ANDROID_NDK_TOOLCHAINDIR}") endif() if(NOT ANDROID_SDK)#Check if its defined at the cmdline @@ -52,9 +52,9 @@ endif() if( IS_DIRECTORY "${ANDROID_SDK}") - MESSAGE(STATUS "Detected the android SDK directory at: " ${ANDROID_SDK}) + message(STATUS "Detected the android SDK directory at: " ${ANDROID_SDK}) else () - MESSAGE(FATAL_ERROR "Couldn't detect the Android SDK directory") + message(FATAL_ERROR "Couldn't detect the Android SDK directory") endif() if( NOT FPC_DIR) @@ -66,18 +66,18 @@ endif() if( IS_DIRECTORY "${FPC_DIR}") - MESSAGE(STATUS "Detected the FreePascal directory at: " "${FPC_DIR}") + message(STATUS "Detected the FreePascal directory at: " "${FPC_DIR}") else () - MESSAGE(FATAL_ERROR "Couldn't detect the FreePascal directory") + message(FATAL_ERROR "Couldn't detect the FreePascal directory") endif() set(SDL_DIR /home/richard/Downloads/android-project) -set(ANDROID_SDK_API_LVL 14) +set(ANDROID_SDK_API_LVL 16) set(ANDROID_NDK_API_LVL 5) -MESSAGE(STATUS "Creating Makefile.android...") +message(STATUS "Creating Makefile.android...") configure_file(Templates/Makefile.android .) @@ -89,9 +89,9 @@ "--target android-${ANDROID_SDK_API_LVL}" OUTPUT_VARIABLE androidoutput ) - MESSAGE(STATUS "Updating android project config...\n" ${androidoutput}) + message(STATUS "Updating android project config...\n" ${androidoutput}) else() - MESSAGE(FATAL_ERROR "Couldn't find the android executable in ${ANDROID_SDK}/platform-tools or ${ANDROID_SDK}/tools.") + message(FATAL_ERROR "Couldn't find the android executable in ${ANDROID_SDK}/platform-tools or ${ANDROID_SDK}/tools.") endif() exec_program(${HGCOMMAND} diff -r d5d5e1698554 -r 1dedcc37bfe8 project_files/Android-build/SDL-android-project/jni/jnidispatch/Android.mk --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/project_files/Android-build/SDL-android-project/jni/jnidispatch/Android.mk Fri Feb 22 05:05:32 2013 +0100 @@ -0,0 +1,6 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_MODULE := libjnidispatch +LOCAL_SRC_FILES := libjnidispatch.so +include $(PREBUILT_SHARED_LIBRARY) \ No newline at end of file diff -r d5d5e1698554 -r 1dedcc37bfe8 project_files/Android-build/SDL-android-project/jni/jnidispatch/README --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/project_files/Android-build/SDL-android-project/jni/jnidispatch/README Fri Feb 22 05:05:32 2013 +0100 @@ -0,0 +1,1 @@ +This library is part of JNA and just needs to be copied into the libs/armeabi folder. However, putting it there directly will get it cleaned away on build. \ No newline at end of file diff -r d5d5e1698554 -r 1dedcc37bfe8 project_files/Android-build/SDL-android-project/jni/jnidispatch/libjnidispatch.so Binary file project_files/Android-build/SDL-android-project/jni/jnidispatch/libjnidispatch.so has changed diff -r d5d5e1698554 -r 1dedcc37bfe8 project_files/Android-build/SDL-android-project/jni/src/hedgewars_main.c --- a/project_files/Android-build/SDL-android-project/jni/src/hedgewars_main.c Sun Nov 18 01:06:01 2012 +0400 +++ b/project_files/Android-build/SDL-android-project/jni/src/hedgewars_main.c Fri Feb 22 05:05:32 2013 +0100 @@ -1,3 +1,4 @@ +#include #include "android/log.h" #include "SDL.h" @@ -6,7 +7,7 @@ #define TAG "HWEngine Loader" -typedef (*HWEngine_Game)(char**); +typedef (*HWEngine_Game)(int32_t argc, char** argv); main(int argc, char *argv[]){ void *handle; @@ -33,7 +34,7 @@ exit(EXIT_FAILURE); } __android_log_print(ANDROID_LOG_INFO, TAG, "dlsym succeeded"); - Game(argv); + Game(argc, argv); __android_log_print(ANDROID_LOG_INFO, TAG, "Game() ended"); dlclose(handle); diff -r d5d5e1698554 -r 1dedcc37bfe8 project_files/Android-build/SDL-android-project/libs/armeabi/libjnidispatch.so Binary file project_files/Android-build/SDL-android-project/libs/armeabi/libjnidispatch.so has changed diff -r d5d5e1698554 -r 1dedcc37bfe8 project_files/Android-build/SDL-android-project/libs/jna-3.5.1.jar Binary file project_files/Android-build/SDL-android-project/libs/jna-3.5.1.jar has changed diff -r d5d5e1698554 -r 1dedcc37bfe8 project_files/Android-build/SDL-android-project/libs/jna.jar Binary file project_files/Android-build/SDL-android-project/libs/jna.jar has changed diff -r d5d5e1698554 -r 1dedcc37bfe8 project_files/Android-build/SDL-android-project/src/org/hedgewars/hedgeroid/EngineProtocol/PascalExports.java --- a/project_files/Android-build/SDL-android-project/src/org/hedgewars/hedgeroid/EngineProtocol/PascalExports.java Sun Nov 18 01:06:01 2012 +0400 +++ b/project_files/Android-build/SDL-android-project/src/org/hedgewars/hedgeroid/EngineProtocol/PascalExports.java Fri Feb 22 05:05:32 2013 +0100 @@ -31,6 +31,7 @@ System.loadLibrary("SDL_mixer"); System.loadLibrary("SDL_ttf"); System.loadLibrary("lua5.1"); + System.loadLibrary("physfs"); System.loadLibrary("hwengine"); } diff -r d5d5e1698554 -r 1dedcc37bfe8 project_files/Android-build/SDL-android-project/src/org/hedgewars/hedgeroid/frontlib/Flib.java --- a/project_files/Android-build/SDL-android-project/src/org/hedgewars/hedgeroid/frontlib/Flib.java Sun Nov 18 01:06:01 2012 +0400 +++ b/project_files/Android-build/SDL-android-project/src/org/hedgewars/hedgeroid/frontlib/Flib.java Fri Feb 22 05:05:32 2013 +0100 @@ -28,6 +28,7 @@ public class Flib { static { + System.loadLibrary("SDL"); System.loadLibrary("SDL_net"); System.setProperty("jna.encoding", "UTF8"); // Ugly global setting, but it seems JNA doesn't allow setting this per-library... } @@ -58,4 +59,4 @@ INSTANCE.flib_log_setLevel(Frontlib.FLIB_LOGLEVEL_INFO); INSTANCE.flib_log_setCallback(logCb); } -} \ No newline at end of file +} diff -r d5d5e1698554 -r 1dedcc37bfe8 project_files/Android-build/SDL-android-project/src/org/hedgewars/hedgeroid/frontlib/Frontlib.java --- a/project_files/Android-build/SDL-android-project/src/org/hedgewars/hedgeroid/frontlib/Frontlib.java Sun Nov 18 01:06:01 2012 +0400 +++ b/project_files/Android-build/SDL-android-project/src/org/hedgewars/hedgeroid/frontlib/Frontlib.java Fri Feb 22 05:05:32 2013 +0100 @@ -21,6 +21,7 @@ package org.hedgewars.hedgeroid.frontlib; import java.io.UnsupportedEncodingException; import java.util.ArrayList; +import java.util.Arrays; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -350,10 +351,14 @@ static class HogStruct extends Structure { public static class ByVal extends HogStruct implements Structure.ByValue {} public static class ByRef extends HogStruct implements Structure.ByReference {} - private static String[] FIELD_ORDER = new String[] {"name", "hat", "rounds", "kills", "deaths", "suicides", "difficulty", "initialHealth", "weaponset"}; - public HogStruct() { super(); setFieldOrder(FIELD_ORDER); } - public HogStruct(Pointer ptr) { super(ptr); setFieldOrder(FIELD_ORDER); } + public HogStruct() { super(); } + public HogStruct(Pointer ptr) { super(ptr); } + + @Override + protected List getFieldOrder() { + return Arrays.asList("name", "hat", "rounds", "kills", "deaths", "suicides", "difficulty", "initialHealth", "weaponset"); + } public void fillFrom(Hog hog) { difficulty = hog.level; @@ -382,10 +387,14 @@ static class TeamStruct extends Structure { public static class ByVal extends TeamStruct implements Structure.ByValue {} public static class ByRef extends TeamStruct implements Structure.ByReference {} - private static String[] FIELD_ORDER = new String[] {"hogs", "name", "grave", "fort", "voicepack", "flag", "bindings", "bindingCount", "rounds", "wins", "campaignProgress", "colorIndex", "hogsInGame", "remoteDriven", "ownerName"}; - public TeamStruct() { super(); setFieldOrder(FIELD_ORDER); } - public TeamStruct(Pointer ptr) { super(ptr); setFieldOrder(FIELD_ORDER); } + public TeamStruct() { super(); } + public TeamStruct(Pointer ptr) { super(ptr); } + + @Override + protected List getFieldOrder() { + return Arrays.asList("hogs", "name", "grave", "fort", "voicepack", "flag", "bindings", "bindingCount", "rounds", "wins", "campaignProgress", "colorIndex", "hogsInGame", "remoteDriven", "ownerName"); + } public void fillFrom(Team team, TeamIngameAttributes attrs) { if(team != null) { @@ -458,10 +467,14 @@ static class WeaponsetStruct extends Structure { public static class ByVal extends WeaponsetStruct implements Structure.ByValue {} public static class ByRef extends WeaponsetStruct implements Structure.ByReference {} - private static String[] FIELD_ORDER = new String[] {"loadout", "crateprob", "crateammo", "delay", "name"}; + + public WeaponsetStruct() { super(); } + public WeaponsetStruct(Pointer ptr) { super(ptr); } - public WeaponsetStruct() { super(); setFieldOrder(FIELD_ORDER); } - public WeaponsetStruct(Pointer ptr) { super(ptr); setFieldOrder(FIELD_ORDER); } + @Override + protected List getFieldOrder() { + return Arrays.asList("loadout", "crateprob", "crateammo", "delay", "name"); + } public void fillFrom(Weaponset weaponset) { fillWeaponInfo(loadout, weaponset.loadout); @@ -501,10 +514,13 @@ * Represents a flib_weaponset*, for use as part of a flib_weaponset** */ static class WeaponsetPointerByReference extends Structure implements Structure.ByReference { - private static String[] FIELD_ORDER = new String[] {"weaponset"}; + public WeaponsetPointerByReference() { super(); } + public WeaponsetPointerByReference(Pointer ptr) { super(ptr); } - public WeaponsetPointerByReference() { super(); setFieldOrder(FIELD_ORDER); } - public WeaponsetPointerByReference(Pointer ptr) { super(ptr); setFieldOrder(FIELD_ORDER); } + @Override + protected List getFieldOrder() { + return Arrays.asList("weaponset"); + } public WeaponsetStruct.ByRef weaponset; } @@ -512,10 +528,14 @@ static class WeaponsetListStruct extends Structure { public static class ByVal extends WeaponsetListStruct implements Structure.ByValue {} public static class ByRef extends WeaponsetListStruct implements Structure.ByReference {} - private static String[] FIELD_ORDER = new String[] {"weaponsetCount", "weaponsets"}; + + public WeaponsetListStruct() { super(); } + public WeaponsetListStruct(Pointer ptr) { super(ptr); } - public WeaponsetListStruct() { super(); setFieldOrder(FIELD_ORDER); } - public WeaponsetListStruct(Pointer ptr) { super(ptr); setFieldOrder(FIELD_ORDER); } + @Override + protected List getFieldOrder() { + return Arrays.asList("weaponsetCount", "weaponsets"); + } public void fillFrom(List list) { weaponsetCount = list.size(); @@ -560,11 +580,15 @@ static class RoomStruct extends Structure { public static class ByVal extends RoomStruct implements Structure.ByValue {} public static class ByRef extends RoomStruct implements Structure.ByReference {} - private static String[] FIELD_ORDER = new String[] {"inProgress", "name", "playerCount", "teamCount", "owner", "map", "scheme", "weapons"}; - public RoomStruct() { super(); setFieldOrder(FIELD_ORDER); } - public RoomStruct(Pointer ptr) { super(ptr); setFieldOrder(FIELD_ORDER); } + public RoomStruct() { super(); } + public RoomStruct(Pointer ptr) { super(ptr); } + @Override + protected List getFieldOrder() { + return Arrays.asList("inProgress", "name", "playerCount", "teamCount", "owner", "map", "scheme", "weapons"); + } + public Room toRoomlistRoom() { return new Room(name, map, scheme, weapons, owner, playerCount, teamCount, inProgress); } @@ -582,10 +606,14 @@ static class MapRecipeStruct extends Structure { public static class ByVal extends MapRecipeStruct implements Structure.ByValue {} public static class ByRef extends MapRecipeStruct implements Structure.ByReference {} - private static String[] FIELD_ORDER = new String[] {"mapgen", "name", "seed", "theme", "drawData", "drawDataSize", "templateFilter", "mazeSize"}; + + public MapRecipeStruct() { super(); } + public MapRecipeStruct(Pointer ptr) { super(ptr); } - public MapRecipeStruct() { super(); setFieldOrder(FIELD_ORDER); } - public MapRecipeStruct(Pointer ptr) { super(ptr); setFieldOrder(FIELD_ORDER); } + @Override + protected List getFieldOrder() { + return Arrays.asList("mapgen", "name", "seed", "theme", "drawData", "drawDataSize", "templateFilter", "mazeSize"); + } public void fillFrom(MapRecipe map) { mapgen = map.mapgen; @@ -593,24 +621,14 @@ seed = map.seed; theme = map.theme; byte[] buf = map.getDrawData(); - if(buf==null || buf.length==0) { - drawData = null; - } else { - drawData = ByteArrayPtr.createJavaOwned(buf).getPointer(); - } + drawData = ByteArrayPtr.createJavaOwned(buf); drawDataSize = NativeSizeT.valueOf(buf==null ? 0 : buf.length); templateFilter = map.templateFilter; mazeSize = map.mazeSize; } public MapRecipe toMapRecipe() { - byte[] buf; - int size = drawDataSize.intValue(); - if(size>0) { - buf = drawData.getByteArray(0, size); - } else { - buf = null; - } + byte[] buf = ByteArrayPtr.deref(drawData, drawDataSize.intValue()); return new MapRecipe(mapgen, templateFilter, mazeSize, name, seed, theme, buf); } @@ -618,7 +636,7 @@ public String name; public String seed; public String theme; - public Pointer drawData; // We can't use ByteArrayPtr in a struct because JNA will overwrite the value with NULL - probably a bug. + public ByteArrayPtr drawData; public NativeSizeT drawDataSize; public int templateFilter; public int mazeSize; @@ -627,10 +645,14 @@ static class MetaschemeSettingStruct extends Structure { public static class ByVal extends MetaschemeSettingStruct implements Structure.ByValue {} public static class ByRef extends MetaschemeSettingStruct implements Structure.ByReference {} - private static String[] FIELD_ORDER = new String[] {"name", "engineCommand", "maxMeansInfinity", "times1000", "min", "max", "def"}; + + public MetaschemeSettingStruct() { super(); } + public MetaschemeSettingStruct(Pointer ptr) { super(ptr); } - public MetaschemeSettingStruct() { super(); setFieldOrder(FIELD_ORDER); } - public MetaschemeSettingStruct(Pointer ptr) { super(ptr); setFieldOrder(FIELD_ORDER); } + @Override + protected List getFieldOrder() { + return Arrays.asList("name", "engineCommand", "maxMeansInfinity", "times1000", "min", "max", "def"); + } public void fillFrom(Setting setting) { name = setting.name; @@ -658,10 +680,14 @@ static class MetaschemeModStruct extends Structure { public static class ByVal extends MetaschemeModStruct implements Structure.ByValue {} public static class ByRef extends MetaschemeModStruct implements Structure.ByReference {} - private static String[] FIELD_ORDER = new String[] {"name", "bitmaskIndex"}; + + public MetaschemeModStruct() { super(); } + public MetaschemeModStruct(Pointer ptr) { super(ptr); } - public MetaschemeModStruct() { super(); setFieldOrder(FIELD_ORDER); } - public MetaschemeModStruct(Pointer ptr) { super(ptr); setFieldOrder(FIELD_ORDER); } + @Override + protected List getFieldOrder() { + return Arrays.asList("name", "bitmaskIndex"); + } public void fillFrom(Mod mod) { name = mod.name; @@ -681,10 +707,13 @@ public static class ByVal extends MetaschemeStruct implements Structure.ByValue {} public static class ByRef extends MetaschemeStruct implements Structure.ByReference {} - private static String[] FIELD_ORDER = new String[] {"settingCount", "modCount", "settings", "mods"}; + public MetaschemeStruct() { super(); } + public MetaschemeStruct(Pointer ptr) { super(ptr); } - public MetaschemeStruct() { super(); setFieldOrder(FIELD_ORDER); } - public MetaschemeStruct(Pointer ptr) { super(ptr); setFieldOrder(FIELD_ORDER); } + @Override + protected List getFieldOrder() { + return Arrays.asList("settingCount", "modCount", "settings", "mods"); + } /** * Only use on native-owned structs! @@ -720,10 +749,14 @@ static class SchemeStruct extends Structure { public static class ByVal extends SchemeStruct implements Structure.ByValue {} public static class ByRef extends SchemeStruct implements Structure.ByReference {} - private static String[] FIELD_ORDER = new String[] {"name", "settings", "mod"}; + + public SchemeStruct() { super(); } + public SchemeStruct(Pointer ptr) { super(ptr); } - public SchemeStruct() { super(); setFieldOrder(FIELD_ORDER); } - public SchemeStruct(Pointer ptr) { super(ptr); setFieldOrder(FIELD_ORDER); } + @Override + protected List getFieldOrder() { + return Arrays.asList("name", "settings", "mods"); + } public void fillFrom(Scheme scheme) { MetaScheme meta = MetaScheme.INSTANCE; @@ -762,10 +795,13 @@ * Represents a flib_scheme*, for use as part of a flib_scheme** */ static class SchemePointerByReference extends Structure implements Structure.ByReference { - private static String[] FIELD_ORDER = new String[] {"scheme"}; + public SchemePointerByReference() { super(); } + public SchemePointerByReference(Pointer ptr) { super(ptr); } - public SchemePointerByReference() { super(); setFieldOrder(FIELD_ORDER); } - public SchemePointerByReference(Pointer ptr) { super(ptr); setFieldOrder(FIELD_ORDER); } + @Override + protected List getFieldOrder() { + return Arrays.asList("scheme"); + } public SchemeStruct.ByRef scheme; } @@ -773,10 +809,14 @@ static class SchemelistStruct extends Structure { public static class ByVal extends SchemelistStruct implements Structure.ByValue {} public static class ByRef extends SchemelistStruct implements Structure.ByReference {} - private static String[] FIELD_ORDER = new String[] {"schemeCount", "schemes"}; + + public SchemelistStruct() { super(); } + public SchemelistStruct(Pointer ptr) { super(ptr); } - public SchemelistStruct() { super(); setFieldOrder(FIELD_ORDER); } - public SchemelistStruct(Pointer ptr) { super(ptr); setFieldOrder(FIELD_ORDER); } + @Override + protected List getFieldOrder() { + return Arrays.asList("schemeCount", "schemes"); + } public void fillFrom(List schemeList) { schemeCount = schemeList.size(); @@ -823,10 +863,13 @@ * Represents a flib_team*, for use as part of a flib_team** */ static class TeamPointerByReference extends Structure implements Structure.ByReference { - private static String[] FIELD_ORDER = new String[] {"team"}; + public TeamPointerByReference() { super(); } + public TeamPointerByReference(Pointer ptr) { super(ptr); } - public TeamPointerByReference() { super(); setFieldOrder(FIELD_ORDER); } - public TeamPointerByReference(Pointer ptr) { super(ptr); setFieldOrder(FIELD_ORDER); } + @Override + protected List getFieldOrder() { + return Arrays.asList("team"); + } public TeamStruct.ByRef team; } @@ -835,10 +878,13 @@ public static class ByVal extends TeamlistStruct implements Structure.ByValue {} public static class ByRef extends TeamlistStruct implements Structure.ByReference {} - private static String[] FIELD_ORDER = new String[] {"teamCount", "teams"}; + public TeamlistStruct() { super(); } + public TeamlistStruct(Pointer ptr) { super(ptr); } - public TeamlistStruct() { super(); setFieldOrder(FIELD_ORDER); } - public TeamlistStruct(Pointer ptr) { super(ptr); setFieldOrder(FIELD_ORDER); } + @Override + protected List getFieldOrder() { + return Arrays.asList("teamCount", "teams"); + } public void fillFrom(List teamList, WeaponsetStruct.ByRef weaponset, int initialHealth) { teamCount = teamList.size(); @@ -878,10 +924,14 @@ static class GameSetupStruct extends Structure { public static class ByVal extends GameSetupStruct implements Structure.ByValue {} public static class ByRef extends GameSetupStruct implements Structure.ByReference {} - private static String[] FIELD_ORDER = new String[] {"script", "gamescheme", "map", "teamlist"}; + + public GameSetupStruct() { super(); } + public GameSetupStruct(Pointer ptr) { super(ptr); } - public GameSetupStruct() { super(); setFieldOrder(FIELD_ORDER); } - public GameSetupStruct(Pointer ptr) { super(ptr); setFieldOrder(FIELD_ORDER); } + @Override + protected List getFieldOrder() { + return Arrays.asList("script", "gamescheme", "map", "teamlist"); + } public void fillFrom(GameConfig conf) { script = conf.style; diff -r d5d5e1698554 -r 1dedcc37bfe8 project_files/HedgewarsMobile/Classes/Appirater.h --- a/project_files/HedgewarsMobile/Classes/Appirater.h Sun Nov 18 01:06:01 2012 +0400 +++ b/project_files/HedgewarsMobile/Classes/Appirater.h Fri Feb 22 05:05:32 2013 +0100 @@ -1,9 +1,9 @@ /* This file is part of Appirater, http://arashpayan.com - + Copyright (c) 2010, Arash Payan All rights reserved. - + Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without @@ -12,10 +12,10 @@ copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - + The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND diff -r d5d5e1698554 -r 1dedcc37bfe8 project_files/HedgewarsMobile/Classes/Appirater.m --- a/project_files/HedgewarsMobile/Classes/Appirater.m Sun Nov 18 01:06:01 2012 +0400 +++ b/project_files/HedgewarsMobile/Classes/Appirater.m Fri Feb 22 05:05:32 2013 +0100 @@ -1,9 +1,9 @@ /* This file is part of Appirater, http://arashpayan.com - + Copyright (c) 2010, Arash Payan All rights reserved. - + Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without @@ -12,10 +12,10 @@ copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - + The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND @@ -66,7 +66,7 @@ trackingVersion = version; [userDefaults setObject:version forKey:kAppiraterCurrentVersion]; } - + if (APPIRATER_DEBUG) DLog(@"APPIRATER Tracking version: %@", trackingVersion); @@ -98,7 +98,7 @@ launchCount > LAUNCHES_UNTIL_PROMPT && !declinedToRate && !ratedApp) { - if ([HWUtils isNetworkReachable]) { // check if they can reach the app store + if ([HWUtils isNetworkReachable]) { // check if they can reach the app store willShowPrompt = YES; [self performSelectorOnMainThread:@selector(showPrompt) withObject:nil waitUntilDone:NO]; } @@ -141,7 +141,7 @@ // they want to rate it [[UIApplication sharedApplication] openURL: [NSURL URLWithString:[templateReviewURL stringByReplacingOccurrencesOfString:@"APP_ID" withString:[NSString stringWithFormat:@"%d", APPIRATER_APP_ID]]]]; - + [userDefaults setBool:YES forKey:kAppiraterRatedCurrentVersion]; break; case 2: diff -r d5d5e1698554 -r 1dedcc37bfe8 project_files/HedgewarsMobile/Classes/AudioManagerController.m --- a/project_files/HedgewarsMobile/Classes/AudioManagerController.m Sun Nov 18 01:06:01 2012 +0400 +++ b/project_files/HedgewarsMobile/Classes/AudioManagerController.m Fri Feb 22 05:05:32 2013 +0100 @@ -79,7 +79,7 @@ self.backgroundMusic.delegate = nil; self.backgroundMusic.numberOfLoops = -1; } - + self.backgroundMusic.volume = DEFAULT_VOLUME; [self.backgroundMusic play]; } @@ -98,7 +98,7 @@ if (self.audioFaderQueue == nil) self.audioFaderQueue = [[NSOperationQueue alloc] init]; - + MXAudioPlayerFadeOperation *fadeOut = [[MXAudioPlayerFadeOperation alloc] initFadeWithAudioPlayer:self.backgroundMusic toVolume:0.0 overDuration:FADEOUT_DURATION]; @@ -144,30 +144,30 @@ -(void) playClickSound { if ([[[NSUserDefaults standardUserDefaults] objectForKey:@"sound"] boolValue] == NO) return; - + if (self.clickSound == -1) self.clickSound = [self loadSound:@"clickSound"]; - + AudioServicesPlaySystemSound(self.clickSound); } -(void) playBackSound { if ([[[NSUserDefaults standardUserDefaults] objectForKey:@"sound"] boolValue] == NO) return; - + if (self.backSound == -1) self.backSound = [self loadSound:@"backSound"]; - + AudioServicesPlaySystemSound(self.backSound); } -(void) playSelectSound { if ([[[NSUserDefaults standardUserDefaults] objectForKey:@"sound"] boolValue] == NO) return; - + if (self.selSound == -1) self.selSound = [self loadSound:@"selSound"]; - + AudioServicesPlaySystemSound(self.selSound); } diff -r d5d5e1698554 -r 1dedcc37bfe8 project_files/HedgewarsMobile/Classes/CreationChamber.m --- a/project_files/HedgewarsMobile/Classes/CreationChamber.m Sun Nov 18 01:06:01 2012 +0400 +++ b/project_files/HedgewarsMobile/Classes/CreationChamber.m Fri Feb 22 05:05:32 2013 +0100 @@ -390,7 +390,7 @@ [basicArray release]; NSString *schemeFile = [[NSString alloc] initWithFormat:@"%@/%@.plist", schemesDirectory, nameWithoutExt]; - + [theScheme writeToFile:schemeFile atomically:YES]; [schemeFile release]; [theScheme release]; diff -r d5d5e1698554 -r 1dedcc37bfe8 project_files/HedgewarsMobile/Classes/DefinesAndMacros.h --- a/project_files/HedgewarsMobile/Classes/DefinesAndMacros.h Sun Nov 18 01:06:01 2012 +0400 +++ b/project_files/HedgewarsMobile/Classes/DefinesAndMacros.h Fri Feb 22 05:05:32 2013 +0100 @@ -39,12 +39,12 @@ #define rotationManager(x) (IS_IPAD() ? YES : (x == UIInterfaceOrientationLandscapeRight) || (x == UIInterfaceOrientationLandscapeLeft)) #define START_TIMER() NSTimeInterval start = [NSDate timeIntervalSinceReferenceDate]; -#define END_TIMER(msg) NSTimeInterval stop = [NSDate timeIntervalSinceReferenceDate]; DLog([NSString stringWithFormat:@"%@ Time = %f", msg, stop-start]); +#define END_TIMER(msg) NSTimeInterval stop = [NSDate timeIntervalSinceReferenceDate]; DLog([NSString stringWithFormat:@"%@ Time = %f", msg, stop-start]); #define DOCUMENTS_FOLDER() [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex:0] -#define DEBUG_FILE() [DOCUMENTS_FOLDER() stringByAppendingString:@"/hw-game.log"] +#define DEBUG_FILE() [DOCUMENTS_FOLDER() stringByAppendingString:@"/Logs/game0.log"] #define BASICFLAGS_FILE() [[[NSBundle mainBundle] resourcePath] stringByAppendingString:@"/basicFlags.plist"] #define GAMEMODS_FILE() [[[NSBundle mainBundle] resourcePath] stringByAppendingString:@"/gameMods.plist"] #define CREDITS_FILE() [[[NSBundle mainBundle] resourcePath] stringByAppendingString:@"/credits.plist"] diff -r d5d5e1698554 -r 1dedcc37bfe8 project_files/HedgewarsMobile/Classes/FlagsViewController.m --- a/project_files/HedgewarsMobile/Classes/FlagsViewController.m Sun Nov 18 01:06:01 2012 +0400 +++ b/project_files/HedgewarsMobile/Classes/FlagsViewController.m Fri Feb 22 05:05:32 2013 +0100 @@ -35,7 +35,7 @@ NSMutableArray *array_na = [[NSMutableArray alloc] init]; NSMutableArray *array_cm = [[NSMutableArray alloc] init]; - + for (NSString *name in [[NSFileManager defaultManager] contentsOfDirectoryAtPath:FLAGS_DIRECTORY() error:NULL]) { if ([name hasPrefix:@"cm_"]) { NSString *processed = [name substringFromIndex:3]; @@ -43,7 +43,7 @@ } else [array_na addObject:name]; } - + self.flagArray = array_na; [array_na release]; self.communityArray = array_cm; @@ -135,14 +135,14 @@ int oldRow = (lastIndexPath != nil) ? [lastIndexPath row] : -1; int newSection = [indexPath section]; int oldSection = (lastIndexPath != nil) ? [lastIndexPath section] : -1; - + if (newRow != oldRow || newSection != oldSection) { NSString *flag = nil; if ([indexPath section] == 0) flag = [self.flagArray objectAtIndex:newRow]; else flag = [NSString stringWithFormat:@"cm_%@",[self.communityArray objectAtIndex:newRow]]; - + // if the two selected rows differ update data on the hog dictionary and reload table content [self.teamDictionary setValue:[flag stringByDeletingPathExtension] forKey:@"flag"]; diff -r d5d5e1698554 -r 1dedcc37bfe8 project_files/HedgewarsMobile/Classes/GameConfigViewController.m --- a/project_files/HedgewarsMobile/Classes/GameConfigViewController.m Sun Nov 18 01:06:01 2012 +0400 +++ b/project_files/HedgewarsMobile/Classes/GameConfigViewController.m Fri Feb 22 05:05:32 2013 +0100 @@ -62,7 +62,7 @@ } } [self startGame:theButton]; - + break; case 2: [[AudioManagerController mainManager] playClickSound]; diff -r d5d5e1698554 -r 1dedcc37bfe8 project_files/HedgewarsMobile/Classes/GameInterfaceBridge.m --- a/project_files/HedgewarsMobile/Classes/GameInterfaceBridge.m Sun Nov 18 01:06:01 2012 +0400 +++ b/project_files/HedgewarsMobile/Classes/GameInterfaceBridge.m Fri Feb 22 05:05:32 2013 +0100 @@ -96,7 +96,6 @@ // main routine for calling the actual game engine -(void) engineLaunch { - const char *gameArgs[11]; CGFloat width, height; CGFloat screenScale = [[UIScreen mainScreen] safeScale]; NSString *ipcString = [[NSString alloc] initWithFormat:@"%d",self.port]; @@ -127,34 +126,64 @@ // disable tooltips on iPhone if (IS_IPAD() == NO) tmpQuality = tmpQuality | 0x00000400; - - // prevents using an empty nickname - NSString *username = [settings objectForKey:@"username"]; - if ([username length] == 0) - username = [NSString stringWithFormat:@"MobileUser-%@",ipcString]; + NSString *rawQuality = [NSString stringWithFormat:@"%d",tmpQuality]; + NSString *documentsDirectory = DOCUMENTS_FOLDER(); - gameArgs[ 0] = [ipcString UTF8String]; //ipcPort - gameArgs[ 1] = [horizontalSize UTF8String]; //cScreenWidth - gameArgs[ 2] = [verticalSize UTF8String]; //cScreenHeight - gameArgs[ 3] = [[NSString stringWithFormat:@"%d",tmpQuality] UTF8String]; //quality - gameArgs[ 4] = [localeString UTF8String]; //cLocaleFName - gameArgs[ 5] = [username UTF8String]; //UserNick - gameArgs[ 6] = [[[settings objectForKey:@"sound"] stringValue] UTF8String]; //isSoundEnabled - gameArgs[ 7] = [[[settings objectForKey:@"music"] stringValue] UTF8String]; //isMusicEnabled - gameArgs[ 8] = [[[settings objectForKey:@"alternate"] stringValue] UTF8String]; //cAltDamage - gameArgs[ 9] = [resourcePath UTF8String]; //PathPrefix - gameArgs[10] = ([HWUtils gameType] == gtSave) ? [self.savePath UTF8String] : NULL; //recordFileName - + NSMutableArray *gameParameters = [[NSMutableArray alloc] initWithObjects: + @"--internal", + @"--port", ipcString, + @"--width", horizontalSize, + @"--height", verticalSize, + @"--raw-quality", rawQuality, + @"--locale", localeString, + @"--prefix", resourcePath, + @"--user-prefix", documentsDirectory, + nil]; [verticalSize release]; [horizontalSize release]; [resourcePath release]; [localeString release]; [ipcString release]; + NSString *username = [settings objectForKey:@"username"]; + if ([username length] > 0) { + [gameParameters addObject:@"--nick"]; + [gameParameters addObject: username]; + } + + if ([[settings objectForKey:@"sound"] boolValue] == NO) + [gameParameters addObject:@"--nosound"]; + + if ([[settings objectForKey:@"music"] boolValue] == NO) + [gameParameters addObject:@"--nomusic"]; + + if([[settings objectForKey:@"alternate"] boolValue] == YES) + [gameParameters addObject:@"--altdmg"]; + +#ifdef DEBUG + [gameParameters addObject:@"--showfps"]; +#endif + + if ([HWUtils gameType] == gtSave) + [gameParameters addObject:self.savePath]; + [HWUtils setGameStatus:gsLoading]; + int argc = [gameParameters count]; + const char **argv = (const char **)malloc(sizeof(const char*)*argc); + for (int i = 0; i < argc; i++) + argv[i] = strdup([[gameParameters objectAtIndex:i] UTF8String]); + [gameParameters release]; + // this is the pascal function that starts the game - Game(gameArgs); + Game(argc, argv); + + // cleanup + for (int i = 0; i < argc; i++) + free((void *)argv[i]); + free(argv); + + // moar cleanup [self lateEngineLaunch]; } diff -r d5d5e1698554 -r 1dedcc37bfe8 project_files/HedgewarsMobile/Classes/GeneralSettingsViewController.m --- a/project_files/HedgewarsMobile/Classes/GeneralSettingsViewController.m Sun Nov 18 01:06:01 2012 +0400 +++ b/project_files/HedgewarsMobile/Classes/GeneralSettingsViewController.m Fri Feb 22 05:05:32 2013 +0100 @@ -51,30 +51,14 @@ #pragma mark - -(void) switchValueChanged:(id) sender { UISwitch *theSwitch = (UISwitch *)sender; - UISwitch *theOtherSwitch = nil; NSUserDefaults *settings = [NSUserDefaults standardUserDefaults]; switch (theSwitch.tag) { case 10: //soundSwitch - // setting this off will turn off also the switch below (music) [settings setObject:[NSNumber numberWithBool:theSwitch.on] forKey:@"sound"]; - [settings setObject:[NSNumber numberWithBool:NO] forKey:@"music"]; - theOtherSwitch = (UISwitch *)[self.tableView cellForRowAtIndexPath:[NSIndexPath indexPathForRow:1 inSection:1]].accessoryView; - [theOtherSwitch setOn:NO animated:YES]; - - // since switching sound on won't turn music on anyways, we can always turn off music - [[AudioManagerController mainManager]pauseBackgroundMusic]; - [settings setObject:[NSNumber numberWithBool:NO] forKey:@"music"]; break; case 20: //musicSwitch - // if switch above (sound) is off, never turn on - if (NO == [[settings objectForKey:@"sound"] boolValue]) { - [settings setObject:[NSNumber numberWithBool:NO] forKey:@"music"]; - theOtherSwitch = (UISwitch *)[self.tableView cellForRowAtIndexPath:[NSIndexPath indexPathForRow:1 inSection:1]].accessoryView; - [theOtherSwitch setOn:NO animated:YES]; - } else - [settings setObject:[NSNumber numberWithBool:theSwitch.on] forKey:@"music"]; - + [settings setObject:[NSNumber numberWithBool:theSwitch.on] forKey:@"music"]; if (theSwitch.on) [[AudioManagerController mainManager] playBackgroundMusic]; else @@ -165,7 +149,7 @@ editableCell.textField.font = [UIFont systemFontOfSize:[UIFont systemFontSize]]; editableCell.textField.textColor = [UIColor blackColor]; } - + if (row == 0) { editableCell.titleLabel.text = NSLocalizedString(@"Nickname","from the settings table"); editableCell.textField.placeholder = NSLocalizedString(@"Insert your username (if you have one)",@"from the settings table"); @@ -179,7 +163,7 @@ editableCell.textField.secureTextEntry = YES; editableCell.tag = 50; } - + editableCell.accessoryView = nil; cell = editableCell; break; @@ -192,10 +176,10 @@ cell.accessoryView = theSwitch; [theSwitch release]; } - + switchContent = (UISwitch *)cell.accessoryView; if (row == 0) { - cell.textLabel.text = NSLocalizedString(@"Sound", @"from the settings table"); + cell.textLabel.text = NSLocalizedString(@"Sound Effects", @"from the settings table"); switchContent.on = [[settings objectForKey:@"sound"] boolValue]; switchContent.tag = 10; } else { @@ -213,7 +197,7 @@ cell.accessoryView = theSwitch; [theSwitch release]; } - + switchContent = (UISwitch *)cell.accessoryView; cell.detailTextLabel.adjustsFontSizeToFitWidth = YES; switch (row) { @@ -237,7 +221,7 @@ default: break; } - + cell.accessoryType = UITableViewCellAccessoryNone; cell.selectionStyle = UITableViewCellSelectionStyleNone; cell.imageView.image = nil; diff -r d5d5e1698554 -r 1dedcc37bfe8 project_files/HedgewarsMobile/Classes/HoldTableViewCell.m --- a/project_files/HedgewarsMobile/Classes/HoldTableViewCell.m Sun Nov 18 01:06:01 2012 +0400 +++ b/project_files/HedgewarsMobile/Classes/HoldTableViewCell.m Fri Feb 22 05:05:32 2013 +0100 @@ -35,8 +35,8 @@ -(void) touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { UITouch *touch = [[event allTouches] anyObject]; - - time = touch.timestamp; + + time = touch.timestamp; [self performSelector:@selector(holdAction) withObject:nil afterDelay:0.25]; [super touchesBegan:touches withEvent:event]; @@ -44,12 +44,12 @@ -(void) touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event { UITouch *touch = [[event allTouches] anyObject]; - + if ( touch.timestamp - time < 0.25 ) { [NSObject cancelPreviousPerformRequestsWithTarget:self selector:@selector(holdAction) object:nil]; - + [super touchesEnded:touches withEvent:event]; } else [super touchesCancelled:touches withEvent:event]; diff -r d5d5e1698554 -r 1dedcc37bfe8 project_files/HedgewarsMobile/Classes/LevelViewController.h --- a/project_files/HedgewarsMobile/Classes/LevelViewController.h Sun Nov 18 01:06:01 2012 +0400 +++ b/project_files/HedgewarsMobile/Classes/LevelViewController.h Fri Feb 22 05:05:32 2013 +0100 @@ -26,7 +26,7 @@ NSArray *levelArray; NSArray *levelSprites; NSIndexPath *lastIndexPath; - + NSInteger numberOfSections; } diff -r d5d5e1698554 -r 1dedcc37bfe8 project_files/HedgewarsMobile/Classes/LevelViewController.m --- a/project_files/HedgewarsMobile/Classes/LevelViewController.m Sun Nov 18 01:06:01 2012 +0400 +++ b/project_files/HedgewarsMobile/Classes/LevelViewController.m Fri Feb 22 05:05:32 2013 +0100 @@ -48,19 +48,19 @@ -(void) viewWillAppear:(BOOL)animated { [super viewWillAppear:animated]; - + if ([[[[self.teamDictionary objectForKey:@"hedgehogs"] objectAtIndex:0] objectForKey:@"level"] intValue] == 0) numberOfSections = 1; else numberOfSections = 2; - + [self.tableView reloadData]; // this moves the tableview to the top [self.tableView setContentOffset:CGPointMake(0,0) animated:NO]; } -(void) viewWillDisappear:(BOOL)animated { - // stuff like checking that at least 1 field was selected + // stuff like checking that at least 1 field was selected } #pragma mark - @@ -84,7 +84,7 @@ NSInteger row = [indexPath row]; NSInteger section = [indexPath section]; UITableViewCell *cell; - + if (section == 0) { cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier0]; if (cell == nil) { @@ -104,7 +104,7 @@ cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier1]; if (cell == nil) cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier1] autorelease]; - + cell.textLabel.text = [levelArray objectAtIndex:row]; NSDictionary *hog = [[self.teamDictionary objectForKey:@"hedgehogs"] objectAtIndex:0]; if ([[hog objectForKey:@"level"] intValue] == row+1) { @@ -113,14 +113,14 @@ } else { cell.accessoryType = UITableViewCellAccessoryNone; } - + NSString *botlevelPath = [[NSString alloc] initWithFormat:@"%@/bot%d.png",[[NSBundle mainBundle] resourcePath],row+1]; UIImage *levelImage = [[UIImage alloc] initWithContentsOfFile:botlevelPath]; [botlevelPath release]; cell.imageView.image = levelImage; [levelImage release]; } - + return cell; } @@ -129,7 +129,7 @@ NSIndexSet *sections = [[NSIndexSet alloc] initWithIndex:1]; NSMutableArray *hogs = [self.teamDictionary objectForKey:@"hedgehogs"]; NSInteger level; - + if (theSwitch.on) { numberOfSections = 2; [self.tableView insertSections:sections withRowAnimation:UITableViewRowAnimationFade]; @@ -156,19 +156,19 @@ int newRow = [indexPath row]; int oldRow = (self.lastIndexPath != nil) ? [self.lastIndexPath row] : -1; - if ([indexPath section] != 0) { + if ([indexPath section] != 0) { if (newRow != oldRow) { NSMutableArray *hogs = [self.teamDictionary objectForKey:@"hedgehogs"]; - + NSInteger level = newRow + 1; for (NSMutableDictionary *hog in hogs) [hog setObject:[NSNumber numberWithInt:level] forKey:@"level"]; DLog(@"New level is %d",level); - + // tell our boss to write this new stuff on disk [[NSNotificationCenter defaultCenter] postNotificationName:@"setWriteNeedTeams" object:nil]; [self.tableView reloadData]; - + self.lastIndexPath = indexPath; [self.tableView selectRowAtIndexPath:indexPath animated:YES scrollPosition:UITableViewScrollPositionNone]; } diff -r d5d5e1698554 -r 1dedcc37bfe8 project_files/HedgewarsMobile/Classes/MGSplitViewController/MGSplitCornersView.h --- a/project_files/HedgewarsMobile/Classes/MGSplitViewController/MGSplitCornersView.h Sun Nov 18 01:06:01 2012 +0400 +++ b/project_files/HedgewarsMobile/Classes/MGSplitViewController/MGSplitCornersView.h Fri Feb 22 05:05:32 2013 +0100 @@ -9,18 +9,18 @@ #import typedef enum _MGCornersPosition { - MGCornersPositionLeadingVertical = 0, // top of screen for a left/right split. - MGCornersPositionTrailingVertical = 1, // bottom of screen for a left/right split. - MGCornersPositionLeadingHorizontal = 2, // left of screen for a top/bottom split. - MGCornersPositionTrailingHorizontal = 3 // right of screen for a top/bottom split. + MGCornersPositionLeadingVertical = 0, // top of screen for a left/right split. + MGCornersPositionTrailingVertical = 1, // bottom of screen for a left/right split. + MGCornersPositionLeadingHorizontal = 2, // left of screen for a top/bottom split. + MGCornersPositionTrailingHorizontal = 3 // right of screen for a top/bottom split. } MGCornersPosition; @class MGSplitViewController; @interface MGSplitCornersView : UIView { - float cornerRadius; - MGSplitViewController *splitViewController; - MGCornersPosition cornersPosition; - UIColor *cornerBackgroundColor; + float cornerRadius; + MGSplitViewController *splitViewController; + MGCornersPosition cornersPosition; + UIColor *cornerBackgroundColor; } @property (nonatomic, assign) float cornerRadius; diff -r d5d5e1698554 -r 1dedcc37bfe8 project_files/HedgewarsMobile/Classes/MGSplitViewController/MGSplitCornersView.m --- a/project_files/HedgewarsMobile/Classes/MGSplitViewController/MGSplitCornersView.m Sun Nov 18 01:06:01 2012 +0400 +++ b/project_files/HedgewarsMobile/Classes/MGSplitViewController/MGSplitCornersView.m Fri Feb 22 05:05:32 2013 +0100 @@ -19,23 +19,23 @@ - (id)initWithFrame:(CGRect)frame { if ((self = [super initWithFrame:frame])) { - self.contentMode = UIViewContentModeRedraw; - self.userInteractionEnabled = NO; - self.opaque = NO; - self.backgroundColor = [UIColor clearColor]; - cornerRadius = 0.0; // actual value is set by the splitViewController. - cornersPosition = MGCornersPositionLeadingVertical; + self.contentMode = UIViewContentModeRedraw; + self.userInteractionEnabled = NO; + self.opaque = NO; + self.backgroundColor = [UIColor clearColor]; + cornerRadius = 0.0; // actual value is set by the splitViewController. + cornersPosition = MGCornersPositionLeadingVertical; } - + return self; } - (void)dealloc { - self.cornerBackgroundColor = nil; - - [super dealloc]; + self.cornerBackgroundColor = nil; + + [super dealloc]; } @@ -45,131 +45,131 @@ - (void)drawRect:(CGRect)rect { - // Draw two appropriate corners, with cornerBackgroundColor behind them. - if (cornerRadius > 0) { - if (NO) { // just for debugging. - [[UIColor redColor] set]; - UIRectFill(self.bounds); - } - - float maxX = CGRectGetMaxX(self.bounds); - float maxY = CGRectGetMaxY(self.bounds); - UIBezierPath *path = [UIBezierPath bezierPath]; - CGPoint pt = CGPointZero; - switch (cornersPosition) { - case MGCornersPositionLeadingVertical: // top of screen for a left/right split - [path moveToPoint:pt]; - pt.y += cornerRadius; - [path appendPath:[UIBezierPath bezierPathWithArcCenter:pt radius:cornerRadius startAngle:degreesToRadians(90) endAngle:0 clockwise:YES]]; - pt.x += cornerRadius; - pt.y -= cornerRadius; - [path addLineToPoint:pt]; - [path addLineToPoint:CGPointZero]; - [path closePath]; - - pt.x = maxX - cornerRadius; - pt.y = 0; - [path moveToPoint:pt]; - pt.y = maxY; - [path addLineToPoint:pt]; - pt.x += cornerRadius; - [path appendPath:[UIBezierPath bezierPathWithArcCenter:pt radius:cornerRadius startAngle:degreesToRadians(180) endAngle:degreesToRadians(90) clockwise:YES]]; - pt.y -= cornerRadius; - [path addLineToPoint:pt]; - pt.x -= cornerRadius; - [path addLineToPoint:pt]; - [path closePath]; - - break; - - case MGCornersPositionTrailingVertical: // bottom of screen for a left/right split - pt.y = maxY; - [path moveToPoint:pt]; - pt.y -= cornerRadius; - [path appendPath:[UIBezierPath bezierPathWithArcCenter:pt radius:cornerRadius startAngle:degreesToRadians(270) endAngle:degreesToRadians(360) clockwise:NO]]; - pt.x += cornerRadius; - pt.y += cornerRadius; - [path addLineToPoint:pt]; - pt.x -= cornerRadius; - [path addLineToPoint:pt]; - [path closePath]; - - pt.x = maxX - cornerRadius; - pt.y = maxY; - [path moveToPoint:pt]; - pt.y -= cornerRadius; - [path addLineToPoint:pt]; - pt.x += cornerRadius; - [path appendPath:[UIBezierPath bezierPathWithArcCenter:pt radius:cornerRadius startAngle:degreesToRadians(180) endAngle:degreesToRadians(270) clockwise:NO]]; - pt.y += cornerRadius; - [path addLineToPoint:pt]; - pt.x -= cornerRadius; - [path addLineToPoint:pt]; - [path closePath]; - - break; - - case MGCornersPositionLeadingHorizontal: // left of screen for a top/bottom split - pt.x = 0; - pt.y = cornerRadius; - [path moveToPoint:pt]; - pt.y -= cornerRadius; - [path addLineToPoint:pt]; - pt.x += cornerRadius; - [path appendPath:[UIBezierPath bezierPathWithArcCenter:pt radius:cornerRadius startAngle:degreesToRadians(180) endAngle:degreesToRadians(270) clockwise:NO]]; - pt.y += cornerRadius; - [path addLineToPoint:pt]; - pt.x -= cornerRadius; - [path addLineToPoint:pt]; - [path closePath]; - - pt.x = 0; - pt.y = maxY - cornerRadius; - [path moveToPoint:pt]; - pt.y = maxY; - [path addLineToPoint:pt]; - pt.x += cornerRadius; - [path appendPath:[UIBezierPath bezierPathWithArcCenter:pt radius:cornerRadius startAngle:degreesToRadians(180) endAngle:degreesToRadians(90) clockwise:YES]]; - pt.y -= cornerRadius; - [path addLineToPoint:pt]; - pt.x -= cornerRadius; - [path addLineToPoint:pt]; - [path closePath]; - - break; - - case MGCornersPositionTrailingHorizontal: // right of screen for a top/bottom split - pt.y = cornerRadius; - [path moveToPoint:pt]; - pt.y -= cornerRadius; - [path appendPath:[UIBezierPath bezierPathWithArcCenter:pt radius:cornerRadius startAngle:degreesToRadians(270) endAngle:degreesToRadians(360) clockwise:NO]]; - pt.x += cornerRadius; - pt.y += cornerRadius; - [path addLineToPoint:pt]; - pt.x -= cornerRadius; - [path addLineToPoint:pt]; - [path closePath]; - - pt.y = maxY - cornerRadius; - [path moveToPoint:pt]; - pt.y += cornerRadius; - [path appendPath:[UIBezierPath bezierPathWithArcCenter:pt radius:cornerRadius startAngle:degreesToRadians(90) endAngle:0 clockwise:YES]]; - pt.x += cornerRadius; - pt.y -= cornerRadius; - [path addLineToPoint:pt]; - pt.x -= cornerRadius; - [path addLineToPoint:pt]; - [path closePath]; - - break; - - default: - break; - } - - [self.cornerBackgroundColor set]; - [path fill]; - } + // Draw two appropriate corners, with cornerBackgroundColor behind them. + if (cornerRadius > 0) { + if (NO) { // just for debugging. + [[UIColor redColor] set]; + UIRectFill(self.bounds); + } + + float maxX = CGRectGetMaxX(self.bounds); + float maxY = CGRectGetMaxY(self.bounds); + UIBezierPath *path = [UIBezierPath bezierPath]; + CGPoint pt = CGPointZero; + switch (cornersPosition) { + case MGCornersPositionLeadingVertical: // top of screen for a left/right split + [path moveToPoint:pt]; + pt.y += cornerRadius; + [path appendPath:[UIBezierPath bezierPathWithArcCenter:pt radius:cornerRadius startAngle:degreesToRadians(90) endAngle:0 clockwise:YES]]; + pt.x += cornerRadius; + pt.y -= cornerRadius; + [path addLineToPoint:pt]; + [path addLineToPoint:CGPointZero]; + [path closePath]; + + pt.x = maxX - cornerRadius; + pt.y = 0; + [path moveToPoint:pt]; + pt.y = maxY; + [path addLineToPoint:pt]; + pt.x += cornerRadius; + [path appendPath:[UIBezierPath bezierPathWithArcCenter:pt radius:cornerRadius startAngle:degreesToRadians(180) endAngle:degreesToRadians(90) clockwise:YES]]; + pt.y -= cornerRadius; + [path addLineToPoint:pt]; + pt.x -= cornerRadius; + [path addLineToPoint:pt]; + [path closePath]; + + break; + + case MGCornersPositionTrailingVertical: // bottom of screen for a left/right split + pt.y = maxY; + [path moveToPoint:pt]; + pt.y -= cornerRadius; + [path appendPath:[UIBezierPath bezierPathWithArcCenter:pt radius:cornerRadius startAngle:degreesToRadians(270) endAngle:degreesToRadians(360) clockwise:NO]]; + pt.x += cornerRadius; + pt.y += cornerRadius; + [path addLineToPoint:pt]; + pt.x -= cornerRadius; + [path addLineToPoint:pt]; + [path closePath]; + + pt.x = maxX - cornerRadius; + pt.y = maxY; + [path moveToPoint:pt]; + pt.y -= cornerRadius; + [path addLineToPoint:pt]; + pt.x += cornerRadius; + [path appendPath:[UIBezierPath bezierPathWithArcCenter:pt radius:cornerRadius startAngle:degreesToRadians(180) endAngle:degreesToRadians(270) clockwise:NO]]; + pt.y += cornerRadius; + [path addLineToPoint:pt]; + pt.x -= cornerRadius; + [path addLineToPoint:pt]; + [path closePath]; + + break; + + case MGCornersPositionLeadingHorizontal: // left of screen for a top/bottom split + pt.x = 0; + pt.y = cornerRadius; + [path moveToPoint:pt]; + pt.y -= cornerRadius; + [path addLineToPoint:pt]; + pt.x += cornerRadius; + [path appendPath:[UIBezierPath bezierPathWithArcCenter:pt radius:cornerRadius startAngle:degreesToRadians(180) endAngle:degreesToRadians(270) clockwise:NO]]; + pt.y += cornerRadius; + [path addLineToPoint:pt]; + pt.x -= cornerRadius; + [path addLineToPoint:pt]; + [path closePath]; + + pt.x = 0; + pt.y = maxY - cornerRadius; + [path moveToPoint:pt]; + pt.y = maxY; + [path addLineToPoint:pt]; + pt.x += cornerRadius; + [path appendPath:[UIBezierPath bezierPathWithArcCenter:pt radius:cornerRadius startAngle:degreesToRadians(180) endAngle:degreesToRadians(90) clockwise:YES]]; + pt.y -= cornerRadius; + [path addLineToPoint:pt]; + pt.x -= cornerRadius; + [path addLineToPoint:pt]; + [path closePath]; + + break; + + case MGCornersPositionTrailingHorizontal: // right of screen for a top/bottom split + pt.y = cornerRadius; + [path moveToPoint:pt]; + pt.y -= cornerRadius; + [path appendPath:[UIBezierPath bezierPathWithArcCenter:pt radius:cornerRadius startAngle:degreesToRadians(270) endAngle:degreesToRadians(360) clockwise:NO]]; + pt.x += cornerRadius; + pt.y += cornerRadius; + [path addLineToPoint:pt]; + pt.x -= cornerRadius; + [path addLineToPoint:pt]; + [path closePath]; + + pt.y = maxY - cornerRadius; + [path moveToPoint:pt]; + pt.y += cornerRadius; + [path appendPath:[UIBezierPath bezierPathWithArcCenter:pt radius:cornerRadius startAngle:degreesToRadians(90) endAngle:0 clockwise:YES]]; + pt.x += cornerRadius; + pt.y -= cornerRadius; + [path addLineToPoint:pt]; + pt.x -= cornerRadius; + [path addLineToPoint:pt]; + [path closePath]; + + break; + + default: + break; + } + + [self.cornerBackgroundColor set]; + [path fill]; + } } @@ -179,38 +179,38 @@ - (void)setCornerRadius:(float)newRadius { - if (newRadius != cornerRadius) { - cornerRadius = newRadius; - [self setNeedsDisplay]; - } + if (newRadius != cornerRadius) { + cornerRadius = newRadius; + [self setNeedsDisplay]; + } } - (void)setSplitViewController:(MGSplitViewController *)theController { - if (theController != splitViewController) { - splitViewController = theController; - [self setNeedsDisplay]; - } + if (theController != splitViewController) { + splitViewController = theController; + [self setNeedsDisplay]; + } } - (void)setCornersPosition:(MGCornersPosition)posn { - if (cornersPosition != posn) { - cornersPosition = posn; - [self setNeedsDisplay]; - } + if (cornersPosition != posn) { + cornersPosition = posn; + [self setNeedsDisplay]; + } } - (void)setCornerBackgroundColor:(UIColor *)color { - if (color != cornerBackgroundColor) { - [cornerBackgroundColor release]; - cornerBackgroundColor = [color retain]; - [self setNeedsDisplay]; - } + if (color != cornerBackgroundColor) { + [cornerBackgroundColor release]; + cornerBackgroundColor = [color retain]; + [self setNeedsDisplay]; + } } diff -r d5d5e1698554 -r 1dedcc37bfe8 project_files/HedgewarsMobile/Classes/MGSplitViewController/MGSplitDividerView.h --- a/project_files/HedgewarsMobile/Classes/MGSplitViewController/MGSplitDividerView.h Sun Nov 18 01:06:01 2012 +0400 +++ b/project_files/HedgewarsMobile/Classes/MGSplitViewController/MGSplitDividerView.h Fri Feb 22 05:05:32 2013 +0100 @@ -10,8 +10,8 @@ @class MGSplitViewController; @interface MGSplitDividerView : UIView { - MGSplitViewController *splitViewController; - BOOL allowsDragging; + MGSplitViewController *splitViewController; + BOOL allowsDragging; } @property (nonatomic, assign) MGSplitViewController *splitViewController; // weak ref. diff -r d5d5e1698554 -r 1dedcc37bfe8 project_files/HedgewarsMobile/Classes/MGSplitViewController/MGSplitDividerView.m --- a/project_files/HedgewarsMobile/Classes/MGSplitViewController/MGSplitDividerView.m Sun Nov 18 01:06:01 2012 +0400 +++ b/project_files/HedgewarsMobile/Classes/MGSplitViewController/MGSplitDividerView.m Fri Feb 22 05:05:32 2013 +0100 @@ -19,19 +19,19 @@ - (id)initWithFrame:(CGRect)frame { - if ((self = [super initWithFrame:frame])) { - self.userInteractionEnabled = NO; - self.allowsDragging = NO; - self.contentMode = UIViewContentModeRedraw; - } - return self; + if ((self = [super initWithFrame:frame])) { + self.userInteractionEnabled = NO; + self.allowsDragging = NO; + self.contentMode = UIViewContentModeRedraw; + } + return self; } - (void)dealloc { - self.splitViewController = nil; - [super dealloc]; + self.splitViewController = nil; + [super dealloc]; } @@ -41,139 +41,139 @@ - (void)drawRect:(CGRect)rect { - if (splitViewController.dividerStyle == MGSplitViewDividerStyleThin) { - [super drawRect:rect]; - - } else if (splitViewController.dividerStyle == MGSplitViewDividerStylePaneSplitter) { - // Draw gradient background. - CGRect bounds = self.bounds; - CGColorSpaceRef rgb = CGColorSpaceCreateDeviceRGB(); - CGFloat locations[2] = {0, 1}; - CGFloat components[8] = { 0.988, 0.988, 0.988, 1.0, // light - 0.875, 0.875, 0.875, 1.0 };// dark - CGGradientRef gradient = CGGradientCreateWithColorComponents (rgb, components, locations, 2); - CGContextRef context = UIGraphicsGetCurrentContext(); - CGPoint start, end; - if (splitViewController.vertical) { - // Light left to dark right. - start = CGPointMake(CGRectGetMinX(bounds), CGRectGetMidY(bounds)); - end = CGPointMake(CGRectGetMaxX(bounds), CGRectGetMidY(bounds)); - } else { - // Light top to dark bottom. - start = CGPointMake(CGRectGetMidX(bounds), CGRectGetMinY(bounds)); - end = CGPointMake(CGRectGetMidX(bounds), CGRectGetMaxY(bounds)); - } - CGContextDrawLinearGradient(context, gradient, start, end, 0); - CGColorSpaceRelease(rgb); - CGGradientRelease(gradient); - - // Draw borders. - float borderThickness = 1.0; - [[UIColor colorWithWhite:0.7 alpha:1.0] set]; - CGRect borderRect = bounds; - if (splitViewController.vertical) { - borderRect.size.width = borderThickness; - UIRectFill(borderRect); - borderRect.origin.x = CGRectGetMaxX(bounds) - borderThickness; - UIRectFill(borderRect); - - } else { - borderRect.size.height = borderThickness; - UIRectFill(borderRect); - borderRect.origin.y = CGRectGetMaxY(bounds) - borderThickness; - UIRectFill(borderRect); - } - - // Draw grip. - [self drawGripThumbInRect:bounds]; - } + if (splitViewController.dividerStyle == MGSplitViewDividerStyleThin) { + [super drawRect:rect]; + + } else if (splitViewController.dividerStyle == MGSplitViewDividerStylePaneSplitter) { + // Draw gradient background. + CGRect bounds = self.bounds; + CGColorSpaceRef rgb = CGColorSpaceCreateDeviceRGB(); + CGFloat locations[2] = {0, 1}; + CGFloat components[8] = { 0.988, 0.988, 0.988, 1.0, // light + 0.875, 0.875, 0.875, 1.0 };// dark + CGGradientRef gradient = CGGradientCreateWithColorComponents (rgb, components, locations, 2); + CGContextRef context = UIGraphicsGetCurrentContext(); + CGPoint start, end; + if (splitViewController.vertical) { + // Light left to dark right. + start = CGPointMake(CGRectGetMinX(bounds), CGRectGetMidY(bounds)); + end = CGPointMake(CGRectGetMaxX(bounds), CGRectGetMidY(bounds)); + } else { + // Light top to dark bottom. + start = CGPointMake(CGRectGetMidX(bounds), CGRectGetMinY(bounds)); + end = CGPointMake(CGRectGetMidX(bounds), CGRectGetMaxY(bounds)); + } + CGContextDrawLinearGradient(context, gradient, start, end, 0); + CGColorSpaceRelease(rgb); + CGGradientRelease(gradient); + + // Draw borders. + float borderThickness = 1.0; + [[UIColor colorWithWhite:0.7 alpha:1.0] set]; + CGRect borderRect = bounds; + if (splitViewController.vertical) { + borderRect.size.width = borderThickness; + UIRectFill(borderRect); + borderRect.origin.x = CGRectGetMaxX(bounds) - borderThickness; + UIRectFill(borderRect); + + } else { + borderRect.size.height = borderThickness; + UIRectFill(borderRect); + borderRect.origin.y = CGRectGetMaxY(bounds) - borderThickness; + UIRectFill(borderRect); + } + + // Draw grip. + [self drawGripThumbInRect:bounds]; + } } - (void)drawGripThumbInRect:(CGRect)rect { - float width = 9.0; - float height; - if (splitViewController.vertical) { - height = 30.0; - } else { - height = width; - width = 30.0; - } - - // Draw grip in centred in rect. - CGRect gripRect = CGRectMake(0, 0, width, height); - gripRect.origin.x = ((rect.size.width - gripRect.size.width) / 2.0); - gripRect.origin.y = ((rect.size.height - gripRect.size.height) / 2.0); - - float stripThickness = 1.0; - UIColor *stripColor = [UIColor colorWithWhite:0.35 alpha:1.0]; - UIColor *lightColor = [UIColor colorWithWhite:1.0 alpha:1.0]; - float space = 3.0; - if (splitViewController.vertical) { - gripRect.size.width = stripThickness; - [stripColor set]; - UIRectFill(gripRect); - - gripRect.origin.x += stripThickness; - gripRect.origin.y += 1; - [lightColor set]; - UIRectFill(gripRect); - gripRect.origin.x -= stripThickness; - gripRect.origin.y -= 1; - - gripRect.origin.x += space + stripThickness; - [stripColor set]; - UIRectFill(gripRect); - - gripRect.origin.x += stripThickness; - gripRect.origin.y += 1; - [lightColor set]; - UIRectFill(gripRect); - gripRect.origin.x -= stripThickness; - gripRect.origin.y -= 1; - - gripRect.origin.x += space + stripThickness; - [stripColor set]; - UIRectFill(gripRect); - - gripRect.origin.x += stripThickness; - gripRect.origin.y += 1; - [lightColor set]; - UIRectFill(gripRect); - - } else { - gripRect.size.height = stripThickness; - [stripColor set]; - UIRectFill(gripRect); - - gripRect.origin.y += stripThickness; - gripRect.origin.x -= 1; - [lightColor set]; - UIRectFill(gripRect); - gripRect.origin.y -= stripThickness; - gripRect.origin.x += 1; - - gripRect.origin.y += space + stripThickness; - [stripColor set]; - UIRectFill(gripRect); - - gripRect.origin.y += stripThickness; - gripRect.origin.x -= 1; - [lightColor set]; - UIRectFill(gripRect); - gripRect.origin.y -= stripThickness; - gripRect.origin.x += 1; - - gripRect.origin.y += space + stripThickness; - [stripColor set]; - UIRectFill(gripRect); - - gripRect.origin.y += stripThickness; - gripRect.origin.x -= 1; - [lightColor set]; - UIRectFill(gripRect); - } + float width = 9.0; + float height; + if (splitViewController.vertical) { + height = 30.0; + } else { + height = width; + width = 30.0; + } + + // Draw grip in centred in rect. + CGRect gripRect = CGRectMake(0, 0, width, height); + gripRect.origin.x = ((rect.size.width - gripRect.size.width) / 2.0); + gripRect.origin.y = ((rect.size.height - gripRect.size.height) / 2.0); + + float stripThickness = 1.0; + UIColor *stripColor = [UIColor colorWithWhite:0.35 alpha:1.0]; + UIColor *lightColor = [UIColor colorWithWhite:1.0 alpha:1.0]; + float space = 3.0; + if (splitViewController.vertical) { + gripRect.size.width = stripThickness; + [stripColor set]; + UIRectFill(gripRect); + + gripRect.origin.x += stripThickness; + gripRect.origin.y += 1; + [lightColor set]; + UIRectFill(gripRect); + gripRect.origin.x -= stripThickness; + gripRect.origin.y -= 1; + + gripRect.origin.x += space + stripThickness; + [stripColor set]; + UIRectFill(gripRect); + + gripRect.origin.x += stripThickness; + gripRect.origin.y += 1; + [lightColor set]; + UIRectFill(gripRect); + gripRect.origin.x -= stripThickness; + gripRect.origin.y -= 1; + + gripRect.origin.x += space + stripThickness; + [stripColor set]; + UIRectFill(gripRect); + + gripRect.origin.x += stripThickness; + gripRect.origin.y += 1; + [lightColor set]; + UIRectFill(gripRect); + + } else { + gripRect.size.height = stripThickness; + [stripColor set]; + UIRectFill(gripRect); + + gripRect.origin.y += stripThickness; + gripRect.origin.x -= 1; + [lightColor set]; + UIRectFill(gripRect); + gripRect.origin.y -= stripThickness; + gripRect.origin.x += 1; + + gripRect.origin.y += space + stripThickness; + [stripColor set]; + UIRectFill(gripRect); + + gripRect.origin.y += stripThickness; + gripRect.origin.x -= 1; + [lightColor set]; + UIRectFill(gripRect); + gripRect.origin.y -= stripThickness; + gripRect.origin.x += 1; + + gripRect.origin.y += space + stripThickness; + [stripColor set]; + UIRectFill(gripRect); + + gripRect.origin.y += stripThickness; + gripRect.origin.x -= 1; + [lightColor set]; + UIRectFill(gripRect); + } } @@ -183,16 +183,16 @@ - (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event { - UITouch *touch = [touches anyObject]; - if (touch) { - CGPoint lastPt = [touch previousLocationInView:self]; - CGPoint pt = [touch locationInView:self]; - float offset = (splitViewController.vertical) ? pt.x - lastPt.x : pt.y - lastPt.y; - if (!splitViewController.masterBeforeDetail) { - offset = -offset; - } - splitViewController.splitPosition = splitViewController.splitPosition + offset; - } + UITouch *touch = [touches anyObject]; + if (touch) { + CGPoint lastPt = [touch previousLocationInView:self]; + CGPoint pt = [touch locationInView:self]; + float offset = (splitViewController.vertical) ? pt.x - lastPt.x : pt.y - lastPt.y; + if (!splitViewController.masterBeforeDetail) { + offset = -offset; + } + splitViewController.splitPosition = splitViewController.splitPosition + offset; + } } @@ -202,10 +202,10 @@ - (void)setAllowsDragging:(BOOL)flag { - if (flag != allowsDragging) { - allowsDragging = flag; - self.userInteractionEnabled = allowsDragging; - } + if (flag != allowsDragging) { + allowsDragging = flag; + self.userInteractionEnabled = allowsDragging; + } } diff -r d5d5e1698554 -r 1dedcc37bfe8 project_files/HedgewarsMobile/Classes/MGSplitViewController/MGSplitViewController.h --- a/project_files/HedgewarsMobile/Classes/MGSplitViewController/MGSplitViewController.h Sun Nov 18 01:06:01 2012 +0400 +++ b/project_files/HedgewarsMobile/Classes/MGSplitViewController/MGSplitViewController.h Fri Feb 22 05:05:32 2013 +0100 @@ -9,28 +9,28 @@ #import typedef enum _MGSplitViewDividerStyle { - // These names have been chosen to be conceptually similar to those of NSSplitView on Mac OS X. - MGSplitViewDividerStyleThin = 0, // Thin divider, like UISplitViewController (default). - MGSplitViewDividerStylePaneSplitter = 1 // Thick divider, drawn with a grey gradient and a grab-strip. + // These names have been chosen to be conceptually similar to those of NSSplitView on Mac OS X. + MGSplitViewDividerStyleThin = 0, // Thin divider, like UISplitViewController (default). + MGSplitViewDividerStylePaneSplitter = 1 // Thick divider, drawn with a grey gradient and a grab-strip. } MGSplitViewDividerStyle; @class MGSplitDividerView; @protocol MGSplitViewControllerDelegate; @interface MGSplitViewController : UIViewController { - BOOL _showsMasterInPortrait; - BOOL _showsMasterInLandscape; - float _splitWidth; - id _delegate; - BOOL _vertical; - BOOL _masterBeforeDetail; - NSMutableArray *_viewControllers; - UIBarButtonItem *_barButtonItem; // To be compliant with wacky UISplitViewController behaviour. + BOOL _showsMasterInPortrait; + BOOL _showsMasterInLandscape; + float _splitWidth; + id _delegate; + BOOL _vertical; + BOOL _masterBeforeDetail; + NSMutableArray *_viewControllers; + UIBarButtonItem *_barButtonItem; // To be compliant with wacky UISplitViewController behaviour. UIPopoverController *_hiddenPopoverController; // Popover used to hold the master view if it's not always visible. - MGSplitDividerView *_dividerView; // View that draws the divider between the master and detail views. - NSArray *_cornerViews; // Views to draw the inner rounded corners between master and detail views. - float _splitPosition; - BOOL _reconfigurePopup; - MGSplitViewDividerStyle _dividerStyle; // Meta-setting which configures several aspects of appearance and behaviour. + MGSplitDividerView *_dividerView; // View that draws the divider between the master and detail views. + NSArray *_cornerViews; // Views to draw the inner rounded corners between master and detail views. + float _splitPosition; + BOOL _reconfigurePopup; + MGSplitViewDividerStyle _dividerStyle; // Meta-setting which configures several aspects of appearance and behaviour. } @property (nonatomic, assign) IBOutlet id delegate; @@ -60,14 +60,14 @@ // Conveniences for you, because I care. - (BOOL)isShowingMaster; - (void)setSplitPosition:(float)posn animated:(BOOL)animate; // Allows for animation of splitPosition changes. The property's regular setter is not animated. -/* Note: splitPosition is the width (in a left/right split, or height in a top/bottom split) of the master view. - It is relative to the appropriate side of the splitView, which can be any of the four sides depending on the values in isMasterBeforeDetail and isVertical: - isVertical = YES, isMasterBeforeDetail = YES: splitPosition is relative to the LEFT edge. (Default) - isVertical = YES, isMasterBeforeDetail = NO: splitPosition is relative to the RIGHT edge. - isVertical = NO, isMasterBeforeDetail = YES: splitPosition is relative to the TOP edge. - isVertical = NO, isMasterBeforeDetail = NO: splitPosition is relative to the BOTTOM edge. +/* Note: splitPosition is the width (in a left/right split, or height in a top/bottom split) of the master view. + It is relative to the appropriate side of the splitView, which can be any of the four sides depending on the values in isMasterBeforeDetail and isVertical: + isVertical = YES, isMasterBeforeDetail = YES: splitPosition is relative to the LEFT edge. (Default) + isVertical = YES, isMasterBeforeDetail = NO: splitPosition is relative to the RIGHT edge. + isVertical = NO, isMasterBeforeDetail = YES: splitPosition is relative to the TOP edge. + isVertical = NO, isMasterBeforeDetail = NO: splitPosition is relative to the BOTTOM edge. - This implementation was chosen so you don't need to recalculate equivalent splitPositions if the user toggles masterBeforeDetail themselves. + This implementation was chosen so you don't need to recalculate equivalent splitPositions if the user toggles masterBeforeDetail themselves. */ - (void)setDividerStyle:(MGSplitViewDividerStyle)newStyle animated:(BOOL)animate; // Allows for animation of dividerStyle changes. The property's regular setter is not animated. - (NSArray *)cornerViews; @@ -76,8 +76,8 @@ The first view is the "leading" corners (top edge of screen for left/right split, left edge of screen for top/bottom split). The second view is the "trailing" corners (bottom edge of screen for left/right split, right edge of screen for top/bottom split). Do NOT modify them, except to: - 1. Change their .cornerBackgroundColor - 2. Change their .cornerRadius + 1. Change their .cornerBackgroundColor + 2. Change their .cornerRadius */ @end @@ -88,19 +88,19 @@ @optional // Called when a button should be added to a toolbar for a hidden view controller. -- (void)splitViewController:(MGSplitViewController*)svc - willHideViewController:(UIViewController *)aViewController - withBarButtonItem:(UIBarButtonItem*)barButtonItem - forPopoverController: (UIPopoverController*)pc; +- (void)splitViewController:(MGSplitViewController*)svc + willHideViewController:(UIViewController *)aViewController + withBarButtonItem:(UIBarButtonItem*)barButtonItem + forPopoverController: (UIPopoverController*)pc; // Called when the master view is shown again in the split view, invalidating the button and popover controller. -- (void)splitViewController:(MGSplitViewController*)svc - willShowViewController:(UIViewController *)aViewController +- (void)splitViewController:(MGSplitViewController*)svc + willShowViewController:(UIViewController *)aViewController invalidatingBarButtonItem:(UIBarButtonItem *)barButtonItem; // Called when the master view is shown in a popover, so the delegate can take action like hiding other popovers. -- (void)splitViewController:(MGSplitViewController*)svc - popoverController:(UIPopoverController*)pc +- (void)splitViewController:(MGSplitViewController*)svc + popoverController:(UIPopoverController*)pc willPresentViewController:(UIViewController *)aViewController; // Called when the split orientation will change (from vertical to horizontal, or vice versa). diff -r d5d5e1698554 -r 1dedcc37bfe8 project_files/HedgewarsMobile/Classes/MGSplitViewController/MGSplitViewController.m --- a/project_files/HedgewarsMobile/Classes/MGSplitViewController/MGSplitViewController.m Sun Nov 18 01:06:01 2012 +0400 +++ b/project_files/HedgewarsMobile/Classes/MGSplitViewController/MGSplitViewController.m Fri Feb 22 05:05:32 2013 +0100 @@ -10,18 +10,18 @@ #import "MGSplitDividerView.h" #import "MGSplitCornersView.h" -#define MG_DEFAULT_SPLIT_POSITION 320.0 // default width of master view in UISplitViewController. -#define MG_DEFAULT_SPLIT_WIDTH 1.0 // default width of split-gutter in UISplitViewController. -#define MG_DEFAULT_CORNER_RADIUS 5.0 // default corner-radius of overlapping split-inner corners on the master and detail views. -#define MG_DEFAULT_CORNER_COLOR [UIColor blackColor] // default color of intruding inner corners (and divider background). +#define MG_DEFAULT_SPLIT_POSITION 320.0 // default width of master view in UISplitViewController. +#define MG_DEFAULT_SPLIT_WIDTH 1.0 // default width of split-gutter in UISplitViewController. +#define MG_DEFAULT_CORNER_RADIUS 5.0 // default corner-radius of overlapping split-inner corners on the master and detail views. +#define MG_DEFAULT_CORNER_COLOR [UIColor blackColor] // default color of intruding inner corners (and divider background). -#define MG_PANESPLITTER_CORNER_RADIUS 0.0 // corner-radius of split-inner corners for MGSplitViewDividerStylePaneSplitter style. -#define MG_PANESPLITTER_SPLIT_WIDTH 25.0 // width of split-gutter for MGSplitViewDividerStylePaneSplitter style. +#define MG_PANESPLITTER_CORNER_RADIUS 0.0 // corner-radius of split-inner corners for MGSplitViewDividerStylePaneSplitter style. +#define MG_PANESPLITTER_SPLIT_WIDTH 25.0 // width of split-gutter for MGSplitViewDividerStylePaneSplitter style. -#define MG_MIN_VIEW_WIDTH 200.0 // minimum width a view is allowed to become as a result of changing the splitPosition. +#define MG_MIN_VIEW_WIDTH 200.0 // minimum width a view is allowed to become as a result of changing the splitPosition. -#define MG_ANIMATION_CHANGE_SPLIT_ORIENTATION @"ChangeSplitOrientation" // Animation ID for internal use. -#define MG_ANIMATION_CHANGE_SUBVIEWS_ORDER @"ChangeSubviewsOrder" // Animation ID for internal use. +#define MG_ANIMATION_CHANGE_SPLIT_ORIENTATION @"ChangeSplitOrientation" // Animation ID for internal use. +#define MG_ANIMATION_CHANGE_SUBVIEWS_ORDER @"ChangeSubviewsOrder" // Animation ID for internal use. @interface MGSplitViewController (MGPrivateMethods) @@ -48,50 +48,50 @@ - (NSString *)nameOfInterfaceOrientation:(UIInterfaceOrientation)theOrientation { - NSString *orientationName = nil; - switch (theOrientation) { - case UIInterfaceOrientationPortrait: - orientationName = @"Portrait"; // Home button at bottom - break; - case UIInterfaceOrientationPortraitUpsideDown: - orientationName = @"Portrait (Upside Down)"; // Home button at top - break; - case UIInterfaceOrientationLandscapeLeft: - orientationName = @"Landscape (Left)"; // Home button on left - break; - case UIInterfaceOrientationLandscapeRight: - orientationName = @"Landscape (Right)"; // Home button on right - break; - default: - break; - } - - return orientationName; + NSString *orientationName = nil; + switch (theOrientation) { + case UIInterfaceOrientationPortrait: + orientationName = @"Portrait"; // Home button at bottom + break; + case UIInterfaceOrientationPortraitUpsideDown: + orientationName = @"Portrait (Upside Down)"; // Home button at top + break; + case UIInterfaceOrientationLandscapeLeft: + orientationName = @"Landscape (Left)"; // Home button on left + break; + case UIInterfaceOrientationLandscapeRight: + orientationName = @"Landscape (Right)"; // Home button on right + break; + default: + break; + } + + return orientationName; } - (BOOL)isLandscape { - return UIInterfaceOrientationIsLandscape(self.interfaceOrientation); + return UIInterfaceOrientationIsLandscape(self.interfaceOrientation); } - (BOOL)shouldShowMasterForInterfaceOrientation:(UIInterfaceOrientation)theOrientation { - // Returns YES if master view should be shown directly embedded in the splitview, instead of hidden in a popover. - return ((UIInterfaceOrientationIsLandscape(theOrientation)) ? _showsMasterInLandscape : _showsMasterInPortrait); + // Returns YES if master view should be shown directly embedded in the splitview, instead of hidden in a popover. + return ((UIInterfaceOrientationIsLandscape(theOrientation)) ? _showsMasterInLandscape : _showsMasterInPortrait); } - (BOOL)shouldShowMaster { - return [self shouldShowMasterForInterfaceOrientation:self.interfaceOrientation]; + return [self shouldShowMasterForInterfaceOrientation:self.interfaceOrientation]; } - (BOOL)isShowingMaster { - return [self shouldShowMaster] && self.masterViewController && self.masterViewController.view && ([self.masterViewController.view superview] == self.view); + return [self shouldShowMaster] && self.masterViewController && self.masterViewController.view && ([self.masterViewController.view superview] == self.view); } @@ -101,61 +101,61 @@ - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { - if ((self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil])) { - [self setup]; - } - - return self; + if ((self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil])) { + [self setup]; + } + + return self; } - (id)initWithCoder:(NSCoder *)aDecoder { - if ((self = [super initWithCoder:aDecoder])) { - [self setup]; - } - - return self; + if ((self = [super initWithCoder:aDecoder])) { + [self setup]; + } + + return self; } - (void)setup { - // Configure default behaviour. - _viewControllers = [[NSMutableArray alloc] initWithObjects:[NSNull null], [NSNull null], nil]; - _splitWidth = MG_DEFAULT_SPLIT_WIDTH; - _showsMasterInPortrait = NO; - _showsMasterInLandscape = YES; - _reconfigurePopup = NO; - _vertical = YES; - _masterBeforeDetail = YES; - _splitPosition = MG_DEFAULT_SPLIT_POSITION; - CGRect divRect = self.view.bounds; - if ([self isVertical]) { - divRect.origin.y = _splitPosition; - divRect.size.height = _splitWidth; - } else { - divRect.origin.x = _splitPosition; - divRect.size.width = _splitWidth; - } - _dividerView = [[MGSplitDividerView alloc] initWithFrame:divRect]; - _dividerView.splitViewController = self; - _dividerView.backgroundColor = MG_DEFAULT_CORNER_COLOR; - _dividerStyle = MGSplitViewDividerStyleThin; + // Configure default behaviour. + _viewControllers = [[NSMutableArray alloc] initWithObjects:[NSNull null], [NSNull null], nil]; + _splitWidth = MG_DEFAULT_SPLIT_WIDTH; + _showsMasterInPortrait = NO; + _showsMasterInLandscape = YES; + _reconfigurePopup = NO; + _vertical = YES; + _masterBeforeDetail = YES; + _splitPosition = MG_DEFAULT_SPLIT_POSITION; + CGRect divRect = self.view.bounds; + if ([self isVertical]) { + divRect.origin.y = _splitPosition; + divRect.size.height = _splitWidth; + } else { + divRect.origin.x = _splitPosition; + divRect.size.width = _splitWidth; + } + _dividerView = [[MGSplitDividerView alloc] initWithFrame:divRect]; + _dividerView.splitViewController = self; + _dividerView.backgroundColor = MG_DEFAULT_CORNER_COLOR; + _dividerStyle = MGSplitViewDividerStyleThin; } - (void)dealloc { - _delegate = nil; - [self.view.subviews makeObjectsPerformSelector:@selector(removeFromSuperview)]; - [_viewControllers release]; - [_barButtonItem release]; - [_hiddenPopoverController release]; - [_dividerView release]; - [_cornerViews release]; - - [super dealloc]; + _delegate = nil; + [self.view.subviews makeObjectsPerformSelector:@selector(removeFromSuperview)]; + [_viewControllers release]; + [_barButtonItem release]; + [_hiddenPopoverController release]; + [_dividerView release]; + [_cornerViews release]; + + [super dealloc]; } @@ -171,371 +171,371 @@ - (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration { - [self.masterViewController willRotateToInterfaceOrientation:toInterfaceOrientation duration:duration]; - [self.detailViewController willRotateToInterfaceOrientation:toInterfaceOrientation duration:duration]; + [self.masterViewController willRotateToInterfaceOrientation:toInterfaceOrientation duration:duration]; + [self.detailViewController willRotateToInterfaceOrientation:toInterfaceOrientation duration:duration]; } - (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation { - [self.masterViewController didRotateFromInterfaceOrientation:fromInterfaceOrientation]; - [self.detailViewController didRotateFromInterfaceOrientation:fromInterfaceOrientation]; + [self.masterViewController didRotateFromInterfaceOrientation:fromInterfaceOrientation]; + [self.detailViewController didRotateFromInterfaceOrientation:fromInterfaceOrientation]; } -- (void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation - duration:(NSTimeInterval)duration +- (void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation + duration:(NSTimeInterval)duration { - [self.masterViewController willAnimateRotationToInterfaceOrientation:toInterfaceOrientation duration:duration]; - [self.detailViewController willAnimateRotationToInterfaceOrientation:toInterfaceOrientation duration:duration]; - - // Hide popover. - if (_hiddenPopoverController && _hiddenPopoverController.popoverVisible) { - [_hiddenPopoverController dismissPopoverAnimated:NO]; - } - - // Re-tile views. - _reconfigurePopup = YES; - [self layoutSubviewsForInterfaceOrientation:toInterfaceOrientation withAnimation:YES]; + [self.masterViewController willAnimateRotationToInterfaceOrientation:toInterfaceOrientation duration:duration]; + [self.detailViewController willAnimateRotationToInterfaceOrientation:toInterfaceOrientation duration:duration]; + + // Hide popover. + if (_hiddenPopoverController && _hiddenPopoverController.popoverVisible) { + [_hiddenPopoverController dismissPopoverAnimated:NO]; + } + + // Re-tile views. + _reconfigurePopup = YES; + [self layoutSubviewsForInterfaceOrientation:toInterfaceOrientation withAnimation:YES]; } - (void)willAnimateFirstHalfOfRotationToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration { - [self.masterViewController willAnimateFirstHalfOfRotationToInterfaceOrientation:toInterfaceOrientation duration:duration]; - [self.detailViewController willAnimateFirstHalfOfRotationToInterfaceOrientation:toInterfaceOrientation duration:duration]; + [self.masterViewController willAnimateFirstHalfOfRotationToInterfaceOrientation:toInterfaceOrientation duration:duration]; + [self.detailViewController willAnimateFirstHalfOfRotationToInterfaceOrientation:toInterfaceOrientation duration:duration]; } - (void)didAnimateFirstHalfOfRotationToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation { - [self.masterViewController didAnimateFirstHalfOfRotationToInterfaceOrientation:toInterfaceOrientation]; - [self.detailViewController didAnimateFirstHalfOfRotationToInterfaceOrientation:toInterfaceOrientation]; + [self.masterViewController didAnimateFirstHalfOfRotationToInterfaceOrientation:toInterfaceOrientation]; + [self.detailViewController didAnimateFirstHalfOfRotationToInterfaceOrientation:toInterfaceOrientation]; } - (void)willAnimateSecondHalfOfRotationFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation duration:(NSTimeInterval)duration { - [self.masterViewController willAnimateSecondHalfOfRotationFromInterfaceOrientation:fromInterfaceOrientation duration:duration]; - [self.detailViewController willAnimateSecondHalfOfRotationFromInterfaceOrientation:fromInterfaceOrientation duration:duration]; + [self.masterViewController willAnimateSecondHalfOfRotationFromInterfaceOrientation:fromInterfaceOrientation duration:duration]; + [self.detailViewController willAnimateSecondHalfOfRotationFromInterfaceOrientation:fromInterfaceOrientation duration:duration]; } - (CGSize)splitViewSizeForOrientation:(UIInterfaceOrientation)theOrientation { - UIScreen *screen = [UIScreen mainScreen]; - CGRect fullScreenRect = screen.bounds; // always implicitly in Portrait orientation. - CGRect appFrame = screen.applicationFrame; - - // Find status bar height by checking which dimension of the applicationFrame is narrower than screen bounds. - // Little bit ugly looking, but it'll still work even if they change the status bar height in future. - float statusBarHeight = MAX((fullScreenRect.size.width - appFrame.size.width), (fullScreenRect.size.height - appFrame.size.height)); - - // Initially assume portrait orientation. - float width = fullScreenRect.size.width; - float height = fullScreenRect.size.height; - - // Correct for orientation. - if (UIInterfaceOrientationIsLandscape(theOrientation)) { - width = height; - height = fullScreenRect.size.width; - } - - // Account for status bar, which always subtracts from the height (since it's always at the top of the screen). - height -= statusBarHeight; - - return CGSizeMake(width, height); + UIScreen *screen = [UIScreen mainScreen]; + CGRect fullScreenRect = screen.bounds; // always implicitly in Portrait orientation. + CGRect appFrame = screen.applicationFrame; + + // Find status bar height by checking which dimension of the applicationFrame is narrower than screen bounds. + // Little bit ugly looking, but it'll still work even if they change the status bar height in future. + float statusBarHeight = MAX((fullScreenRect.size.width - appFrame.size.width), (fullScreenRect.size.height - appFrame.size.height)); + + // Initially assume portrait orientation. + float width = fullScreenRect.size.width; + float height = fullScreenRect.size.height; + + // Correct for orientation. + if (UIInterfaceOrientationIsLandscape(theOrientation)) { + width = height; + height = fullScreenRect.size.width; + } + + // Account for status bar, which always subtracts from the height (since it's always at the top of the screen). + height -= statusBarHeight; + + return CGSizeMake(width, height); } - (void)layoutSubviewsForInterfaceOrientation:(UIInterfaceOrientation)theOrientation withAnimation:(BOOL)animate { - if (_reconfigurePopup) { - [self reconfigureForMasterInPopover:![self shouldShowMasterForInterfaceOrientation:theOrientation]]; - } - - // Layout the master, detail and divider views appropriately, adding/removing subviews as needed. - // First obtain relevant geometry. - CGSize fullSize = [self splitViewSizeForOrientation:theOrientation]; - float width = fullSize.width; - float height = fullSize.height; - - if (NO) { // Just for debugging. - NSLog(@"Target orientation is %@, dimensions will be %.0f x %.0f", - [self nameOfInterfaceOrientation:theOrientation], width, height); - } - - // Layout the master, divider and detail views. - CGRect newFrame = CGRectMake(0, 0, width, height); - UIViewController *controller; - UIView *theView; - BOOL shouldShowMaster = [self shouldShowMasterForInterfaceOrientation:theOrientation]; - BOOL masterFirst = [self isMasterBeforeDetail]; - if ([self isVertical]) { - // Master on left, detail on right (or vice versa). - CGRect masterRect, dividerRect, detailRect; - if (masterFirst) { - if (!shouldShowMaster) { - // Move off-screen. - newFrame.origin.x -= (_splitPosition + _splitWidth); - } - - newFrame.size.width = _splitPosition; - masterRect = newFrame; - - newFrame.origin.x += newFrame.size.width; - newFrame.size.width = _splitWidth; - dividerRect = newFrame; - - newFrame.origin.x += newFrame.size.width; - newFrame.size.width = width - newFrame.origin.x; - detailRect = newFrame; - - } else { - if (!shouldShowMaster) { - // Move off-screen. - newFrame.size.width += (_splitPosition + _splitWidth); - } - - newFrame.size.width -= (_splitPosition + _splitWidth); - detailRect = newFrame; - - newFrame.origin.x += newFrame.size.width; - newFrame.size.width = _splitWidth; - dividerRect = newFrame; - - newFrame.origin.x += newFrame.size.width; - newFrame.size.width = _splitPosition; - masterRect = newFrame; - } - - // Position master. - controller = self.masterViewController; - if (controller && [controller isKindOfClass:[UIViewController class]]) { - theView = controller.view; - if (theView) { - theView.frame = masterRect; - if (!theView.superview) { - [controller viewWillAppear:NO]; - [self.view addSubview:theView]; - [controller viewDidAppear:NO]; - } - } - } - - // Position divider. - theView = _dividerView; - theView.frame = dividerRect; - if (!theView.superview) { - [self.view addSubview:theView]; - } - - // Position detail. - controller = self.detailViewController; - if (controller && [controller isKindOfClass:[UIViewController class]]) { - theView = controller.view; - if (theView) { - theView.frame = detailRect; - if (!theView.superview) { - [self.view insertSubview:theView aboveSubview:self.masterViewController.view]; - } else { - [self.view bringSubviewToFront:theView]; - } - } - } - - } else { - // Master above, detail below (or vice versa). - CGRect masterRect, dividerRect, detailRect; - if (masterFirst) { - if (!shouldShowMaster) { - // Move off-screen. - newFrame.origin.y -= (_splitPosition + _splitWidth); - } - - newFrame.size.height = _splitPosition; - masterRect = newFrame; - - newFrame.origin.y += newFrame.size.height; - newFrame.size.height = _splitWidth; - dividerRect = newFrame; - - newFrame.origin.y += newFrame.size.height; - newFrame.size.height = height - newFrame.origin.y; - detailRect = newFrame; - - } else { - if (!shouldShowMaster) { - // Move off-screen. - newFrame.size.height += (_splitPosition + _splitWidth); - } - - newFrame.size.height -= (_splitPosition + _splitWidth); - detailRect = newFrame; - - newFrame.origin.y += newFrame.size.height; - newFrame.size.height = _splitWidth; - dividerRect = newFrame; - - newFrame.origin.y += newFrame.size.height; - newFrame.size.height = _splitPosition; - masterRect = newFrame; - } - - // Position master. - controller = self.masterViewController; - if (controller && [controller isKindOfClass:[UIViewController class]]) { - theView = controller.view; - if (theView) { - theView.frame = masterRect; - if (!theView.superview) { - [controller viewWillAppear:NO]; - [self.view addSubview:theView]; - [controller viewDidAppear:NO]; - } - } - } - - // Position divider. - theView = _dividerView; - theView.frame = dividerRect; - if (!theView.superview) { - [self.view addSubview:theView]; - } - - // Position detail. - controller = self.detailViewController; - if (controller && [controller isKindOfClass:[UIViewController class]]) { - theView = controller.view; - if (theView) { - theView.frame = detailRect; - if (!theView.superview) { - [self.view insertSubview:theView aboveSubview:self.masterViewController.view]; - } else { - [self.view bringSubviewToFront:theView]; - } - } - } - } - - // Create corner views if necessary. - MGSplitCornersView *leadingCorners; // top/left of screen in vertical/horizontal split. - MGSplitCornersView *trailingCorners; // bottom/right of screen in vertical/horizontal split. - if (!_cornerViews) { - CGRect cornerRect = CGRectMake(0, 0, 10, 10); // arbitrary, will be resized below. - leadingCorners = [[MGSplitCornersView alloc] initWithFrame:cornerRect]; - leadingCorners.splitViewController = self; - leadingCorners.cornerBackgroundColor = MG_DEFAULT_CORNER_COLOR; - leadingCorners.cornerRadius = MG_DEFAULT_CORNER_RADIUS; - trailingCorners = [[MGSplitCornersView alloc] initWithFrame:cornerRect]; - trailingCorners.splitViewController = self; - trailingCorners.cornerBackgroundColor = MG_DEFAULT_CORNER_COLOR; - trailingCorners.cornerRadius = MG_DEFAULT_CORNER_RADIUS; - _cornerViews = [[NSArray alloc] initWithObjects:leadingCorners, trailingCorners, nil]; - [leadingCorners release]; - [trailingCorners release]; - - } else if ([_cornerViews count] == 2) { - leadingCorners = [_cornerViews objectAtIndex:0]; - trailingCorners = [_cornerViews objectAtIndex:1]; - } - - // Configure and layout the corner-views. - leadingCorners.cornersPosition = (_vertical) ? MGCornersPositionLeadingVertical : MGCornersPositionLeadingHorizontal; - trailingCorners.cornersPosition = (_vertical) ? MGCornersPositionTrailingVertical : MGCornersPositionTrailingHorizontal; - leadingCorners.autoresizingMask = (_vertical) ? UIViewAutoresizingFlexibleBottomMargin : UIViewAutoresizingFlexibleRightMargin; - trailingCorners.autoresizingMask = (_vertical) ? UIViewAutoresizingFlexibleTopMargin : UIViewAutoresizingFlexibleLeftMargin; - - float x, y, cornersWidth, cornersHeight; - CGRect leadingRect, trailingRect; - float radius = leadingCorners.cornerRadius; - if (_vertical) { // left/right split - cornersWidth = (radius * 2.0) + _splitWidth; - cornersHeight = radius; - x = ((shouldShowMaster) ? ((masterFirst) ? _splitPosition : width - (_splitPosition + _splitWidth)) : (0 - _splitWidth)) - radius; - y = 0; - leadingRect = CGRectMake(x, y, cornersWidth, cornersHeight); // top corners - trailingRect = CGRectMake(x, (height - cornersHeight), cornersWidth, cornersHeight); // bottom corners - - } else { // top/bottom split - x = 0; - y = ((shouldShowMaster) ? ((masterFirst) ? _splitPosition : height - (_splitPosition + _splitWidth)) : (0 - _splitWidth)) - radius; - cornersWidth = radius; - cornersHeight = (radius * 2.0) + _splitWidth; - leadingRect = CGRectMake(x, y, cornersWidth, cornersHeight); // left corners - trailingRect = CGRectMake((width - cornersWidth), y, cornersWidth, cornersHeight); // right corners - } - - leadingCorners.frame = leadingRect; - trailingCorners.frame = trailingRect; - - // Ensure corners are visible and frontmost. - if (!leadingCorners.superview) { - [self.view insertSubview:leadingCorners aboveSubview:self.detailViewController.view]; - [self.view insertSubview:trailingCorners aboveSubview:self.detailViewController.view]; - } else { - [self.view bringSubviewToFront:leadingCorners]; - [self.view bringSubviewToFront:trailingCorners]; - } + if (_reconfigurePopup) { + [self reconfigureForMasterInPopover:![self shouldShowMasterForInterfaceOrientation:theOrientation]]; + } + + // Layout the master, detail and divider views appropriately, adding/removing subviews as needed. + // First obtain relevant geometry. + CGSize fullSize = [self splitViewSizeForOrientation:theOrientation]; + float width = fullSize.width; + float height = fullSize.height; + + if (NO) { // Just for debugging. + NSLog(@"Target orientation is %@, dimensions will be %.0f x %.0f", + [self nameOfInterfaceOrientation:theOrientation], width, height); + } + + // Layout the master, divider and detail views. + CGRect newFrame = CGRectMake(0, 0, width, height); + UIViewController *controller; + UIView *theView; + BOOL shouldShowMaster = [self shouldShowMasterForInterfaceOrientation:theOrientation]; + BOOL masterFirst = [self isMasterBeforeDetail]; + if ([self isVertical]) { + // Master on left, detail on right (or vice versa). + CGRect masterRect, dividerRect, detailRect; + if (masterFirst) { + if (!shouldShowMaster) { + // Move off-screen. + newFrame.origin.x -= (_splitPosition + _splitWidth); + } + + newFrame.size.width = _splitPosition; + masterRect = newFrame; + + newFrame.origin.x += newFrame.size.width; + newFrame.size.width = _splitWidth; + dividerRect = newFrame; + + newFrame.origin.x += newFrame.size.width; + newFrame.size.width = width - newFrame.origin.x; + detailRect = newFrame; + + } else { + if (!shouldShowMaster) { + // Move off-screen. + newFrame.size.width += (_splitPosition + _splitWidth); + } + + newFrame.size.width -= (_splitPosition + _splitWidth); + detailRect = newFrame; + + newFrame.origin.x += newFrame.size.width; + newFrame.size.width = _splitWidth; + dividerRect = newFrame; + + newFrame.origin.x += newFrame.size.width; + newFrame.size.width = _splitPosition; + masterRect = newFrame; + } + + // Position master. + controller = self.masterViewController; + if (controller && [controller isKindOfClass:[UIViewController class]]) { + theView = controller.view; + if (theView) { + theView.frame = masterRect; + if (!theView.superview) { + [controller viewWillAppear:NO]; + [self.view addSubview:theView]; + [controller viewDidAppear:NO]; + } + } + } + + // Position divider. + theView = _dividerView; + theView.frame = dividerRect; + if (!theView.superview) { + [self.view addSubview:theView]; + } + + // Position detail. + controller = self.detailViewController; + if (controller && [controller isKindOfClass:[UIViewController class]]) { + theView = controller.view; + if (theView) { + theView.frame = detailRect; + if (!theView.superview) { + [self.view insertSubview:theView aboveSubview:self.masterViewController.view]; + } else { + [self.view bringSubviewToFront:theView]; + } + } + } + + } else { + // Master above, detail below (or vice versa). + CGRect masterRect, dividerRect, detailRect; + if (masterFirst) { + if (!shouldShowMaster) { + // Move off-screen. + newFrame.origin.y -= (_splitPosition + _splitWidth); + } + + newFrame.size.height = _splitPosition; + masterRect = newFrame; + + newFrame.origin.y += newFrame.size.height; + newFrame.size.height = _splitWidth; + dividerRect = newFrame; + + newFrame.origin.y += newFrame.size.height; + newFrame.size.height = height - newFrame.origin.y; + detailRect = newFrame; + + } else { + if (!shouldShowMaster) { + // Move off-screen. + newFrame.size.height += (_splitPosition + _splitWidth); + } + + newFrame.size.height -= (_splitPosition + _splitWidth); + detailRect = newFrame; + + newFrame.origin.y += newFrame.size.height; + newFrame.size.height = _splitWidth; + dividerRect = newFrame; + + newFrame.origin.y += newFrame.size.height; + newFrame.size.height = _splitPosition; + masterRect = newFrame; + } + + // Position master. + controller = self.masterViewController; + if (controller && [controller isKindOfClass:[UIViewController class]]) { + theView = controller.view; + if (theView) { + theView.frame = masterRect; + if (!theView.superview) { + [controller viewWillAppear:NO]; + [self.view addSubview:theView]; + [controller viewDidAppear:NO]; + } + } + } + + // Position divider. + theView = _dividerView; + theView.frame = dividerRect; + if (!theView.superview) { + [self.view addSubview:theView]; + } + + // Position detail. + controller = self.detailViewController; + if (controller && [controller isKindOfClass:[UIViewController class]]) { + theView = controller.view; + if (theView) { + theView.frame = detailRect; + if (!theView.superview) { + [self.view insertSubview:theView aboveSubview:self.masterViewController.view]; + } else { + [self.view bringSubviewToFront:theView]; + } + } + } + } + + // Create corner views if necessary. + MGSplitCornersView *leadingCorners; // top/left of screen in vertical/horizontal split. + MGSplitCornersView *trailingCorners; // bottom/right of screen in vertical/horizontal split. + if (!_cornerViews) { + CGRect cornerRect = CGRectMake(0, 0, 10, 10); // arbitrary, will be resized below. + leadingCorners = [[MGSplitCornersView alloc] initWithFrame:cornerRect]; + leadingCorners.splitViewController = self; + leadingCorners.cornerBackgroundColor = MG_DEFAULT_CORNER_COLOR; + leadingCorners.cornerRadius = MG_DEFAULT_CORNER_RADIUS; + trailingCorners = [[MGSplitCornersView alloc] initWithFrame:cornerRect]; + trailingCorners.splitViewController = self; + trailingCorners.cornerBackgroundColor = MG_DEFAULT_CORNER_COLOR; + trailingCorners.cornerRadius = MG_DEFAULT_CORNER_RADIUS; + _cornerViews = [[NSArray alloc] initWithObjects:leadingCorners, trailingCorners, nil]; + [leadingCorners release]; + [trailingCorners release]; + + } else if ([_cornerViews count] == 2) { + leadingCorners = [_cornerViews objectAtIndex:0]; + trailingCorners = [_cornerViews objectAtIndex:1]; + } + + // Configure and layout the corner-views. + leadingCorners.cornersPosition = (_vertical) ? MGCornersPositionLeadingVertical : MGCornersPositionLeadingHorizontal; + trailingCorners.cornersPosition = (_vertical) ? MGCornersPositionTrailingVertical : MGCornersPositionTrailingHorizontal; + leadingCorners.autoresizingMask = (_vertical) ? UIViewAutoresizingFlexibleBottomMargin : UIViewAutoresizingFlexibleRightMargin; + trailingCorners.autoresizingMask = (_vertical) ? UIViewAutoresizingFlexibleTopMargin : UIViewAutoresizingFlexibleLeftMargin; + + float x, y, cornersWidth, cornersHeight; + CGRect leadingRect, trailingRect; + float radius = leadingCorners.cornerRadius; + if (_vertical) { // left/right split + cornersWidth = (radius * 2.0) + _splitWidth; + cornersHeight = radius; + x = ((shouldShowMaster) ? ((masterFirst) ? _splitPosition : width - (_splitPosition + _splitWidth)) : (0 - _splitWidth)) - radius; + y = 0; + leadingRect = CGRectMake(x, y, cornersWidth, cornersHeight); // top corners + trailingRect = CGRectMake(x, (height - cornersHeight), cornersWidth, cornersHeight); // bottom corners + + } else { // top/bottom split + x = 0; + y = ((shouldShowMaster) ? ((masterFirst) ? _splitPosition : height - (_splitPosition + _splitWidth)) : (0 - _splitWidth)) - radius; + cornersWidth = radius; + cornersHeight = (radius * 2.0) + _splitWidth; + leadingRect = CGRectMake(x, y, cornersWidth, cornersHeight); // left corners + trailingRect = CGRectMake((width - cornersWidth), y, cornersWidth, cornersHeight); // right corners + } + + leadingCorners.frame = leadingRect; + trailingCorners.frame = trailingRect; + + // Ensure corners are visible and frontmost. + if (!leadingCorners.superview) { + [self.view insertSubview:leadingCorners aboveSubview:self.detailViewController.view]; + [self.view insertSubview:trailingCorners aboveSubview:self.detailViewController.view]; + } else { + [self.view bringSubviewToFront:leadingCorners]; + [self.view bringSubviewToFront:trailingCorners]; + } } - (void)layoutSubviewsWithAnimation:(BOOL)animate { - [self layoutSubviewsForInterfaceOrientation:self.interfaceOrientation withAnimation:animate]; + [self layoutSubviewsForInterfaceOrientation:self.interfaceOrientation withAnimation:animate]; } - (void)layoutSubviews { - [self layoutSubviewsForInterfaceOrientation:self.interfaceOrientation withAnimation:YES]; + [self layoutSubviewsForInterfaceOrientation:self.interfaceOrientation withAnimation:YES]; } - (void)viewWillAppear:(BOOL)animated { - [super viewWillAppear:animated]; - - if ([self isShowingMaster]) { - [self.masterViewController viewWillAppear:animated]; - } - [self.detailViewController viewWillAppear:animated]; - - _reconfigurePopup = YES; - [self layoutSubviews]; + [super viewWillAppear:animated]; + + if ([self isShowingMaster]) { + [self.masterViewController viewWillAppear:animated]; + } + [self.detailViewController viewWillAppear:animated]; + + _reconfigurePopup = YES; + [self layoutSubviews]; } - (void)viewDidAppear:(BOOL)animated { - [super viewDidAppear:animated]; - - if ([self isShowingMaster]) { - [self.masterViewController viewDidAppear:animated]; - } - [self.detailViewController viewDidAppear:animated]; + [super viewDidAppear:animated]; + + if ([self isShowingMaster]) { + [self.masterViewController viewDidAppear:animated]; + } + [self.detailViewController viewDidAppear:animated]; } - (void)viewWillDisappear:(BOOL)animated { - [super viewWillDisappear:animated]; - - if ([self isShowingMaster]) { - [self.masterViewController viewWillDisappear:animated]; - } - [self.detailViewController viewWillDisappear:animated]; + [super viewWillDisappear:animated]; + + if ([self isShowingMaster]) { + [self.masterViewController viewWillDisappear:animated]; + } + [self.detailViewController viewWillDisappear:animated]; } - (void)viewDidDisappear:(BOOL)animated { - [super viewDidDisappear:animated]; - - if ([self isShowingMaster]) { - [self.masterViewController viewDidDisappear:animated]; - } - [self.detailViewController viewDidDisappear:animated]; + [super viewDidDisappear:animated]; + + if ([self isShowingMaster]) { + [self.masterViewController viewDidDisappear:animated]; + } + [self.detailViewController viewDidDisappear:animated]; } @@ -545,73 +545,73 @@ - (void)reconfigureForMasterInPopover:(BOOL)inPopover { - _reconfigurePopup = NO; - - if ((inPopover && _hiddenPopoverController) || (!inPopover && !_hiddenPopoverController) || !self.masterViewController) { - // Nothing to do. - return; - } - - if (inPopover && !_hiddenPopoverController && !_barButtonItem) { - // Create and configure popover for our masterViewController. - [_hiddenPopoverController release]; - _hiddenPopoverController = nil; - [self.masterViewController viewWillDisappear:NO]; - _hiddenPopoverController = [[UIPopoverController alloc] initWithContentViewController:self.masterViewController]; - [self.masterViewController viewDidDisappear:NO]; - - // Create and configure _barButtonItem. - _barButtonItem = [[UIBarButtonItem alloc] initWithTitle:NSLocalizedString(@"Master", nil) - style:UIBarButtonItemStyleBordered - target:self - action:@selector(showMasterPopover:)]; - - // Inform delegate of this state of affairs. - if (_delegate && [_delegate respondsToSelector:@selector(splitViewController:willHideViewController:withBarButtonItem:forPopoverController:)]) { - [(NSObject *)_delegate splitViewController:self - willHideViewController:self.masterViewController - withBarButtonItem:_barButtonItem - forPopoverController:_hiddenPopoverController]; - } - - } else if (!inPopover && _hiddenPopoverController && _barButtonItem) { - // I know this looks strange, but it fixes a bizarre issue with UIPopoverController leaving masterViewController's views in disarray. - [_hiddenPopoverController presentPopoverFromRect:CGRectZero inView:self.view permittedArrowDirections:UIPopoverArrowDirectionAny animated:NO]; - - // Remove master from popover and destroy popover, if it exists. - [_hiddenPopoverController dismissPopoverAnimated:NO]; - [_hiddenPopoverController release]; - _hiddenPopoverController = nil; - - // Inform delegate that the _barButtonItem will become invalid. - if (_delegate && [_delegate respondsToSelector:@selector(splitViewController:willShowViewController:invalidatingBarButtonItem:)]) { - [(NSObject *)_delegate splitViewController:self - willShowViewController:self.masterViewController - invalidatingBarButtonItem:_barButtonItem]; - } - - // Destroy _barButtonItem. - [_barButtonItem release]; - _barButtonItem = nil; - - // Move master view. - UIView *masterView = self.masterViewController.view; - if (masterView && masterView.superview != self.view) { - [masterView removeFromSuperview]; - } - } + _reconfigurePopup = NO; + + if ((inPopover && _hiddenPopoverController) || (!inPopover && !_hiddenPopoverController) || !self.masterViewController) { + // Nothing to do. + return; + } + + if (inPopover && !_hiddenPopoverController && !_barButtonItem) { + // Create and configure popover for our masterViewController. + [_hiddenPopoverController release]; + _hiddenPopoverController = nil; + [self.masterViewController viewWillDisappear:NO]; + _hiddenPopoverController = [[UIPopoverController alloc] initWithContentViewController:self.masterViewController]; + [self.masterViewController viewDidDisappear:NO]; + + // Create and configure _barButtonItem. + _barButtonItem = [[UIBarButtonItem alloc] initWithTitle:NSLocalizedString(@"Master", nil) + style:UIBarButtonItemStyleBordered + target:self + action:@selector(showMasterPopover:)]; + + // Inform delegate of this state of affairs. + if (_delegate && [_delegate respondsToSelector:@selector(splitViewController:willHideViewController:withBarButtonItem:forPopoverController:)]) { + [(NSObject *)_delegate splitViewController:self + willHideViewController:self.masterViewController + withBarButtonItem:_barButtonItem + forPopoverController:_hiddenPopoverController]; + } + + } else if (!inPopover && _hiddenPopoverController && _barButtonItem) { + // I know this looks strange, but it fixes a bizarre issue with UIPopoverController leaving masterViewController's views in disarray. + [_hiddenPopoverController presentPopoverFromRect:CGRectZero inView:self.view permittedArrowDirections:UIPopoverArrowDirectionAny animated:NO]; + + // Remove master from popover and destroy popover, if it exists. + [_hiddenPopoverController dismissPopoverAnimated:NO]; + [_hiddenPopoverController release]; + _hiddenPopoverController = nil; + + // Inform delegate that the _barButtonItem will become invalid. + if (_delegate && [_delegate respondsToSelector:@selector(splitViewController:willShowViewController:invalidatingBarButtonItem:)]) { + [(NSObject *)_delegate splitViewController:self + willShowViewController:self.masterViewController + invalidatingBarButtonItem:_barButtonItem]; + } + + // Destroy _barButtonItem. + [_barButtonItem release]; + _barButtonItem = nil; + + // Move master view. + UIView *masterView = self.masterViewController.view; + if (masterView && masterView.superview != self.view) { + [masterView removeFromSuperview]; + } + } } - (void)popoverControllerDidDismissPopover:(UIPopoverController *)popoverController { - [self reconfigureForMasterInPopover:NO]; + [self reconfigureForMasterInPopover:NO]; } - (void)notePopoverDismissed { - [self popoverControllerDidDismissPopover:_hiddenPopoverController]; + [self popoverControllerDidDismissPopover:_hiddenPopoverController]; } @@ -621,14 +621,14 @@ - (void)animationDidStop:(NSString *)animationID finished:(NSNumber *)finished context:(void *)context { - if (([animationID isEqualToString:MG_ANIMATION_CHANGE_SPLIT_ORIENTATION] || - [animationID isEqualToString:MG_ANIMATION_CHANGE_SUBVIEWS_ORDER]) - && _cornerViews) { - for (UIView *corner in _cornerViews) { - corner.hidden = NO; - } - _dividerView.hidden = NO; - } + if (([animationID isEqualToString:MG_ANIMATION_CHANGE_SPLIT_ORIENTATION] || + [animationID isEqualToString:MG_ANIMATION_CHANGE_SUBVIEWS_ORDER]) + && _cornerViews) { + for (UIView *corner in _cornerViews) { + corner.hidden = NO; + } + _dividerView.hidden = NO; + } } @@ -638,83 +638,83 @@ - (IBAction)toggleSplitOrientation:(id)sender { - BOOL showingMaster = [self isShowingMaster]; - if (showingMaster) { - if (_cornerViews) { - for (UIView *corner in _cornerViews) { - corner.hidden = YES; - } - _dividerView.hidden = YES; - } - [UIView beginAnimations:MG_ANIMATION_CHANGE_SPLIT_ORIENTATION context:nil]; - [UIView setAnimationDelegate:self]; - [UIView setAnimationDidStopSelector:@selector(animationDidStop:finished:context:)]; - } - self.vertical = (!self.vertical); - if (showingMaster) { - [UIView commitAnimations]; - } + BOOL showingMaster = [self isShowingMaster]; + if (showingMaster) { + if (_cornerViews) { + for (UIView *corner in _cornerViews) { + corner.hidden = YES; + } + _dividerView.hidden = YES; + } + [UIView beginAnimations:MG_ANIMATION_CHANGE_SPLIT_ORIENTATION context:nil]; + [UIView setAnimationDelegate:self]; + [UIView setAnimationDidStopSelector:@selector(animationDidStop:finished:context:)]; + } + self.vertical = (!self.vertical); + if (showingMaster) { + [UIView commitAnimations]; + } } - (IBAction)toggleMasterBeforeDetail:(id)sender { - BOOL showingMaster = [self isShowingMaster]; - if (showingMaster) { - if (_cornerViews) { - for (UIView *corner in _cornerViews) { - corner.hidden = YES; - } - _dividerView.hidden = YES; - } - [UIView beginAnimations:MG_ANIMATION_CHANGE_SUBVIEWS_ORDER context:nil]; - [UIView setAnimationDelegate:self]; - [UIView setAnimationDidStopSelector:@selector(animationDidStop:finished:context:)]; - } - self.masterBeforeDetail = (!self.masterBeforeDetail); - if (showingMaster) { - [UIView commitAnimations]; - } + BOOL showingMaster = [self isShowingMaster]; + if (showingMaster) { + if (_cornerViews) { + for (UIView *corner in _cornerViews) { + corner.hidden = YES; + } + _dividerView.hidden = YES; + } + [UIView beginAnimations:MG_ANIMATION_CHANGE_SUBVIEWS_ORDER context:nil]; + [UIView setAnimationDelegate:self]; + [UIView setAnimationDidStopSelector:@selector(animationDidStop:finished:context:)]; + } + self.masterBeforeDetail = (!self.masterBeforeDetail); + if (showingMaster) { + [UIView commitAnimations]; + } } - (IBAction)toggleMasterView:(id)sender { - if (_hiddenPopoverController && _hiddenPopoverController.popoverVisible) { - [_hiddenPopoverController dismissPopoverAnimated:NO]; - } - - if (![self isShowingMaster]) { - // We're about to show the master view. Ensure it's in place off-screen to be animated in. - _reconfigurePopup = YES; - [self reconfigureForMasterInPopover:NO]; - [self layoutSubviews]; - } - - // This action functions on the current primary orientation; it is independent of the other primary orientation. - [UIView beginAnimations:@"toggleMaster" context:nil]; - if (self.isLandscape) { - self.showsMasterInLandscape = !_showsMasterInLandscape; - } else { - self.showsMasterInPortrait = !_showsMasterInPortrait; - } - [UIView commitAnimations]; + if (_hiddenPopoverController && _hiddenPopoverController.popoverVisible) { + [_hiddenPopoverController dismissPopoverAnimated:NO]; + } + + if (![self isShowingMaster]) { + // We're about to show the master view. Ensure it's in place off-screen to be animated in. + _reconfigurePopup = YES; + [self reconfigureForMasterInPopover:NO]; + [self layoutSubviews]; + } + + // This action functions on the current primary orientation; it is independent of the other primary orientation. + [UIView beginAnimations:@"toggleMaster" context:nil]; + if (self.isLandscape) { + self.showsMasterInLandscape = !_showsMasterInLandscape; + } else { + self.showsMasterInPortrait = !_showsMasterInPortrait; + } + [UIView commitAnimations]; } - (IBAction)showMasterPopover:(id) sender { - if (_hiddenPopoverController && !(_hiddenPopoverController.popoverVisible)) { - // Inform delegate. - if (_delegate && [_delegate respondsToSelector:@selector(splitViewController:popoverController:willPresentViewController:)]) { - [(NSObject *)_delegate splitViewController:self - popoverController:_hiddenPopoverController - willPresentViewController:self.masterViewController]; - } - - // Show popover. - [_hiddenPopoverController presentPopoverFromBarButtonItem:_barButtonItem permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES]; - } + if (_hiddenPopoverController && !(_hiddenPopoverController.popoverVisible)) { + // Inform delegate. + if (_delegate && [_delegate respondsToSelector:@selector(splitViewController:popoverController:willPresentViewController:)]) { + [(NSObject *)_delegate splitViewController:self + popoverController:_hiddenPopoverController + willPresentViewController:self.masterViewController]; + } + + // Show popover. + [_hiddenPopoverController presentPopoverFromBarButtonItem:_barButtonItem permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES]; + } } @@ -724,395 +724,395 @@ - (id)delegate { - return _delegate; + return _delegate; } - (void)setDelegate:(id )newDelegate { - if (newDelegate != _delegate && - (!newDelegate || [(NSObject *)newDelegate conformsToProtocol:@protocol(MGSplitViewControllerDelegate)])) { - _delegate = newDelegate; - } + if (newDelegate != _delegate && + (!newDelegate || [(NSObject *)newDelegate conformsToProtocol:@protocol(MGSplitViewControllerDelegate)])) { + _delegate = newDelegate; + } } - (BOOL)showsMasterInPortrait { - return _showsMasterInPortrait; + return _showsMasterInPortrait; } - (void)setShowsMasterInPortrait:(BOOL)flag { - if (flag != _showsMasterInPortrait) { - _showsMasterInPortrait = flag; - - if (![self isLandscape]) { // i.e. if this will cause a visual change. - if (_hiddenPopoverController && _hiddenPopoverController.popoverVisible) { - [_hiddenPopoverController dismissPopoverAnimated:NO]; - } - - // Rearrange views. - _reconfigurePopup = YES; - [self layoutSubviews]; - } - } + if (flag != _showsMasterInPortrait) { + _showsMasterInPortrait = flag; + + if (![self isLandscape]) { // i.e. if this will cause a visual change. + if (_hiddenPopoverController && _hiddenPopoverController.popoverVisible) { + [_hiddenPopoverController dismissPopoverAnimated:NO]; + } + + // Rearrange views. + _reconfigurePopup = YES; + [self layoutSubviews]; + } + } } - (BOOL)showsMasterInLandscape { - return _showsMasterInLandscape; + return _showsMasterInLandscape; } - (void)setShowsMasterInLandscape:(BOOL)flag { - if (flag != _showsMasterInLandscape) { - _showsMasterInLandscape = flag; - - if ([self isLandscape]) { // i.e. if this will cause a visual change. - if (_hiddenPopoverController && _hiddenPopoverController.popoverVisible) { - [_hiddenPopoverController dismissPopoverAnimated:NO]; - } - - // Rearrange views. - _reconfigurePopup = YES; - [self layoutSubviews]; - } - } + if (flag != _showsMasterInLandscape) { + _showsMasterInLandscape = flag; + + if ([self isLandscape]) { // i.e. if this will cause a visual change. + if (_hiddenPopoverController && _hiddenPopoverController.popoverVisible) { + [_hiddenPopoverController dismissPopoverAnimated:NO]; + } + + // Rearrange views. + _reconfigurePopup = YES; + [self layoutSubviews]; + } + } } - (BOOL)isVertical { - return _vertical; + return _vertical; } - (void)setVertical:(BOOL)flag { - if (flag != _vertical) { - if (_hiddenPopoverController && _hiddenPopoverController.popoverVisible) { - [_hiddenPopoverController dismissPopoverAnimated:NO]; - } - - _vertical = flag; - - // Inform delegate. - if (_delegate && [_delegate respondsToSelector:@selector(splitViewController:willChangeSplitOrientationToVertical:)]) { - [_delegate splitViewController:self willChangeSplitOrientationToVertical:_vertical]; - } - - [self layoutSubviews]; - } + if (flag != _vertical) { + if (_hiddenPopoverController && _hiddenPopoverController.popoverVisible) { + [_hiddenPopoverController dismissPopoverAnimated:NO]; + } + + _vertical = flag; + + // Inform delegate. + if (_delegate && [_delegate respondsToSelector:@selector(splitViewController:willChangeSplitOrientationToVertical:)]) { + [_delegate splitViewController:self willChangeSplitOrientationToVertical:_vertical]; + } + + [self layoutSubviews]; + } } - (BOOL)isMasterBeforeDetail { - return _masterBeforeDetail; + return _masterBeforeDetail; } - (void)setMasterBeforeDetail:(BOOL)flag { - if (flag != _masterBeforeDetail) { - if (_hiddenPopoverController && _hiddenPopoverController.popoverVisible) { - [_hiddenPopoverController dismissPopoverAnimated:NO]; - } - - _masterBeforeDetail = flag; - - if ([self isShowingMaster]) { - [self layoutSubviews]; - } - } + if (flag != _masterBeforeDetail) { + if (_hiddenPopoverController && _hiddenPopoverController.popoverVisible) { + [_hiddenPopoverController dismissPopoverAnimated:NO]; + } + + _masterBeforeDetail = flag; + + if ([self isShowingMaster]) { + [self layoutSubviews]; + } + } } - (float)splitPosition { - return _splitPosition; + return _splitPosition; } - (void)setSplitPosition:(float)posn { - // Check to see if delegate wishes to constrain the position. - float newPosn = posn; - BOOL constrained = NO; - CGSize fullSize = [self splitViewSizeForOrientation:self.interfaceOrientation]; - if (_delegate && [_delegate respondsToSelector:@selector(splitViewController:constrainSplitPosition:splitViewSize:)]) { - newPosn = [_delegate splitViewController:self constrainSplitPosition:newPosn splitViewSize:fullSize]; - constrained = YES; // implicitly trust delegate's response. - - } else { - // Apply default constraints if delegate doesn't wish to participate. - float minPos = MG_MIN_VIEW_WIDTH; - float maxPos = ((_vertical) ? fullSize.width : fullSize.height) - (MG_MIN_VIEW_WIDTH + _splitWidth); - constrained = (newPosn != _splitPosition && newPosn >= minPos && newPosn <= maxPos); - } - - if (constrained) { - if (_hiddenPopoverController && _hiddenPopoverController.popoverVisible) { - [_hiddenPopoverController dismissPopoverAnimated:NO]; - } - - _splitPosition = newPosn; - - // Inform delegate. - if (_delegate && [_delegate respondsToSelector:@selector(splitViewController:willMoveSplitToPosition:)]) { - [_delegate splitViewController:self willMoveSplitToPosition:_splitPosition]; - } - - if ([self isShowingMaster]) { - [self layoutSubviews]; - } - } + // Check to see if delegate wishes to constrain the position. + float newPosn = posn; + BOOL constrained = NO; + CGSize fullSize = [self splitViewSizeForOrientation:self.interfaceOrientation]; + if (_delegate && [_delegate respondsToSelector:@selector(splitViewController:constrainSplitPosition:splitViewSize:)]) { + newPosn = [_delegate splitViewController:self constrainSplitPosition:newPosn splitViewSize:fullSize]; + constrained = YES; // implicitly trust delegate's response. + + } else { + // Apply default constraints if delegate doesn't wish to participate. + float minPos = MG_MIN_VIEW_WIDTH; + float maxPos = ((_vertical) ? fullSize.width : fullSize.height) - (MG_MIN_VIEW_WIDTH + _splitWidth); + constrained = (newPosn != _splitPosition && newPosn >= minPos && newPosn <= maxPos); + } + + if (constrained) { + if (_hiddenPopoverController && _hiddenPopoverController.popoverVisible) { + [_hiddenPopoverController dismissPopoverAnimated:NO]; + } + + _splitPosition = newPosn; + + // Inform delegate. + if (_delegate && [_delegate respondsToSelector:@selector(splitViewController:willMoveSplitToPosition:)]) { + [_delegate splitViewController:self willMoveSplitToPosition:_splitPosition]; + } + + if ([self isShowingMaster]) { + [self layoutSubviews]; + } + } } - (void)setSplitPosition:(float)posn animated:(BOOL)animate { - BOOL shouldAnimate = (animate && [self isShowingMaster]); - if (shouldAnimate) { - [UIView beginAnimations:@"SplitPosition" context:nil]; - } - [self setSplitPosition:posn]; - if (shouldAnimate) { - [UIView commitAnimations]; - } + BOOL shouldAnimate = (animate && [self isShowingMaster]); + if (shouldAnimate) { + [UIView beginAnimations:@"SplitPosition" context:nil]; + } + [self setSplitPosition:posn]; + if (shouldAnimate) { + [UIView commitAnimations]; + } } - (float)splitWidth { - return _splitWidth; + return _splitWidth; } - (void)setSplitWidth:(float)width { - if (width != _splitWidth && width >= 0) { - _splitWidth = width; - if ([self isShowingMaster]) { - [self layoutSubviews]; - } - } + if (width != _splitWidth && width >= 0) { + _splitWidth = width; + if ([self isShowingMaster]) { + [self layoutSubviews]; + } + } } - (NSArray *)viewControllers { - return [[_viewControllers copy] autorelease]; + return [[_viewControllers copy] autorelease]; } - (void)setViewControllers:(NSArray *)controllers { - if (controllers != _viewControllers) { - for (UIViewController *controller in _viewControllers) { - if ([controller isKindOfClass:[UIViewController class]]) { - [controller.view removeFromSuperview]; - } - } - [_viewControllers release]; - _viewControllers = [[NSMutableArray alloc] initWithCapacity:2]; - if (controllers && [controllers count] >= 2) { - self.masterViewController = [controllers objectAtIndex:0]; - self.detailViewController = [controllers objectAtIndex:1]; - } else { - NSLog(@"Error: %@ requires 2 view-controllers. (%@)", NSStringFromClass([self class]), NSStringFromSelector(_cmd)); - } - - [self layoutSubviews]; - } + if (controllers != _viewControllers) { + for (UIViewController *controller in _viewControllers) { + if ([controller isKindOfClass:[UIViewController class]]) { + [controller.view removeFromSuperview]; + } + } + [_viewControllers release]; + _viewControllers = [[NSMutableArray alloc] initWithCapacity:2]; + if (controllers && [controllers count] >= 2) { + self.masterViewController = [controllers objectAtIndex:0]; + self.detailViewController = [controllers objectAtIndex:1]; + } else { + NSLog(@"Error: %@ requires 2 view-controllers. (%@)", NSStringFromClass([self class]), NSStringFromSelector(_cmd)); + } + + [self layoutSubviews]; + } } - (UIViewController *)masterViewController { - if (_viewControllers && [_viewControllers count] > 0) { - NSObject *controller = [_viewControllers objectAtIndex:0]; - if ([controller isKindOfClass:[UIViewController class]]) { - return [[controller retain] autorelease]; - } - } - - return nil; + if (_viewControllers && [_viewControllers count] > 0) { + NSObject *controller = [_viewControllers objectAtIndex:0]; + if ([controller isKindOfClass:[UIViewController class]]) { + return [[controller retain] autorelease]; + } + } + + return nil; } - (void)setMasterViewController:(UIViewController *)master { - if (!_viewControllers) { - _viewControllers = [[NSMutableArray alloc] initWithCapacity:2]; - } - - NSObject *newMaster = master; - if (!newMaster) { - newMaster = [NSNull null]; - } - - BOOL changed = YES; - if ([_viewControllers count] > 0) { - if ([_viewControllers objectAtIndex:0] == newMaster) { - changed = NO; - } else { - [_viewControllers replaceObjectAtIndex:0 withObject:newMaster]; - } - - } else { - [_viewControllers addObject:newMaster]; - } - - if (changed) { - [self layoutSubviews]; - } + if (!_viewControllers) { + _viewControllers = [[NSMutableArray alloc] initWithCapacity:2]; + } + + NSObject *newMaster = master; + if (!newMaster) { + newMaster = [NSNull null]; + } + + BOOL changed = YES; + if ([_viewControllers count] > 0) { + if ([_viewControllers objectAtIndex:0] == newMaster) { + changed = NO; + } else { + [_viewControllers replaceObjectAtIndex:0 withObject:newMaster]; + } + + } else { + [_viewControllers addObject:newMaster]; + } + + if (changed) { + [self layoutSubviews]; + } } - (UIViewController *)detailViewController { - if (_viewControllers && [_viewControllers count] > 1) { - NSObject *controller = [_viewControllers objectAtIndex:1]; - if ([controller isKindOfClass:[UIViewController class]]) { - return [[controller retain] autorelease]; - } - } - - return nil; + if (_viewControllers && [_viewControllers count] > 1) { + NSObject *controller = [_viewControllers objectAtIndex:1]; + if ([controller isKindOfClass:[UIViewController class]]) { + return [[controller retain] autorelease]; + } + } + + return nil; } - (void)setDetailViewController:(UIViewController *)detail { - if (!_viewControllers) { - _viewControllers = [[NSMutableArray alloc] initWithCapacity:2]; - [_viewControllers addObject:[NSNull null]]; - } - - BOOL changed = YES; - if ([_viewControllers count] > 1) { - if ([_viewControllers objectAtIndex:1] == detail) { - changed = NO; - } else { - [_viewControllers replaceObjectAtIndex:1 withObject:detail]; - } - - } else { - [_viewControllers addObject:detail]; - } - - if (changed) { - [self layoutSubviews]; - } + if (!_viewControllers) { + _viewControllers = [[NSMutableArray alloc] initWithCapacity:2]; + [_viewControllers addObject:[NSNull null]]; + } + + BOOL changed = YES; + if ([_viewControllers count] > 1) { + if ([_viewControllers objectAtIndex:1] == detail) { + changed = NO; + } else { + [_viewControllers replaceObjectAtIndex:1 withObject:detail]; + } + + } else { + [_viewControllers addObject:detail]; + } + + if (changed) { + [self layoutSubviews]; + } } - (MGSplitDividerView *)dividerView { - return [[_dividerView retain] autorelease]; + return [[_dividerView retain] autorelease]; } - (void)setDividerView:(MGSplitDividerView *)divider { - if (divider != _dividerView) { - [_dividerView removeFromSuperview]; - [_dividerView release]; - _dividerView = [divider retain]; - _dividerView.splitViewController = self; - _dividerView.backgroundColor = MG_DEFAULT_CORNER_COLOR; - if ([self isShowingMaster]) { - [self layoutSubviews]; - } - } + if (divider != _dividerView) { + [_dividerView removeFromSuperview]; + [_dividerView release]; + _dividerView = [divider retain]; + _dividerView.splitViewController = self; + _dividerView.backgroundColor = MG_DEFAULT_CORNER_COLOR; + if ([self isShowingMaster]) { + [self layoutSubviews]; + } + } } - (BOOL)allowsDraggingDivider { - if (_dividerView) { - return _dividerView.allowsDragging; - } - - return NO; + if (_dividerView) { + return _dividerView.allowsDragging; + } + + return NO; } - (void)setAllowsDraggingDivider:(BOOL)flag { - if (self.allowsDraggingDivider != flag && _dividerView) { - _dividerView.allowsDragging = flag; - } + if (self.allowsDraggingDivider != flag && _dividerView) { + _dividerView.allowsDragging = flag; + } } - (MGSplitViewDividerStyle)dividerStyle { - return _dividerStyle; + return _dividerStyle; } - (void)setDividerStyle:(MGSplitViewDividerStyle)newStyle { - if (_hiddenPopoverController && _hiddenPopoverController.popoverVisible) { - [_hiddenPopoverController dismissPopoverAnimated:NO]; - } - - // We don't check to see if newStyle equals _dividerStyle, because it's a meta-setting. - // Aspects could have been changed since it was set. - _dividerStyle = newStyle; - - // Reconfigure general appearance and behaviour. - float cornerRadius; - if (_dividerStyle == MGSplitViewDividerStyleThin) { - cornerRadius = MG_DEFAULT_CORNER_RADIUS; - _splitWidth = MG_DEFAULT_SPLIT_WIDTH; - self.allowsDraggingDivider = NO; - - } else if (_dividerStyle == MGSplitViewDividerStylePaneSplitter) { - cornerRadius = MG_PANESPLITTER_CORNER_RADIUS; - _splitWidth = MG_PANESPLITTER_SPLIT_WIDTH; - self.allowsDraggingDivider = YES; - } - - // Update divider and corners. - [_dividerView setNeedsDisplay]; - if (_cornerViews) { - for (MGSplitCornersView *corner in _cornerViews) { - corner.cornerRadius = cornerRadius; - } - } - - // Layout all views. - [self layoutSubviews]; + if (_hiddenPopoverController && _hiddenPopoverController.popoverVisible) { + [_hiddenPopoverController dismissPopoverAnimated:NO]; + } + + // We don't check to see if newStyle equals _dividerStyle, because it's a meta-setting. + // Aspects could have been changed since it was set. + _dividerStyle = newStyle; + + // Reconfigure general appearance and behaviour. + float cornerRadius; + if (_dividerStyle == MGSplitViewDividerStyleThin) { + cornerRadius = MG_DEFAULT_CORNER_RADIUS; + _splitWidth = MG_DEFAULT_SPLIT_WIDTH; + self.allowsDraggingDivider = NO; + + } else if (_dividerStyle == MGSplitViewDividerStylePaneSplitter) { + cornerRadius = MG_PANESPLITTER_CORNER_RADIUS; + _splitWidth = MG_PANESPLITTER_SPLIT_WIDTH; + self.allowsDraggingDivider = YES; + } + + // Update divider and corners. + [_dividerView setNeedsDisplay]; + if (_cornerViews) { + for (MGSplitCornersView *corner in _cornerViews) { + corner.cornerRadius = cornerRadius; + } + } + + // Layout all views. + [self layoutSubviews]; } - (void)setDividerStyle:(MGSplitViewDividerStyle)newStyle animated:(BOOL)animate { - BOOL shouldAnimate = (animate && [self isShowingMaster]); - if (shouldAnimate) { - [UIView beginAnimations:@"DividerStyle" context:nil]; - } - [self setDividerStyle:newStyle]; - if (shouldAnimate) { - [UIView commitAnimations]; - } + BOOL shouldAnimate = (animate && [self isShowingMaster]); + if (shouldAnimate) { + [UIView beginAnimations:@"DividerStyle" context:nil]; + } + [self setDividerStyle:newStyle]; + if (shouldAnimate) { + [UIView commitAnimations]; + } } - (NSArray *)cornerViews { - if (_cornerViews) { - return [[_cornerViews retain] autorelease]; - } - - return nil; + if (_cornerViews) { + return [[_cornerViews retain] autorelease]; + } + + return nil; } diff -r d5d5e1698554 -r 1dedcc37bfe8 project_files/HedgewarsMobile/Classes/MXAudioPlayerFadeOperation.h --- a/project_files/HedgewarsMobile/Classes/MXAudioPlayerFadeOperation.h Sun Nov 18 01:06:01 2012 +0400 +++ b/project_files/HedgewarsMobile/Classes/MXAudioPlayerFadeOperation.h Fri Feb 22 05:05:32 2013 +0100 @@ -17,26 +17,26 @@ BOOL _playBeforeFade; } -// The AVAudioPlayer that the volume fade will be applied to. +// The AVAudioPlayer that the volume fade will be applied to. // Retained until the fade is completed. // Must be set with init method. -@property (nonatomic, retain, readonly) AVAudioPlayer *audioPlayer; +@property (nonatomic, retain, readonly) AVAudioPlayer *audioPlayer; -// The duration of the volume fade. +// The duration of the volume fade. // Default value is 1.0 -@property (nonatomic, assign) NSTimeInterval fadeDuration; +@property (nonatomic, assign) NSTimeInterval fadeDuration; -// The delay before the volume fade begins. +// The delay before the volume fade begins. // Default value is 0.0 -@property (nonatomic, assign) NSTimeInterval delay; +@property (nonatomic, assign) NSTimeInterval delay; -// The volume that will be faded to. +// The volume that will be faded to. // Default value is 0.0 -@property (nonatomic, assign) float finishVolume; +@property (nonatomic, assign) float finishVolume; -// If YES, audio player will be sent a pause message when the fade has completed. +// If YES, audio player will be sent a pause message when the fade has completed. // Default value is NO, however, if finishVolume is 0.0, default is YES -@property (nonatomic, assign) BOOL pauseAfterFade; +@property (nonatomic, assign) BOOL pauseAfterFade; // If YES, when the fade has completed the audio player will be sent a stop message. // Default value is NO. diff -r d5d5e1698554 -r 1dedcc37bfe8 project_files/HedgewarsMobile/Classes/MXAudioPlayerFadeOperation.m --- a/project_files/HedgewarsMobile/Classes/MXAudioPlayerFadeOperation.m Sun Nov 18 01:06:01 2012 +0400 +++ b/project_files/HedgewarsMobile/Classes/MXAudioPlayerFadeOperation.m Fri Feb 22 05:05:32 2013 +0100 @@ -10,7 +10,7 @@ #define SKVolumeChangesPerSecond 15 @interface MXAudioPlayerFadeOperation () -@property (nonatomic, retain, readwrite) AVAudioPlayer *audioPlayer; +@property (nonatomic, retain, readwrite) AVAudioPlayer *audioPlayer; - (void)beginFadeOperation; - (void)finishFadeOperation; @end @@ -87,21 +87,21 @@ else { ALog(@"AudioPlayerFadeOperation began with invalid AVAudioPlayer"); } - + [pool release]; } - (void)beginFadeOperation { if (![self.audioPlayer isPlaying] && _playBeforeFade) [self.audioPlayer play]; - + if (_fadeDuration != 0.0) { - + NSTimeInterval sleepInterval = (1.0 / SKVolumeChangesPerSecond); NSTimeInterval startTime = [[NSDate date] timeIntervalSinceReferenceDate]; NSTimeInterval now = startTime; - + float startVolume = [self.audioPlayer volume]; - + while (now < (startTime + _fadeDuration)) { float ratioOfFadeCompleted = (now - startTime)/_fadeDuration; float volume = (_finishVolume * ratioOfFadeCompleted) + (startVolume * (1-ratioOfFadeCompleted)); @@ -109,7 +109,7 @@ [NSThread sleepForTimeInterval:sleepInterval]; now = [[NSDate date] timeIntervalSinceReferenceDate]; } - + [self.audioPlayer setVolume:_finishVolume]; [self finishFadeOperation]; } diff -r d5d5e1698554 -r 1dedcc37bfe8 project_files/HedgewarsMobile/Classes/MapConfigViewController.m --- a/project_files/HedgewarsMobile/Classes/MapConfigViewController.m Sun Nov 18 01:06:01 2012 +0400 +++ b/project_files/HedgewarsMobile/Classes/MapConfigViewController.m Fri Feb 22 05:05:32 2013 +0100 @@ -150,8 +150,8 @@ // this set details for a static map (called by didSelectRowAtIndexPath) -(void) setDetailsForStaticMap:(NSInteger) index { NSArray *source = [self.dataSourceArray objectAtIndex:scIndex]; - - NSString *fileCfg = [[NSString alloc] initWithFormat:@"%@/%@/map.cfg", + + NSString *fileCfg = [[NSString alloc] initWithFormat:@"%@/%@/map.cfg", (scIndex == 1) ? MAPS_DIRECTORY() : MISSIONS_DIRECTORY(),[source objectAtIndex:index]]; NSString *contents = [[NSString alloc] initWithContentsOfFile:fileCfg encoding:NSUTF8StringEncoding error:NULL]; [fileCfg release]; @@ -166,7 +166,7 @@ else max = @"18"; [self setMaxLabelText:max]; - + self.themeCommand = [NSString stringWithFormat:@"etheme %@", [split objectAtIndex:0]]; self.staticMapCommand = [NSString stringWithFormat:@"emap %@", [source objectAtIndex:index]]; @@ -357,7 +357,7 @@ -(NSArray *) dataSourceArray { if (dataSourceArray == nil) { NSString *model = [HWUtils modelType]; - + // only folders containing icon.png are a valid theme NSArray *themeArrayFull = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:THEMES_DIRECTORY() error:NULL]; NSMutableArray *themeArray = [[NSMutableArray alloc] init]; @@ -367,7 +367,7 @@ [themeArray addObject:themeName]; [checkPath release]; } - + // remove images that are too big for certain devices without loading the whole image NSArray *mapArrayFull = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:MAPS_DIRECTORY() error:NULL]; NSMutableArray *mapArray = [[NSMutableArray alloc] init]; @@ -379,7 +379,7 @@ continue; [mapArray addObject:str]; } - + NSArray *missionArrayFull = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:MISSIONS_DIRECTORY() error:NULL]; NSMutableArray *missionArray = [[NSMutableArray alloc] init]; for (NSString *str in missionArrayFull) { @@ -394,7 +394,7 @@ [missionArray release]; [themeArray release]; [mapArray release]; - + self.dataSourceArray = array; [array release]; } @@ -404,7 +404,7 @@ -(void) viewDidLoad { [super viewDidLoad]; srandom(time(NULL)); - + // initialize some "default" values self.slider.value = 0.05f; self.slider.enabled = NO; diff -r d5d5e1698554 -r 1dedcc37bfe8 project_files/HedgewarsMobile/Classes/MapPreviewButtonView.m --- a/project_files/HedgewarsMobile/Classes/MapPreviewButtonView.m Sun Nov 18 01:06:01 2012 +0400 +++ b/project_files/HedgewarsMobile/Classes/MapPreviewButtonView.m Fri Feb 22 05:05:32 2013 +0100 @@ -52,7 +52,7 @@ } #pragma mark - -#pragma mark preview +#pragma mark preview -(int) sendToEngine:(NSString *)string { unsigned char length = [string length]; @@ -157,7 +157,7 @@ [self performSelectorOnMainThread:@selector(removeIndicator) withObject:nil waitUntilDone:NO]; - + [pool release]; } @@ -165,12 +165,12 @@ // remove the current preview and title [self setImage:nil forState:UIControlStateNormal]; [self setTitle:nil forState:UIControlStateNormal]; - + // don't display preview on slower device, too slow and memory hog if (IS_NOT_POWERFUL([HWUtils modelType])) { [self setTitle:NSLocalizedString(@"Preview not available",@"") forState:UIControlStateNormal]; [self turnOnWidgets]; - } else { + } else { // add a very nice spinning wheel UIActivityIndicatorView *indicator = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhiteLarge]; @@ -179,7 +179,7 @@ [indicator startAnimating]; [self addSubview:indicator]; [indicator release]; - + // let's draw in a separate thread so the gui can work; at the end it restore other widgets [NSThread detachNewThreadSelector:@selector(drawingThread) toTarget:self withObject:nil]; } diff -r d5d5e1698554 -r 1dedcc37bfe8 project_files/HedgewarsMobile/Classes/PascalImports.h --- a/project_files/HedgewarsMobile/Classes/PascalImports.h Sun Nov 18 01:06:01 2012 +0400 +++ b/project_files/HedgewarsMobile/Classes/PascalImports.h Fri Feb 22 05:05:32 2013 +0100 @@ -28,7 +28,7 @@ * that you want to use in your non-Pascal code */ - void Game(const char *args[]); + void Game(const int argc, const char *argv[]); void GenLandPreview(void); void LoadLocaleWrapper(const char *filename); @@ -44,7 +44,7 @@ int HW_getMaxNumberOfTeams(void); void HW_memoryWarningCallback(void); - + #ifdef __cplusplus } #endif diff -r d5d5e1698554 -r 1dedcc37bfe8 project_files/HedgewarsMobile/Classes/SavedGamesViewController.m --- a/project_files/HedgewarsMobile/Classes/SavedGamesViewController.m Sun Nov 18 01:06:01 2012 +0400 +++ b/project_files/HedgewarsMobile/Classes/SavedGamesViewController.m Fri Feb 22 05:05:32 2013 +0100 @@ -203,12 +203,12 @@ [self updateTable]; NSString *oldFilePath = [NSString stringWithFormat:@"%@/%@",SAVES_DIRECTORY(),[self.listOfSavegames objectAtIndex:tagValue]]; NSString *newFilePath = [NSString stringWithFormat:@"%@/%@.hws",SAVES_DIRECTORY(),textString]; - + if ([oldFilePath isEqualToString:newFilePath] == NO) { [[NSFileManager defaultManager] moveItemAtPath:oldFilePath toPath:newFilePath error:nil]; [self.listOfSavegames replaceObjectAtIndex:tagValue withObject:[textString stringByAppendingString:@".hws"]]; } - + } #pragma mark - diff -r d5d5e1698554 -r 1dedcc37bfe8 project_files/HedgewarsMobile/Classes/SingleSchemeViewController.m --- a/project_files/HedgewarsMobile/Classes/SingleSchemeViewController.m Sun Nov 18 01:06:01 2012 +0400 +++ b/project_files/HedgewarsMobile/Classes/SingleSchemeViewController.m Fri Feb 22 05:05:32 2013 +0100 @@ -151,7 +151,7 @@ editableCell.selectionStyle = UITableViewCellSelectionStyleNone; editableCell.imageView.image = nil; editableCell.detailTextLabel.text = nil; - + if (row == 0) { editableCell.textField.text = self.schemeName; editableCell.textField.font = [UIFont boldSystemFontOfSize:[UIFont labelFontSize]]; @@ -199,7 +199,7 @@ if ([oneView isMemberOfClass:[UISlider class]]) { cellSlider = (UISlider *)oneView; break; - } + } } cellSlider.tag = SLIDER_TAG + row; cellSlider.maximumValue = [[detail objectForKey:@"max"] floatValue]; @@ -244,7 +244,7 @@ UISwitch *switcher = (UISwitch *)cell.accessoryView; switcher.tag = SWITCH_TAG + row; [switcher setOn:[[[self.schemeDictionary objectForKey:@"gamemod"] objectAtIndex:row] boolValue] animated:NO]; - + UIImage *image = [[UIImage alloc] initWithContentsOfFile:[NSString stringWithFormat:@"%@/btn%@.png",ICONS_DIRECTORY(), [[self.gameModifierArray objectAtIndex:row] objectForKey:@"image"]]]; cell.imageView.image = image; diff -r d5d5e1698554 -r 1dedcc37bfe8 project_files/HedgewarsMobile/Classes/SingleTeamViewController.m --- a/project_files/HedgewarsMobile/Classes/SingleTeamViewController.m Sun Nov 18 01:06:01 2012 +0400 +++ b/project_files/HedgewarsMobile/Classes/SingleTeamViewController.m Fri Feb 22 05:05:32 2013 +0100 @@ -69,7 +69,7 @@ NSLocalizedString(@"Level",@""),nil]; self.secondaryItems = array; [array release]; - + // labels for the subtitles NSArray *moreArray = [[NSArray alloc] initWithObjects: NSLocalizedString(@"Mark the death of your fallen warriors",@""), @@ -295,35 +295,35 @@ case 0: // grave if (nil == gravesViewController) gravesViewController = [[GravesViewController alloc] initWithStyle:UITableViewStyleGrouped]; - + [gravesViewController setTeamDictionary:teamDictionary]; [self.navigationController pushViewController:gravesViewController animated:YES]; break; case 1: // voice if (nil == voicesViewController) voicesViewController = [[VoicesViewController alloc] initWithStyle:UITableViewStyleGrouped]; - + [voicesViewController setTeamDictionary:teamDictionary]; [self.navigationController pushViewController:voicesViewController animated:YES]; break; case 2: // fort if (nil == fortsViewController) fortsViewController = [[FortsViewController alloc] initWithStyle:UITableViewStyleGrouped]; - + [fortsViewController setTeamDictionary:teamDictionary]; [self.navigationController pushViewController:fortsViewController animated:YES]; break; case 3: // flag if (nil == flagsViewController) flagsViewController = [[FlagsViewController alloc] initWithStyle:UITableViewStyleGrouped]; - + [flagsViewController setTeamDictionary:teamDictionary]; [self.navigationController pushViewController:flagsViewController animated:YES]; break; case 4: // level if (nil == levelViewController) levelViewController = [[LevelViewController alloc] initWithStyle:UITableViewStyleGrouped]; - + [levelViewController setTeamDictionary:teamDictionary]; [self.navigationController pushViewController:levelViewController animated:YES]; break; diff -r d5d5e1698554 -r 1dedcc37bfe8 project_files/HedgewarsMobile/Classes/SingleWeaponViewController.m --- a/project_files/HedgewarsMobile/Classes/SingleWeaponViewController.m Sun Nov 18 01:06:01 2012 +0400 +++ b/project_files/HedgewarsMobile/Classes/SingleWeaponViewController.m Fri Feb 22 05:05:32 2013 +0100 @@ -31,38 +31,38 @@ #pragma mark View lifecycle -(void) viewDidLoad { [super viewDidLoad]; - + NSString *trFilePath = [NSString stringWithFormat:@"%@/%@.txt",LOCALE_DIRECTORY(),[[NSLocale preferredLanguages] objectAtIndex:0]]; // fill the data structure that we are going to read LoadLocaleWrapper([trFilePath UTF8String]); - + quantity = (char *)malloc(sizeof(char)*(HW_getNumberOfWeapons()+1)); probability = (char *)malloc(sizeof(char)*(HW_getNumberOfWeapons()+1)); delay = (char *)malloc(sizeof(char)*(HW_getNumberOfWeapons()+1)); crateness = (char *)malloc(sizeof(char)*(HW_getNumberOfWeapons()+1)); - + NSString *str = [NSString stringWithFormat:@"%@/AmmoMenu/Ammos.png",GRAPHICS_DIRECTORY()]; UIImage *img = [[UIImage alloc] initWithContentsOfFile:str]; self.ammoStoreImage = img; [img release]; - + self.title = NSLocalizedString(@"Edit weapons preferences",@""); } -(void) viewWillAppear:(BOOL) animated { [super viewWillAppear:animated]; - + NSString *ammoFile = [[NSString alloc] initWithFormat:@"%@/%@.plist",WEAPONS_DIRECTORY(),self.weaponName]; NSDictionary *weapon = [[NSDictionary alloc] initWithContentsOfFile:ammoFile]; [ammoFile release]; - + self.description = [weapon objectForKey:@"description"]; const char *tmp1 = [[weapon objectForKey:@"ammostore_initialqt"] UTF8String]; const char *tmp2 = [[weapon objectForKey:@"ammostore_probability"] UTF8String]; const char *tmp3 = [[weapon objectForKey:@"ammostore_delay"] UTF8String]; const char *tmp4 = [[weapon objectForKey:@"ammostore_crate"] UTF8String]; [weapon release]; - + // if the new weaponset is diffrent from the older we need to update it replacing // the missing ammos with 0 quantity int oldlen = strlen(tmp1); @@ -78,7 +78,7 @@ delay[i] = '0'; crateness[i] = '0'; } - + [self.tableView reloadData]; } @@ -92,20 +92,20 @@ probability[HW_getNumberOfWeapons()] = '\0'; delay[HW_getNumberOfWeapons()] = '\0'; crateness[HW_getNumberOfWeapons()] = '\0'; - + NSString *quantityStr = [NSString stringWithUTF8String:quantity]; NSString *probabilityStr = [NSString stringWithUTF8String:probability]; NSString *delayStr = [NSString stringWithUTF8String:delay]; NSString *cratenessStr = [NSString stringWithUTF8String:crateness]; - + NSDictionary *weapon = [[NSDictionary alloc] initWithObjectsAndKeys: quantityStr,@"ammostore_initialqt", probabilityStr,@"ammostore_probability", delayStr,@"ammostore_delay", - cratenessStr,@"ammostore_crate", + cratenessStr,@"ammostore_crate", self.description,@"description", nil]; - + NSString *ammoFile = [[NSString alloc] initWithFormat:@"%@/%@.plist",WEAPONS_DIRECTORY(),self.weaponName]; [weapon writeToFile:ammoFile atomically:YES]; [ammoFile release]; @@ -131,7 +131,7 @@ static NSString *CellIdentifier1 = @"Cell1"; NSInteger row = [indexPath row]; UITableViewCell *cell = nil; - + if (0 == [indexPath section]) { EditableCellView *editableCell = (EditableCellView *)[aTableView dequeueReusableCellWithIdentifier:CellIdentifier0]; if (editableCell == nil) { @@ -143,7 +143,7 @@ editableCell.selectionStyle = UITableViewCellSelectionStyleNone; editableCell.imageView.image = nil; editableCell.detailTextLabel.text = nil; - + if (row == 0) { editableCell.textField.text = self.weaponName; editableCell.textField.font = [UIFont boldSystemFontOfSize:[UIFont labelFontSize]]; diff -r d5d5e1698554 -r 1dedcc37bfe8 project_files/HedgewarsMobile/Classes/SupportViewController.m --- a/project_files/HedgewarsMobile/Classes/SupportViewController.m Sun Nov 18 01:06:01 2012 +0400 +++ b/project_files/HedgewarsMobile/Classes/SupportViewController.m Fri Feb 22 05:05:32 2013 +0100 @@ -107,7 +107,7 @@ [imgView release]; } [img release]; - + return cell; } @@ -150,7 +150,7 @@ imgView.autoresizingMask = UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin; [footer addSubview:imgView]; [imgView release]; - + UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, self.tableView.frame.size.width, 20)]; label.autoresizingMask = UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin; label.textAlignment = UITextAlignmentCenter; @@ -159,7 +159,7 @@ label.center = CGPointMake(self.tableView.frame.size.width/2, 250); [footer addSubview:label]; [label release]; - + return [footer autorelease]; } else return nil; diff -r d5d5e1698554 -r 1dedcc37bfe8 project_files/HedgewarsMobile/Classes/TeamConfigViewController.m --- a/project_files/HedgewarsMobile/Classes/TeamConfigViewController.m Sun Nov 18 01:06:01 2012 +0400 +++ b/project_files/HedgewarsMobile/Classes/TeamConfigViewController.m Fri Feb 22 05:05:32 2013 +0100 @@ -150,7 +150,7 @@ cell.textLabel.text = [[[self.listOfAllTeams objectAtIndex:[indexPath row]] objectForKey:@"team"] stringByDeletingPathExtension]; cell.textLabel.backgroundColor = [UIColor clearColor]; - + NSString *teamPath = [NSString stringWithFormat:@"%@/%@.plist",TEAMS_DIRECTORY(),cell.textLabel.text]; NSDictionary *firstHog = [[[NSDictionary dictionaryWithContentsOfFile:teamPath] objectForKey:@"hedgehogs"] objectAtIndex:0]; if ([[firstHog objectForKey:@"level"] intValue] != 0) { @@ -159,7 +159,7 @@ [imgString release]; UIImageView *spriteView = [[UIImageView alloc] initWithImage:sprite]; [sprite release]; - + cell.accessoryView = spriteView; [spriteView release]; } else diff -r d5d5e1698554 -r 1dedcc37bfe8 project_files/HedgewarsMobile/Classes/WeaponCellView.m --- a/project_files/HedgewarsMobile/Classes/WeaponCellView.m Sun Nov 18 01:06:01 2012 +0400 +++ b/project_files/HedgewarsMobile/Classes/WeaponCellView.m Fri Feb 22 05:05:32 2013 +0100 @@ -159,7 +159,7 @@ weaponIcon.frame = CGRectMake(5, 5, 32, 32); weaponName.frame = CGRectMake(45, 8, 200, 25); - + helpLabel.frame = CGRectMake(200 + helpLabelOffset, 11, helpLabelLength, 20); // second line @@ -212,7 +212,7 @@ -(void) startDragging:(id) sender { UISlider *slider = (UISlider *)sender; NSString *str = nil; - + switch (slider.tag) { case 100: str = NSLocalizedString(@"Initial quantity",@"ammo selection"); diff -r d5d5e1698554 -r 1dedcc37bfe8 project_files/HedgewarsMobile/Hedgewars.xcodeproj/project.pbxproj --- a/project_files/HedgewarsMobile/Hedgewars.xcodeproj/project.pbxproj Sun Nov 18 01:06:01 2012 +0400 +++ b/project_files/HedgewarsMobile/Hedgewars.xcodeproj/project.pbxproj Fri Feb 22 05:05:32 2013 +0100 @@ -34,6 +34,8 @@ 610C8E3714E018D200CF5C4C /* MNEValueTrackingSlider.m in Sources */ = {isa = PBXBuildFile; fileRef = 610C8E3614E018D200CF5C4C /* MNEValueTrackingSlider.m */; }; 610D5FB21270E2660033333A /* Icon-Small@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 61F7A43411E290650040BA66 /* Icon-Small@2x.png */; }; 610D5FB31270E26C0033333A /* Icon@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 61F7A43611E290650040BA66 /* Icon@2x.png */; }; + 610FB7C81661390E002FB2A7 /* uPhysFSLayer.pas in Sources */ = {isa = PBXBuildFile; fileRef = 610FB7C71661390E002FB2A7 /* uPhysFSLayer.pas */; }; + 610FB81A166139DF002FB2A7 /* libPhysfs.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 610FB7F8166139A4002FB2A7 /* libPhysfs.a */; }; 61156521147F48B6006729A9 /* About.strings in Resources */ = {isa = PBXBuildFile; fileRef = 61156520147F48B6006729A9 /* About.strings */; }; 61156523147F48B7006729A9 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 61156522147F48B7006729A9 /* Localizable.strings */; }; 61156525147F48B8006729A9 /* Scheme.strings in Resources */ = {isa = PBXBuildFile; fileRef = 61156524147F48B8006729A9 /* Scheme.strings */; }; @@ -65,7 +67,6 @@ 6129B9F711EFB04D0017E305 /* denied.png in Resources */ = {isa = PBXBuildFile; fileRef = 6129B9F611EFB04D0017E305 /* denied.png */; }; 612CABAB1391CE68005E9596 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 612CABAA1391CE68005E9596 /* AVFoundation.framework */; }; 61370653117B1D50004EE44A /* Entitlements-Distribution.plist in Resources */ = {isa = PBXBuildFile; fileRef = 61370652117B1D50004EE44A /* Entitlements-Distribution.plist */; }; - 61399013125D19C0003C2DC0 /* uMobile.pas in Sources */ = {isa = PBXBuildFile; fileRef = 61399012125D19C0003C2DC0 /* uMobile.pas */; }; 6147DAD31253DCDE0010357E /* savesButton.png in Resources */ = {isa = PBXBuildFile; fileRef = 6147DAD21253DCDE0010357E /* savesButton.png */; }; 61536DF411CEAE7100D87A7E /* GameConfigViewController-iPhone.xib in Resources */ = {isa = PBXBuildFile; fileRef = 6165924A11CA9CB400D6E256 /* GameConfigViewController-iPhone.xib */; }; 615AD96212073B4D00F2FF04 /* startGameButton.png in Resources */ = {isa = PBXBuildFile; fileRef = 615AD96112073B4D00F2FF04 /* startGameButton.png */; }; @@ -255,6 +256,76 @@ /* End PBXBuildRule section */ /* Begin PBXContainerItemProxy section */ + 610FB7E116613980002FB2A7 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 619599BA1364E65900B429B6 /* Freetype.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = D2AAC07D0554694100DB518D; + remoteInfo = libFreetype; + }; + 610FB7E316613980002FB2A7 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 61A19BF414D20D83004B1E6D /* SDL_net.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = BE48FF6507AFA9A800BB41DA; + remoteInfo = "Static Library"; + }; + 610FB7E516613980002FB2A7 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 6195993F1364C82B00B429B6 /* Lua.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = D2AAC07D0554694100DB518D; + remoteInfo = libLua; + }; + 610FB7E716613980002FB2A7 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 61A19AE314D2010A004B1E6D /* SDL.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = FD6526620DE8FCCB002AD96B; + remoteInfo = libSDL; + }; + 610FB7E916613980002FB2A7 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 61A19C1E14D20F51004B1E6D /* SDL_mixer.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = BE1FA90707AF96B2004B6283; + remoteInfo = "Static Library"; + }; + 610FB7EB16613980002FB2A7 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 61A19BC114D20CDA004B1E6D /* SDL_ttf.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = BE48FD6807AFA17000BB41DA; + remoteInfo = "Static Library"; + }; + 610FB7ED16613980002FB2A7 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 619598181364BCD200B429B6 /* Tremor.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = D2AAC07D0554694100DB518D; + remoteInfo = libTremor; + }; + 610FB7EF16613980002FB2A7 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 61A19B6114D20B6C004B1E6D /* SDL_image.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = BE1FA72F07AF4C45004B6283; + remoteInfo = libSDL_image; + }; + 610FB7F7166139A4002FB2A7 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 610FB7F3166139A4002FB2A7 /* Physfs.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = D2AAC07E0554694100DB518D; + remoteInfo = Physfs; + }; + 610FB81B166139EC002FB2A7 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 610FB7F3166139A4002FB2A7 /* Physfs.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = D2AAC07D0554694100DB518D; + remoteInfo = Physfs; + }; 6162456614E6159C00CC97FB /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 619599BA1364E65900B429B6 /* Freetype.xcodeproj */; @@ -346,6 +417,8 @@ 610782951440EE5C00645B29 /* gameMods.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = gameMods.plist; path = Resources/gameMods.plist; sourceTree = ""; }; 610C8E3514E018D200CF5C4C /* MNEValueTrackingSlider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MNEValueTrackingSlider.h; path = Classes/MNEValueTrackingSlider.h; sourceTree = ""; }; 610C8E3614E018D200CF5C4C /* MNEValueTrackingSlider.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = MNEValueTrackingSlider.m; path = Classes/MNEValueTrackingSlider.m; sourceTree = ""; }; + 610FB7C71661390E002FB2A7 /* uPhysFSLayer.pas */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; name = uPhysFSLayer.pas; path = ../../hedgewars/uPhysFSLayer.pas; sourceTree = SOURCE_ROOT; }; + 610FB7F3166139A4002FB2A7 /* Physfs.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Physfs.xcodeproj; path = ../../misc/physfs/Xcode/Physfs.xcodeproj; sourceTree = SOURCE_ROOT; }; 6115651A147F48AE006729A9 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = Locale/English.lproj/About.strings; sourceTree = ""; }; 6115651B147F48AE006729A9 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = Locale/English.lproj/Localizable.strings; sourceTree = ""; }; 6115651C147F48AE006729A9 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = Locale/English.lproj/Scheme.strings; sourceTree = ""; }; @@ -382,7 +455,6 @@ 6129B9F611EFB04D0017E305 /* denied.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = denied.png; path = Resources/denied.png; sourceTree = ""; }; 612CABAA1391CE68005E9596 /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; }; 61370652117B1D50004EE44A /* Entitlements-Distribution.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "Entitlements-Distribution.plist"; sourceTree = ""; }; - 61399012125D19C0003C2DC0 /* uMobile.pas */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; name = uMobile.pas; path = ../../hedgewars/uMobile.pas; sourceTree = SOURCE_ROOT; }; 6147DAD21253DCDE0010357E /* savesButton.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = savesButton.png; path = Resources/Frontend/savesButton.png; sourceTree = ""; }; 614E333D11DE9A93009DBA4E /* VGSHandlers.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; name = VGSHandlers.inc; path = ../../hedgewars/VGSHandlers.inc; sourceTree = SOURCE_ROOT; }; 6154A53114C37E4A00F6EEF6 /* Romanian */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = Romanian; path = Locale/Romanian.lproj/About.strings; sourceTree = ""; }; @@ -649,6 +721,7 @@ 616245D114E6160200CC97FB /* libFreetype.a in Frameworks */, 619599451364C83D00B429B6 /* libLua.a in Frameworks */, 6195981F1364BCEF00B429B6 /* libTremor.a in Frameworks */, + 610FB81A166139DF002FB2A7 /* libPhysfs.a in Frameworks */, 61A19AFC14D20170004B1E6D /* libSDL2.a in Frameworks */, 61A19B7714D20B7A004B1E6D /* libSDL2_image.a in Frameworks */, 61A19C2414D20F5A004B1E6D /* libSDL2_mixer.a in Frameworks */, @@ -757,6 +830,7 @@ 29B97323FDCFA39411CA2CEA /* Frameworks */ = { isa = PBXGroup; children = ( + 610FB7F3166139A4002FB2A7 /* Physfs.xcodeproj */, 619599BA1364E65900B429B6 /* Freetype.xcodeproj */, 6195993F1364C82B00B429B6 /* Lua.xcodeproj */, 619598181364BCD200B429B6 /* Tremor.xcodeproj */, @@ -780,6 +854,14 @@ name = Frameworks; sourceTree = ""; }; + 610FB7F4166139A4002FB2A7 /* Products */ = { + isa = PBXGroup; + children = ( + 610FB7F8166139A4002FB2A7 /* libPhysfs.a */, + ); + name = Products; + sourceTree = ""; + }; 61156510147F481B006729A9 /* Locale */ = { isa = PBXGroup; children = ( @@ -1133,6 +1215,7 @@ 9283015C0F10E48900CC5A3C /* Pascal Sources */ = { isa = PBXGroup; children = ( + 610FB7C71661390E002FB2A7 /* uPhysFSLayer.pas */, 619349C5160BAF3E00A08518 /* uAILandMarks.pas */, 619349C6160BAF3E00A08518 /* uGearsHandlers.pas */, 619349C7160BAF3E00A08518 /* uGearsHandlersRope.pas */, @@ -1158,7 +1241,6 @@ 61A4A39112A5CCC2004D81E6 /* uTypes.pas */, 61A4A39212A5CCC2004D81E6 /* uUtils.pas */, 61A4A39312A5CCC2004D81E6 /* uVariables.pas */, - 61399012125D19C0003C2DC0 /* uMobile.pas */, 619C5AF3124F7E3100D041AE /* LuaPas.pas */, 61E1F4F711D004240016A5AA /* adler32.pas */, 617987E7114AA34C00BA94A9 /* hwengine.pas */, @@ -1213,6 +1295,15 @@ ); dependencies = ( 9283015A0F10E41300CC5A3C /* PBXTargetDependency */, + 610FB7E216613980002FB2A7 /* PBXTargetDependency */, + 610FB7E416613980002FB2A7 /* PBXTargetDependency */, + 610FB7E616613980002FB2A7 /* PBXTargetDependency */, + 610FB7E816613980002FB2A7 /* PBXTargetDependency */, + 610FB7EA16613980002FB2A7 /* PBXTargetDependency */, + 610FB7EC16613980002FB2A7 /* PBXTargetDependency */, + 610FB7EE16613980002FB2A7 /* PBXTargetDependency */, + 610FB7F016613980002FB2A7 /* PBXTargetDependency */, + 610FB81C166139EC002FB2A7 /* PBXTargetDependency */, ); name = Hedgewars; productName = HedgewarsMobile; @@ -1273,6 +1364,10 @@ ProjectRef = 6195993F1364C82B00B429B6 /* Lua.xcodeproj */; }, { + ProductGroup = 610FB7F4166139A4002FB2A7 /* Products */; + ProjectRef = 610FB7F3166139A4002FB2A7 /* Physfs.xcodeproj */; + }, + { ProductGroup = 61A19AE414D2010A004B1E6D /* Products */; ProjectRef = 61A19AE314D2010A004B1E6D /* SDL.xcodeproj */; }, @@ -1307,6 +1402,13 @@ /* End PBXProject section */ /* Begin PBXReferenceProxy section */ + 610FB7F8166139A4002FB2A7 /* libPhysfs.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = libPhysfs.a; + remoteRef = 610FB7F7166139A4002FB2A7 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; 6162456714E6159C00CC97FB /* libFreetype.a */ = { isa = PBXReferenceProxy; fileType = archive.ar; @@ -1606,7 +1708,6 @@ 611D9BFB12497E9800008271 /* SavedGamesViewController.m in Sources */, 619C5AF4124F7E3100D041AE /* LuaPas.pas in Sources */, 619C5BA2124FA59000D041AE /* MapPreviewButtonView.m in Sources */, - 61399013125D19C0003C2DC0 /* uMobile.pas in Sources */, 61D205A1127CDD1100ABD83E /* ObjcExports.m in Sources */, 61006F95128DE31F00EBA7F7 /* CreationChamber.m in Sources */, 61A4A39412A5CCC2004D81E6 /* uCommandHandlers.pas in Sources */, @@ -1647,12 +1748,58 @@ 619349C8160BAF3E00A08518 /* uAILandMarks.pas in Sources */, 619349C9160BAF3E00A08518 /* uGearsHandlers.pas in Sources */, 619349CA160BAF3E00A08518 /* uGearsHandlersRope.pas in Sources */, + 610FB7C81661390E002FB2A7 /* uPhysFSLayer.pas in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXSourcesBuildPhase section */ /* Begin PBXTargetDependency section */ + 610FB7E216613980002FB2A7 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = libFreetype; + targetProxy = 610FB7E116613980002FB2A7 /* PBXContainerItemProxy */; + }; + 610FB7E416613980002FB2A7 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = "Static Library"; + targetProxy = 610FB7E316613980002FB2A7 /* PBXContainerItemProxy */; + }; + 610FB7E616613980002FB2A7 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = libLua; + targetProxy = 610FB7E516613980002FB2A7 /* PBXContainerItemProxy */; + }; + 610FB7E816613980002FB2A7 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = libSDL; + targetProxy = 610FB7E716613980002FB2A7 /* PBXContainerItemProxy */; + }; + 610FB7EA16613980002FB2A7 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = "Static Library"; + targetProxy = 610FB7E916613980002FB2A7 /* PBXContainerItemProxy */; + }; + 610FB7EC16613980002FB2A7 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = "Static Library"; + targetProxy = 610FB7EB16613980002FB2A7 /* PBXContainerItemProxy */; + }; + 610FB7EE16613980002FB2A7 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = libTremor; + targetProxy = 610FB7ED16613980002FB2A7 /* PBXContainerItemProxy */; + }; + 610FB7F016613980002FB2A7 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = libSDL_image; + targetProxy = 610FB7EF16613980002FB2A7 /* PBXContainerItemProxy */; + }; + 610FB81C166139EC002FB2A7 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = Physfs; + targetProxy = 610FB81B166139EC002FB2A7 /* PBXContainerItemProxy */; + }; 9283015A0F10E41300CC5A3C /* PBXTargetDependency */ = { isa = PBXTargetDependency; target = 928301160F10CAFC00CC5A3C /* fpc */; diff -r d5d5e1698554 -r 1dedcc37bfe8 project_files/HedgewarsMobile/Locale/hw-desc_da.txt --- a/project_files/HedgewarsMobile/Locale/hw-desc_da.txt Sun Nov 18 01:06:01 2012 +0400 +++ b/project_files/HedgewarsMobile/Locale/hw-desc_da.txt Fri Feb 22 05:05:32 2013 +0100 @@ -4,7 +4,7 @@ ✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭ Hedgewars er tilgængeligt i Mac App Store! Søg efter Hedgewars på din Mac og få din GRATIS kopi i dag! ✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭ -✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭ +✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭ iOS versionen har flere eksklusive funktioner, så som * iPad VGA-udgangssignal: tilslut en ekstern skærm og spil i fuld oplysning; diff -r d5d5e1698554 -r 1dedcc37bfe8 project_files/HedgewarsMobile/Locale/hw-desc_de.txt --- a/project_files/HedgewarsMobile/Locale/hw-desc_de.txt Sun Nov 18 01:06:01 2012 +0400 +++ b/project_files/HedgewarsMobile/Locale/hw-desc_de.txt Fri Feb 22 05:05:32 2013 +0100 @@ -4,7 +4,7 @@ ✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭ Hedgewars ist jetzt auch im Mac Appstore verfügbar! Suche Hedgewars von deinem Mac und bekomme deine GRATIS Kopie! ✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭ -✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭ +✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭ Der iOS-Port hat einige exklusiven Features, wie z.B.: * iPad VGA-Ausgabe: Schließe einen externen Bildschirm an und spiele mit voller Auflösung; diff -r d5d5e1698554 -r 1dedcc37bfe8 project_files/HedgewarsMobile/Locale/hw-desc_en.txt --- a/project_files/HedgewarsMobile/Locale/hw-desc_en.txt Sun Nov 18 01:06:01 2012 +0400 +++ b/project_files/HedgewarsMobile/Locale/hw-desc_en.txt Fri Feb 22 05:05:32 2013 +0100 @@ -4,7 +4,7 @@ ✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭ Hedgewars is available for the Mac Appstore! Search Hedgewars on your Mac and get your FREE copy today! ✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭ -✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭ +✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭ The iOS port has some exclusive features, such as * iPad VGA Out: hook an external display and play at full resolution; diff -r d5d5e1698554 -r 1dedcc37bfe8 project_files/HedgewarsMobile/Locale/hw-desc_es.txt --- a/project_files/HedgewarsMobile/Locale/hw-desc_es.txt Sun Nov 18 01:06:01 2012 +0400 +++ b/project_files/HedgewarsMobile/Locale/hw-desc_es.txt Fri Feb 22 05:05:32 2013 +0100 @@ -4,7 +4,7 @@ ✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭ ¡Hedgewars esta disponible en la Mac Appstore! ¡Busca Hedgewars en tu Mac y consigue tu copia gratuita hoy! ✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭ -✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭ +✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭ La versión para iOS contiene algunas características exclusivas, como: * Salida VGA para iPad: conecta un monitor externo y juega a resolución completa; diff -r d5d5e1698554 -r 1dedcc37bfe8 project_files/HedgewarsMobile/Locale/hw-desc_fr.txt --- a/project_files/HedgewarsMobile/Locale/hw-desc_fr.txt Sun Nov 18 01:06:01 2012 +0400 +++ b/project_files/HedgewarsMobile/Locale/hw-desc_fr.txt Fri Feb 22 05:05:32 2013 +0100 @@ -4,7 +4,7 @@ ✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭ Hedgewars est disponible sur le Mac Appstore ! Cherchez Hedgewars sur votre Mac et obtenez une copie gratuite aujourd'hui ! ✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭ -✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭ +✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭ Le portage vers iOS a quelques fonctionnalités exclusives, comme : * Sortie VGA de l'iPad: connectez un affichage externe et jouez à la résolution maximale; diff -r d5d5e1698554 -r 1dedcc37bfe8 project_files/HedgewarsMobile/Locale/hw-desc_it.txt --- a/project_files/HedgewarsMobile/Locale/hw-desc_it.txt Sun Nov 18 01:06:01 2012 +0400 +++ b/project_files/HedgewarsMobile/Locale/hw-desc_it.txt Fri Feb 22 05:05:32 2013 +0100 @@ -4,7 +4,7 @@ ✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭ Hedgewars è disponiile sul Mac Appstore! Cerca Hedgewars sul tuo Mac e scarica la tua copia gratuitamente! ✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭ -✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭ +✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭ La verisone per iOS offre alcune fantastiche esclusive, come * iPad VGA Out: attacca un dispaly esterno e gioca a piena risoluzione; diff -r d5d5e1698554 -r 1dedcc37bfe8 project_files/HedgewarsMobile/Locale/hw-desc_pl.txt --- a/project_files/HedgewarsMobile/Locale/hw-desc_pl.txt Sun Nov 18 01:06:01 2012 +0400 +++ b/project_files/HedgewarsMobile/Locale/hw-desc_pl.txt Fri Feb 22 05:05:32 2013 +0100 @@ -4,7 +4,7 @@ ✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭ Hedgewars jest dostępny na Mac Appstore! Poszukaj Hedgewars na swoim Mac'u i otrzymaj kopię za darmo! ✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭ -✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭ +✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭ Port na iOS posiada kilka unikalnych funkcji, takich jak: * Wtyczka iPad VGA : podłącz zewnętrzny ekran i graj w pełnej rozdzielczości; diff -r d5d5e1698554 -r 1dedcc37bfe8 project_files/HedgewarsMobile/Locale/hw-desc_pt.txt --- a/project_files/HedgewarsMobile/Locale/hw-desc_pt.txt Sun Nov 18 01:06:01 2012 +0400 +++ b/project_files/HedgewarsMobile/Locale/hw-desc_pt.txt Fri Feb 22 05:05:32 2013 +0100 @@ -4,7 +4,7 @@ ✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭ O Hedgewars está disponível na Mac App Store! Pesquisa Hedgewars no teu MacBook e obtém a tua cópia GRATUITA hoje! ✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭ -✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭ +✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭ A versão para iOS tem algumas funcionalidades exclusivas, como * Saída VGA no iPad: liga-o a um ecrã externo e joga em resolução completa; diff -r d5d5e1698554 -r 1dedcc37bfe8 project_files/frontlib/CMakeLists.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/project_files/frontlib/CMakeLists.txt Fri Feb 22 05:05:32 2013 +0100 @@ -0,0 +1,21 @@ +find_package(SDL REQUIRED) +find_package(SDL_net REQUIRED) +find_package(ZLIB REQUIRED) + +add_definitions("-std=c99") + +file(GLOB frontlib_src + *.c *.h + base64/*.c base64/*.h + ipc/*.c ipc/*.h + md5/*.c md5/*.h + model/*.c model/*.h + net/*.c net/*.h + util/*.c util/*.h + ) + +include_directories(${SDL_INCLUDE_DIR}) +include_directories(${SDLNET_INCLUDE_DIR}) +include_directories(${ZLIB_INCLUDE_DIR}) + +add_library(frontlib STATIC ${frontlib_src}) diff -r d5d5e1698554 -r 1dedcc37bfe8 project_files/frontlib/base64/base64.h --- a/project_files/frontlib/base64/base64.h Sun Nov 18 01:06:01 2012 +0400 +++ b/project_files/frontlib/base64/base64.h Fri Feb 22 05:05:32 2013 +0100 @@ -24,7 +24,7 @@ /* Get bool. */ # include -/* This uses that the expression (n+(k-1))/k means the smallest +/*! This uses that the expression (n+(k-1))/k means the smallest integer >= n/k, i.e., the ceiling of n/k. */ # define BASE64_LENGTH(inlen) ((((inlen) + 2) / 3) * 4) diff -r d5d5e1698554 -r 1dedcc37bfe8 project_files/frontlib/frontlib.h diff -r d5d5e1698554 -r 1dedcc37bfe8 project_files/frontlib/hw_doc.doxygen --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/project_files/frontlib/hw_doc.doxygen Fri Feb 22 05:05:32 2013 +0100 @@ -0,0 +1,1846 @@ +# Doxyfile 1.8.2 + +# This file describes the settings to be used by the documentation system +# doxygen (www.doxygen.org) for a project +# +# All text after a hash (#) is considered a comment and will be ignored +# The format is: +# TAG = value [value, ...] +# For lists items can also be appended using: +# TAG += value [value, ...] +# Values that contain spaces should be placed between quotes (" ") + +#--------------------------------------------------------------------------- +# Project related configuration options +#--------------------------------------------------------------------------- + +# This tag specifies the encoding used for all characters in the config file +# that follow. The default is UTF-8 which is also the encoding used for all +# text before the first occurrence of this tag. Doxygen uses libiconv (or the +# iconv built into libc) for the transcoding. See +# http://www.gnu.org/software/libiconv for the list of possible encodings. + +DOXYFILE_ENCODING = UTF-8 + +# The PROJECT_NAME tag is a single word (or sequence of words) that should +# identify the project. Note that if you do not use Doxywizard you need +# to put quotes around the project name if it contains spaces. + +PROJECT_NAME = "HW Frontlib" + +# The PROJECT_NUMBER tag can be used to enter a project or revision number. +# This could be handy for archiving the generated documentation or +# if some version control system is used. + +PROJECT_NUMBER = "" + +# Using the PROJECT_BRIEF tag one can provide an optional one line description +# for a project that appears at the top of each page and should give viewer +# a quick idea about the purpose of the project. Keep the description short. + +PROJECT_BRIEF = + +# With the PROJECT_LOGO tag one can specify an logo or icon that is +# included in the documentation. The maximum height of the logo should not +# exceed 55 pixels and the maximum width should not exceed 200 pixels. +# Doxygen will copy the logo to the output directory. + +PROJECT_LOGO = + +# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) +# base path where the generated documentation will be put. +# If a relative path is entered, it will be relative to the location +# where doxygen was started. If left blank the current directory will be used. + +OUTPUT_DIRECTORY = "doc" + +# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create +# 4096 sub-directories (in 2 levels) under the output directory of each output +# format and will distribute the generated files over these directories. +# Enabling this option can be useful when feeding doxygen a huge amount of +# source files, where putting all generated files in the same directory would +# otherwise cause performance problems for the file system. + +CREATE_SUBDIRS = NO + +# The OUTPUT_LANGUAGE tag is used to specify the language in which all +# documentation generated by doxygen is written. Doxygen will use this +# information to generate all constant output in the proper language. +# The default language is English, other supported languages are: +# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, +# Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German, +# Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English +# messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian, +# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrillic, Slovak, +# Slovene, Spanish, Swedish, Ukrainian, and Vietnamese. + +OUTPUT_LANGUAGE = English + +# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will +# include brief member descriptions after the members that are listed in +# the file and class documentation (similar to JavaDoc). +# Set to NO to disable this. + +BRIEF_MEMBER_DESC = YES + +# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend +# the brief description of a member or function before the detailed description. +# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the +# brief descriptions will be completely suppressed. + +REPEAT_BRIEF = YES + +# This tag implements a quasi-intelligent brief description abbreviator +# that is used to form the text in various listings. Each string +# in this list, if found as the leading text of the brief description, will be +# stripped from the text and the result after processing the whole list, is +# used as the annotated text. Otherwise, the brief description is used as-is. +# If left blank, the following values are used ("$name" is automatically +# replaced with the name of the entity): "The $name class" "The $name widget" +# "The $name file" "is" "provides" "specifies" "contains" +# "represents" "a" "an" "the" + +ABBREVIATE_BRIEF = "The $name class" \ + "The $name widget" \ + "The $name file" \ + is \ + provides \ + specifies \ + contains \ + represents \ + a \ + an \ + the + +# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then +# Doxygen will generate a detailed section even if there is only a brief +# description. + +ALWAYS_DETAILED_SEC = NO + +# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all +# inherited members of a class in the documentation of that class as if those +# members were ordinary class members. Constructors, destructors and assignment +# operators of the base classes will not be shown. + +INLINE_INHERITED_MEMB = NO + +# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full +# path before files name in the file list and in the header files. If set +# to NO the shortest path that makes the file name unique will be used. + +FULL_PATH_NAMES = YES + +# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag +# can be used to strip a user-defined part of the path. Stripping is +# only done if one of the specified strings matches the left-hand part of +# the path. The tag can be used to show relative paths in the file list. +# If left blank the directory from which doxygen is run is used as the +# path to strip. Note that you specify absolute paths here, but also +# relative paths, which will be relative from the directory where doxygen is +# started. + +STRIP_FROM_PATH = + +# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of +# the path mentioned in the documentation of a class, which tells +# the reader which header file to include in order to use a class. +# If left blank only the name of the header file containing the class +# definition is used. Otherwise one should specify the include paths that +# are normally passed to the compiler using the -I flag. + +STRIP_FROM_INC_PATH = + +# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter +# (but less readable) file names. This can be useful if your file system +# doesn't support long names like on DOS, Mac, or CD-ROM. + +SHORT_NAMES = NO + +# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen +# will interpret the first line (until the first dot) of a JavaDoc-style +# comment as the brief description. If set to NO, the JavaDoc +# comments will behave just like regular Qt-style comments +# (thus requiring an explicit @brief command for a brief description.) + +JAVADOC_AUTOBRIEF = NO + +# If the QT_AUTOBRIEF tag is set to YES then Doxygen will +# interpret the first line (until the first dot) of a Qt-style +# comment as the brief description. If set to NO, the comments +# will behave just like regular Qt-style comments (thus requiring +# an explicit \brief command for a brief description.) + +QT_AUTOBRIEF = NO + +# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen +# treat a multi-line C++ special comment block (i.e. a block of //! or /// +# comments) as a brief description. This used to be the default behaviour. +# The new default is to treat a multi-line C++ comment block as a detailed +# description. Set this tag to YES if you prefer the old behaviour instead. + +MULTILINE_CPP_IS_BRIEF = NO + +# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented +# member inherits the documentation from any documented member that it +# re-implements. + +INHERIT_DOCS = YES + +# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce +# a new page for each member. If set to NO, the documentation of a member will +# be part of the file/class/namespace that contains it. + +SEPARATE_MEMBER_PAGES = NO + +# The TAB_SIZE tag can be used to set the number of spaces in a tab. +# Doxygen uses this value to replace tabs by spaces in code fragments. + +TAB_SIZE = 4 + +# This tag can be used to specify a number of aliases that acts +# as commands in the documentation. An alias has the form "name=value". +# For example adding "sideeffect=\par Side Effects:\n" will allow you to +# put the command \sideeffect (or @sideeffect) in the documentation, which +# will result in a user-defined paragraph with heading "Side Effects:". +# You can put \n's in the value part of an alias to insert newlines. + +ALIASES = + +# This tag can be used to specify a number of word-keyword mappings (TCL only). +# A mapping has the form "name=value". For example adding +# "class=itcl::class" will allow you to use the command class in the +# itcl::class meaning. + +TCL_SUBST = + +# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C +# sources only. Doxygen will then generate output that is more tailored for C. +# For instance, some of the names that are used will be different. The list +# of all members will be omitted, etc. + +OPTIMIZE_OUTPUT_FOR_C = NO + +# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java +# sources only. Doxygen will then generate output that is more tailored for +# Java. For instance, namespaces will be presented as packages, qualified +# scopes will look different, etc. + +OPTIMIZE_OUTPUT_JAVA = NO + +# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran +# sources only. Doxygen will then generate output that is more tailored for +# Fortran. + +OPTIMIZE_FOR_FORTRAN = NO + +# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL +# sources. Doxygen will then generate output that is tailored for +# VHDL. + +OPTIMIZE_OUTPUT_VHDL = NO + +# Doxygen selects the parser to use depending on the extension of the files it +# parses. With this tag you can assign which parser to use for a given +# extension. Doxygen has a built-in mapping, but you can override or extend it +# using this tag. The format is ext=language, where ext is a file extension, +# and language is one of the parsers supported by doxygen: IDL, Java, +# Javascript, CSharp, C, C++, D, PHP, Objective-C, Python, Fortran, VHDL, C, +# C++. For instance to make doxygen treat .inc files as Fortran files (default +# is PHP), and .f files as C (default is Fortran), use: inc=Fortran f=C. Note +# that for custom extensions you also need to set FILE_PATTERNS otherwise the +# files are not read by doxygen. + +EXTENSION_MAPPING = + +# If MARKDOWN_SUPPORT is enabled (the default) then doxygen pre-processes all +# comments according to the Markdown format, which allows for more readable +# documentation. See http://daringfireball.net/projects/markdown/ for details. +# The output of markdown processing is further processed by doxygen, so you +# can mix doxygen, HTML, and XML commands with Markdown formatting. +# Disable only in case of backward compatibilities issues. + +MARKDOWN_SUPPORT = YES + +# When enabled doxygen tries to link words that correspond to documented classes, +# or namespaces to their corresponding documentation. Such a link can be +# prevented in individual cases by by putting a % sign in front of the word or +# globally by setting AUTOLINK_SUPPORT to NO. + +AUTOLINK_SUPPORT = YES + +# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want +# to include (a tag file for) the STL sources as input, then you should +# set this tag to YES in order to let doxygen match functions declarations and +# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. +# func(std::string) {}). This also makes the inheritance and collaboration +# diagrams that involve STL classes more complete and accurate. + +BUILTIN_STL_SUPPORT = NO + +# If you use Microsoft's C++/CLI language, you should set this option to YES to +# enable parsing support. + +CPP_CLI_SUPPORT = NO + +# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only. +# Doxygen will parse them like normal C++ but will assume all classes use public +# instead of private inheritance when no explicit protection keyword is present. + +SIP_SUPPORT = NO + +# For Microsoft's IDL there are propget and propput attributes to indicate +# getter and setter methods for a property. Setting this option to YES (the +# default) will make doxygen replace the get and set methods by a property in +# the documentation. This will only work if the methods are indeed getting or +# setting a simple type. If this is not the case, or you want to show the +# methods anyway, you should set this option to NO. + +IDL_PROPERTY_SUPPORT = YES + +# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC +# tag is set to YES, then doxygen will reuse the documentation of the first +# member in the group (if any) for the other members of the group. By default +# all members of a group must be documented explicitly. + +DISTRIBUTE_GROUP_DOC = NO + +# Set the SUBGROUPING tag to YES (the default) to allow class member groups of +# the same type (for instance a group of public functions) to be put as a +# subgroup of that type (e.g. under the Public Functions section). Set it to +# NO to prevent subgrouping. Alternatively, this can be done per class using +# the \nosubgrouping command. + +SUBGROUPING = YES + +# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and +# unions are shown inside the group in which they are included (e.g. using +# @ingroup) instead of on a separate page (for HTML and Man pages) or +# section (for LaTeX and RTF). + +INLINE_GROUPED_CLASSES = NO + +# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and +# unions with only public data fields will be shown inline in the documentation +# of the scope in which they are defined (i.e. file, namespace, or group +# documentation), provided this scope is documented. If set to NO (the default), +# structs, classes, and unions are shown on a separate page (for HTML and Man +# pages) or section (for LaTeX and RTF). + +INLINE_SIMPLE_STRUCTS = NO + +# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum +# is documented as struct, union, or enum with the name of the typedef. So +# typedef struct TypeS {} TypeT, will appear in the documentation as a struct +# with name TypeT. When disabled the typedef will appear as a member of a file, +# namespace, or class. And the struct will be named TypeS. This can typically +# be useful for C code in case the coding convention dictates that all compound +# types are typedef'ed and only the typedef is referenced, never the tag name. + +TYPEDEF_HIDES_STRUCT = NO + +# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to +# determine which symbols to keep in memory and which to flush to disk. +# When the cache is full, less often used symbols will be written to disk. +# For small to medium size projects (<1000 input files) the default value is +# probably good enough. For larger projects a too small cache size can cause +# doxygen to be busy swapping symbols to and from disk most of the time +# causing a significant performance penalty. +# If the system has enough physical memory increasing the cache will improve the +# performance by keeping more symbols in memory. Note that the value works on +# a logarithmic scale so increasing the size by one will roughly double the +# memory usage. The cache size is given by this formula: +# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0, +# corresponding to a cache size of 2^16 = 65536 symbols. + +SYMBOL_CACHE_SIZE = 0 + +# Similar to the SYMBOL_CACHE_SIZE the size of the symbol lookup cache can be +# set using LOOKUP_CACHE_SIZE. This cache is used to resolve symbols given +# their name and scope. Since this can be an expensive process and often the +# same symbol appear multiple times in the code, doxygen keeps a cache of +# pre-resolved symbols. If the cache is too small doxygen will become slower. +# If the cache is too large, memory is wasted. The cache size is given by this +# formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range is 0..9, the default is 0, +# corresponding to a cache size of 2^16 = 65536 symbols. + +LOOKUP_CACHE_SIZE = 0 + +#--------------------------------------------------------------------------- +# Build related configuration options +#--------------------------------------------------------------------------- + +# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in +# documentation are documented, even if no documentation was available. +# Private class members and static file members will be hidden unless +# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES + +EXTRACT_ALL = NO + +# If the EXTRACT_PRIVATE tag is set to YES all private members of a class +# will be included in the documentation. + +EXTRACT_PRIVATE = NO + +# If the EXTRACT_PACKAGE tag is set to YES all members with package or internal +# scope will be included in the documentation. + +EXTRACT_PACKAGE = NO + +# If the EXTRACT_STATIC tag is set to YES all static members of a file +# will be included in the documentation. + +EXTRACT_STATIC = NO + +# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) +# defined locally in source files will be included in the documentation. +# If set to NO only classes defined in header files are included. + +EXTRACT_LOCAL_CLASSES = YES + +# This flag is only useful for Objective-C code. When set to YES local +# methods, which are defined in the implementation section but not in +# the interface are included in the documentation. +# If set to NO (the default) only methods in the interface are included. + +EXTRACT_LOCAL_METHODS = NO + +# If this flag is set to YES, the members of anonymous namespaces will be +# extracted and appear in the documentation as a namespace called +# 'anonymous_namespace{file}', where file will be replaced with the base +# name of the file that contains the anonymous namespace. By default +# anonymous namespaces are hidden. + +EXTRACT_ANON_NSPACES = NO + +# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all +# undocumented members of documented classes, files or namespaces. +# If set to NO (the default) these members will be included in the +# various overviews, but no documentation section is generated. +# This option has no effect if EXTRACT_ALL is enabled. + +HIDE_UNDOC_MEMBERS = NO + +# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all +# undocumented classes that are normally visible in the class hierarchy. +# If set to NO (the default) these classes will be included in the various +# overviews. This option has no effect if EXTRACT_ALL is enabled. + +HIDE_UNDOC_CLASSES = NO + +# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all +# friend (class|struct|union) declarations. +# If set to NO (the default) these declarations will be included in the +# documentation. + +HIDE_FRIEND_COMPOUNDS = NO + +# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any +# documentation blocks found inside the body of a function. +# If set to NO (the default) these blocks will be appended to the +# function's detailed documentation block. + +HIDE_IN_BODY_DOCS = NO + +# The INTERNAL_DOCS tag determines if documentation +# that is typed after a \internal command is included. If the tag is set +# to NO (the default) then the documentation will be excluded. +# Set it to YES to include the internal documentation. + +INTERNAL_DOCS = NO + +# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate +# file names in lower-case letters. If set to YES upper-case letters are also +# allowed. This is useful if you have classes or files whose names only differ +# in case and if your file system supports case sensitive file names. Windows +# and Mac users are advised to set this option to NO. + +CASE_SENSE_NAMES = NO + +# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen +# will show members with their full class and namespace scopes in the +# documentation. If set to YES the scope will be hidden. + +HIDE_SCOPE_NAMES = NO + +# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen +# will put a list of the files that are included by a file in the documentation +# of that file. + +SHOW_INCLUDE_FILES = YES + +# If the FORCE_LOCAL_INCLUDES tag is set to YES then Doxygen +# will list include files with double quotes in the documentation +# rather than with sharp brackets. + +FORCE_LOCAL_INCLUDES = NO + +# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] +# is inserted in the documentation for inline members. + +INLINE_INFO = YES + +# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen +# will sort the (detailed) documentation of file and class members +# alphabetically by member name. If set to NO the members will appear in +# declaration order. + +SORT_MEMBER_DOCS = YES + +# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the +# brief documentation of file, namespace and class members alphabetically +# by member name. If set to NO (the default) the members will appear in +# declaration order. + +SORT_BRIEF_DOCS = NO + +# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen +# will sort the (brief and detailed) documentation of class members so that +# constructors and destructors are listed first. If set to NO (the default) +# the constructors will appear in the respective orders defined by +# SORT_MEMBER_DOCS and SORT_BRIEF_DOCS. +# This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO +# and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO. + +SORT_MEMBERS_CTORS_1ST = NO + +# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the +# hierarchy of group names into alphabetical order. If set to NO (the default) +# the group names will appear in their defined order. + +SORT_GROUP_NAMES = NO + +# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be +# sorted by fully-qualified names, including namespaces. If set to +# NO (the default), the class list will be sorted only by class name, +# not including the namespace part. +# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. +# Note: This option applies only to the class list, not to the +# alphabetical list. + +SORT_BY_SCOPE_NAME = NO + +# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to +# do proper type resolution of all parameters of a function it will reject a +# match between the prototype and the implementation of a member function even +# if there is only one candidate or it is obvious which candidate to choose +# by doing a simple string match. By disabling STRICT_PROTO_MATCHING doxygen +# will still accept a match between prototype and implementation in such cases. + +STRICT_PROTO_MATCHING = NO + +# The GENERATE_TODOLIST tag can be used to enable (YES) or +# disable (NO) the todo list. This list is created by putting \todo +# commands in the documentation. + +GENERATE_TODOLIST = YES + +# The GENERATE_TESTLIST tag can be used to enable (YES) or +# disable (NO) the test list. This list is created by putting \test +# commands in the documentation. + +GENERATE_TESTLIST = YES + +# The GENERATE_BUGLIST tag can be used to enable (YES) or +# disable (NO) the bug list. This list is created by putting \bug +# commands in the documentation. + +GENERATE_BUGLIST = YES + +# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or +# disable (NO) the deprecated list. This list is created by putting +# \deprecated commands in the documentation. + +GENERATE_DEPRECATEDLIST= YES + +# The ENABLED_SECTIONS tag can be used to enable conditional +# documentation sections, marked by \if sectionname ... \endif. + +ENABLED_SECTIONS = + +# The MAX_INITIALIZER_LINES tag determines the maximum number of lines +# the initial value of a variable or macro consists of for it to appear in +# the documentation. If the initializer consists of more lines than specified +# here it will be hidden. Use a value of 0 to hide initializers completely. +# The appearance of the initializer of individual variables and macros in the +# documentation can be controlled using \showinitializer or \hideinitializer +# command in the documentation regardless of this setting. + +MAX_INITIALIZER_LINES = 30 + +# Set the SHOW_USED_FILES tag to NO to disable the list of files generated +# at the bottom of the documentation of classes and structs. If set to YES the +# list will mention the files that were used to generate the documentation. + +SHOW_USED_FILES = YES + +# Set the SHOW_FILES tag to NO to disable the generation of the Files page. +# This will remove the Files entry from the Quick Index and from the +# Folder Tree View (if specified). The default is YES. + +SHOW_FILES = YES + +# Set the SHOW_NAMESPACES tag to NO to disable the generation of the +# Namespaces page. This will remove the Namespaces entry from the Quick Index +# and from the Folder Tree View (if specified). The default is YES. + +SHOW_NAMESPACES = YES + +# The FILE_VERSION_FILTER tag can be used to specify a program or script that +# doxygen should invoke to get the current version for each file (typically from +# the version control system). Doxygen will invoke the program by executing (via +# popen()) the command , where is the value of +# the FILE_VERSION_FILTER tag, and is the name of an input file +# provided by doxygen. Whatever the program writes to standard output +# is used as the file version. See the manual for examples. + +FILE_VERSION_FILTER = + +# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed +# by doxygen. The layout file controls the global structure of the generated +# output files in an output format independent way. To create the layout file +# that represents doxygen's defaults, run doxygen with the -l option. +# You can optionally specify a file name after the option, if omitted +# DoxygenLayout.xml will be used as the name of the layout file. + +LAYOUT_FILE = + +# The CITE_BIB_FILES tag can be used to specify one or more bib files +# containing the references data. This must be a list of .bib files. The +# .bib extension is automatically appended if omitted. Using this command +# requires the bibtex tool to be installed. See also +# http://en.wikipedia.org/wiki/BibTeX for more info. For LaTeX the style +# of the bibliography can be controlled using LATEX_BIB_STYLE. To use this +# feature you need bibtex and perl available in the search path. + +CITE_BIB_FILES = + +#--------------------------------------------------------------------------- +# configuration options related to warning and progress messages +#--------------------------------------------------------------------------- + +# The QUIET tag can be used to turn on/off the messages that are generated +# by doxygen. Possible values are YES and NO. If left blank NO is used. + +QUIET = NO + +# The WARNINGS tag can be used to turn on/off the warning messages that are +# generated by doxygen. Possible values are YES and NO. If left blank +# NO is used. + +WARNINGS = YES + +# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings +# for undocumented members. If EXTRACT_ALL is set to YES then this flag will +# automatically be disabled. + +WARN_IF_UNDOCUMENTED = YES + +# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for +# potential errors in the documentation, such as not documenting some +# parameters in a documented function, or documenting parameters that +# don't exist or using markup commands wrongly. + +WARN_IF_DOC_ERROR = YES + +# The WARN_NO_PARAMDOC option can be enabled to get warnings for +# functions that are documented, but have no documentation for their parameters +# or return value. If set to NO (the default) doxygen will only warn about +# wrong or incomplete parameter documentation, but not about the absence of +# documentation. + +WARN_NO_PARAMDOC = NO + +# The WARN_FORMAT tag determines the format of the warning messages that +# doxygen can produce. The string should contain the $file, $line, and $text +# tags, which will be replaced by the file and line number from which the +# warning originated and the warning text. Optionally the format may contain +# $version, which will be replaced by the version of the file (if it could +# be obtained via FILE_VERSION_FILTER) + +WARN_FORMAT = "$file:$line: $text" + +# The WARN_LOGFILE tag can be used to specify a file to which warning +# and error messages should be written. If left blank the output is written +# to stderr. + +WARN_LOGFILE = + +#--------------------------------------------------------------------------- +# configuration options related to the input files +#--------------------------------------------------------------------------- + +# The INPUT tag can be used to specify the files and/or directories that contain +# documented source files. You may enter file names like "myfile.cpp" or +# directories like "/usr/src/myproject". Separate the files or directories +# with spaces. + +INPUT = . + +# This tag can be used to specify the character encoding of the source files +# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is +# also the default input encoding. Doxygen uses libiconv (or the iconv built +# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for +# the list of possible encodings. + +INPUT_ENCODING = UTF-8 + +# If the value of the INPUT tag contains directories, you can use the +# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left +# blank the following patterns are tested: +# *.c *.cc *.cxx *.cpp *.c++ *.d *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh +# *.hxx *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.dox *.py +# *.f90 *.f *.for *.vhd *.vhdl + +FILE_PATTERNS = *.c \ + *.cc \ + *.cxx \ + *.cpp \ + *.c++ \ + *.d \ + *.java \ + *.ii \ + *.ixx \ + *.ipp \ + *.i++ \ + *.inl \ + *.h \ + *.hh \ + *.hxx \ + *.hpp \ + *.h++ \ + *.idl \ + *.odl \ + *.cs \ + *.php \ + *.php3 \ + *.inc \ + *.m \ + *.markdown \ + *.md \ + *.mm \ + *.dox \ + *.py \ + *.f90 \ + *.f \ + *.for \ + *.vhd \ + *.vhdl + +# The RECURSIVE tag can be used to turn specify whether or not subdirectories +# should be searched for input files as well. Possible values are YES and NO. +# If left blank NO is used. + +RECURSIVE = YES + +# The EXCLUDE tag can be used to specify files and/or directories that should be +# excluded from the INPUT source files. This way you can easily exclude a +# subdirectory from a directory tree whose root is specified with the INPUT tag. +# Note that relative paths are relative to the directory from which doxygen is +# run. + +EXCLUDE = + +# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or +# directories that are symbolic links (a Unix file system feature) are excluded +# from the input. + +EXCLUDE_SYMLINKS = NO + +# If the value of the INPUT tag contains directories, you can use the +# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude +# certain files from those directories. Note that the wildcards are matched +# against the file with absolute path, so to exclude all test directories +# for example use the pattern */test/* + +EXCLUDE_PATTERNS = + +# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names +# (namespaces, classes, functions, etc.) that should be excluded from the +# output. The symbol name can be a fully qualified name, a word, or if the +# wildcard * is used, a substring. Examples: ANamespace, AClass, +# AClass::ANamespace, ANamespace::*Test + +EXCLUDE_SYMBOLS = + +# The EXAMPLE_PATH tag can be used to specify one or more files or +# directories that contain example code fragments that are included (see +# the \include command). + +EXAMPLE_PATH = + +# If the value of the EXAMPLE_PATH tag contains directories, you can use the +# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left +# blank all files are included. + +EXAMPLE_PATTERNS = * + +# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be +# searched for input files to be used with the \include or \dontinclude +# commands irrespective of the value of the RECURSIVE tag. +# Possible values are YES and NO. If left blank NO is used. + +EXAMPLE_RECURSIVE = NO + +# The IMAGE_PATH tag can be used to specify one or more files or +# directories that contain image that are included in the documentation (see +# the \image command). + +IMAGE_PATH = + +# The INPUT_FILTER tag can be used to specify a program that doxygen should +# invoke to filter for each input file. Doxygen will invoke the filter program +# by executing (via popen()) the command , where +# is the value of the INPUT_FILTER tag, and is the name of an +# input file. Doxygen will then use the output that the filter program writes +# to standard output. If FILTER_PATTERNS is specified, this tag will be +# ignored. + +INPUT_FILTER = + +# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern +# basis. Doxygen will compare the file name with each pattern and apply the +# filter if there is a match. The filters are a list of the form: +# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further +# info on how filters are used. If FILTER_PATTERNS is empty or if +# non of the patterns match the file name, INPUT_FILTER is applied. + +FILTER_PATTERNS = + +# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using +# INPUT_FILTER) will be used to filter the input files when producing source +# files to browse (i.e. when SOURCE_BROWSER is set to YES). + +FILTER_SOURCE_FILES = NO + +# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file +# pattern. A pattern will override the setting for FILTER_PATTERN (if any) +# and it is also possible to disable source filtering for a specific pattern +# using *.ext= (so without naming a filter). This option only has effect when +# FILTER_SOURCE_FILES is enabled. + +FILTER_SOURCE_PATTERNS = + +#--------------------------------------------------------------------------- +# configuration options related to source browsing +#--------------------------------------------------------------------------- + +# If the SOURCE_BROWSER tag is set to YES then a list of source files will +# be generated. Documented entities will be cross-referenced with these sources. +# Note: To get rid of all source code in the generated output, make sure also +# VERBATIM_HEADERS is set to NO. + +SOURCE_BROWSER = NO + +# Setting the INLINE_SOURCES tag to YES will include the body +# of functions and classes directly in the documentation. + +INLINE_SOURCES = NO + +# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct +# doxygen to hide any special comment blocks from generated source code +# fragments. Normal C, C++ and Fortran comments will always remain visible. + +STRIP_CODE_COMMENTS = YES + +# If the REFERENCED_BY_RELATION tag is set to YES +# then for each documented function all documented +# functions referencing it will be listed. + +REFERENCED_BY_RELATION = NO + +# If the REFERENCES_RELATION tag is set to YES +# then for each documented function all documented entities +# called/used by that function will be listed. + +REFERENCES_RELATION = NO + +# If the REFERENCES_LINK_SOURCE tag is set to YES (the default) +# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from +# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will +# link to the source code. Otherwise they will link to the documentation. + +REFERENCES_LINK_SOURCE = YES + +# If the USE_HTAGS tag is set to YES then the references to source code +# will point to the HTML generated by the htags(1) tool instead of doxygen +# built-in source browser. The htags tool is part of GNU's global source +# tagging system (see http://www.gnu.org/software/global/global.html). You +# will need version 4.8.6 or higher. + +USE_HTAGS = NO + +# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen +# will generate a verbatim copy of the header file for each class for +# which an include is specified. Set to NO to disable this. + +VERBATIM_HEADERS = YES + +#--------------------------------------------------------------------------- +# configuration options related to the alphabetical class index +#--------------------------------------------------------------------------- + +# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index +# of all compounds will be generated. Enable this if the project +# contains a lot of classes, structs, unions or interfaces. + +ALPHABETICAL_INDEX = YES + +# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then +# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns +# in which this list will be split (can be a number in the range [1..20]) + +COLS_IN_ALPHA_INDEX = 5 + +# In case all classes in a project start with a common prefix, all +# classes will be put under the same header in the alphabetical index. +# The IGNORE_PREFIX tag can be used to specify one or more prefixes that +# should be ignored while generating the index headers. + +IGNORE_PREFIX = + +#--------------------------------------------------------------------------- +# configuration options related to the HTML output +#--------------------------------------------------------------------------- + +# If the GENERATE_HTML tag is set to YES (the default) Doxygen will +# generate HTML output. + +GENERATE_HTML = YES + +# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `html' will be used as the default path. + +HTML_OUTPUT = html + +# The HTML_FILE_EXTENSION tag can be used to specify the file extension for +# each generated HTML page (for example: .htm,.php,.asp). If it is left blank +# doxygen will generate files with .html extension. + +HTML_FILE_EXTENSION = .html + +# The HTML_HEADER tag can be used to specify a personal HTML header for +# each generated HTML page. If it is left blank doxygen will generate a +# standard header. Note that when using a custom header you are responsible +# for the proper inclusion of any scripts and style sheets that doxygen +# needs, which is dependent on the configuration options used. +# It is advised to generate a default header using "doxygen -w html +# header.html footer.html stylesheet.css YourConfigFile" and then modify +# that header. Note that the header is subject to change so you typically +# have to redo this when upgrading to a newer version of doxygen or when +# changing the value of configuration settings such as GENERATE_TREEVIEW! + +HTML_HEADER = + +# The HTML_FOOTER tag can be used to specify a personal HTML footer for +# each generated HTML page. If it is left blank doxygen will generate a +# standard footer. + +HTML_FOOTER = + +# The HTML_STYLESHEET tag can be used to specify a user-defined cascading +# style sheet that is used by each HTML page. It can be used to +# fine-tune the look of the HTML output. If left blank doxygen will +# generate a default style sheet. Note that it is recommended to use +# HTML_EXTRA_STYLESHEET instead of this one, as it is more robust and this +# tag will in the future become obsolete. + +HTML_STYLESHEET = + +# The HTML_EXTRA_STYLESHEET tag can be used to specify an additional +# user-defined cascading style sheet that is included after the standard +# style sheets created by doxygen. Using this option one can overrule +# certain style aspects. This is preferred over using HTML_STYLESHEET +# since it does not replace the standard style sheet and is therefor more +# robust against future updates. Doxygen will copy the style sheet file to +# the output directory. + +HTML_EXTRA_STYLESHEET = + +# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or +# other source files which should be copied to the HTML output directory. Note +# that these files will be copied to the base HTML output directory. Use the +# $relpath$ marker in the HTML_HEADER and/or HTML_FOOTER files to load these +# files. In the HTML_STYLESHEET file, use the file name only. Also note that +# the files will be copied as-is; there are no commands or markers available. + +HTML_EXTRA_FILES = + +# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. +# Doxygen will adjust the colors in the style sheet and background images +# according to this color. Hue is specified as an angle on a colorwheel, +# see http://en.wikipedia.org/wiki/Hue for more information. +# For instance the value 0 represents red, 60 is yellow, 120 is green, +# 180 is cyan, 240 is blue, 300 purple, and 360 is red again. +# The allowed range is 0 to 359. + +HTML_COLORSTYLE_HUE = 220 + +# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of +# the colors in the HTML output. For a value of 0 the output will use +# grayscales only. A value of 255 will produce the most vivid colors. + +HTML_COLORSTYLE_SAT = 100 + +# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to +# the luminance component of the colors in the HTML output. Values below +# 100 gradually make the output lighter, whereas values above 100 make +# the output darker. The value divided by 100 is the actual gamma applied, +# so 80 represents a gamma of 0.8, The value 220 represents a gamma of 2.2, +# and 100 does not change the gamma. + +HTML_COLORSTYLE_GAMMA = 80 + +# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML +# page will contain the date and time when the page was generated. Setting +# this to NO can help when comparing the output of multiple runs. + +HTML_TIMESTAMP = YES + +# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML +# documentation will contain sections that can be hidden and shown after the +# page has loaded. + +HTML_DYNAMIC_SECTIONS = NO + +# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of +# entries shown in the various tree structured indices initially; the user +# can expand and collapse entries dynamically later on. Doxygen will expand +# the tree to such a level that at most the specified number of entries are +# visible (unless a fully collapsed tree already exceeds this amount). +# So setting the number of entries 1 will produce a full collapsed tree by +# default. 0 is a special value representing an infinite number of entries +# and will result in a full expanded tree by default. + +HTML_INDEX_NUM_ENTRIES = 100 + +# If the GENERATE_DOCSET tag is set to YES, additional index files +# will be generated that can be used as input for Apple's Xcode 3 +# integrated development environment, introduced with OSX 10.5 (Leopard). +# To create a documentation set, doxygen will generate a Makefile in the +# HTML output directory. Running make will produce the docset in that +# directory and running "make install" will install the docset in +# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find +# it at startup. +# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html +# for more information. + +GENERATE_DOCSET = NO + +# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the +# feed. A documentation feed provides an umbrella under which multiple +# documentation sets from a single provider (such as a company or product suite) +# can be grouped. + +DOCSET_FEEDNAME = "Doxygen generated docs" + +# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that +# should uniquely identify the documentation set bundle. This should be a +# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen +# will append .docset to the name. + +DOCSET_BUNDLE_ID = org.doxygen.Project + +# When GENERATE_PUBLISHER_ID tag specifies a string that should uniquely +# identify the documentation publisher. This should be a reverse domain-name +# style string, e.g. com.mycompany.MyDocSet.documentation. + +DOCSET_PUBLISHER_ID = org.doxygen.Publisher + +# The GENERATE_PUBLISHER_NAME tag identifies the documentation publisher. + +DOCSET_PUBLISHER_NAME = Publisher + +# If the GENERATE_HTMLHELP tag is set to YES, additional index files +# will be generated that can be used as input for tools like the +# Microsoft HTML help workshop to generate a compiled HTML help file (.chm) +# of the generated HTML documentation. + +GENERATE_HTMLHELP = NO + +# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can +# be used to specify the file name of the resulting .chm file. You +# can add a path in front of the file if the result should not be +# written to the html output directory. + +CHM_FILE = + +# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can +# be used to specify the location (absolute path including file name) of +# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run +# the HTML help compiler on the generated index.hhp. + +HHC_LOCATION = + +# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag +# controls if a separate .chi index file is generated (YES) or that +# it should be included in the master .chm file (NO). + +GENERATE_CHI = NO + +# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING +# is used to encode HtmlHelp index (hhk), content (hhc) and project file +# content. + +CHM_INDEX_ENCODING = + +# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag +# controls whether a binary table of contents is generated (YES) or a +# normal table of contents (NO) in the .chm file. + +BINARY_TOC = NO + +# The TOC_EXPAND flag can be set to YES to add extra items for group members +# to the contents of the HTML help documentation and to the tree view. + +TOC_EXPAND = NO + +# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and +# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated +# that can be used as input for Qt's qhelpgenerator to generate a +# Qt Compressed Help (.qch) of the generated HTML documentation. + +GENERATE_QHP = NO + +# If the QHG_LOCATION tag is specified, the QCH_FILE tag can +# be used to specify the file name of the resulting .qch file. +# The path specified is relative to the HTML output folder. + +QCH_FILE = + +# The QHP_NAMESPACE tag specifies the namespace to use when generating +# Qt Help Project output. For more information please see +# http://doc.trolltech.com/qthelpproject.html#namespace + +QHP_NAMESPACE = org.doxygen.Project + +# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating +# Qt Help Project output. For more information please see +# http://doc.trolltech.com/qthelpproject.html#virtual-folders + +QHP_VIRTUAL_FOLDER = doc + +# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to +# add. For more information please see +# http://doc.trolltech.com/qthelpproject.html#custom-filters + +QHP_CUST_FILTER_NAME = + +# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the +# custom filter to add. For more information please see +# +# Qt Help Project / Custom Filters. + +QHP_CUST_FILTER_ATTRS = + +# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this +# project's +# filter section matches. +# +# Qt Help Project / Filter Attributes. + +QHP_SECT_FILTER_ATTRS = + +# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can +# be used to specify the location of Qt's qhelpgenerator. +# If non-empty doxygen will try to run qhelpgenerator on the generated +# .qhp file. + +QHG_LOCATION = + +# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files +# will be generated, which together with the HTML files, form an Eclipse help +# plugin. To install this plugin and make it available under the help contents +# menu in Eclipse, the contents of the directory containing the HTML and XML +# files needs to be copied into the plugins directory of eclipse. The name of +# the directory within the plugins directory should be the same as +# the ECLIPSE_DOC_ID value. After copying Eclipse needs to be restarted before +# the help appears. + +GENERATE_ECLIPSEHELP = NO + +# A unique identifier for the eclipse help plugin. When installing the plugin +# the directory name containing the HTML and XML files should also have +# this name. + +ECLIPSE_DOC_ID = org.doxygen.Project + +# The DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) +# at top of each HTML page. The value NO (the default) enables the index and +# the value YES disables it. Since the tabs have the same information as the +# navigation tree you can set this option to NO if you already set +# GENERATE_TREEVIEW to YES. + +DISABLE_INDEX = NO + +# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index +# structure should be generated to display hierarchical information. +# If the tag value is set to YES, a side panel will be generated +# containing a tree-like index structure (just like the one that +# is generated for HTML Help). For this to work a browser that supports +# JavaScript, DHTML, CSS and frames is required (i.e. any modern browser). +# Windows users are probably better off using the HTML help feature. +# Since the tree basically has the same information as the tab index you +# could consider to set DISABLE_INDEX to NO when enabling this option. + +GENERATE_TREEVIEW = YES + +# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values +# (range [0,1..20]) that doxygen will group on one line in the generated HTML +# documentation. Note that a value of 0 will completely suppress the enum +# values from appearing in the overview section. + +ENUM_VALUES_PER_LINE = 4 + +# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be +# used to set the initial width (in pixels) of the frame in which the tree +# is shown. + +TREEVIEW_WIDTH = 250 + +# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open +# links to external symbols imported via tag files in a separate window. + +EXT_LINKS_IN_WINDOW = NO + +# Use this tag to change the font size of Latex formulas included +# as images in the HTML documentation. The default is 10. Note that +# when you change the font size after a successful doxygen run you need +# to manually remove any form_*.png images from the HTML output directory +# to force them to be regenerated. + +FORMULA_FONTSIZE = 10 + +# Use the FORMULA_TRANPARENT tag to determine whether or not the images +# generated for formulas are transparent PNGs. Transparent PNGs are +# not supported properly for IE 6.0, but are supported on all modern browsers. +# Note that when changing this option you need to delete any form_*.png files +# in the HTML output before the changes have effect. + +FORMULA_TRANSPARENT = YES + +# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax +# (see http://www.mathjax.org) which uses client side Javascript for the +# rendering instead of using prerendered bitmaps. Use this if you do not +# have LaTeX installed or if you want to formulas look prettier in the HTML +# output. When enabled you may also need to install MathJax separately and +# configure the path to it using the MATHJAX_RELPATH option. + +USE_MATHJAX = NO + +# When MathJax is enabled you need to specify the location relative to the +# HTML output directory using the MATHJAX_RELPATH option. The destination +# directory should contain the MathJax.js script. For instance, if the mathjax +# directory is located at the same level as the HTML output directory, then +# MATHJAX_RELPATH should be ../mathjax. The default value points to +# the MathJax Content Delivery Network so you can quickly see the result without +# installing MathJax. However, it is strongly recommended to install a local +# copy of MathJax from http://www.mathjax.org before deployment. + +MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest + +# The MATHJAX_EXTENSIONS tag can be used to specify one or MathJax extension +# names that should be enabled during MathJax rendering. + +MATHJAX_EXTENSIONS = + +# When the SEARCHENGINE tag is enabled doxygen will generate a search box +# for the HTML output. The underlying search engine uses javascript +# and DHTML and should work on any modern browser. Note that when using +# HTML help (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets +# (GENERATE_DOCSET) there is already a search function so this one should +# typically be disabled. For large projects the javascript based search engine +# can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution. + +SEARCHENGINE = YES + +# When the SERVER_BASED_SEARCH tag is enabled the search engine will be +# implemented using a PHP enabled web server instead of at the web client +# using Javascript. Doxygen will generate the search PHP script and index +# file to put on the web server. The advantage of the server +# based approach is that it scales better to large projects and allows +# full text search. The disadvantages are that it is more difficult to setup +# and does not have live searching capabilities. + +SERVER_BASED_SEARCH = NO + +#--------------------------------------------------------------------------- +# configuration options related to the LaTeX output +#--------------------------------------------------------------------------- + +# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will +# generate Latex output. + +GENERATE_LATEX = YES + +# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `latex' will be used as the default path. + +LATEX_OUTPUT = latex + +# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be +# invoked. If left blank `latex' will be used as the default command name. +# Note that when enabling USE_PDFLATEX this option is only used for +# generating bitmaps for formulas in the HTML output, but not in the +# Makefile that is written to the output directory. + +LATEX_CMD_NAME = latex + +# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to +# generate index for LaTeX. If left blank `makeindex' will be used as the +# default command name. + +MAKEINDEX_CMD_NAME = makeindex + +# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact +# LaTeX documents. This may be useful for small projects and may help to +# save some trees in general. + +COMPACT_LATEX = NO + +# The PAPER_TYPE tag can be used to set the paper type that is used +# by the printer. Possible values are: a4, letter, legal and +# executive. If left blank a4wide will be used. + +PAPER_TYPE = a4 + +# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX +# packages that should be included in the LaTeX output. + +EXTRA_PACKAGES = + +# The LATEX_HEADER tag can be used to specify a personal LaTeX header for +# the generated latex document. The header should contain everything until +# the first chapter. If it is left blank doxygen will generate a +# standard header. Notice: only use this tag if you know what you are doing! + +LATEX_HEADER = + +# The LATEX_FOOTER tag can be used to specify a personal LaTeX footer for +# the generated latex document. The footer should contain everything after +# the last chapter. If it is left blank doxygen will generate a +# standard footer. Notice: only use this tag if you know what you are doing! + +LATEX_FOOTER = + +# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated +# is prepared for conversion to pdf (using ps2pdf). The pdf file will +# contain links (just like the HTML output) instead of page references +# This makes the output suitable for online browsing using a pdf viewer. + +PDF_HYPERLINKS = YES + +# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of +# plain latex in the generated Makefile. Set this option to YES to get a +# higher quality PDF documentation. + +USE_PDFLATEX = YES + +# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. +# command to the generated LaTeX files. This will instruct LaTeX to keep +# running if errors occur, instead of asking the user for help. +# This option is also used when generating formulas in HTML. + +LATEX_BATCHMODE = NO + +# If LATEX_HIDE_INDICES is set to YES then doxygen will not +# include the index chapters (such as File Index, Compound Index, etc.) +# in the output. + +LATEX_HIDE_INDICES = NO + +# If LATEX_SOURCE_CODE is set to YES then doxygen will include +# source code with syntax highlighting in the LaTeX output. +# Note that which sources are shown also depends on other settings +# such as SOURCE_BROWSER. + +LATEX_SOURCE_CODE = NO + +# The LATEX_BIB_STYLE tag can be used to specify the style to use for the +# bibliography, e.g. plainnat, or ieeetr. The default style is "plain". See +# http://en.wikipedia.org/wiki/BibTeX for more info. + +LATEX_BIB_STYLE = plain + +#--------------------------------------------------------------------------- +# configuration options related to the RTF output +#--------------------------------------------------------------------------- + +# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output +# The RTF output is optimized for Word 97 and may not look very pretty with +# other RTF readers or editors. + +GENERATE_RTF = NO + +# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `rtf' will be used as the default path. + +RTF_OUTPUT = rtf + +# If the COMPACT_RTF tag is set to YES Doxygen generates more compact +# RTF documents. This may be useful for small projects and may help to +# save some trees in general. + +COMPACT_RTF = NO + +# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated +# will contain hyperlink fields. The RTF file will +# contain links (just like the HTML output) instead of page references. +# This makes the output suitable for online browsing using WORD or other +# programs which support those fields. +# Note: wordpad (write) and others do not support links. + +RTF_HYPERLINKS = NO + +# Load style sheet definitions from file. Syntax is similar to doxygen's +# config file, i.e. a series of assignments. You only have to provide +# replacements, missing definitions are set to their default value. + +RTF_STYLESHEET_FILE = + +# Set optional variables used in the generation of an rtf document. +# Syntax is similar to doxygen's config file. + +RTF_EXTENSIONS_FILE = + +#--------------------------------------------------------------------------- +# configuration options related to the man page output +#--------------------------------------------------------------------------- + +# If the GENERATE_MAN tag is set to YES (the default) Doxygen will +# generate man pages + +GENERATE_MAN = NO + +# The MAN_OUTPUT tag is used to specify where the man pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `man' will be used as the default path. + +MAN_OUTPUT = man + +# The MAN_EXTENSION tag determines the extension that is added to +# the generated man pages (default is the subroutine's section .3) + +MAN_EXTENSION = .3 + +# If the MAN_LINKS tag is set to YES and Doxygen generates man output, +# then it will generate one additional man file for each entity +# documented in the real man page(s). These additional files +# only source the real man page, but without them the man command +# would be unable to find the correct page. The default is NO. + +MAN_LINKS = NO + +#--------------------------------------------------------------------------- +# configuration options related to the XML output +#--------------------------------------------------------------------------- + +# If the GENERATE_XML tag is set to YES Doxygen will +# generate an XML file that captures the structure of +# the code including all documentation. + +GENERATE_XML = NO + +# The XML_OUTPUT tag is used to specify where the XML pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `xml' will be used as the default path. + +XML_OUTPUT = xml + +# The XML_SCHEMA tag can be used to specify an XML schema, +# which can be used by a validating XML parser to check the +# syntax of the XML files. + +XML_SCHEMA = + +# The XML_DTD tag can be used to specify an XML DTD, +# which can be used by a validating XML parser to check the +# syntax of the XML files. + +XML_DTD = + +# If the XML_PROGRAMLISTING tag is set to YES Doxygen will +# dump the program listings (including syntax highlighting +# and cross-referencing information) to the XML output. Note that +# enabling this will significantly increase the size of the XML output. + +XML_PROGRAMLISTING = YES + +#--------------------------------------------------------------------------- +# configuration options for the AutoGen Definitions output +#--------------------------------------------------------------------------- + +# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will +# generate an AutoGen Definitions (see autogen.sf.net) file +# that captures the structure of the code including all +# documentation. Note that this feature is still experimental +# and incomplete at the moment. + +GENERATE_AUTOGEN_DEF = NO + +#--------------------------------------------------------------------------- +# configuration options related to the Perl module output +#--------------------------------------------------------------------------- + +# If the GENERATE_PERLMOD tag is set to YES Doxygen will +# generate a Perl module file that captures the structure of +# the code including all documentation. Note that this +# feature is still experimental and incomplete at the +# moment. + +GENERATE_PERLMOD = NO + +# If the PERLMOD_LATEX tag is set to YES Doxygen will generate +# the necessary Makefile rules, Perl scripts and LaTeX code to be able +# to generate PDF and DVI output from the Perl module output. + +PERLMOD_LATEX = NO + +# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be +# nicely formatted so it can be parsed by a human reader. This is useful +# if you want to understand what is going on. On the other hand, if this +# tag is set to NO the size of the Perl module output will be much smaller +# and Perl will parse it just the same. + +PERLMOD_PRETTY = YES + +# The names of the make variables in the generated doxyrules.make file +# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. +# This is useful so different doxyrules.make files included by the same +# Makefile don't overwrite each other's variables. + +PERLMOD_MAKEVAR_PREFIX = + +#--------------------------------------------------------------------------- +# Configuration options related to the preprocessor +#--------------------------------------------------------------------------- + +# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will +# evaluate all C-preprocessor directives found in the sources and include +# files. + +ENABLE_PREPROCESSING = YES + +# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro +# names in the source code. If set to NO (the default) only conditional +# compilation will be performed. Macro expansion can be done in a controlled +# way by setting EXPAND_ONLY_PREDEF to YES. + +MACRO_EXPANSION = NO + +# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES +# then the macro expansion is limited to the macros specified with the +# PREDEFINED and EXPAND_AS_DEFINED tags. + +EXPAND_ONLY_PREDEF = NO + +# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files +# pointed to by INCLUDE_PATH will be searched when a #include is found. + +SEARCH_INCLUDES = YES + +# The INCLUDE_PATH tag can be used to specify one or more directories that +# contain include files that are not input files but should be processed by +# the preprocessor. + +INCLUDE_PATH = + +# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard +# patterns (like *.h and *.hpp) to filter out the header-files in the +# directories. If left blank, the patterns specified with FILE_PATTERNS will +# be used. + +INCLUDE_FILE_PATTERNS = + +# The PREDEFINED tag can be used to specify one or more macro names that +# are defined before the preprocessor is started (similar to the -D option of +# gcc). The argument of the tag is a list of macros of the form: name +# or name=definition (no spaces). If the definition and the = are +# omitted =1 is assumed. To prevent a macro definition from being +# undefined via #undef or recursively expanded use the := operator +# instead of the = operator. + +PREDEFINED = + +# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then +# this tag can be used to specify a list of macro names that should be expanded. +# The macro definition that is found in the sources will be used. +# Use the PREDEFINED tag if you want to use a different macro definition that +# overrules the definition found in the source code. + +EXPAND_AS_DEFINED = + +# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then +# doxygen's preprocessor will remove all references to function-like macros +# that are alone on a line, have an all uppercase name, and do not end with a +# semicolon, because these will confuse the parser if not removed. + +SKIP_FUNCTION_MACROS = YES + +#--------------------------------------------------------------------------- +# Configuration::additions related to external references +#--------------------------------------------------------------------------- + +# The TAGFILES option can be used to specify one or more tagfiles. For each +# tag file the location of the external documentation should be added. The +# format of a tag file without this location is as follows: +# TAGFILES = file1 file2 ... +# Adding location for the tag files is done as follows: +# TAGFILES = file1=loc1 "file2 = loc2" ... +# where "loc1" and "loc2" can be relative or absolute paths +# or URLs. Note that each tag file must have a unique name (where the name does +# NOT include the path). If a tag file is not located in the directory in which +# doxygen is run, you must also specify the path to the tagfile here. + +TAGFILES = + +# When a file name is specified after GENERATE_TAGFILE, doxygen will create +# a tag file that is based on the input files it reads. + +GENERATE_TAGFILE = + +# If the ALLEXTERNALS tag is set to YES all external classes will be listed +# in the class index. If set to NO only the inherited external classes +# will be listed. + +ALLEXTERNALS = NO + +# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed +# in the modules index. If set to NO, only the current project's groups will +# be listed. + +EXTERNAL_GROUPS = YES + +# The PERL_PATH should be the absolute path and name of the perl script +# interpreter (i.e. the result of `which perl'). + +PERL_PATH = /usr/bin/perl + +#--------------------------------------------------------------------------- +# Configuration options related to the dot tool +#--------------------------------------------------------------------------- + +# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will +# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base +# or super classes. Setting the tag to NO turns the diagrams off. Note that +# this option also works with HAVE_DOT disabled, but it is recommended to +# install and use dot, since it yields more powerful graphs. + +CLASS_DIAGRAMS = NO + +# You can define message sequence charts within doxygen comments using the \msc +# command. Doxygen will then run the mscgen tool (see +# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the +# documentation. The MSCGEN_PATH tag allows you to specify the directory where +# the mscgen tool resides. If left empty the tool is assumed to be found in the +# default search path. + +MSCGEN_PATH = + +# If set to YES, the inheritance and collaboration graphs will hide +# inheritance and usage relations if the target is undocumented +# or is not a class. + +HIDE_UNDOC_RELATIONS = YES + +# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is +# available from the path. This tool is part of Graphviz, a graph visualization +# toolkit from AT&T and Lucent Bell Labs. The other options in this section +# have no effect if this option is set to NO (the default) + +HAVE_DOT = YES + +# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is +# allowed to run in parallel. When set to 0 (the default) doxygen will +# base this on the number of processors available in the system. You can set it +# explicitly to a value larger than 0 to get control over the balance +# between CPU load and processing speed. + +DOT_NUM_THREADS = 0 + +# By default doxygen will use the Helvetica font for all dot files that +# doxygen generates. When you want a differently looking font you can specify +# the font name using DOT_FONTNAME. You need to make sure dot is able to find +# the font, which can be done by putting it in a standard location or by setting +# the DOTFONTPATH environment variable or by setting DOT_FONTPATH to the +# directory containing the font. + +DOT_FONTNAME = Helvetica + +# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs. +# The default size is 10pt. + +DOT_FONTSIZE = 10 + +# By default doxygen will tell dot to use the Helvetica font. +# If you specify a different font using DOT_FONTNAME you can use DOT_FONTPATH to +# set the path where dot can find it. + +DOT_FONTPATH = + +# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for each documented class showing the direct and +# indirect inheritance relations. Setting this tag to YES will force the +# CLASS_DIAGRAMS tag to NO. + +CLASS_GRAPH = YES + +# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for each documented class showing the direct and +# indirect implementation dependencies (inheritance, containment, and +# class references variables) of the class with other documented classes. + +COLLABORATION_GRAPH = YES + +# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for groups, showing the direct groups dependencies + +GROUP_GRAPHS = YES + +# If the UML_LOOK tag is set to YES doxygen will generate inheritance and +# collaboration diagrams in a style similar to the OMG's Unified Modeling +# Language. + +UML_LOOK = NO + +# If the UML_LOOK tag is enabled, the fields and methods are shown inside +# the class node. If there are many fields or methods and many nodes the +# graph may become too big to be useful. The UML_LIMIT_NUM_FIELDS +# threshold limits the number of items for each type to make the size more +# managable. Set this to 0 for no limit. Note that the threshold may be +# exceeded by 50% before the limit is enforced. + +UML_LIMIT_NUM_FIELDS = 10 + +# If set to YES, the inheritance and collaboration graphs will show the +# relations between templates and their instances. + +TEMPLATE_RELATIONS = NO + +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT +# tags are set to YES then doxygen will generate a graph for each documented +# file showing the direct and indirect include dependencies of the file with +# other documented files. + +INCLUDE_GRAPH = YES + +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and +# HAVE_DOT tags are set to YES then doxygen will generate a graph for each +# documented header file showing the documented files that directly or +# indirectly include this file. + +INCLUDED_BY_GRAPH = YES + +# If the CALL_GRAPH and HAVE_DOT options are set to YES then +# doxygen will generate a call dependency graph for every global function +# or class method. Note that enabling this option will significantly increase +# the time of a run. So in most cases it will be better to enable call graphs +# for selected functions only using the \callgraph command. + +CALL_GRAPH = NO + +# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then +# doxygen will generate a caller dependency graph for every global function +# or class method. Note that enabling this option will significantly increase +# the time of a run. So in most cases it will be better to enable caller +# graphs for selected functions only using the \callergraph command. + +CALLER_GRAPH = NO + +# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen +# will generate a graphical hierarchy of all classes instead of a textual one. + +GRAPHICAL_HIERARCHY = YES + +# If the DIRECTORY_GRAPH and HAVE_DOT tags are set to YES +# then doxygen will show the dependencies a directory has on other directories +# in a graphical way. The dependency relations are determined by the #include +# relations between the files in the directories. + +DIRECTORY_GRAPH = YES + +# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images +# generated by dot. Possible values are svg, png, jpg, or gif. +# If left blank png will be used. If you choose svg you need to set +# HTML_FILE_EXTENSION to xhtml in order to make the SVG files +# visible in IE 9+ (other browsers do not have this requirement). + +DOT_IMAGE_FORMAT = png + +# If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to +# enable generation of interactive SVG images that allow zooming and panning. +# Note that this requires a modern browser other than Internet Explorer. +# Tested and working are Firefox, Chrome, Safari, and Opera. For IE 9+ you +# need to set HTML_FILE_EXTENSION to xhtml in order to make the SVG files +# visible. Older versions of IE do not have SVG support. + +INTERACTIVE_SVG = NO + +# The tag DOT_PATH can be used to specify the path where the dot tool can be +# found. If left blank, it is assumed the dot tool can be found in the path. + +DOT_PATH = + +# The DOTFILE_DIRS tag can be used to specify one or more directories that +# contain dot files that are included in the documentation (see the +# \dotfile command). + +DOTFILE_DIRS = + +# The MSCFILE_DIRS tag can be used to specify one or more directories that +# contain msc files that are included in the documentation (see the +# \mscfile command). + +MSCFILE_DIRS = + +# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of +# nodes that will be shown in the graph. If the number of nodes in a graph +# becomes larger than this value, doxygen will truncate the graph, which is +# visualized by representing a node as a red box. Note that doxygen if the +# number of direct children of the root node in a graph is already larger than +# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note +# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH. + +DOT_GRAPH_MAX_NODES = 50 + +# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the +# graphs generated by dot. A depth value of 3 means that only nodes reachable +# from the root by following a path via at most 3 edges will be shown. Nodes +# that lay further from the root node will be omitted. Note that setting this +# option to 1 or 2 may greatly reduce the computation time needed for large +# code bases. Also note that the size of a graph can be further restricted by +# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction. + +MAX_DOT_GRAPH_DEPTH = 0 + +# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent +# background. This is disabled by default, because dot on Windows does not +# seem to support this out of the box. Warning: Depending on the platform used, +# enabling this option may lead to badly anti-aliased labels on the edges of +# a graph (i.e. they become hard to read). + +DOT_TRANSPARENT = NO + +# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output +# files in one run (i.e. multiple -o and -T options on the command line). This +# makes dot run faster, but since only newer versions of dot (>1.8.10) +# support this, this feature is disabled by default. + +DOT_MULTI_TARGETS = NO + +# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will +# generate a legend page explaining the meaning of the various boxes and +# arrows in the dot generated graphs. + +GENERATE_LEGEND = YES + +# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will +# remove the intermediate dot files that are used to generate +# the various graphs. + +DOT_CLEANUP = YES diff -r d5d5e1698554 -r 1dedcc37bfe8 project_files/frontlib/hwconsts.h --- a/project_files/frontlib/hwconsts.h Sun Nov 18 01:06:01 2012 +0400 +++ b/project_files/frontlib/hwconsts.h Fri Feb 22 05:05:32 2013 +0100 @@ -41,24 +41,24 @@ #define PROTOCOL_VERSION 42 #define MIN_SERVER_VERSION 1 -// Used for sending scripts to the engine +//! Used for sending scripts to the engine #define MULTIPLAYER_SCRIPT_PATH "Scripts/Multiplayer/" -#define WEAPONS_COUNT 55 +#define WEAPONS_COUNT 56 // TODO allow frontend to override these? -/* A merge of mikade/bugq colours w/ a bit of channel feedback */ -#define HW_TEAMCOLOR_ARRAY { UINT32_C(0xffff0204), /* red */ \ - UINT32_C(0xff4980c1), /* blue */ \ - UINT32_C(0xff1de6ba), /* teal */ \ - UINT32_C(0xffb541ef), /* purple */ \ - UINT32_C(0xffe55bb0), /* pink */ \ - UINT32_C(0xff20bf00), /* green */ \ - UINT32_C(0xfffe8b0e), /* orange */ \ - UINT32_C(0xff5f3605), /* brown */ \ - UINT32_C(0xffffff01), /* yellow */ \ - /* add new colors here */ \ - 0 } /* Keep this 0 at the end */ +/*! A merge of mikade/bugq colours w/ a bit of channel feedback */ +#define HW_TEAMCOLOR_ARRAY { UINT32_C(0xffff0204), /*! red */ \ + UINT32_C(0xff4980c1), /*! blue */ \ + UINT32_C(0xff1de6ba), /*! teal */ \ + UINT32_C(0xffb541ef), /*! purple */ \ + UINT32_C(0xffe55bb0), /*! pink */ \ + UINT32_C(0xff20bf00), /*! green */ \ + UINT32_C(0xfffe8b0e), /*! orange */ \ + UINT32_C(0xff5f3605), /*! brown */ \ + UINT32_C(0xffffff01), /*! yellow */ \ + /*! add new colors here */ \ + 0 } /*! Keep this 0 at the end */ extern const size_t flib_teamcolor_count; extern const uint32_t flib_teamcolors[]; @@ -83,25 +83,25 @@ */ int flib_get_weapons_count(); -/* +/*! * These structs define the meaning of values in the flib_scheme struct, i.e. their correspondence to * ini settings, engine commands and positions in the network protocol (the last is encoded in the * order of settings/mods). */ typedef struct { - const char *name; // A name identifying this setting (used as key in the schemes file) - const char *engineCommand; // The command needed to send the setting to the engine. May be null if the setting is not sent to the engine (for the "health" setting) - const bool maxMeansInfinity; // If true, send a very high number to the engine if the setting is equal to its maximum - const bool times1000; // If true (for time-based settings), multiply the setting by 1000 before sending it to the engine. - const int min; // The smallest allowed value - const int max; // The highest allowed value - const int def; // The default value + const char *name; //!< A name identifying this setting (used as key in the schemes file) + const char *engineCommand; //!< The command needed to send the setting to the engine. May be null if the setting is not sent to the engine (for the "health" setting) + const bool maxMeansInfinity; //!< If true, send a very high number to the engine if the setting is equal to its maximum + const bool times1000; //!< If true (for time-based settings), multiply the setting by 1000 before sending it to the engine. + const int min; //!< The smallest allowed value + const int max; //!< The highest allowed value + const int def; //!< The default value } flib_metascheme_setting; typedef struct { - const char *name; // A name identifying this mod (used as key in the schemes file) - const int bitmaskIndex; // Mods are sent to the engine in a single integer, this field describes which bit of that integer is used - // for this particular mod. + const char *name; //!< A name identifying this mod (used as key in the schemes file) + const int bitmaskIndex; //!< Mods are sent to the engine in a single integer, this field describes which bit of that integer is used + //! for this particular mod. } flib_metascheme_mod; typedef struct { diff -r d5d5e1698554 -r 1dedcc37bfe8 project_files/frontlib/ipc/ipcbase.c --- a/project_files/frontlib/ipc/ipcbase.c Sun Nov 18 01:06:01 2012 +0400 +++ b/project_files/frontlib/ipc/ipcbase.c Fri Feb 22 05:05:32 2013 +0100 @@ -186,7 +186,7 @@ logSentMsg(data, len); return 0; } else { - flib_log_w("Failed or incomplete ICP write: engine connection lost."); + flib_log_w("Failed or incomplete IPC write: engine connection lost."); flib_socket_close(ipc->sock); ipc->sock = NULL; return -1; diff -r d5d5e1698554 -r 1dedcc37bfe8 project_files/frontlib/md5/md5.h --- a/project_files/frontlib/md5/md5.h Sun Nov 18 01:06:01 2012 +0400 +++ b/project_files/frontlib/md5/md5.h Fri Feb 22 05:05:32 2013 +0100 @@ -63,11 +63,11 @@ typedef unsigned char md5_byte_t; /* 8-bit byte */ typedef unsigned int md5_word_t; /* 32-bit word */ -/* Define the state of the MD5 Algorithm. */ +/*! Define the state of the MD5 Algorithm. */ typedef struct md5_state_s { - md5_word_t count[2]; /* message length in bits, lsw first */ - md5_word_t abcd[4]; /* digest buffer */ - md5_byte_t buf[64]; /* accumulate block */ + md5_word_t count[2]; /*! message length in bits, lsw first */ + md5_word_t abcd[4]; /*! digest buffer */ + md5_byte_t buf[64]; /*! accumulate block */ } md5_state_t; #ifdef __cplusplus @@ -75,13 +75,13 @@ { #endif -/* Initialize the algorithm. */ +/*! Initialize the algorithm. */ void md5_init(md5_state_t *pms); -/* Append a string to the message. */ +/*! Append a string to the message. */ void md5_append(md5_state_t *pms, const md5_byte_t *data, int nbytes); -/* Finish the message and return the digest. */ +/*! Finish the message and return the digest. */ void md5_finish(md5_state_t *pms, md5_byte_t digest[16]); #ifdef __cplusplus diff -r d5d5e1698554 -r 1dedcc37bfe8 project_files/frontlib/model/gamesetup.h --- a/project_files/frontlib/model/gamesetup.h Sun Nov 18 01:06:01 2012 +0400 +++ b/project_files/frontlib/model/gamesetup.h Fri Feb 22 05:05:32 2013 +0100 @@ -31,7 +31,7 @@ #include "teamlist.h" typedef struct { - char *style; // e.g. "Capture the Flag" + char *style; //!< e.g. "Capture the Flag" flib_scheme *gamescheme; flib_map *map; flib_teamlist *teamlist; diff -r d5d5e1698554 -r 1dedcc37bfe8 project_files/frontlib/model/map.h --- a/project_files/frontlib/model/map.h Sun Nov 18 01:06:01 2012 +0400 +++ b/project_files/frontlib/model/map.h Fri Feb 22 05:05:32 2013 +0100 @@ -51,14 +51,14 @@ * at the struct for details. */ typedef struct { - int mapgen; // Always one of the MAPGEN_ constants - char *name; // The name of the map for MAPGEN_NAMED (e.g. "Cogs"), otherwise one of "+rnd+", "+maze+" or "+drawn+". - char *seed; // Used for all maps. This is a random seed for all (non-AI) entropy in the round. Typically a random UUID, but can be any string. - char *theme; // Used for all maps. This is the name of a directory in Data/Themes (e.g. "Beach") - uint8_t *drawData; // Used for MAPGEN_DRAWN - size_t drawDataSize; // Used for MAPGEN_DRAWN - int templateFilter; // Used for MAPGEN_REGULAR. One of the TEMPLATEFILTER_xxx constants. - int mazeSize; // Used for MAPGEN_MAZE. One of the MAZE_SIZE_xxx constants. + int mapgen; //!< Always one of the MAPGEN_ constants + char *name; //!< The name of the map for MAPGEN_NAMED (e.g. "Cogs"), otherwise one of "+rnd+", "+maze+" or "+drawn+". + char *seed; //!< Used for all maps. This is a random seed for all (non-AI) entropy in the round. Typically a random UUID, but can be any string. + char *theme; //!< Used for all maps. This is the name of a directory in Data/Themes (e.g. "Beach") + uint8_t *drawData; //!< Used for MAPGEN_DRAWN + size_t drawDataSize; //!< Used for MAPGEN_DRAWN + int templateFilter; //!< Used for MAPGEN_REGULAR. One of the TEMPLATEFILTER_xxx constants. + int mazeSize; //!< Used for MAPGEN_MAZE. One of the MAZE_SIZE_xxx constants. } flib_map; /** diff -r d5d5e1698554 -r 1dedcc37bfe8 project_files/frontlib/model/mapcfg.h --- a/project_files/frontlib/model/mapcfg.h Sun Nov 18 01:06:01 2012 +0400 +++ b/project_files/frontlib/model/mapcfg.h Fri Feb 22 05:05:32 2013 +0100 @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -/* +/*! * Data structure and functions for accessing the map.cfg of named maps. */ diff -r d5d5e1698554 -r 1dedcc37bfe8 project_files/frontlib/model/room.h --- a/project_files/frontlib/model/room.h Sun Nov 18 01:06:01 2012 +0400 +++ b/project_files/frontlib/model/room.h Fri Feb 22 05:05:32 2013 +0100 @@ -27,12 +27,12 @@ #include typedef struct { - bool inProgress; // true if the game is running + bool inProgress; //!< true if the game is running char *name; int playerCount; int teamCount; char *owner; - char *map; // This is either a map name, or one of +rnd+, +maze+ or +drawn+. + char *map; //!< This is either a map name, or one of +rnd+, +maze+ or +drawn+. char *scheme; char *weapons; } flib_room; diff -r d5d5e1698554 -r 1dedcc37bfe8 project_files/frontlib/model/team.h --- a/project_files/frontlib/model/team.h Sun Nov 18 01:06:01 2012 +0400 +++ b/project_files/frontlib/model/team.h Fri Feb 22 05:05:32 2013 +0100 @@ -49,18 +49,18 @@ typedef struct { char *name; - char *hat; // e.g. hair_yellow; References a .png file in Data/Graphics/Hats + char *hat; //!< e.g. hair_yellow; References a .png file in Data/Graphics/Hats - // Statistics. They are irrelevant for the engine or server, - // but provided for ini reading/writing by the frontend. + //! Statistics. They are irrelevant for the engine or server, + //! but provided for ini reading/writing by the frontend. int rounds; int kills; int deaths; int suicides; - int difficulty; // 0 = human, 1 = most difficult bot ... 5 = least difficult bot (somewhat counterintuitive) + int difficulty; //!< 0 = human, 1 = most difficult bot ... 5 = least difficult bot (somewhat counterintuitive) - // Transient setting used in game setup + //! Transient setting used in game setup int initialHealth; flib_weaponset *weaponset; } flib_hog; @@ -68,25 +68,25 @@ typedef struct { flib_hog hogs[HEDGEHOGS_PER_TEAM]; char *name; - char *grave; // e.g. "Bone"; References a .png file in Data/Graphics/Graves - char *fort; // e.g. "Castle"; References a series of files in Data/Forts - char *voicepack; // e.g. "Classic"; References a directory in Data/Sounds/voices - char *flag; // e.g. "hedgewars"; References a .png file in Data/Graphics/Flags + char *grave; //!< e.g. "Bone"; References a .png file in Data/Graphics/Graves + char *fort; //!< e.g. "Castle"; References a series of files in Data/Forts + char *voicepack; //!< e.g. "Classic"; References a directory in Data/Sounds/voices + char *flag; //!< e.g. "hedgewars"; References a .png file in Data/Graphics/Flags flib_binding *bindings; int bindingCount; - // Statistics. They are irrelevant for the engine or server, - // but provided for ini reading/writing by the frontend. + //! Statistics. They are irrelevant for the engine or server, + //! but provided for ini reading/writing by the frontend. int rounds; int wins; int campaignProgress; - // Transient settings used in game setup - int colorIndex; // Index into a color table - int hogsInGame; // The number of hogs that will actually play - bool remoteDriven; // true for non-local teams in a network game - char *ownerName; // Username of the owner of a team in a network game + //! Transient settings used in game setup + int colorIndex; //!< Index into a color table + int hogsInGame; //!< The number of hogs that will actually play + bool remoteDriven; //!< true for non-local teams in a network game + char *ownerName; //!< Username of the owner of a team in a network game } flib_team; /** diff -r d5d5e1698554 -r 1dedcc37bfe8 project_files/frontlib/net/netconn.h --- a/project_files/frontlib/net/netconn.h Sun Nov 18 01:06:01 2012 +0400 +++ b/project_files/frontlib/net/netconn.h Fri Feb 22 05:05:32 2013 +0100 @@ -68,19 +68,19 @@ #define NETCONN_STATE_ROOM 2 #define NETCONN_STATE_DISCONNECTED 10 -#define NETCONN_DISCONNECT_NORMAL 0 // The connection was closed normally -#define NETCONN_DISCONNECT_SERVER_TOO_OLD 1 // The server has a lower protocol version than we do -#define NETCONN_DISCONNECT_AUTH_FAILED 2 // You sent a password with flib_netconn_send_password that was not accepted -#define NETCONN_DISCONNECT_CONNLOST 3 // The network connection was lost -#define NETCONN_DISCONNECT_INTERNAL_ERROR 100 // Something went wrong in frontlib itself +#define NETCONN_DISCONNECT_NORMAL 0 //!< The connection was closed normally +#define NETCONN_DISCONNECT_SERVER_TOO_OLD 1 //!< The server has a lower protocol version than we do +#define NETCONN_DISCONNECT_AUTH_FAILED 2 //!< You sent a password with flib_netconn_send_password that was not accepted +#define NETCONN_DISCONNECT_CONNLOST 3 //!< The network connection was lost +#define NETCONN_DISCONNECT_INTERNAL_ERROR 100 //!< Something went wrong in frontlib itself -#define NETCONN_ROOMLEAVE_ABANDONED 0 // The room was closed because the chief left -#define NETCONN_ROOMLEAVE_KICKED 1 // You have been kicked from the room +#define NETCONN_ROOMLEAVE_ABANDONED 0 //!< The room was closed because the chief left +#define NETCONN_ROOMLEAVE_KICKED 1 //!< You have been kicked from the room -#define NETCONN_MSG_TYPE_PLAYERINFO 0 // A response to flib_netconn_send_playerInfo -#define NETCONN_MSG_TYPE_SERVERMESSAGE 1 // The welcome message when connecting to the lobby -#define NETCONN_MSG_TYPE_WARNING 2 // A general warning message -#define NETCONN_MSG_TYPE_ERROR 3 // A general error message +#define NETCONN_MSG_TYPE_PLAYERINFO 0 //!< A response to flib_netconn_send_playerInfo +#define NETCONN_MSG_TYPE_SERVERMESSAGE 1 //!< The welcome message when connecting to the lobby +#define NETCONN_MSG_TYPE_WARNING 2 //!< A general warning message +#define NETCONN_MSG_TYPE_ERROR 3 //!< A general error message #define NETCONN_MAPCHANGE_FULL 0 #define NETCONN_MAPCHANGE_MAP 1 diff -r d5d5e1698554 -r 1dedcc37bfe8 project_files/frontlib/net/netconn_internal.h --- a/project_files/frontlib/net/netconn_internal.h Sun Nov 18 01:06:01 2012 +0400 +++ b/project_files/frontlib/net/netconn_internal.h Fri Feb 22 05:05:32 2013 +0100 @@ -40,9 +40,9 @@ char *playerName; char *dataDirPath; - int netconnState; // One of the NETCONN_STATE constants + int netconnState; //!< One of the NETCONN_STATE constants - bool isChief; // Player can modify the current room + bool isChief; //!< Player can modify the current room flib_map *map; flib_teamlist pendingTeamlist; flib_teamlist teamlist; diff -r d5d5e1698554 -r 1dedcc37bfe8 project_files/frontlib/socket.c --- a/project_files/frontlib/socket.c Sun Nov 18 01:06:01 2012 +0400 +++ b/project_files/frontlib/socket.c Fri Feb 22 05:05:32 2013 +0100 @@ -84,7 +84,7 @@ srand(time(NULL)); for(int i=0; !result->sock && i<1000; i++) { // IANA suggests using ports in the range 49152-65535 for things like this - result->port = 49152+(rand()%(65535-49152)); + result->port = 49152+(rand()%(65536-49152)); result->sock = listen(result->port); } } diff -r d5d5e1698554 -r 1dedcc37bfe8 project_files/hedgewars.pro --- a/project_files/hedgewars.pro Sun Nov 18 01:06:01 2012 +0400 +++ b/project_files/hedgewars.pro Fri Feb 22 05:05:32 2013 +0100 @@ -1,270 +1,283 @@ -TEMPLATE = app -TARGET = hedgewars -DEPENDPATH += ../QTfrontend/ -INCLUDEPATH += ../QTfrontend -INCLUDEPATH += ../QTfrontend/model -INCLUDEPATH += ../QTfrontend/ui -INCLUDEPATH += ../QTfrontend/ui/widget -INCLUDEPATH += ../QTfrontend/ui/page -INCLUDEPATH += ../QTfrontend/ui/dialog -INCLUDEPATH += ../QTfrontend/net -INCLUDEPATH += ../QTfrontend/util -INCLUDEPATH += ../misc/physfs/src -INCLUDEPATH += ../misc/physfs/extras - -DESTDIR = ../bin - -QT += network -QT += webkit - -HEADERS += ../QTfrontend/model/ThemeModel.h \ - ../QTfrontend/model/MapModel.h \ - ../QTfrontend/model/ammoSchemeModel.h \ - ../QTfrontend/model/netserverslist.h \ - ../QTfrontend/ui/page/pagedrawmap.h \ - ../QTfrontend/ui/page/pagedata.h \ - ../QTfrontend/ui/page/pagetraining.h \ - ../QTfrontend/ui/page/pageselectweapon.h \ - ../QTfrontend/ui/page/pagesingleplayer.h \ - ../QTfrontend/ui/page/pagenettype.h \ - ../QTfrontend/ui/page/pageingame.h \ - ../QTfrontend/ui/page/pageadmin.h \ - ../QTfrontend/ui/page/pagescheme.h \ - ../QTfrontend/ui/page/pagemultiplayer.h \ - ../QTfrontend/ui/page/pageplayrecord.h \ - ../QTfrontend/ui/page/pagemain.h \ - ../QTfrontend/ui/page/pageoptions.h \ - ../QTfrontend/ui/page/pagenetgame.h \ - ../QTfrontend/ui/page/pageeditteam.h \ - ../QTfrontend/ui/page/pageconnecting.h \ - ../QTfrontend/ui/page/pageroomslist.h \ - ../QTfrontend/ui/page/pagenet.h \ - ../QTfrontend/ui/page/pagecampaign.h \ - ../QTfrontend/ui/page/pageinfo.h \ - ../QTfrontend/ui/page/pagenetserver.h \ - ../QTfrontend/ui/page/pagegamestats.h \ - ../QTfrontend/ui/dialog/input_ip.h \ - ../QTfrontend/ui/qaspectratiolayout.h \ - ../QTfrontend/ui/widget/bgwidget.h \ - ../QTfrontend/ui/widget/fpsedit.h \ - ../QTfrontend/ui/widget/FreqSpinBox.h \ - ../QTfrontend/ui/widget/igbox.h \ - ../QTfrontend/ui/widget/chatwidget.h \ - ../QTfrontend/ui/widget/togglebutton.h \ - ../QTfrontend/ui/widget/SquareLabel.h \ - ../QTfrontend/ui/widget/itemNum.h \ - ../QTfrontend/ui/widget/frameTeam.h \ - ../QTfrontend/ui/widget/teamselect.h \ - ../QTfrontend/ui/widget/vertScrollArea.h \ - ../QTfrontend/ui/widget/about.h \ - ../QTfrontend/ui/widget/teamselhelper.h \ - ../QTfrontend/ui/widget/drawmapwidget.h \ - ../QTfrontend/ui/widget/databrowser.h \ - ../QTfrontend/ui/widget/hedgehogerWidget.h \ - ../QTfrontend/ui/widget/selectWeapon.h \ - ../QTfrontend/ui/widget/weaponItem.h \ - ../QTfrontend/ui/widget/gamecfgwidget.h \ - ../QTfrontend/ui/widget/mapContainer.h \ - ../QTfrontend/ui/widget/HistoryLineEdit.h \ - ../QTfrontend/ui/widget/SmartLineEdit.h \ - ../QTfrontend/util/DataManager.h \ - ../QTfrontend/net/netregister.h \ - ../QTfrontend/net/netserver.h \ - ../QTfrontend/net/netudpwidget.h \ - ../QTfrontend/net/tcpBase.h \ - ../QTfrontend/net/proto.h \ - ../QTfrontend/net/newnetclient.h \ - ../QTfrontend/net/netudpserver.h \ - ../QTfrontend/net/hwmap.h \ - ../QTfrontend/util/namegen.h \ - ../QTfrontend/ui/page/AbstractPage.h \ - ../QTfrontend/drawmapscene.h \ - ../QTfrontend/game.h \ - ../QTfrontend/gameuiconfig.h \ - ../QTfrontend/HWApplication.h \ - ../QTfrontend/hwform.h \ - ../QTfrontend/util/SDLInteraction.h \ - ../QTfrontend/team.h \ - ../QTfrontend/achievements.h \ - ../QTfrontend/binds.h \ - ../QTfrontend/ui_hwform.h \ - ../QTfrontend/KB.h \ - ../QTfrontend/hwconsts.h \ - ../QTfrontend/sdlkeys.h \ - ../QTfrontend/ui/mouseoverfilter.h \ - ../QTfrontend/ui/qpushbuttonwithsound.h \ - ../QTfrontend/ui/widget/qpushbuttonwithsound.h \ - ../QTfrontend/ui/page/pagefeedback.h \ - ../QTfrontend/model/roomslistmodel.h \ - ../QTfrontend/ui/dialog/input_password.h \ - ../QTfrontend/ui/widget/colorwidget.h \ - ../QTfrontend/model/HatModel.h \ - ../QTfrontend/model/GameStyleModel.h \ - ../QTfrontend/ui/page/pagevideos.h \ - ../QTfrontend/net/recorder.h \ - ../QTfrontend/ui/dialog/ask_quit.h \ - ../QTfrontend/ui/dialog/upload_video.h \ - ../QTfrontend/campaign.h \ - ../QTfrontend/model/playerslistmodel.h \ - ../QTfrontend/util/LibavInteraction.h \ - ../QTfrontend/util/FileEngine.h - - -SOURCES += ../QTfrontend/model/ammoSchemeModel.cpp \ - ../QTfrontend/model/MapModel.cpp \ - ../QTfrontend/model/ThemeModel.cpp \ - ../QTfrontend/model/netserverslist.cpp \ - ../QTfrontend/ui/qaspectratiolayout.cpp \ - ../QTfrontend/ui/page/pagemain.cpp \ - ../QTfrontend/ui/page/pagetraining.cpp \ - ../QTfrontend/ui/page/pageroomslist.cpp \ - ../QTfrontend/ui/page/pagemultiplayer.cpp \ - ../QTfrontend/ui/page/pagegamestats.cpp \ - ../QTfrontend/ui/page/pagenettype.cpp \ - ../QTfrontend/ui/page/pageeditteam.cpp \ - ../QTfrontend/ui/page/pagenetgame.cpp \ - ../QTfrontend/ui/page/pagedata.cpp \ - ../QTfrontend/ui/page/pagedrawmap.cpp \ - ../QTfrontend/ui/page/pageplayrecord.cpp \ - ../QTfrontend/ui/page/pageselectweapon.cpp \ - ../QTfrontend/ui/page/pageingame.cpp \ - ../QTfrontend/ui/page/pagenetserver.cpp \ - ../QTfrontend/ui/page/pagecampaign.cpp \ - ../QTfrontend/ui/page/pageadmin.cpp \ - ../QTfrontend/ui/page/pageinfo.cpp \ - ../QTfrontend/ui/page/pageconnecting.cpp \ - ../QTfrontend/ui/page/pagesingleplayer.cpp \ - ../QTfrontend/ui/page/pagenet.cpp \ - ../QTfrontend/ui/page/pagescheme.cpp \ - ../QTfrontend/ui/page/pageoptions.cpp \ - ../QTfrontend/ui/dialog/input_ip.cpp \ - ../QTfrontend/ui/widget/igbox.cpp \ - ../QTfrontend/ui/widget/selectWeapon.cpp \ - ../QTfrontend/ui/widget/FreqSpinBox.cpp \ - ../QTfrontend/ui/widget/SquareLabel.cpp \ - ../QTfrontend/ui/widget/frameTeam.cpp \ - ../QTfrontend/ui/widget/fpsedit.cpp \ - ../QTfrontend/ui/widget/databrowser.cpp \ - ../QTfrontend/ui/widget/teamselect.cpp \ - ../QTfrontend/ui/widget/gamecfgwidget.cpp \ - ../QTfrontend/ui/widget/chatwidget.cpp \ - ../QTfrontend/ui/widget/itemNum.cpp \ - ../QTfrontend/ui/widget/bgwidget.cpp \ - ../QTfrontend/ui/widget/about.cpp \ - ../QTfrontend/ui/widget/togglebutton.cpp \ - ../QTfrontend/ui/widget/vertScrollArea.cpp \ - ../QTfrontend/ui/widget/hedgehogerWidget.cpp \ - ../QTfrontend/ui/widget/teamselhelper.cpp \ - ../QTfrontend/ui/widget/drawmapwidget.cpp \ - ../QTfrontend/ui/widget/weaponItem.cpp \ - ../QTfrontend/ui/widget/mapContainer.cpp \ - ../QTfrontend/ui/widget/HistoryLineEdit.cpp \ - ../QTfrontend/ui/widget/SmartLineEdit.cpp \ - ../QTfrontend/util/DataManager.cpp \ - ../QTfrontend/net/tcpBase.cpp \ - ../QTfrontend/net/netregister.cpp \ - ../QTfrontend/net/proto.cpp \ - ../QTfrontend/net/hwmap.cpp \ - ../QTfrontend/net/netudpserver.cpp \ - ../QTfrontend/net/newnetclient.cpp \ - ../QTfrontend/net/netudpwidget.cpp \ - ../QTfrontend/net/netserver.cpp \ - ../QTfrontend/util/namegen.cpp \ - ../QTfrontend/ui/page/AbstractPage.cpp \ - ../QTfrontend/achievements.cpp \ - ../QTfrontend/binds.cpp \ - ../QTfrontend/drawmapscene.cpp \ - ../QTfrontend/game.cpp \ - ../QTfrontend/gameuiconfig.cpp \ - ../QTfrontend/HWApplication.cpp \ - ../QTfrontend/hwform.cpp \ - ../QTfrontend/main.cpp \ - ../QTfrontend/util/SDLInteraction.cpp \ - ../QTfrontend/team.cpp \ - ../QTfrontend/ui_hwform.cpp \ - ../QTfrontend/hwconsts.cpp \ - ../QTfrontend/ui/mouseoverfilter.cpp \ - ../QTfrontend/ui/widget/qpushbuttonwithsound.cpp \ - ../QTfrontend/ui/page/pagefeedback.cpp \ - ../QTfrontend/model/roomslistmodel.cpp \ - ../QTfrontend/ui/dialog/input_password.cpp \ - ../QTfrontend/ui/widget/colorwidget.cpp \ - ../QTfrontend/model/HatModel.cpp \ - ../QTfrontend/model/GameStyleModel.cpp \ - ../QTfrontend/ui/page/pagevideos.cpp \ - ../QTfrontend/net/recorder.cpp \ - ../QTfrontend/ui/dialog/ask_quit.cpp \ - ../QTfrontend/ui/dialog/upload_video.cpp \ - ../QTfrontend/campaign.cpp \ - ../QTfrontend/model/playerslistmodel.cpp \ - ../QTfrontend/util/LibavInteraction.cpp \ - ../QTfrontend/util/FileEngine.cpp - - -TRANSLATIONS += ../share/hedgewars/Data/Locale/hedgewars_ar.ts \ - ../share/hedgewars/Data/Locale/hedgewars_bg.ts \ - ../share/hedgewars/Data/Locale/hedgewars_cs.ts \ - ../share/hedgewars/Data/Locale/hedgewars_da.ts \ - ../share/hedgewars/Data/Locale/hedgewars_de.ts \ - ../share/hedgewars/Data/Locale/hedgewars_el.ts \ - ../share/hedgewars/Data/Locale/hedgewars_en.ts \ - ../share/hedgewars/Data/Locale/hedgewars_es.ts \ - ../share/hedgewars/Data/Locale/hedgewars_fi.ts \ - ../share/hedgewars/Data/Locale/hedgewars_fr.ts \ - ../share/hedgewars/Data/Locale/hedgewars_gl.ts \ - ../share/hedgewars/Data/Locale/hedgewars_hu.ts \ - ../share/hedgewars/Data/Locale/hedgewars_it.ts \ - ../share/hedgewars/Data/Locale/hedgewars_ja.ts \ - ../share/hedgewars/Data/Locale/hedgewars_ko.ts \ - ../share/hedgewars/Data/Locale/hedgewars_lt.ts \ - ../share/hedgewars/Data/Locale/hedgewars_ms.ts \ - ../share/hedgewars/Data/Locale/hedgewars_nl.ts \ - ../share/hedgewars/Data/Locale/hedgewars_pl.ts \ - ../share/hedgewars/Data/Locale/hedgewars_pt_BR.ts \ - ../share/hedgewars/Data/Locale/hedgewars_pt_PT.ts \ - ../share/hedgewars/Data/Locale/hedgewars_ro.ts \ - ../share/hedgewars/Data/Locale/hedgewars_ru.ts \ - ../share/hedgewars/Data/Locale/hedgewars_sk.ts \ - ../share/hedgewars/Data/Locale/hedgewars_sv.ts \ - ../share/hedgewars/Data/Locale/hedgewars_tr_TR.ts \ - ../share/hedgewars/Data/Locale/hedgewars_uk.ts \ - ../share/hedgewars/Data/Locale/hedgewars_zh_CN.ts \ - ../share/hedgewars/Data/Locale/hedgewars_zh_TW.ts - -RESOURCES += ../QTfrontend/hedgewars.qrc - -LIBS += -L../bin -lphysfs -lphysfsrwops - -macx { - QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.6 - QMAKE_MAC_SDK=/Developer/SDKs/MacOSX10.6.sdk - - OBJECTIVE_SOURCES += ../QTfrontend/*.m ../QTfrontend/*.mm - SOURCES += ../QTfrontend/AutoUpdater.cpp ../QTfrontend/InstallController.cpp \ - ../../build/QTfrontend/hwconsts.cpp - HEADERS += ../QTfrontend/M3InstallController.h ../QTfrontend/M3Panel.h \ - ../QTfrontend/NSWorkspace_RBAdditions.h ../QTfrontend/AutoUpdater.h \ - ../QTfrontend/CocoaInitializer.h ../QTfrontend/InstallController.h \ - ../QTfrontend/SparkleAutoUpdater.h - - LIBS += -lobjc -framework AppKit -framework IOKit -framework Foundation -framework SDL -framework SDL_Mixer -framework Sparkle -DSPARKLE_ENABLED - INCLUDEPATH += /Library/Frameworks/SDL.framework/Headers /Library/Frameworks/SDL_Mixer.framework/Headers - CONFIG += warn_on x86 - #CONFIG += x86 ppc x86_64 ppc64 -} - -win32 { - RC_FILE = ../QTfrontend/hedgewars.rc - SOURCES += ../QTfrontend/xfire.cpp - INCLUDEPATH += ../misc/winutils/include - LIBS += -L../misc/winutils/lib -} - -!macx { - LIBS += -lSDL -lSDL_mixer - !win32 { - INCLUDEPATH += /usr/local/include/SDL /usr/include/SDL - } -} - -FORMS += +TEMPLATE = app +TARGET = hedgewars +DEPENDPATH += ../QTfrontend/ +INCLUDEPATH += ../QTfrontend +INCLUDEPATH += ../QTfrontend/model +INCLUDEPATH += ../QTfrontend/ui +INCLUDEPATH += ../QTfrontend/ui/widget +INCLUDEPATH += ../QTfrontend/ui/page +INCLUDEPATH += ../QTfrontend/ui/dialog +INCLUDEPATH += ../QTfrontend/net +INCLUDEPATH += ../QTfrontend/util +INCLUDEPATH += ../QTfrontend/util/platform +INCLUDEPATH += ../misc/physfs/src +INCLUDEPATH += ../misc/physfs/extras + +DESTDIR = ../bin + +QT += network +QT += webkit + +HEADERS += ../QTfrontend/model/ThemeModel.h \ + ../QTfrontend/model/MapModel.h \ + ../QTfrontend/model/ammoSchemeModel.h \ + ../QTfrontend/model/netserverslist.h \ + ../QTfrontend/ui/page/pagedrawmap.h \ + ../QTfrontend/ui/page/pagedata.h \ + ../QTfrontend/ui/page/pagetraining.h \ + ../QTfrontend/ui/page/pageselectweapon.h \ + ../QTfrontend/ui/page/pagesingleplayer.h \ + ../QTfrontend/ui/page/pageingame.h \ + ../QTfrontend/ui/page/pageadmin.h \ + ../QTfrontend/ui/page/pagescheme.h \ + ../QTfrontend/ui/page/pagemultiplayer.h \ + ../QTfrontend/ui/page/pageplayrecord.h \ + ../QTfrontend/ui/page/pagemain.h \ + ../QTfrontend/ui/page/pageoptions.h \ + ../QTfrontend/ui/page/pagenetgame.h \ + ../QTfrontend/ui/page/pageeditteam.h \ + ../QTfrontend/ui/page/pageconnecting.h \ + ../QTfrontend/ui/page/pageroomslist.h \ + ../QTfrontend/ui/page/pagenet.h \ + ../QTfrontend/ui/page/pagecampaign.h \ + ../QTfrontend/ui/page/pageinfo.h \ + ../QTfrontend/ui/page/pagenetserver.h \ + ../QTfrontend/ui/page/pagegamestats.h \ + ../QTfrontend/ui/dialog/input_ip.h \ + ../QTfrontend/ui/qaspectratiolayout.h \ + ../QTfrontend/ui/widget/bgwidget.h \ + ../QTfrontend/ui/widget/fpsedit.h \ + ../QTfrontend/ui/widget/FreqSpinBox.h \ + ../QTfrontend/ui/widget/igbox.h \ + ../QTfrontend/ui/widget/chatwidget.h \ + ../QTfrontend/ui/widget/togglebutton.h \ + ../QTfrontend/ui/widget/SquareLabel.h \ + ../QTfrontend/ui/widget/itemNum.h \ + ../QTfrontend/ui/widget/frameTeam.h \ + ../QTfrontend/ui/widget/teamselect.h \ + ../QTfrontend/ui/widget/vertScrollArea.h \ + ../QTfrontend/ui/widget/about.h \ + ../QTfrontend/ui/widget/teamselhelper.h \ + ../QTfrontend/ui/widget/drawmapwidget.h \ + ../QTfrontend/ui/widget/databrowser.h \ + ../QTfrontend/ui/widget/hedgehogerWidget.h \ + ../QTfrontend/ui/widget/selectWeapon.h \ + ../QTfrontend/ui/widget/weaponItem.h \ + ../QTfrontend/ui/widget/gamecfgwidget.h \ + ../QTfrontend/ui/widget/mapContainer.h \ + ../QTfrontend/ui/widget/HistoryLineEdit.h \ + ../QTfrontend/ui/widget/SmartLineEdit.h \ + ../QTfrontend/util/DataManager.h \ + ../QTfrontend/net/netregister.h \ + ../QTfrontend/net/netserver.h \ + ../QTfrontend/net/netudpwidget.h \ + ../QTfrontend/net/tcpBase.h \ + ../QTfrontend/net/proto.h \ + ../QTfrontend/net/newnetclient.h \ + ../QTfrontend/net/netudpserver.h \ + ../QTfrontend/net/hwmap.h \ + ../QTfrontend/util/namegen.h \ + ../QTfrontend/ui/page/AbstractPage.h \ + ../QTfrontend/drawmapscene.h \ + ../QTfrontend/game.h \ + ../QTfrontend/gameuiconfig.h \ + ../QTfrontend/HWApplication.h \ + ../QTfrontend/hwform.h \ + ../QTfrontend/util/SDLInteraction.h \ + ../QTfrontend/team.h \ + ../QTfrontend/achievements.h \ + ../QTfrontend/binds.h \ + ../QTfrontend/ui_hwform.h \ + ../QTfrontend/KB.h \ + ../QTfrontend/hwconsts.h \ + ../QTfrontend/sdlkeys.h \ + ../QTfrontend/ui/mouseoverfilter.h \ + ../QTfrontend/ui/widget/qpushbuttonwithsound.h \ + ../QTfrontend/model/roomslistmodel.h \ + ../QTfrontend/ui/dialog/input_password.h \ + ../QTfrontend/ui/widget/colorwidget.h \ + ../QTfrontend/model/HatModel.h \ + ../QTfrontend/model/GameStyleModel.h \ + ../QTfrontend/ui/page/pagevideos.h \ + ../QTfrontend/net/recorder.h \ + ../QTfrontend/ui/dialog/ask_quit.h \ + ../QTfrontend/ui/dialog/upload_video.h \ + ../QTfrontend/campaign.h \ + ../QTfrontend/model/playerslistmodel.h \ + ../QTfrontend/util/LibavInteraction.h \ + ../QTfrontend/util/FileEngine.h \ + ../QTfrontend/ui/dialog/bandialog.h \ + ../QTfrontend/ui/widget/keybinder.h \ + ../QTfrontend/ui/widget/seedprompt.h \ + ../QTfrontend/ui/widget/themeprompt.h \ + ../QTfrontend/ui/widget/hatbutton.h \ + ../QTfrontend/util/MessageDialog.h \ + ../QTfrontend/ui/widget/hatprompt.h \ + ../QTfrontend/ui/widget/feedbackdialog.h \ + ../QTfrontend/ui/widget/lineeditcursor.h \ + ../QTfrontend/servermessages.h \ + ../QTfrontend/ui/widget/roomnameprompt.h + + +SOURCES += ../QTfrontend/model/ammoSchemeModel.cpp \ + ../QTfrontend/model/MapModel.cpp \ + ../QTfrontend/model/ThemeModel.cpp \ + ../QTfrontend/model/netserverslist.cpp \ + ../QTfrontend/ui/qaspectratiolayout.cpp \ + ../QTfrontend/ui/page/pagemain.cpp \ + ../QTfrontend/ui/page/pagetraining.cpp \ + ../QTfrontend/ui/page/pageroomslist.cpp \ + ../QTfrontend/ui/page/pagemultiplayer.cpp \ + ../QTfrontend/ui/page/pagegamestats.cpp \ + ../QTfrontend/ui/page/pageeditteam.cpp \ + ../QTfrontend/ui/page/pagenetgame.cpp \ + ../QTfrontend/ui/page/pagedata.cpp \ + ../QTfrontend/ui/page/pagedrawmap.cpp \ + ../QTfrontend/ui/page/pageplayrecord.cpp \ + ../QTfrontend/ui/page/pageselectweapon.cpp \ + ../QTfrontend/ui/page/pageingame.cpp \ + ../QTfrontend/ui/page/pagenetserver.cpp \ + ../QTfrontend/ui/page/pagecampaign.cpp \ + ../QTfrontend/ui/page/pageadmin.cpp \ + ../QTfrontend/ui/page/pageinfo.cpp \ + ../QTfrontend/ui/page/pageconnecting.cpp \ + ../QTfrontend/ui/page/pagesingleplayer.cpp \ + ../QTfrontend/ui/page/pagenet.cpp \ + ../QTfrontend/ui/page/pagescheme.cpp \ + ../QTfrontend/ui/page/pageoptions.cpp \ + ../QTfrontend/ui/dialog/input_ip.cpp \ + ../QTfrontend/ui/widget/igbox.cpp \ + ../QTfrontend/ui/widget/selectWeapon.cpp \ + ../QTfrontend/ui/widget/FreqSpinBox.cpp \ + ../QTfrontend/ui/widget/SquareLabel.cpp \ + ../QTfrontend/ui/widget/frameTeam.cpp \ + ../QTfrontend/ui/widget/fpsedit.cpp \ + ../QTfrontend/ui/widget/databrowser.cpp \ + ../QTfrontend/ui/widget/teamselect.cpp \ + ../QTfrontend/ui/widget/gamecfgwidget.cpp \ + ../QTfrontend/ui/widget/chatwidget.cpp \ + ../QTfrontend/ui/widget/itemNum.cpp \ + ../QTfrontend/ui/widget/bgwidget.cpp \ + ../QTfrontend/ui/widget/about.cpp \ + ../QTfrontend/ui/widget/togglebutton.cpp \ + ../QTfrontend/ui/widget/vertScrollArea.cpp \ + ../QTfrontend/ui/widget/hedgehogerWidget.cpp \ + ../QTfrontend/ui/widget/teamselhelper.cpp \ + ../QTfrontend/ui/widget/drawmapwidget.cpp \ + ../QTfrontend/ui/widget/weaponItem.cpp \ + ../QTfrontend/ui/widget/mapContainer.cpp \ + ../QTfrontend/ui/widget/HistoryLineEdit.cpp \ + ../QTfrontend/ui/widget/SmartLineEdit.cpp \ + ../QTfrontend/util/DataManager.cpp \ + ../QTfrontend/net/tcpBase.cpp \ + ../QTfrontend/net/netregister.cpp \ + ../QTfrontend/net/proto.cpp \ + ../QTfrontend/net/hwmap.cpp \ + ../QTfrontend/net/netudpserver.cpp \ + ../QTfrontend/net/newnetclient.cpp \ + ../QTfrontend/net/netudpwidget.cpp \ + ../QTfrontend/net/netserver.cpp \ + ../QTfrontend/util/namegen.cpp \ + ../QTfrontend/ui/page/AbstractPage.cpp \ + ../QTfrontend/achievements.cpp \ + ../QTfrontend/binds.cpp \ + ../QTfrontend/drawmapscene.cpp \ + ../QTfrontend/game.cpp \ + ../QTfrontend/gameuiconfig.cpp \ + ../QTfrontend/HWApplication.cpp \ + ../QTfrontend/hwform.cpp \ + ../QTfrontend/main.cpp \ + ../QTfrontend/util/SDLInteraction.cpp \ + ../QTfrontend/team.cpp \ + ../QTfrontend/ui_hwform.cpp \ + ../QTfrontend/hwconsts.cpp \ + ../QTfrontend/ui/mouseoverfilter.cpp \ + ../QTfrontend/ui/widget/qpushbuttonwithsound.cpp \ + ../QTfrontend/model/roomslistmodel.cpp \ + ../QTfrontend/ui/dialog/input_password.cpp \ + ../QTfrontend/ui/widget/colorwidget.cpp \ + ../QTfrontend/ui/widget/hatbutton.cpp \ + ../QTfrontend/ui/widget/hatprompt.cpp \ + ../QTfrontend/model/HatModel.cpp \ + ../QTfrontend/model/GameStyleModel.cpp \ + ../QTfrontend/ui/page/pagevideos.cpp \ + ../QTfrontend/net/recorder.cpp \ + ../QTfrontend/ui/dialog/ask_quit.cpp \ + ../QTfrontend/ui/dialog/upload_video.cpp \ + ../QTfrontend/campaign.cpp \ + ../QTfrontend/model/playerslistmodel.cpp \ + ../QTfrontend/util/LibavInteraction.cpp \ + ../QTfrontend/util/FileEngine.cpp \ + ../QTfrontend/ui/dialog/bandialog.cpp \ + ../QTfrontend/ui/widget/keybinder.cpp \ + ../QTfrontend/ui/widget/seedprompt.cpp \ + ../QTfrontend/ui/widget/themeprompt.cpp \ + ../QTfrontend/util/MessageDialog.cpp \ + ../QTfrontend/ui/widget/feedbackdialog.cpp \ + ../QTfrontend/ui/widget/lineeditcursor.cpp \ + ../QTfrontend/ui/widget/roomnameprompt.cpp + + +TRANSLATIONS += ../share/hedgewars/Data/Locale/hedgewars_ar.ts \ + ../share/hedgewars/Data/Locale/hedgewars_bg.ts \ + ../share/hedgewars/Data/Locale/hedgewars_cs.ts \ + ../share/hedgewars/Data/Locale/hedgewars_da.ts \ + ../share/hedgewars/Data/Locale/hedgewars_de.ts \ + ../share/hedgewars/Data/Locale/hedgewars_el.ts \ + ../share/hedgewars/Data/Locale/hedgewars_en.ts \ + ../share/hedgewars/Data/Locale/hedgewars_es.ts \ + ../share/hedgewars/Data/Locale/hedgewars_fi.ts \ + ../share/hedgewars/Data/Locale/hedgewars_fr.ts \ + ../share/hedgewars/Data/Locale/hedgewars_gl.ts \ + ../share/hedgewars/Data/Locale/hedgewars_hu.ts \ + ../share/hedgewars/Data/Locale/hedgewars_it.ts \ + ../share/hedgewars/Data/Locale/hedgewars_ja.ts \ + ../share/hedgewars/Data/Locale/hedgewars_ko.ts \ + ../share/hedgewars/Data/Locale/hedgewars_lt.ts \ + ../share/hedgewars/Data/Locale/hedgewars_ms.ts \ + ../share/hedgewars/Data/Locale/hedgewars_nl.ts \ + ../share/hedgewars/Data/Locale/hedgewars_pl.ts \ + ../share/hedgewars/Data/Locale/hedgewars_pt_BR.ts \ + ../share/hedgewars/Data/Locale/hedgewars_pt_PT.ts \ + ../share/hedgewars/Data/Locale/hedgewars_ro.ts \ + ../share/hedgewars/Data/Locale/hedgewars_ru.ts \ + ../share/hedgewars/Data/Locale/hedgewars_sk.ts \ + ../share/hedgewars/Data/Locale/hedgewars_sv.ts \ + ../share/hedgewars/Data/Locale/hedgewars_tr_TR.ts \ + ../share/hedgewars/Data/Locale/hedgewars_uk.ts \ + ../share/hedgewars/Data/Locale/hedgewars_zh_CN.ts \ + ../share/hedgewars/Data/Locale/hedgewars_zh_TW.ts + +RESOURCES += ../QTfrontend/hedgewars.qrc + +LIBS += -L../bin -lphysfs + +macx { + QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.6 + QMAKE_MAC_SDK = /Developer/SDKs/MacOSX10.6.sdk + + OBJECTIVE_SOURCES += ../QTfrontend/util/platform/*.m ../QTfrontend/util/platform/*.mm + SOURCES += ../QTfrontend/util/platform/AutoUpdater.cpp \ + ../QTfrontend/util/platform/InstallController.cpp \ + ../../build/QTfrontend/hwconsts.cpp + HEADERS += ../QTfrontend/util/platform/*.h + + LIBS += -lobjc -framework AppKit -framework IOKit -framework Foundation -framework SDL -framework SDL_Mixer -framework Sparkle -DSPARKLE_ENABLED + INCLUDEPATH += /Library/Frameworks/SDL.framework/Headers /Library/Frameworks/SDL_Mixer.framework/Headers + CONFIG += warn_on x86 + #CONFIG += x86 ppc x86_64 ppc64 +} + +win32 { + RC_FILE = ../QTfrontend/hedgewars.rc + SOURCES += ../QTfrontend/util/platform/xfire.cpp ../QTfrontend/util/platform/xfiregameclient.cpp + LIBS += -L../misc/winutils/lib + INCLUDEPATH += ../misc/winutils/include +} + +!macx { + LIBS += -lSDL -lSDL_mixer -lSDL_net + !win32 { + INCLUDEPATH += /usr/local/include/SDL /usr/include/SDL + } +} diff -r d5d5e1698554 -r 1dedcc37bfe8 share/CMakeLists.txt --- a/share/CMakeLists.txt Sun Nov 18 01:06:01 2012 +0400 +++ b/share/CMakeLists.txt Fri Feb 22 05:05:32 2013 +0100 @@ -1,27 +1,32 @@ add_subdirectory(hedgewars) -IF(APPLE OR CROSSAPPLE) - #needed for CFBundleVersion and CFBundleShortVersionString - FIND_PROGRAM(HGCOMMAND hg) - IF (HGCOMMAND AND (EXISTS ${hedgewars_SOURCE_DIR}/.hg)) - exec_program(${HGCOMMAND} - ARGS identify -n ${hedgewars_SOURCE_DIR} - OUTPUT_VARIABLE version_suffix - ) - STRING(REGEX REPLACE "([0-9]+)(.*)" "\\1" version_suffix ${version_suffix}) - set (HEDGEWARS_REVISION ${version_suffix}) - ELSE () - set (HEDGEWARS_REVISION ${HEDGEWARS_VERSION}) - ENDIF () +if(APPLE) + #needed for CFBundleVersion and CFBundleShortVersionString + #should reuse the variables set in main CMakeLists.txt + if(HGCOMMAND AND (EXISTS ${CMAKE_SOURCE_DIR}/.hg)) + set(HEDGEWARS_REVISION ${revision_number}) + else() + set(HEDGEWARS_REVISION ${HEDGEWARS_VERSION}) + endif() - configure_file(${hedgewars_SOURCE_DIR}/share/Info.plist.in - ${CMAKE_CURRENT_BINARY_DIR}/Info.plist) - install(PROGRAMS "${CMAKE_CURRENT_BINARY_DIR}/Info.plist" - DESTINATION ../) - install(PROGRAMS "${hedgewars_SOURCE_DIR}/share/Icon.icns" - DESTINATION ../Resources/) - install(PROGRAMS "${hedgewars_SOURCE_DIR}/share/hwico.icns" - DESTINATION ../Resources/) - install(PROGRAMS "${hedgewars_SOURCE_DIR}/share/dsa_pub.pem" - DESTINATION ../Resources/) -ENDIF(APPLE OR CROSSAPPLE) + #silly libav that always brings in VideoDecoderAcceleration, avaible only from 10.6.3 + if(NOT NOVIDEOREC) + set(FFMPEG_FIND_QUIETLY true) + find_package(FFMPEG) + if(${FFMPEG_FOUND} AND ${minimum_macosx_version} VERSION_EQUAL "10.6") + set(minimum_macosx_version "10.6.3") + endif() + endif() + + configure_file(${hedgewars_SOURCE_DIR}/share/Info.plist.in + ${CMAKE_CURRENT_BINARY_DIR}/Info.plist) + #path here should be Hedgewars.app/Contents/MacOS + install(PROGRAMS "${CMAKE_CURRENT_BINARY_DIR}/Info.plist" + DESTINATION ../) + install(PROGRAMS "${hedgewars_SOURCE_DIR}/share/Icon.icns" + DESTINATION ../Resources/) + install(PROGRAMS "${hedgewars_SOURCE_DIR}/share/hwico.icns" + DESTINATION ../Resources/) + install(PROGRAMS "${hedgewars_SOURCE_DIR}/share/dsa_pub.pem" + DESTINATION ../Resources/) +endif(APPLE) diff -r d5d5e1698554 -r 1dedcc37bfe8 share/Info.plist.in --- a/share/Info.plist.in Sun Nov 18 01:06:01 2012 +0400 +++ b/share/Info.plist.in Fri Feb 22 05:05:32 2013 +0100 @@ -2,159 +2,159 @@ - LSApplicationCategoryType - public.app-category.strategy-games - CFBundleName - Hedgewars - CFBundleExecutable - hedgewars - CFBundleGetInfoString - http://www.hedgewars.org - CFBundleIconFile - Icon.icns - CFBundleIdentifier - org.hedgewars.desktop - CFBundlePackageType - APPL - CFBundleSignature - Hedge - CFBundleVersion - ${HEDGEWARS_REVISION} - CFBundleShortVersionString - ${HEDGEWARS_VERSION} - NSHumanReadableCopyright - Copyright © 2004-2012, Hedgewars Project - NSAppleScriptEnabled - - LSRequiresNativeExecution - - LSMinimumSystemVersionByArchitecture - - x86_64 - 10.6.0 - i386 - 10.4.0 - ppc - 10.4.0 - - LSArchitecturePriority - - x86_64 - i386 - ppc - - LSMinimumSystemVersion - ${minimum_macosx_version} - SUPublicDSAKeyFile - dsa_pub.pem - SUFeedURL - http://www.hedgewars.org/download/appcast.xml - CFBundleLocalizations - - ar - bg - cs - da - de - el - en - es - fi - fr - gl - hu - it - ja - ko - lt - nl - pl - pt_BR - pt_PT - ro - ru - sk - sv - tr_TR - uk - zh_CN - zh_TW - - UTExportedTypeDeclarations - - - UTTypeIdentifier - org.hedgewars.desktop.hws - UTTypeReferenceURL - http://www.hedgewars.org/demos/ - UTTypeDescription - Hedgewars Save Game - UTTypeIconFile - public.text.icns - UTTypeConformsTo - - public.data - - UTTypeTagSpecification - - public.filename-extension - - hws - - public.mime-type - application/x-hedgewars-save - - - - UTTypeIdentifier - org.hedgewars.desktop.hwd - UTTypeReferenceURL - http://www.hedgewars.org/demos/ - UTTypeIconFile - public.text.icns - UTTypeDescription - Hedgewars Demo Game - UTTypeConformsTo - - public.data - - UTTypeTagSpecification - - public.filename-extension - - hwd - - public.mime-type - application/x-hedgewars-demo - - - - CFBundleDocumentTypes - - - CFBundleTypeIconFile - hwico.icns - CFBundleTypeName - Hedgewars Savefile - LSItemContentTypes - - org.hedgewars.desktop.hws - - CFBundleTypeRole - Editor - - - CFBundleTypeIconFile - hwico.icns - CFBundleTypeName - Hedgewars Demofile - LSItemContentTypes - - org.hedgewars.desktop.hwd - - CFBundleTypeRole - Viewer - - + LSApplicationCategoryType + public.app-category.strategy-games + CFBundleName + Hedgewars + CFBundleExecutable + hedgewars + CFBundleGetInfoString + http://www.hedgewars.org + CFBundleIconFile + Icon.icns + CFBundleIdentifier + org.hedgewars.desktop + CFBundlePackageType + APPL + CFBundleSignature + Hedge + CFBundleVersion + ${HEDGEWARS_REVISION} + CFBundleShortVersionString + ${HEDGEWARS_VERSION} + NSHumanReadableCopyright + Copyright © 2004-2012, Hedgewars Project + NSAppleScriptEnabled + + LSRequiresNativeExecution + + LSMinimumSystemVersionByArchitecture + + x86_64 + 10.6.0 + i386 + 10.4.0 + ppc + 10.4.0 + + LSArchitecturePriority + + x86_64 + i386 + ppc + + LSMinimumSystemVersion + ${minimum_macosx_version} + SUPublicDSAKeyFile + dsa_pub.pem + SUFeedURL + http://www.hedgewars.org/download/appcast.xml + CFBundleLocalizations + + ar + bg + cs + da + de + el + en + es + fi + fr + gl + hu + it + ja + ko + lt + nl + pl + pt_BR + pt_PT + ro + ru + sk + sv + tr_TR + uk + zh_CN + zh_TW + + UTExportedTypeDeclarations + + + UTTypeIdentifier + org.hedgewars.desktop.hws + UTTypeReferenceURL + http://www.hedgewars.org/demos/ + UTTypeDescription + Hedgewars Save Game + UTTypeIconFile + public.text.icns + UTTypeConformsTo + + public.data + + UTTypeTagSpecification + + public.filename-extension + + hws + + public.mime-type + application/x-hedgewars-save + + + + UTTypeIdentifier + org.hedgewars.desktop.hwd + UTTypeReferenceURL + http://www.hedgewars.org/demos/ + UTTypeIconFile + public.text.icns + UTTypeDescription + Hedgewars Demo Game + UTTypeConformsTo + + public.data + + UTTypeTagSpecification + + public.filename-extension + + hwd + + public.mime-type + application/x-hedgewars-demo + + + + CFBundleDocumentTypes + + + CFBundleTypeIconFile + hwico.icns + CFBundleTypeName + Hedgewars Savefile + LSItemContentTypes + + org.hedgewars.desktop.hws + + CFBundleTypeRole + Editor + + + CFBundleTypeIconFile + hwico.icns + CFBundleTypeName + Hedgewars Demofile + LSItemContentTypes + + org.hedgewars.desktop.hwd + + CFBundleTypeRole + Viewer + + diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Fonts/CMakeLists.txt --- a/share/hedgewars/Data/Fonts/CMakeLists.txt Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Fonts/CMakeLists.txt Fri Feb 22 05:05:32 2013 +0100 @@ -1,4 +1,4 @@ install(FILES - DejaVuSans-Bold.ttf + DejaVuSans-Bold.ttf wqy-zenhei.ttc - DESTINATION ${SHAREPATH}Data/Fonts) + DESTINATION ${SHAREPATH}Data/Fonts) diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Forts/CMakeLists.txt --- a/share/hedgewars/Data/Forts/CMakeLists.txt Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Forts/CMakeLists.txt Fri Feb 22 05:05:32 2013 +0100 @@ -1,7 +1,7 @@ -file(GLOB FortSprites *L.png *R.png) +file(GLOB FortSprites *L.png *R.png) list(REMOVE_ITEM FortSprites *@2x.png) list(REMOVE_ITEM FortSprites *-icon.png) install(FILES - ${FortSprites} - DESTINATION ${SHAREPATH}Data/Forts) + ${FortSprites} + DESTINATION ${SHAREPATH}Data/Forts) diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Graphics/AmmoMenu/Ammos.png Binary file share/hedgewars/Data/Graphics/AmmoMenu/Ammos.png has changed diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Graphics/AmmoMenu/Ammos@2x.png Binary file share/hedgewars/Data/Graphics/AmmoMenu/Ammos@2x.png has changed diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Graphics/AmmoMenu/Ammos_bw.png Binary file share/hedgewars/Data/Graphics/AmmoMenu/Ammos_bw.png has changed diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Graphics/AmmoMenu/Ammos_bw@2x.png Binary file share/hedgewars/Data/Graphics/AmmoMenu/Ammos_bw@2x.png has changed diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Graphics/AmmoMenu/BorderHorizontal.png Binary file share/hedgewars/Data/Graphics/AmmoMenu/BorderHorizontal.png has changed diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Graphics/AmmoMenu/BorderVertical.png Binary file share/hedgewars/Data/Graphics/AmmoMenu/BorderVertical.png has changed diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Graphics/AmmoMenu/CMakeLists.txt --- a/share/hedgewars/Data/Graphics/AmmoMenu/CMakeLists.txt Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Graphics/AmmoMenu/CMakeLists.txt Fri Feb 22 05:05:32 2013 +0100 @@ -1,6 +1,5 @@ file(GLOB AmmoMenuSprites *.png) -list(REMOVE_ITEM AmmoMenuSprites *@2x.png Border*.png) install(FILES - ${AmmoMenuSprites} - DESTINATION ${SHAREPATH}Data/Graphics/AmmoMenu) + ${AmmoMenuSprites} + DESTINATION ${SHAREPATH}Data/Graphics/AmmoMenu) diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Graphics/CMakeLists.txt --- a/share/hedgewars/Data/Graphics/CMakeLists.txt Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Graphics/CMakeLists.txt Fri Feb 22 05:05:32 2013 +0100 @@ -6,9 +6,9 @@ add_subdirectory(SuddenDeath) add_subdirectory(Missions) -file(GLOB BaseSprites *.png) +file(GLOB BaseSprites *.png) list(REMOVE_ITEM BaseSprites *@2x.png) install(FILES - ${BaseSprites} - DESTINATION ${SHAREPATH}Data/Graphics) + ${BaseSprites} + DESTINATION ${SHAREPATH}Data/Graphics) diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Graphics/Flags/CMakeLists.txt --- a/share/hedgewars/Data/Graphics/Flags/CMakeLists.txt Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Graphics/Flags/CMakeLists.txt Fri Feb 22 05:05:32 2013 +0100 @@ -1,5 +1,5 @@ -file(GLOB FlagTemplates *.png) +file(GLOB FlagTemplates *.png) install(FILES - ${FlagTemplates} - DESTINATION ${SHAREPATH}Data/Graphics/Flags) + ${FlagTemplates} + DESTINATION ${SHAREPATH}Data/Graphics/Flags) diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Graphics/Flags/cm_belarus.png Binary file share/hedgewars/Data/Graphics/Flags/cm_belarus.png has changed diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Graphics/Graves/CMakeLists.txt --- a/share/hedgewars/Data/Graphics/Graves/CMakeLists.txt Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Graphics/Graves/CMakeLists.txt Fri Feb 22 05:05:32 2013 +0100 @@ -1,5 +1,5 @@ -file(GLOB GraveSprites *.png) +file(GLOB GraveSprites *.png) install(FILES - ${GraveSprites} - DESTINATION ${SHAREPATH}Data/Graphics/Graves) + ${GraveSprites} + DESTINATION ${SHAREPATH}Data/Graphics/Graves) diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Graphics/Hats/CMakeLists.txt --- a/share/hedgewars/Data/Graphics/Hats/CMakeLists.txt Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Graphics/Hats/CMakeLists.txt Fri Feb 22 05:05:32 2013 +0100 @@ -3,5 +3,5 @@ file(GLOB HatSprites *.png) install(FILES - ${HatSprites} - DESTINATION ${SHAREPATH}Data/Graphics/Hats) + ${HatSprites} + DESTINATION ${SHAREPATH}Data/Graphics/Hats) diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Graphics/Hats/Reserved/CMakeLists.txt --- a/share/hedgewars/Data/Graphics/Hats/Reserved/CMakeLists.txt Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Graphics/Hats/Reserved/CMakeLists.txt Fri Feb 22 05:05:32 2013 +0100 @@ -1,5 +1,5 @@ file(GLOB HatSprites *.png) install(FILES - ${HatSprites} - DESTINATION ${SHAREPATH}Data/Graphics/Hats/Reserved) + ${HatSprites} + DESTINATION ${SHAREPATH}Data/Graphics/Hats/Reserved) diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Graphics/Hedgehog/CMakeLists.txt --- a/share/hedgewars/Data/Graphics/Hedgehog/CMakeLists.txt Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Graphics/Hedgehog/CMakeLists.txt Fri Feb 22 05:05:32 2013 +0100 @@ -1,5 +1,5 @@ file(GLOB HedgehogSprites *.png) install(FILES - ${HedgehogSprites} - DESTINATION ${SHAREPATH}Data/Graphics/Hedgehog) + ${HedgehogSprites} + DESTINATION ${SHAREPATH}Data/Graphics/Hedgehog) diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Graphics/Missions/Training/CMakeLists.txt --- a/share/hedgewars/Data/Graphics/Missions/Training/CMakeLists.txt Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Graphics/Missions/Training/CMakeLists.txt Fri Feb 22 05:05:32 2013 +0100 @@ -1,5 +1,5 @@ file(GLOB MissionPics *@2x.png) install(FILES - ${MissionPics} - DESTINATION ${SHAREPATH}Data/Graphics/Missions/Training) + ${MissionPics} + DESTINATION ${SHAREPATH}Data/Graphics/Missions/Training) diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Graphics/SuddenDeath/CMakeLists.txt --- a/share/hedgewars/Data/Graphics/SuddenDeath/CMakeLists.txt Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Graphics/SuddenDeath/CMakeLists.txt Fri Feb 22 05:05:32 2013 +0100 @@ -1,5 +1,5 @@ file(GLOB Sprites *.png) install(FILES - ${Sprites} - DESTINATION ${SHAREPATH}Data/Graphics/SuddenDeath) + ${Sprites} + DESTINATION ${SHAREPATH}Data/Graphics/SuddenDeath) diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Locale/CMakeLists.txt --- a/share/hedgewars/Data/Locale/CMakeLists.txt Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Locale/CMakeLists.txt Fri Feb 22 05:05:32 2013 +0100 @@ -6,17 +6,17 @@ QT4_ADD_TRANSLATION(QM ${tsfiles}) -add_custom_target (release-translation ALL - DEPENDS ${QM} - COMMENT "Compiling ts files" +add_custom_target (release-translation ALL + DEPENDS ${QM} + COMMENT "Compiling ts files" ) install(FILES - ${txttrans2} - ${txttrans5} - ${QM} - ${luafiles} - ${missionfiles} - DESTINATION ${SHAREPATH}Data/Locale + ${txttrans2} + ${txttrans5} + ${QM} + ${luafiles} + ${missionfiles} + DESTINATION ${SHAREPATH}Data/Locale ) diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Locale/cs.lua --- a/share/hedgewars/Data/Locale/cs.lua Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Locale/cs.lua Fri Feb 22 05:05:32 2013 +0100 @@ -332,7 +332,7 @@ -- ["Hmmm...perhaps a little more time will help."] = "", -- A_Classic_Fairytale:first_blood -- ["Hogminator"] = "", -- A_Classic_Fairytale:family -- ["Hogs in sight!"] = "", -- Continental_supplies --- ["HOLY SHIT!"] = "", -- Mutant +-- ["HOLY SHYTE!"] = "", -- Mutant -- ["Honest Lee"] = "", -- A_Classic_Fairytale:enemy ["Hooray!"] = "Hurá!", -- ["Hostage Situation"] = "", -- A_Classic_Fairytale:family diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Locale/cs.txt --- a/share/hedgewars/Data/Locale/cs.txt Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Locale/cs.txt Fri Feb 22 05:05:32 2013 +0100 @@ -54,8 +54,8 @@ 00:51=Hrouda bláta 00:52=Není vybrána žádná zbraň 00:53=TimeBox -00:54=Struktura -00:55=Pozemek s rozprašovačem +; 00:54=Struktura +00:54=Pozemek s rozprašovačem 01:00=Do boje! 01:01=Kolo nerozhodně @@ -506,7 +506,7 @@ 04:51=Získat ve volném záběru vrhá kouli bláta.|Žihadla bit, a srazí prasata zpět. 04:52=NEPOUŽITO 04:53=Vydejte se na dobrodružství v čase a prostoru,|přičemž vaši kamarádi bojovat dál sám.|Být připraven vrátit kdykoliv,|nebo náhlé smrti nebo pokud jsou všichni poraženi.|Prohlášení. Nefunguje v náhlé smrti,|Pokud jste sami, nebo jste-li král. -04:54=NEÚPLNÝ +04:54=NEÚPLNÝ 04:55=Sprej proud lepkavými vločkami.|Stavět mosty, pohřbít nepřátele, utěsnění tunely.|Buďte opatrní, nechcete dostat každý z vás! ; Game goal strings diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Locale/da.lua --- a/share/hedgewars/Data/Locale/da.lua Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Locale/da.lua Fri Feb 22 05:05:32 2013 +0100 @@ -332,7 +332,7 @@ -- ["Hmmm...perhaps a little more time will help."] = "", -- A_Classic_Fairytale:first_blood -- ["Hogminator"] = "", -- A_Classic_Fairytale:family -- ["Hogs in sight!"] = "", -- Continental_supplies --- ["HOLY SHIT!"] = "", -- Mutant +-- ["HOLY SHYTE!"] = "", -- Mutant -- ["Honest Lee"] = "", -- A_Classic_Fairytale:enemy ["Hooray!"] = "Hurra!", -- ["Hostage Situation"] = "", -- A_Classic_Fairytale:family diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Locale/da.txt --- a/share/hedgewars/Data/Locale/da.txt Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Locale/da.txt Fri Feb 22 05:05:32 2013 +0100 @@ -54,8 +54,8 @@ 00:51=Mudderklat 00:52=Intet våben valgt 00:53=Tidsboks -00:54=Struktur -00:55=Jordspray +; 00:54=Struktur +00:54=Jordspray 01:00=Kæmp! 01:01=Runde uafgjort @@ -505,7 +505,7 @@ 04:51=Få et skud lige ind med en Mudderklat.|Bider en smule og slår fjender omkuld. 04:52=UBRUGT 04:53=Tag på et eventyr gennem tid og rum,|mens du efterlader kampen til dine kammerater.|Vær klar til at vende tilbage når som helst,|eller hvis Pludselig Død indtræder|eller alle dine andre pindsvin dør.|Advarsel! Virker ikke under Pludselig Død,|hvis du er alene eller er Konge. -04:54=UFÆRDIG +04:54=UFÆRDIG 04:55=Sprøjt rundt med klistrende flammer.|Byg broer, begrav fjender, luk tunneler af.|Pas på ikke selv at få noget på dig. ; Game goal strings diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Locale/de.lua --- a/share/hedgewars/Data/Locale/de.lua Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Locale/de.lua Fri Feb 22 05:05:32 2013 +0100 @@ -332,7 +332,7 @@ -- ["Hmmm...perhaps a little more time will help."] = "", -- A_Classic_Fairytale:first_blood -- ["Hogminator"] = "", -- A_Classic_Fairytale:family -- ["Hogs in sight!"] = "", -- Continental_supplies --- ["HOLY SHIT!"] = "", -- Mutant +-- ["HOLY SHYTE!"] = "", -- Mutant -- ["Honest Lee"] = "", -- A_Classic_Fairytale:enemy ["Hooray!"] = "Hurra!", -- ["Hostage Situation"] = "", -- A_Classic_Fairytale:family diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Locale/de.txt --- a/share/hedgewars/Data/Locale/de.txt Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Locale/de.txt Fri Feb 22 05:05:32 2013 +0100 @@ -54,10 +54,10 @@ 00:51=Schlammball 00:52=Keine Waffe ausgewählt 00:53=ZeitBox -00:54=Bauwerk -00:55=Landkanone -00:56=Gefrierer -00:57=Hackbeil +; 00:54=Bauwerk +00:54=Landkanone +00:55=Gefrierer +00:56=Hackbeil 01:00=Auf in die Schlacht! diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Locale/el.txt --- a/share/hedgewars/Data/Locale/el.txt Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Locale/el.txt Fri Feb 22 05:05:32 2013 +0100 @@ -164,7 +164,7 @@ 02:01=Ο %1 βρήκε την χαμένη πόλη της Ατλαντίδας! 02:01=Ο %1 έγινε τροφή για τα ψάρια! 02:01=Του %1 δεν του αρέσουν τα αθλήματα του νερού! -02:01=Ο %1 έπρεπε να φέρει τη σχεδία του! +02:01=Ο %1 έπρεπε να φέρει τη σχεδία του! 02:01=Ο %1 πιστεύει ότι το θαλασσινό νερό κάνει καλό στο δέρμα! 02:01=Ο %1 βάζει αλάτι στις πληγές του! 02:01=Ο %1 πάει ταξίδι στην άβυσσο! @@ -187,10 +187,10 @@ 02:02=Συνέτριψε τους εχθρούς σου! 02:02=Ας νικήσει ο καλύτερος σκαντζόχοιρος! 02:02=Νίκη ή θάνατος! -02:02=Τα λάφυρα πάνε στο νικητή! +02:02=Τα λάφυρα πάνε στο νικητή! 02:02=Η ήττα δεν είναι επιλογή! 02:02=Σκορπίστε τον όλεθρο! -02:02=Αφέθηκαν ελεύθεροι οι σκαντζόχοιροι του πολέμου! +02:02=Αφέθηκαν ελεύθεροι οι σκαντζόχοιροι του πολέμου! 02:02=Hedgewars, σας προσφέρεται από το Hedgewars.org 02:02=ΑΑΑΑΕΕΕΕΕΕΡΡΡΡΡΑΑΑΑΑΑΑΑΑΑΑΑΑΑΑ..... 02:02=Είσαι πολύ τυχερός αν δεν είσαι εναντίων του Tiyuri! @@ -486,7 +486,7 @@ ; Game goal strings 05:00=Κανόνες Παιχνιδιού -05:01=Ισχύουν οι ακόλουθοι κανόνες : +05:01=Ισχύουν οι ακόλουθοι κανόνες : 05:02=Φρούρια : Υπερασπιστείτε το φρούριό σας, συντρίψτε τους εχθρούς σας! 05:03=Μικροβαρύτητα : Προσέξτε πού πατάτε! 05:04=Ασπίδα: Οι σκαντζόχοιροι είναι (σχεδόν) άτρωτοι. diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Locale/en.txt --- a/share/hedgewars/Data/Locale/en.txt Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Locale/en.txt Fri Feb 22 05:05:32 2013 +0100 @@ -54,17 +54,17 @@ 00:51=Mudball 00:52=No weapon selected 00:53=TimeBox -00:54=Structure -00:55=Land Spray -00:56=Freezer -00:57=Cleaver +; 00:54=Structure +00:54=Land Spray +00:55=Freezer +00:56=Cleaver 01:00=Let's fight! 01:01=Round draw 01:02=%1 wins! 01:03=Volume %1% 01:04=Paused -01:05=Really quit (Y/Esc)? +01:05=Really quit? (Y/Esc) (Click to resume) 01:06=Sudden Death! 01:07=%1 remaining 01:08=Fuel @@ -508,7 +508,7 @@ 04:51=Get in a free shot by hurling a ball of mud.|Stings a bit, and knocks hogs back. 04:52=UNUSED 04:53=Take a trip through time and space,|while leaving your comrades to fight on alone.|Be prepared to return at any time,|or for Sudden Death or if they are all defeated.|Disclaimer. Does not function in Sudden Death,|if you are alone, or if you are a King. -04:54=INCOMPLETE +04:54=INCOMPLETE 04:55=Spray a stream of sticky flakes.|Build bridges, bury enemies, seal off tunnels.|Be careful you don't get any on you! ; Game goal strings diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Locale/es.lua --- a/share/hedgewars/Data/Locale/es.lua Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Locale/es.lua Fri Feb 22 05:05:32 2013 +0100 @@ -332,7 +332,7 @@ -- ["Hmmm...perhaps a little more time will help."] = "", -- A_Classic_Fairytale:first_blood -- ["Hogminator"] = "", -- A_Classic_Fairytale:family -- ["Hogs in sight!"] = "", -- Continental_supplies --- ["HOLY SHIT!"] = "", -- Mutant +-- ["HOLY SHYTE!"] = "", -- Mutant -- ["Honest Lee"] = "", -- A_Classic_Fairytale:enemy ["Hooray!"] = "¡Hurra!", -- ["Hostage Situation"] = "", -- A_Classic_Fairytale:family diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Locale/es.txt --- a/share/hedgewars/Data/Locale/es.txt Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Locale/es.txt Fri Feb 22 05:05:32 2013 +0100 @@ -55,8 +55,8 @@ 00:51=Bola de barro 00:52=No hay arma seleccionada 00:53=Cabina del tiempo -00:54=Estructura -00:55=Pistola de barro +; 00:54=Estructura +00:54=Pistola de barro 01:00=¡Luchad! 01:01=Empate @@ -504,7 +504,7 @@ 04:51=¿Qué hay más barato que el barro?|Un tiro gratis gracias a la bola de barro.|Hará que el enemigo salga volando|y escuece un poco si te entra en los ojos. 04:52=SIN USAR 04:53=Vive una trepidante aventura a través del|espacio y el tiempo mientras tus compañeros|siguen luchando en tu lugar.|Estate preparado para volver en cualquier momento,|o al llegar la Muerte súbita si te has quedado solo.|Aviso: no funciona durante la Muerte súbita,|si estás solo o si eres el rey. -04:54=INCOMPLETO +04:54=INCOMPLETO 04:55=Esparce un chorro de pegajoso barro.|Construye puentes, entierra enemigos o cierra túneles.|¡Ten especial cuidado de no mancharte! ; Game goal strings diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Locale/fi.txt --- a/share/hedgewars/Data/Locale/fi.txt Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Locale/fi.txt Fri Feb 22 05:05:32 2013 +0100 @@ -416,18 +416,18 @@ 04:01=Hyökkää sirpalepommilla.|Se jakaantuu pienemmiksi pommeiksi ajan|loppuessa ajastimesta|1-5: Säädä kranaatin ajastin|Hyökkää: Pidä pohjassa lisätäksesi heittovoimaa 04:02=Hyökkää ballistisella ammuksella|johon tuuli saattaa vaikuttaa|Hyökkää: Pidä pohjassa lisätäksesi voimaa 04:03=Laukaise ohjattu mehiläinen joka lukittuu|valittuun kohteeseen. Älä ammu täydellä voimalla|lisätäksesi tarkkuutta|Kursori: Valitse kohde|Hyökkää: Pidä pohjassa lisätäksesi voimaa -04:04=Ammu vihollisiasi kahdesti laukeavalla haulikolla.|Kiitos leviämisen sinun ei tarvitse tähdätä suoraan|vahingoittaeksi vihollisiasi.|Hyökkää: Ammu (useita kertoja) +04:04=Ammu vihollisiasi kahdesti laukeavalla haulikolla.|Kiitos leviämisen sinun ei tarvitse tähdätä suoraan|vahingoittaeksi vihollisiasi.|Hyökkää: Ammu (useita kertoja) 04:05=Siirry maan alle! Käytä maaporaa porataksesi|reiän maahan päästäksesi muille alueille.|Hyökkää: Aloita ja lopeta kaivaminen 04:06=Tylsää? Ei mitään tapaa hyökätä? Säästät ammuksiasi?|Ei hätää! Jätä vuoro väliin, pelkuri!|Hyökkää: Jätä vuorosi väliin ilman tappelua 04:07=Ylitä pitkiä välimatkoja|hyvin ajoitetuilla laukauksilla ja köydellä.|Käytä momenttiasi liukuaksesi muiden siilien sekaan|tai pudota kranaatteja ja muita aseita niiden päälle.|Hyökkää: Ammu ja irroita köysi|Pitkä hyppy: Pudota kranaatteja ja vastaavia aseita 04:08=Pidä viholliset kaukana pudottamalla miina|kapeille käytäville tai suoraan niiden jalkojen juureen.|Pakene ennen kuin aktivoit sen itse!|Hyökkää: Pudota miina viereesi 04:09=Oletko epävarma tähtäyksestäsi? Käytä Desert|Eaglea hyökätäksesi neljällä laukauksella| Hyökkää: Ammu (useita kertoja) -04:10=Raaka voima on aina vaihtoehto. Käytä tätä klassista|räjähdettä vihollisiis ja pakene.|Hyökkää: Pudota dynamiitti viereesi +04:10=Raaka voima on aina vaihtoehto. Käytä tätä klassista|räjähdettä vihollisiis ja pakene.|Hyökkää: Pudota dynamiitti viereesi 04:11=Hankkiudu vihollissiileistä eroon lyömällä ne mailalla|kartan ulkopuolelle tai veteen. Tai miten olisi|muutaman miinan lyöminen kavereillesi?|Hyökkää: Lyö kaikkia edessä olevia -04:12=Mene henkilökohtaisuuksiin vapauttamalla|tämän melkein tappavan kamppailulajitekniikan voimat.|Hyökkää: Suorita Fire Punch -04:13=UNUSED +04:12=Mene henkilökohtaisuuksiin vapauttamalla|tämän melkein tappavan kamppailulajitekniikan voimat.|Hyökkää: Suorita Fire Punch +04:13=UNUSED 04:14=Korkean paikan kammo? Parempi ottaa laskuvarjo.|Se avautuu kun putoat liian kauas|ja pelastaa siilen putoamisvaurioilta.|Hyökkää: Avaa laskuvarjo -04:15=Kutsu lentokone hyökkäämään vihollisiasi päin|pommituslennolla|Vasen/Oikea: Valitse suunta|Osoitin: Valitse kohdealue +04:15=Kutsu lentokone hyökkäämään vihollisiasi päin|pommituslennolla|Vasen/Oikea: Valitse suunta|Osoitin: Valitse kohdealue 04:16=Kutsu lentokone pudottaaman useita miinoja kohdealueelle|Vasen/Oikea: Valitse hyökkäyssuunta|Osoitin: Valitse kohdealue 04:17=Tarvitsetko suojaa? Käytä puhalluslamppua kaivaaksesi|tunnelin maahan saadaksesi suojaa|Hyökkää: Aloita ja lopeta kaivaminen 04:18=Tarvitsetko suojaa vai haluatko ylittää|ylittämättömän maa-alueen? Sijoita muutamia palkkeja kuten haluat|Vasen/Oikea: Valitse asetettava palkki|Osoitin: Sijoita palkki sallittuun kohtaan @@ -436,7 +436,7 @@ 04:21=Ammu kranaatin kaltainen ammus|joka vapauttaa useita pommeja osuessaan|Hyökkää: Ammu täydellä voimalla 04:22=Ei vain Indiana Jonesille! Piiska on hyödyllinen ase|useissa tilanteissa. Erityisesti|jos haluat sysätä jonkun alas kielekkeeltä|Hyökkää: Iske kaikkea edessäsi olevaa 04:23=Jos sinulla ei ole mitään menettävää|tämä saattaa olla melko kätevä.|Uhraa siilesi laukaisemalla se|valittuun suuntan vahingottaen kaikkea tiellä olevaa räjähtäen lopussa|Hyökkää: Laukaise tuhoisa ja tappava hyökkäys -04:24=Hyvää syntymäpäivää! Laukaise tämä kakku ja anna sen kävellä|vihollistesi viereen ja järjestä heille räjähtävät kekkerit.|Tämä kakku voi ylittää melkein minkä tahansa maaston|Mutta se saattaa räjähtää matkalla|Hyökkää: Laukaise kakku tai anna sen pysähtyä ja räjähtää +04:24=Hyvää syntymäpäivää! Laukaise tämä kakku ja anna sen kävellä|vihollistesi viereen ja järjestä heille räjähtävät kekkerit.|Tämä kakku voi ylittää melkein minkä tahansa maaston|Mutta se saattaa räjähtää matkalla|Hyökkää: Laukaise kakku tai anna sen pysähtyä ja räjähtää 04:25=Käytä tätä naamioitumispakkausta saadaksesi vihollisesi|hyppäämään halatakseen (ja sitten putoamaan kuoppaan tai reikään).|Hyökkää: Käytä pakkausta ja yritä vietellä toinen siili 04:26=Heitä tämä mehukas vesimeloni vihollsiasi kohti|Kun ajastimesta loppuu aika, se hajoaa useiksi|räjähtäviksi palasiksi.|1-5: säädä vesimelonin ajastinta|Hyökkää: Pidä pohjassa lisätäksesi voimaa 04:27=Anna helvetin tulen sataa vihollistesi päälle käyttämällä tätä|pirullista räjähdettä. Älä mene liian lähelle tätä räjähdettä|koska pienemmät tulet saattavat kestää pitempään.|Hyökkää: Pidä pohjassa ampuaksesi voimakkaammin diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Locale/fr.lua --- a/share/hedgewars/Data/Locale/fr.lua Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Locale/fr.lua Fri Feb 22 05:05:32 2013 +0100 @@ -331,7 +331,7 @@ ["Hmmm...perhaps a little more time will help."] = "humm...Peut être qu'un peu plus de temps aiderait", -- ["Hogminator"] = "", -- ["Hogs in sight!"] = "", -- Continental_supplies --- ["HOLY SHIT!"] = "", -- Mutant +-- ["HOLY SHYTE!"] = "", -- Mutant -- ["Honest Lee"] = "", ["Hooray!"] = "Hourra ! ", ["Hostage Situation"] = "Situation d'otage", diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Locale/fr.txt --- a/share/hedgewars/Data/Locale/fr.txt Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Locale/fr.txt Fri Feb 22 05:05:32 2013 +0100 @@ -351,113 +351,113 @@ 02:10=Hors du parc ! 02:10=Coup gagnant ! 02:10=I believe I can FLY ! I believe I can... *boum* -; Weapon Categories -03:00=Grenade à retardement -03:01=Grenade à retardement -03:02=Arme balistique -03:03=Arme téléguidée -03:04=Fusil (plusieurs coups) -03:05=Engin excavateur -03:06=Action -03:07=Véhicule utilitaire -03:08=Bombe de proximité -03:09=Révolver (à plusieurs coups) -03:10=BOUM! -03:11=Bonk! -03:12=Arts martiaux -03:13=Non Utilisé -03:14=Véhicule utilitaire -03:15=Attaque aéroportée -03:16=Attaque aéroportée -03:17=Engin excavateur -03:18=Utilitaire -03:19=Véhicule utilitaire -03:20=Action -03:21=Engin balistique -03:22=Appelez-moi Indiana ! -03:23=Arts (vraiment) martiaux ! -03:24=Le gâteau n'est PAS un mensonge ! -03:25=Déguisement -03:26=Grenade à fragmentation -03:27=Grenade infernale -03:28=Missile balistique -03:29=Missile balistique -03:30=Attaque aéroportée -03:31=Bombe à déclenchement télécommandé -03:32=Effet temporaire -03:33=Effet temporaire -03:34=Effet temporaire -03:35=Effet temporaire -03:36=Effet temporaire -03:37=Effet temporaire -03:38=Fusil (à coups multiples) -03:39=Moyen de transport -03:40=Grenade incendiaire +; Weapon Categories +03:00=Grenade à retardement +03:01=Grenade à retardement +03:02=Arme balistique +03:03=Arme téléguidée +03:04=Fusil (plusieurs coups) +03:05=Engin excavateur +03:06=Action +03:07=Véhicule utilitaire +03:08=Bombe de proximité +03:09=Révolver (à plusieurs coups) +03:10=BOUM! +03:11=Bonk! +03:12=Arts martiaux +03:13=Non Utilisé +03:14=Véhicule utilitaire +03:15=Attaque aéroportée +03:16=Attaque aéroportée +03:17=Engin excavateur +03:18=Utilitaire +03:19=Véhicule utilitaire +03:20=Action +03:21=Engin balistique +03:22=Appelez-moi Indiana ! +03:23=Arts (vraiment) martiaux ! +03:24=Le gâteau n'est PAS un mensonge ! +03:25=Déguisement +03:26=Grenade à fragmentation +03:27=Grenade infernale +03:28=Missile balistique +03:29=Missile balistique +03:30=Attaque aéroportée +03:31=Bombe à déclenchement télécommandé +03:32=Effet temporaire +03:33=Effet temporaire +03:34=Effet temporaire +03:35=Effet temporaire +03:36=Effet temporaire +03:37=Effet temporaire +03:38=Fusil (à coups multiples) +03:39=Moyen de transport +03:40=Grenade incendiaire 03:41=Un supporter enragé de Squawks -; Weapon Descriptions (use | as line breaks) -04:00=Attaquez vos ennemis en utilisant une simple grenade.|Elle explosera une fois que le compte à rebours atteindra zéro.|1-5: Lancez le minuteur de la grenade|Attaque : maintenez pour la lancer avec plus de force -04:01=Attaquez vos ennemis en utilisant une bombe à retardement.|Elle se désintégrera en de multiples petites bombes |quand le compte à rebours atteindra zéro|1-5 : Lancez le minuteur de la grenade|Attaque : maintenez pour la lancer avec plus de force -04:02=Attaquez vos ennemis en utilisant un missile balistique|subissant l'influence du vent.|Attaque : maintenez pour tirer avec plus de force -04:03=Lancez une bombe téléguidée qui se verrouillera|sur la cible choisie. Ne tirez pas à pleine puissance|pour une meilleure précision.|Curseur : choix de la cible|Attaque : maintenez pour tirer avec plus de force -04:04=Attaquez votre ennemi en utilisant un fusil à deux coups.|Grâce à son pouvoir de dispersion vous n'avez pas besoin de frapper directement sur la cible|pour toucher votre ennemi.|Attaque : tirez (coups multiples) -04:05=Descendez sous terre ! Utilisez le marteau-piqueur pour creuser un trou|dans le sol et atteindre d'autres zones.|Attaque : commencez/achevez de creuser -04:06=Vous en avez marre ? Pas moyen d'attaquer ? Vous économisez vos munitions ?|Pas de problèmes ! Passez simplement votre tour, espèce de lâche !|Attaque : Passez votre tour sans combattre -04:07=Franchissez les grandes distances en utilisant par intervalles la |corde ninja. Utilisez votre élan pour vous lancer contre les autres hérissons,|balancez leurs des grenades ou d'autres armes explosives.|Attaque : Tirer ou lâchez la corde ninja|Saut longue distance : jetez des grenades ou des armes similaires +; Weapon Descriptions (use | as line breaks) +04:00=Attaquez vos ennemis en utilisant une simple grenade.|Elle explosera une fois que le compte à rebours atteindra zéro.|1-5: Lancez le minuteur de la grenade|Attaque : maintenez pour la lancer avec plus de force +04:01=Attaquez vos ennemis en utilisant une bombe à retardement.|Elle se désintégrera en de multiples petites bombes |quand le compte à rebours atteindra zéro|1-5 : Lancez le minuteur de la grenade|Attaque : maintenez pour la lancer avec plus de force +04:02=Attaquez vos ennemis en utilisant un missile balistique|subissant l'influence du vent.|Attaque : maintenez pour tirer avec plus de force +04:03=Lancez une bombe téléguidée qui se verrouillera|sur la cible choisie. Ne tirez pas à pleine puissance|pour une meilleure précision.|Curseur : choix de la cible|Attaque : maintenez pour tirer avec plus de force +04:04=Attaquez votre ennemi en utilisant un fusil à deux coups.|Grâce à son pouvoir de dispersion vous n'avez pas besoin de frapper directement sur la cible|pour toucher votre ennemi.|Attaque : tirez (coups multiples) +04:05=Descendez sous terre ! Utilisez le marteau-piqueur pour creuser un trou|dans le sol et atteindre d'autres zones.|Attaque : commencez/achevez de creuser +04:06=Vous en avez marre ? Pas moyen d'attaquer ? Vous économisez vos munitions ?|Pas de problèmes ! Passez simplement votre tour, espèce de lâche !|Attaque : Passez votre tour sans combattre +04:07=Franchissez les grandes distances en utilisant par intervalles la |corde ninja. Utilisez votre élan pour vous lancer contre les autres hérissons,|balancez leurs des grenades ou d'autres armes explosives.|Attaque : Tirer ou lâchez la corde ninja|Saut longue distance : jetez des grenades ou des armes similaires 04:08=Maintenez vos ennemis à distance en laissant une mine|dans les passages étroits ou juste sous leurs pieds. Assurez-vous|que vous pouvez vous sauver avant son déclenchement !|Attaque : lâchez la mine à vos pieds -04:09=Vous n'êtes pas sûr de ce que vous voulez ? Utilisez l'Aigle| du Désert pour attaquer en utilisant vos quatre coups. Poussez dans l'eau vos ennemis ou transpercez leur défense|Attaque : tirez (coups multiples) -04:10=La force brute est toujours une possibilité. Lancez cet explosif|classique sur vos ennemis et prenez le temps de vous retirer.|Attaque : Lâchez la dynamite à vos pieds +04:09=Vous n'êtes pas sûr de ce que vous voulez ? Utilisez l'Aigle| du Désert pour attaquer en utilisant vos quatre coups. Poussez dans l'eau vos ennemis ou transpercez leur défense|Attaque : tirez (coups multiples) +04:10=La force brute est toujours une possibilité. Lancez cet explosif|classique sur vos ennemis et prenez le temps de vous retirer.|Attaque : Lâchez la dynamite à vos pieds 04:11=Débarrassez-vous des hérissons ennemis en leur donnant des coups pour les chasser |vers d'autres horizons ou en les jetant à l'eau. Ou bien préférez-vous|envoyer quelques tonneaux ou mines sur vos ennemis ?|Attaque : frappez un bon coup sur tout ce qui bouge. 04:12=Allez au combat rapproché corps à corps pour utiliser toute la force presque mortelle de ces arts martiaux.|Attaque : lancez un coup de poing fulgurant 04:13=non-utilisé 04:14=Vous avez le vertige ? Prenez donc un parachute.|Il se déploiera lorsque|vous serez tombé trop loin|et épargnera le choc de la chute à votre hérisson.|Attaque: Dépliez le parachute 04:15=Appelez le 3615 BOMBE pour commander une frappe aérienne dévastatrice sur vos ennemis.|Gauche/Droite : Déterminez la direction de l'attaque|Curseur : Choisissez la zone cible 04:16=Appelez un avion qui enverra plusieurs mines|sur la zone cible.|Gauche/Droite : Détermine la direction de l'attaque|Curseur : Sélectionnez la zone cible -04:17=vous avez besoin d'un abri ? de pousser quelques ennemis dans l'eau ? Utilisez le chalumeau| pour creuser un tunnel dans le sol, vous protéger ou faire de nouvelles victimes.|Attaque : Commencez/cessez de creuser. -04:18=Vous avez besoin de vous protéger davantage ou de passer un |obstacle infranchissable ? Placez quelques poutrelles|où vous voulez .|Gauche/Droite : Choisissez la poutrelle à placer|Curseur : Placez la poutrelle dans la bonne position +04:17=vous avez besoin d'un abri ? de pousser quelques ennemis dans l'eau ? Utilisez le chalumeau| pour creuser un tunnel dans le sol, vous protéger ou faire de nouvelles victimes.|Attaque : Commencez/cessez de creuser. +04:18=Vous avez besoin de vous protéger davantage ou de passer un |obstacle infranchissable ? Placez quelques poutrelles|où vous voulez .|Gauche/Droite : Choisissez la poutrelle à placer|Curseur : Placez la poutrelle dans la bonne position 04:19=La téléportation utilisée au bon moment|peut être bien plus efficace|que la plupart des autres armes|car elle vous permet de sauver des hérissons de situations dangereuses|en quelques secondes.|Curseur : Choisissez la zone cible -04:20=Vous permet de jouer la partie en cours avec|un hérisson différent.|Attaque : Activez le changement de hérisson +04:20=Vous permet de jouer la partie en cours avec|un hérisson différent.|Attaque : Activez le changement de hérisson 04:21=Tirez un missile balistique qui va|envoyer de multiples bombes au point d'impact.|Attaque : Tirez à pleine puissance -04:22=Ce n'est pas réservé à Indiana Jones ! Le fouet est une|arme bien utile dans plusieurs situations. Particulièrement|quand vous devez hisser quelqu'un en haut d'une falaise.|Attaque : Frappez tout ce qui bouge devant vous +04:22=Ce n'est pas réservé à Indiana Jones ! Le fouet est une|arme bien utile dans plusieurs situations. Particulièrement|quand vous devez hisser quelqu'un en haut d'une falaise.|Attaque : Frappez tout ce qui bouge devant vous 04:23=Si vous n'avez rien à perdre, voilà qui peut être |bien pratique. Sacrifiez votre hérisson en le lançant dans une direction| particulière. Il heurtera tout sur son passage avant |d'exploser finalement.|Attaque : Lancer l'attaque mortelle et dévastatrice -04:24=Joyeux anniversaire ! Lancez ce gâteau, faites-le atterrir|tout près de vos ennemis et offrez-leur une fête explosive.|Le gâteau peut franchir presque tous les environnements mais|il se peut qu'il explose à mi-chemin.|Attaque : Lancez le gâteau ou bien faites-le s'arrêter et exploser -04:25=Arme de séduction massive ! Utilisez le déguisement pour amener vos ennemis| à sauter vers votre hérisson (et donc vers un piège ou un trou).|Attaque : Utilisez le déguisement et tentez de séduire un autre hérisson -04:26=Envoyez cette pastèque explosive à la tête de vos ennemis. Une fois le compte-à-rebours achevé, elle se désintégrera en de multiples fragments explosifs|1-5 : Lancer le compte à rebours|Attaque : Maintenez pour tirer avec plus de puissance +04:24=Joyeux anniversaire ! Lancez ce gâteau, faites-le atterrir|tout près de vos ennemis et offrez-leur une fête explosive.|Le gâteau peut franchir presque tous les environnements mais|il se peut qu'il explose à mi-chemin.|Attaque : Lancez le gâteau ou bien faites-le s'arrêter et exploser +04:25=Arme de séduction massive ! Utilisez le déguisement pour amener vos ennemis| à sauter vers votre hérisson (et donc vers un piège ou un trou).|Attaque : Utilisez le déguisement et tentez de séduire un autre hérisson +04:26=Envoyez cette pastèque explosive à la tête de vos ennemis. Une fois le compte-à-rebours achevé, elle se désintégrera en de multiples fragments explosifs|1-5 : Lancer le compte à rebours|Attaque : Maintenez pour tirer avec plus de puissance 04:27=Faites tomber un déluge de feu sur vos adversaires en utilisant|cet explosif dévastateur.|Ne vous tenez pas trop prêt|de l'impact car les flammes peuvent durer longtemps|Attaque : Maintenez pour tirer avec plus de puissance 04:28=Peu après le lancement de ce missile, il va se mettre|à creuser le sol le plus résistant et explosera|une fois son détonateur amorcé ou une fois atteint l'air libre.|Attaque : Maintenez pour tirer avec plus de puissance 04:29=Ce n'est pas un jouet pour les enfants ! La mitrailleuse envoie|des centaines de petites balles colorées explosives.|Attaque : Tirez à pleine puissance|Haut/Bas : Continuez à tirer -04:30=Appelez un avion pour larguer une puissante giclée de napalm.|En la menant correctement cette attaque peut éradiquer|des zones entières du paysage, et notamment les hérissons qui auraient la malchance de se trouver là.|Gauche/Droite: Déterminez la direction de l'attaque|Curseur : Choisissez la zone cible -04:31=L'avion télécommandé est l'arme idéale pour récolter des boites ou|attaquer des hérissons très éloignés. Une fois vos ennemis bombardés, vous pourrez lancer votre avion sur l'ennemi dans une explosion incendiaire.|Attaque : Lancez l'avion ou larguez des bombes|Saut longue distance : laissez les valkyries entrer dans la danse guerrière|Haut/Bas : Pilotez l'avion +04:30=Appelez un avion pour larguer une puissante giclée de napalm.|En la menant correctement cette attaque peut éradiquer|des zones entières du paysage, et notamment les hérissons qui auraient la malchance de se trouver là.|Gauche/Droite: Déterminez la direction de l'attaque|Curseur : Choisissez la zone cible +04:31=L'avion télécommandé est l'arme idéale pour récolter des boites ou|attaquer des hérissons très éloignés. Une fois vos ennemis bombardés, vous pourrez lancer votre avion sur l'ennemi dans une explosion incendiaire.|Attaque : Lancez l'avion ou larguez des bombes|Saut longue distance : laissez les valkyries entrer dans la danse guerrière|Haut/Bas : Pilotez l'avion 04:32=La fable gravité est plus efficace que n'importe quel régime ! Sautez|plus haut et franchissez de plus grandes distances ou bien faites voltiger vos ennemis |encore plus loin.|Attaque : Activez -04:33=Parfois vous avez besoin d'un petit coup de pouce supplémentaire|pour gérer les dégâts.|Attaque : Activez +04:33=Parfois vous avez besoin d'un petit coup de pouce supplémentaire|pour gérer les dégâts.|Attaque : Activez 04:34=Personne ne peut me toucher !|Attaque : Activez 04:35=Parfois le temps passe trop vite. Grappillez quelques secondes de plus pour terminer votre attaque|Attaque : Activez -04:36=Eh bien, parfois vous ratez complètement la cible. Demandez plutôt de l'aide|à la technologie de pointe actuelle pour bien viser.|Attaque : Activez +04:36=Eh bien, parfois vous ratez complètement la cible. Demandez plutôt de l'aide|à la technologie de pointe actuelle pour bien viser.|Attaque : Activez 04:37=Ne craignez pas la lumière du jour. Rafraichissez vous |d'un peu de sang en récupérant des points de vie sur les dégats faits aux ennemis.|Attaque : Activez -04:38= Le fusil à lunette peut être une des armes les plus dévastatrices|de tout votre arsenal, toutefois il est totalement inefficace|en combat rapproché. Les dommages qu'il cause augmentent suivant|la distance de la cible.|Attaque : Tirez (deux fois) +04:38= Le fusil à lunette peut être une des armes les plus dévastatrices|de tout votre arsenal, toutefois il est totalement inefficace|en combat rapproché. Les dommages qu'il cause augmentent suivant|la distance de la cible.|Attaque : Tirez (deux fois) 04:39=Volez vers d'autres secteurs de la carte en utilisant une soucoupe|volante. Ce moyen de transport, pas facile à dompter, vous|emportera vers presque tous les horizons du champ de bataille|Attaque : Activer|Haut/Gauche/Droite : Prenez de l'altitude et controllez votre direction -04:40=Mettez le feu à un territoire en utilisant cette bouteille remplie|de liquide inflammable.|Attaque : maintenez pour tirer avec plus de force +04:40=Mettez le feu à un territoire en utilisant cette bouteille remplie|de liquide inflammable.|Attaque : maintenez pour tirer avec plus de force 04:41=Une arme naturelle qui peut suffire à remplacer la soucoupe volante.|Cet oiseau a du manger un vieux fromage pourri (du Limburger vous dites ?)|car ses oeufs ont comme quelquechose de ... toxique.|Le piaf peut donc transporter votre hérisson et balancer des œufs|sur vos ennemis !|Attaque : Activez et larguez des œufs|Haut/Gauche/Droite: voltigez vers une direction. 04:42=Ce fusil à portails est capable de transporter instantanément hérissons,|tonneaux ou mines entre deux points du terrain. |Utilisez-le intelligemment et votre campagne sera un ... GRAND SUCCÈS !|Attaque : Crée un portail|Modificateur : Change la couleur du portail 04:43=Faites de vos débuts musicaux un succès explosif !| Lâchez un piano depuis les cieux, mais attention ... si quelqu'un doit|jouer dessus, cela pourrait lui coûter la vie !|Curseur : Choix de la cible|F1-F9 : Jouer du piano -04:44=Ce n'est pas juste un fromage, c'est une arme bactériologique !|Si il ne provoque que de faibles dommages, sa puissance se|trouve dans sa durée. Il empoisonnera tous les malchanceux|touchés par l'odeur et réduira leur vie à l'agonie !|1-5 : Lancez le minuteur de la grenade|Attaque : maintenez pour la lancer avec plus de force +04:44=Ce n'est pas juste un fromage, c'est une arme bactériologique !|Si il ne provoque que de faibles dommages, sa puissance se|trouve dans sa durée. Il empoisonnera tous les malchanceux|touchés par l'odeur et réduira leur vie à l'agonie !|1-5 : Lancez le minuteur de la grenade|Attaque : maintenez pour la lancer avec plus de force 04:45=Tous ces cours de physique ont finalement payé,|lancez une onde Sinus dévastatrice sur vos ennemis.|Attention au recul ! (cette arme est incomplète)|Attaque : Activez 04:46=Aspergez vos ennemis de flammes liquides ou creusez vous un passage dans le sol.|Hardi !|Attaque : Activez|Haut/Bas : Continuez à viser|Droite/Gauche : Changer la puissance de tir 04:47=Doublez le fun avec deux mines, piquantes, furtives et collantes.|Provoquez une réaction en chaine dévastatrice et/ou défendez-vous ! |Attaque : maintenez pour tirer avec plus de force (deux fois) 04:48=Outre une bonne bosse, un bon coup de ce marteau enlèvera un tiers de la santé |du hérisson ennemi et l'enfoncera dans le sol ou dans l'eau comme un vulgaire asticot !|Attaque : Activez 04:49=Ressuscite vos amis oubliés six pieds sous terre ! Mais méfiez-vous, ressuscite également vos ennemis. |Attaque : Maintenez attaque pressée pour ressusciter lentement|Haut : Accélérer la résurrection -; Game goal strings -05:00=Modes de jeu -05:01=Les règles suivantes s'appliquent -05:02=Forts : Défendez votre forteresse ; exterminez vos ennemis ! -05:03=Faible gravité : Attention à vos mouvements -05:04=Invulnérabilité : Les hérissons sont (presque) invulnérables -05:05=Vampirisme : Les hérissons récupèrent des points de vie par les dégats qu'ils infligent +; Game goal strings +05:00=Modes de jeu +05:01=Les règles suivantes s'appliquent +05:02=Forts : Défendez votre forteresse ; exterminez vos ennemis ! +05:03=Faible gravité : Attention à vos mouvements +05:04=Invulnérabilité : Les hérissons sont (presque) invulnérables +05:05=Vampirisme : Les hérissons récupèrent des points de vie par les dégats qu'ils infligent 05:06=Karma: Les hérissons sont victimes des blessures qu'ils infligent -05:07=Protégez le roi : Ne laissez pas mourir le roi !|Placez le roi : Choisissez un point de départ sécurisé pour le roi -05:08=Placez les hérissons : Placez vos hérissons avant le début de la partie -05:09=Artillerie : Les hérissons ne peuvent pas se déplacer pour changer de place +05:07=Protégez le roi : Ne laissez pas mourir le roi !|Placez le roi : Choisissez un point de départ sécurisé pour le roi +05:08=Placez les hérissons : Placez vos hérissons avant le début de la partie +05:09=Artillerie : Les hérissons ne peuvent pas se déplacer pour changer de place 05:10=Terrain indestructible : La plupart des armes sont incapables de modifier le terrain 05:11=Munitions partagées : Toutes les équipes de la même couleur partagent leurs munitions 05:12=Mines à retardement : Les mines exploseront après %1 seconde(s) diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Locale/hedgewars_ar.ts --- a/share/hedgewars/Data/Locale/hedgewars_ar.ts Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Locale/hedgewars_ar.ts Fri Feb 22 05:05:32 2013 +0100 @@ -20,6 +20,79 @@ + BanDialog + + IP + IP + + + Nick + + + + IP/Nick + + + + Reason + + + + Duration + + + + Ok + + + + Cancel + الغاء + + + you know why + + + + Warning + + + + Please, specify %1 + + + + nickname + + + + permanent + + + + + DataManager + + Use Default + + + + + FeedbackDialog + + View + + + + Cancel + الغاء + + + Send Feedback + + + + FreqSpinBox Never @@ -45,13 +118,36 @@ Edit schemes - When this option is enabled selecting a game scheme will auto-select a weapon - - - Game Options + + Game scheme will auto-select a weapon + + + + + HWApplication + + %1 minutes + + + + %1 hour + + + + %1 hours + + + + %1 day + + + + %1 days + + HWAskQuitDialog @@ -102,10 +198,6 @@ Failed to save StyleSheet to %1 - - %1 is not a valid command! - - HWForm @@ -140,17 +232,6 @@ - Your nickname %1 is -registered on Hedgewars.org -Please provide your password below -or pick another nickname in game config: - - - - No password supplied. - - - Nickname اسم اللاعب @@ -163,6 +244,59 @@ Please pick another nickname: + + %1's Team + + + + Hedgewars - Nick registered + + + + This nick is registered, and you haven't specified a password. + +If this nick isn't yours, please register your own nick at www.hedgewars.org + +Password: + + + + Your nickname is not registered. +To prevent someone else from using it, +please register it at www.hedgewars.org + + + + + +Your password wasn't saved either. + + + + Hedgewars - Empty nickname + + + + Hedgewars - Wrong password + + + + You entered a wrong password. + + + + Try Again + + + + Hedgewars - Connection error + + + + You reconnected too fast. +Please wait a few seconds and try again. + + HWGame @@ -178,18 +312,6 @@ HWMapContainer - Map - خارطة - - - Themes - نمط - - - Filter - فلنر - - All كل @@ -214,10 +336,6 @@ تعبان - Type - نوع - - Small tunnels انقاق صغيرة @@ -226,27 +344,95 @@ انفاق متوسطة - Large tunnels - انفاق كبيرة - - - Small floating islands - جزر طائفة صغيرة - - - Medium floating islands - جزر طائفة متوسطة - - - Large floating islands - جزر طائفة كبيرة - - Seed - Set + Map type: + + + + Image map + + + + Mission map + + + + Hand-drawn + + + + Randomly generated + + + + Random maze + + + + Random + عشوائي + + + Map preview: + + + + Load map drawing + + + + Edit map drawing + + + + Largetunnels + + + + Small islands + + + + Medium islands + + + + Large islands + + + + Map size: + + + + Maze style: + + + + Mission: + + + + Map: + + + + Theme: + + + + Load drawn map + + + + Drawn Maps + + + + All files @@ -319,8 +505,8 @@ HWPasswordDialog - Password - كلمة السر + Login + @@ -335,6 +521,32 @@ + HatButton + + Change hat (%1) + + + + + HatPrompt + + Select a hat + + + + Filter: + + + + Cancel + الغاء + + + Use selected hat + + + + KB SDL_ttf returned error while rendering text, most propably it is related to the bug in freetype2. It's recommended to update your freetype lib. @@ -342,6 +554,13 @@ + KeyBinder + + Category + + + + LibavInteraction Duration: %1m %2s @@ -360,6 +579,17 @@ Audio: + + unknown + + + + + MapModel + + No description available. + + PageAdmin @@ -391,6 +621,38 @@ Set data + + General + عام + + + Bans + + + + IP/Nick + + + + Expiration + + + + Reason + + + + Refresh + + + + Add + + + + Remove + + PageConnecting @@ -445,8 +707,40 @@ عام - Advanced - متقدم + Select an action to choose a custom key bind for this team + + + + Use my default + + + + Reset all binds + + + + Custom Controls + + + + Hat + + + + Name + اسم + + + This hedgehog's name + + + + Randomize this hedgehog's name + + + + Random Team + فريق عشوائي @@ -527,267 +821,14 @@ PageMain - Simply pick the same color as a friend to play together as a team. Each of you will still control his or her own hedgehogs but they'll win or lose together. - Tips - - - - Some weapons might do only low damage but they can be a lot more devastating in the right situation. Try to use the Desert Eagle to knock multiple hedgehogs into the water. - Tips - - - - If you're unsure what to do and don't want to waste ammo, skip one round. But don't let too much time pass as there will be Sudden Death! - Tips - - - - If you'd like to keep others from using your preferred nickname on the official server, register an account at http://www.hedgewars.org/. - Tips - - - - You're bored of default gameplay? Try one of the missions - they'll offer different gameplay depending on the one you picked. - Tips - - - - By default the game will always record the last game played as a demo. Select 'Local Game' and pick the 'Demos' button on the lower right corner to play or manage them. - Tips - - - - Hedgewars is Open Source and Freeware we create in our spare time. If you've got problems, ask on our forums but please don't expect 24/7 support! - Tips - - - - Hedgewars is Open Source and Freeware we create in our spare time. If you like it, help us with a small donation or contribute your own work! - Tips - - - - Hedgewars is Open Source and Freeware we create in our spare time. Share it with your family and friends as you like! - Tips - - - - Hedgewars is Open Source and Freeware we create in our spare time. If someone sold you the game, you should try get a refund! - Tips - - - - From time to time there will be official tournaments. Upcoming events will be announced at http://www.hedgewars.org/ some days in advance. - Tips - - - - Hedgewars is available in many languages. If the translation in your language seems to be missing or outdated, feel free to contact us! - Tips - - - - Hedgewars can be run on lots of different operating systems including Microsoft Windows, Mac OS X and Linux. - Tips - - - - Always remember you're able to set up your own games in local and network/online play. You're not restricted to the 'Simple Game' option. - Tips - - - - Connect one or more gamepads before starting the game to be able to assign their controls to your teams. - Tips - - - - Create an account on %1 to keep others from using your most favourite nickname while playing on the official server. - Tips - - - - While playing you should give yourself a short break at least once an hour. - Tips - - - - If your graphics card isn't able to provide hardware accelerated OpenGL, try to enable the low quality mode to improve performance. - Tips - - - - If your graphics card isn't able to provide hardware accelerated OpenGL, try to update the associated drivers. - Tips - - - - We're open to suggestions and constructive feedback. If you don't like something or got a great idea, let us know! - Tips - - - - Especially while playing online be polite and always remember there might be some minors playing with or against you as well! - Tips - - - - Special game modes such as 'Vampirism' or 'Karma' allow you to develop completely new tactics. Try them in a custom game! - Tips - - - - You should never install Hedgewars on computers you don't own (school, university, work, etc.). Please ask the responsible person instead! - Tips - - - - Hedgewars can be perfect for short games during breaks. Just ensure you don't add too many hedgehogs or use an huge map. Reducing time and health might help as well. - Tips - - - - No hedgehogs were harmed in making this game. - Tips - - - - There are three different jumps available. Tap [high jump] twice to do a very high/backwards jump. - Tips - - - - Afraid of falling off a cliff? Hold down [precise] to turn [left] or [right] without actually moving. - Tips - - - - Some weapons require special strategies or just lots of training, so don't give up on a particular tool if you miss an enemy once. - Tips - - - - Most weapons won't work once they touch the water. The Homing Bee as well as the Cake are exceptions to this. - Tips - - - - The Old Limbuger only causes a small explosion. However the wind affected smelly cloud can poison lots of hogs at once. - Tips - - - - The Piano Strike is the most damaging air strike. You'll lose the hedgehog performing it, so there's a huge downside as well. - Tips - - - - Sticky Mines are a perfect tool to create small chain reactions knocking enemy hedgehogs into dire situations ... or water. - Tips - - - - The Hammer is most effective when used on bridges or girders. Hit hogs will just break through the ground. - Tips - - - - If you're stuck behind an enemy hedgehog, use the Hammer to free yourself without getting damaged by an explosion. - Tips - - - - The Cake's maximum walking distance depends on the ground it has to pass. Use [attack] to detonate it early. - Tips - - - - The Flame Thrower is a weapon but it can be used for tunnel digging as well. - Tips - - - - Want to know who's behind the game? Click on the Hedgewars logo in the main menu to see the credits. - Tips - - - - Like Hedgewars? Become a fan on %1 or follow us on %2! - Tips - - - - Feel free to draw your own graves, hats, flags or even maps and themes! But note that you'll have to share them somewhere to use them online. - Tips - - - - Really want to wear a specific hat? Donate to us and receive an exclusive hat of your choice! - Tips - - - - Keep your video card drivers up to date to avoid issues playing the game. - Tips - - - - You can find your Hedgewars configuration files under "My Documents\Hedgewars". Create backups or take the files with you, but don't edit them by hand. - Tips - - - - You're able to associate Hedgewars related files (savegames and demo recordings) with the game to launch them right from your favorite file or internet browser. - Tips - - - - Want to save ropes? Release the rope in mid air and then shoot again. As long as you don't touch the ground you'll reuse your rope without wasting ammo! - Tips - - - - You can find your Hedgewars configuration files under "Library/Application Support/Hedgewars" in your home directory. Create backups or take the files with you, but don't edit them by hand. - Tips - - - - You can find your Hedgewars configuration files under ".hedgewars" in your home directory. Create backups or take the files with you, but don't edit them by hand. - Tips - - - - The Windows version of Hedgewars supports Xfire. Make sure to add Hedgewars to its game list so your friends can see you playing. - Tips - - - - Use the Molotov or Flame Thrower to temporary keep hedgehogs from passing terrain such as tunnels or platforms. - Tips - - - - The Homing Bee can be tricky to use. Its turn radius depends on its velocity, so try to not use full power. - Tips - - - Downloadable Content - Local Game - - - Play a game on a single computer - Network Game - - - Play a game across a network @@ -815,6 +856,14 @@ Edit game preferences + + Play a game across a local area network + + + + Play a game on an official server + + PageMultiplayer @@ -822,6 +871,10 @@ Start ابدا + + Edit game preferences + + PageNetGame @@ -829,24 +882,13 @@ Control تحكم - - - PageNetType - - LAN game - لعبة شبكية - - - Official server - الخادم الرسمي - - - Join hundreds of players online! - - - - Join or host your own game server in a Local Area Network. - + + Edit game preferences + + + + Start + ابدا @@ -892,10 +934,6 @@ - General - عام - - Advanced متقدم @@ -935,6 +973,94 @@ System proxy settings + + Select an action to change what key controls it + + + + Reset to default + + + + Reset all binds + + + + Game + + + + Graphics + + + + Audio + + + + Controls + + + + Video Recording + + + + Network + + + + Teams + فرق + + + Schemes + + + + Weapons + اسلحة + + + Frontend + + + + Custom colors + + + + Game audio + + + + Frontend audio + + + + Account + + + + Proxy settings + + + + Miscellaneous + + + + Updates + + + + Check for updates + + + + Video recording options + + PagePlayDemo @@ -1134,18 +1260,10 @@ PageSinglePlayer - Simple Game - - - Play a quick game against the computer with random settings - Multiplayer - - - Play a hotseat game against your friends, or AI teams @@ -1154,26 +1272,14 @@ - Training Mode - - - Practice your skills in a range of training missions - Demos - - - Watch recorded demos - Load - تحميل - - Load a previously saved game @@ -1219,14 +1325,6 @@ - Date: - - - - Size: - - - encoding @@ -1234,6 +1332,16 @@ uploading + + Date: %1 + + + + + Size: %1 + + + QAction @@ -1246,10 +1354,6 @@ معلومات - Start - ابدا - - Restrict Joins امنع الانضمام @@ -1297,18 +1401,6 @@ ملء الشاشة - Frontend fullscreen - شاشة القائمة ملء العرض - - - Enable sound - فعل الصوت - - - Enable music - فعل الموسيقى - - Show FPS اضهر عدد الاطارات في الثانية @@ -1325,18 +1417,6 @@ اضهر قوائم للعتاد - Enable frontend sounds - فعل اصوات شاشة المقدمة - - - Enable frontend music - فعل موسيقى شاشة المقدمة - - - Frontend effects - تأثيرات المقدمة - - Save password @@ -1356,14 +1436,38 @@ Use game resolution + + Visual effects + + + + Sound + + + + In-game sound effects + + + + Music + + + + In-game music + + + + Frontend sound effects + + + + Frontend music + + QComboBox - generated map... - ولد خارطة - - Human انسان @@ -1376,14 +1480,6 @@ نمط النظام - Mission - مهمة - - - generated maze... - ولد متاهة - - Community @@ -1400,10 +1496,6 @@ - hand drawn map... - - - Disabled @@ -1440,10 +1532,6 @@ - Wiggle - - - Red/Cyan grayscale @@ -1479,18 +1567,6 @@ حصن - Key binds - ربط المفاتيج - - - Teams - فرق - - - Audio/Graphic options - قوائم الصوتيات و المرئيات - - Net game لعبة شبكية @@ -1511,26 +1587,6 @@ اعدادات الفريق - Misc - متنوعة - - - Schemes and Weapons - - - - Custom colors - - - - Miscellaneous - - - - Video recording options - - - Videos @@ -1538,10 +1594,6 @@ Description - - Proxy settings - - QLabel @@ -1558,26 +1610,6 @@ نسخة - Developers: - المطورون - - - Art: - قنون - - - Sounds: - الاصوات - - - Translations: - المترجمون - - - Special thanks: - شكر خاص - - Weapons اسلحة @@ -1634,10 +1666,6 @@ المساعدات - Game scheme - نمط اللعبة - - % Dud Mines % الغام @@ -1674,10 +1702,6 @@ - This development build is 'work in progress' and may not be compatible with other versions of the game. Some features might be broken or incomplete. Use at your own risk! - - - Quality @@ -1752,10 +1776,6 @@ - Summary - - - Description @@ -1783,6 +1803,38 @@ Bitrate (Kbps) + + This development build is 'work in progress' and may not be compatible with other versions of the game, while some features might be broken or incomplete! + + + + Fullscreen + ملء الشاشة + + + Fullscreen Resolution + + + + Windowed Resolution + + + + Your Email + + + + Summary + + + + Send system information + + + + Type the security code: + + QLineEdit @@ -1821,10 +1873,6 @@ - Please fill out all fields - - - Error while authenticating at google.com: @@ -1871,18 +1919,6 @@ - Successfully posted the issue on hedgewars.googlecode.com - - - - Error during authentication at google.com - - - - Error reporting the issue, please try again later (or visit hedgewars.googlecode.com directly) - - - Main - Error @@ -2029,16 +2065,37 @@ Do you really want to delete the weapon set '%1'? - - - QObject - - Nickname - اسم اللاعب - - - Please enter your nickname - ادحل اسم اللاعب + + Hedgewars - Nick not registered + + + + System Information Preview + + + + Failed to generate captcha + + + + Failed to download captcha + + + + Please fill out all fields. Email is optional. + + + + Hedgewars - Warning + + + + Hedgewars - Information + + + + Hedgewars + @@ -2096,26 +2153,10 @@ تحميل - Setup - تنصيب - - - Ready - ابدا - - - Random Team - فريق عشوائي - - Associate file extensions - more - - - More info @@ -2208,6 +2249,25 @@ + SeedPrompt + + The map seed is the basis for all random values generated by the game. + + + + Cancel + الغاء + + + Set seed + + + + Close + + + + SelWeaponWidget Weapon set @@ -2235,106 +2295,21 @@ - ToggleButtonWidget - - Vampirism - مصاص دماء - - - Karma - كارما - - - Artillery - مدفعية - - - Fort Mode - طريقة الحصن - - - Divide Teams - قسم الفرق - - - Solid Land - ارض صلبة - - - Add Border - اضف اطار - - - Low Gravity - جاذبية قليلة - - - Laser Sight - منظار ليزري - - - Invulnerable - غير قابل للتدمير - - - Random Order - توزيع عشوائي - - - King - ملك - - - Place Hedgehogs - ضع الاعبين - - - Clan Shares Ammo - الفريق يتشارك بالعتاد - - - Disable Girders - ابطال البناء - - - Disable Land Objects - ابطال الاجسام الارضية - - - Reset Health - - - - AI Survival Mode - - - - Unlimited Attacks - - - - Reset Weapons - - - - Per Hedgehog Ammo - - - - Disable Wind - - - - More Wind - - - - Tag Team - - - - Add Bottom Border - + TeamShowWidget + + %1's team + + + + + ThemePrompt + + Select a theme for this map + + + + Cancel + الغاء @@ -2468,12 +2443,6 @@ capture - hedgehogs -info - hedgehogs -info - - quit quit @@ -2509,33 +2478,33 @@ record + + hedgehog info + + binds (categories) - Basic controls - الاسلحة الاولية - - - Weapon controls - السيطرة على الاسلحة - - - Camera and cursor controls - السيطرة على الكامرة و المؤشر - - - Other - اخرى + Movement + + + + Weapons + اسلحة + + + Camera + + + + Miscellaneous + binds (descriptions) - Move your hogs and aim: - تحريك اللاعب و التصويب - - Traverse gaps and obstacles by jumping: قفز فوق الحواجز @@ -2599,6 +2568,10 @@ Record video: + + Hedgehog movement + + binds (keys) diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Locale/hedgewars_bg.ts --- a/share/hedgewars/Data/Locale/hedgewars_bg.ts Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Locale/hedgewars_bg.ts Fri Feb 22 05:05:32 2013 +0100 @@ -20,6 +20,79 @@ + BanDialog + + IP + IP + + + Nick + + + + IP/Nick + + + + Reason + + + + Duration + + + + Ok + + + + Cancel + Отказ + + + you know why + + + + Warning + + + + Please, specify %1 + + + + nickname + + + + permanent + + + + + DataManager + + Use Default + + + + + FeedbackDialog + + View + + + + Cancel + Отказ + + + Send Feedback + + + + FreqSpinBox Never @@ -44,13 +117,36 @@ Редактиране на оръжията - When this option is enabled selecting a game scheme will auto-select a weapon - Когато тази настройка е включена, при избирането на игрова схема автоматично ще се избере оръжие - - Game Options + + Game scheme will auto-select a weapon + + + + + HWApplication + + %1 minutes + + + + %1 hour + + + + %1 hours + + + + %1 day + + + + %1 days + + HWAskQuitDialog @@ -101,10 +197,6 @@ Failed to save StyleSheet to %1 - - %1 is not a valid command! - - HWForm @@ -139,20 +231,6 @@ - Your nickname %1 is -registered on Hedgewars.org -Please provide your password below -or pick another nickname in game config: - Прякорът ви %1 е -регистриран на Hedgewars.org -Моля въдете паролата си по-долу -или изберете друг прякор в настройките на играта: - - - No password supplied. - - - Nickname Прякор @@ -165,6 +243,59 @@ Please pick another nickname: + + %1's Team + + + + Hedgewars - Nick registered + + + + This nick is registered, and you haven't specified a password. + +If this nick isn't yours, please register your own nick at www.hedgewars.org + +Password: + + + + Your nickname is not registered. +To prevent someone else from using it, +please register it at www.hedgewars.org + + + + + +Your password wasn't saved either. + + + + Hedgewars - Empty nickname + + + + Hedgewars - Wrong password + + + + You entered a wrong password. + + + + Try Again + + + + Hedgewars - Connection error + + + + You reconnected too fast. +Please wait a few seconds and try again. + + HWGame @@ -180,18 +311,6 @@ HWMapContainer - Map - Карта - - - Themes - Тема - - - Filter - Филтър - - All Всички @@ -216,10 +335,6 @@ Щура - Type - Тип - - Small tunnels Малки тунели @@ -228,27 +343,95 @@ Средни тунели - Large tunnels - Големи тунели - - - Small floating islands - Малки плаващи острови - - - Medium floating islands - Средни плаващи острови - - - Large floating islands - Големи плаващи острови - - Seed - Set + Map type: + + + + Image map + + + + Mission map + + + + Hand-drawn + + + + Randomly generated + + + + Random maze + + + + Random + + + + Map preview: + + + + Load map drawing + + + + Edit map drawing + + + + Largetunnels + + + + Small islands + + + + Medium islands + + + + Large islands + + + + Map size: + + + + Maze style: + + + + Mission: + + + + Map: + + + + Theme: + + + + Load drawn map + Зареждане на начертана карта + + + Drawn Maps + + + + All files @@ -321,8 +504,8 @@ HWPasswordDialog - Password - Парола + Login + @@ -337,6 +520,32 @@ + HatButton + + Change hat (%1) + + + + + HatPrompt + + Select a hat + + + + Filter: + + + + Cancel + Отказ + + + Use selected hat + + + + KB SDL_ttf returned error while rendering text, most propably it is related to the bug in freetype2. It's recommended to update your freetype lib. @@ -344,6 +553,13 @@ + KeyBinder + + Category + + + + LibavInteraction Duration: %1m %2s @@ -362,6 +578,17 @@ Audio: + + unknown + + + + + MapModel + + No description available. + + PageAdmin @@ -393,6 +620,38 @@ Set data Задаване на данни + + General + Общи + + + Bans + + + + IP/Nick + + + + Expiration + + + + Reason + + + + Refresh + + + + Add + + + + Remove + + PageConnecting @@ -447,8 +706,40 @@ Общи - Advanced - За напреднали + Select an action to choose a custom key bind for this team + + + + Use my default + + + + Reset all binds + + + + Custom Controls + + + + Hat + + + + Name + Име + + + This hedgehog's name + + + + Randomize this hedgehog's name + + + + Random Team + Случаен отбор @@ -529,267 +820,14 @@ PageMain - Simply pick the same color as a friend to play together as a team. Each of you will still control his or her own hedgehogs but they'll win or lose together. - Tips - - - - Some weapons might do only low damage but they can be a lot more devastating in the right situation. Try to use the Desert Eagle to knock multiple hedgehogs into the water. - Tips - - - - If you're unsure what to do and don't want to waste ammo, skip one round. But don't let too much time pass as there will be Sudden Death! - Tips - - - - If you'd like to keep others from using your preferred nickname on the official server, register an account at http://www.hedgewars.org/. - Tips - - - - You're bored of default gameplay? Try one of the missions - they'll offer different gameplay depending on the one you picked. - Tips - - - - By default the game will always record the last game played as a demo. Select 'Local Game' and pick the 'Demos' button on the lower right corner to play or manage them. - Tips - - - - Hedgewars is Open Source and Freeware we create in our spare time. If you've got problems, ask on our forums but please don't expect 24/7 support! - Tips - - - - Hedgewars is Open Source and Freeware we create in our spare time. If you like it, help us with a small donation or contribute your own work! - Tips - - - - Hedgewars is Open Source and Freeware we create in our spare time. Share it with your family and friends as you like! - Tips - - - - From time to time there will be official tournaments. Upcoming events will be announced at http://www.hedgewars.org/ some days in advance. - Tips - - - - Hedgewars is available in many languages. If the translation in your language seems to be missing or outdated, feel free to contact us! - Tips - - - - Hedgewars can be run on lots of different operating systems including Microsoft Windows, Mac OS X and Linux. - Tips - - - - Always remember you're able to set up your own games in local and network/online play. You're not restricted to the 'Simple Game' option. - Tips - - - - While playing you should give yourself a short break at least once an hour. - Tips - - - - If your graphics card isn't able to provide hardware accelerated OpenGL, try to enable the low quality mode to improve performance. - Tips - - - - We're open to suggestions and constructive feedback. If you don't like something or got a great idea, let us know! - Tips - - - - Especially while playing online be polite and always remember there might be some minors playing with or against you as well! - Tips - - - - Special game modes such as 'Vampirism' or 'Karma' allow you to develop completely new tactics. Try them in a custom game! - Tips - - - - You should never install Hedgewars on computers you don't own (school, university, work, etc.). Please ask the responsible person instead! - Tips - - - - Hedgewars can be perfect for short games during breaks. Just ensure you don't add too many hedgehogs or use an huge map. Reducing time and health might help as well. - Tips - - - - No hedgehogs were harmed in making this game. - Tips - - - - Hedgewars is Open Source and Freeware we create in our spare time. If someone sold you the game, you should try get a refund! - Tips - - - - Connect one or more gamepads before starting the game to be able to assign their controls to your teams. - Tips - - - - Create an account on %1 to keep others from using your most favourite nickname while playing on the official server. - Tips - - - - If your graphics card isn't able to provide hardware accelerated OpenGL, try to update the associated drivers. - Tips - - - - There are three different jumps available. Tap [high jump] twice to do a very high/backwards jump. - Tips - - - - Afraid of falling off a cliff? Hold down [precise] to turn [left] or [right] without actually moving. - Tips - - - - Some weapons require special strategies or just lots of training, so don't give up on a particular tool if you miss an enemy once. - Tips - - - - Most weapons won't work once they touch the water. The Homing Bee as well as the Cake are exceptions to this. - Tips - - - - The Old Limbuger only causes a small explosion. However the wind affected smelly cloud can poison lots of hogs at once. - Tips - - - - The Piano Strike is the most damaging air strike. You'll lose the hedgehog performing it, so there's a huge downside as well. - Tips - - - - Sticky Mines are a perfect tool to create small chain reactions knocking enemy hedgehogs into dire situations ... or water. - Tips - - - - The Hammer is most effective when used on bridges or girders. Hit hogs will just break through the ground. - Tips - - - - If you're stuck behind an enemy hedgehog, use the Hammer to free yourself without getting damaged by an explosion. - Tips - - - - The Cake's maximum walking distance depends on the ground it has to pass. Use [attack] to detonate it early. - Tips - - - - The Flame Thrower is a weapon but it can be used for tunnel digging as well. - Tips - - - - Want to know who's behind the game? Click on the Hedgewars logo in the main menu to see the credits. - Tips - - - - Like Hedgewars? Become a fan on %1 or follow us on %2! - Tips - - - - Feel free to draw your own graves, hats, flags or even maps and themes! But note that you'll have to share them somewhere to use them online. - Tips - - - - Really want to wear a specific hat? Donate to us and receive an exclusive hat of your choice! - Tips - - - - Keep your video card drivers up to date to avoid issues playing the game. - Tips - - - - You can find your Hedgewars configuration files under "My Documents\Hedgewars". Create backups or take the files with you, but don't edit them by hand. - Tips - - - - You're able to associate Hedgewars related files (savegames and demo recordings) with the game to launch them right from your favorite file or internet browser. - Tips - - - - Want to save ropes? Release the rope in mid air and then shoot again. As long as you don't touch the ground you'll reuse your rope without wasting ammo! - Tips - - - - You can find your Hedgewars configuration files under "Library/Application Support/Hedgewars" in your home directory. Create backups or take the files with you, but don't edit them by hand. - Tips - - - - You can find your Hedgewars configuration files under ".hedgewars" in your home directory. Create backups or take the files with you, but don't edit them by hand. - Tips - - - - The Windows version of Hedgewars supports Xfire. Make sure to add Hedgewars to its game list so your friends can see you playing. - Tips - - - - Use the Molotov or Flame Thrower to temporary keep hedgehogs from passing terrain such as tunnels or platforms. - Tips - - - - The Homing Bee can be tricky to use. Its turn radius depends on its velocity, so try to not use full power. - Tips - - - Downloadable Content - Local Game - - - Play a game on a single computer - Network Game - - - Play a game across a network @@ -817,6 +855,14 @@ Edit game preferences + + Play a game across a local area network + + + + Play a game on an official server + + PageMultiplayer @@ -824,6 +870,10 @@ Start Старт + + Edit game preferences + + PageNetGame @@ -831,24 +881,13 @@ Control Контрол - - - PageNetType - - LAN game - Игра по локална мрежа - - - Official server - Официален сървър - - - Join hundreds of players online! - - - - Join or host your own game server in a Local Area Network. - + + Edit game preferences + + + + Start + Старт @@ -894,10 +933,6 @@ Изтриване на комплекта оръжия - General - Общи - - Advanced За напреднали @@ -937,6 +972,94 @@ System proxy settings + + Select an action to change what key controls it + + + + Reset to default + + + + Reset all binds + + + + Game + + + + Graphics + + + + Audio + + + + Controls + + + + Video Recording + + + + Network + + + + Teams + Отбори + + + Schemes + + + + Weapons + Оръжия + + + Frontend + + + + Custom colors + + + + Game audio + + + + Frontend audio + + + + Account + + + + Proxy settings + + + + Miscellaneous + + + + Updates + + + + Check for updates + + + + Video recording options + + PagePlayDemo @@ -1136,18 +1259,10 @@ PageSinglePlayer - Simple Game - - - Play a quick game against the computer with random settings - Multiplayer - - - Play a hotseat game against your friends, or AI teams @@ -1156,26 +1271,14 @@ - Training Mode - - - Practice your skills in a range of training missions - Demos - - - Watch recorded demos - Load - Зареждане - - Load a previously saved game @@ -1221,14 +1324,6 @@ - Date: - - - - Size: - - - encoding @@ -1236,6 +1331,16 @@ uploading + + Date: %1 + + + + + Size: %1 + + + QAction @@ -1248,10 +1353,6 @@ Забраняване - Start - Старт - - Restrict Joins Ограничи присъединяване @@ -1295,10 +1396,6 @@ Проверяване за обновления при стартиране - Enable sound - Включване на звука - - Fullscreen Пълен екран @@ -1311,14 +1408,6 @@ Показване на алтернативен режим на щетите - Enable music - Включване на музиката - - - Frontend fullscreen - Пълен екран - - Append date and time to record file name Добави дата и час към името на записаното демо @@ -1327,18 +1416,6 @@ Показване на подсказки за боеприпасите - Enable frontend sounds - Включване на звуци - - - Enable frontend music - Включване на музика - - - Frontend effects - Ефекти - - Save password @@ -1358,14 +1435,38 @@ Use game resolution + + Visual effects + + + + Sound + + + + In-game sound effects + + + + Music + + + + In-game music + + + + Frontend sound effects + + + + Frontend music + + QComboBox - generated map... - Случайна карта... - - Human Човек @@ -1378,14 +1479,6 @@ (Стандартно за системата) - generated maze... - генериран лабиринт... - - - Mission - Мисия - - Community Общност @@ -1402,10 +1495,6 @@ В прогрес - hand drawn map... - Ръчно нарисувана карта... - - Disabled Изключено @@ -1442,10 +1531,6 @@ - Wiggle - - - Red/Cyan grayscale @@ -1489,18 +1574,6 @@ Форт - Key binds - Клавиши - - - Teams - Отбори - - - Audio/Graphic options - Настройки на Звук/Графика - - Playing teams Играещи отбори @@ -1513,26 +1586,6 @@ Настройки на отборите - Misc - Разни - - - Schemes and Weapons - Схеми и оръжия - - - Custom colors - - - - Miscellaneous - - - - Video recording options - - - Videos @@ -1540,18 +1593,10 @@ Description - - Proxy settings - - QLabel - Game scheme - Игрови схеми - - Damage Modifier Модификатор на щетите @@ -1592,22 +1637,6 @@ Ограничение на брой кадри за секунда - Developers: - Разработчици: - - - Art: - Графика: - - - Translations: - Преводи: - - - Special thanks: - Специални благодарности на: - - Server name: Име на сървъра: @@ -1632,10 +1661,6 @@ Версия - Sounds: - Звуци: - - Initial sound volume Първоначална сила на звука @@ -1676,10 +1701,6 @@ Съвет: - This development build is 'work in progress' and may not be compatible with other versions of the game. Some features might be broken or incomplete. Use at your own risk! - - - Quality Качество @@ -1754,10 +1775,6 @@ - Summary - - - Description @@ -1785,6 +1802,38 @@ Bitrate (Kbps) + + This development build is 'work in progress' and may not be compatible with other versions of the game, while some features might be broken or incomplete! + + + + Fullscreen + Пълен екран + + + Fullscreen Resolution + + + + Windowed Resolution + + + + Your Email + + + + Summary + + + + Send system information + + + + Type the security code: + + QLineEdit @@ -1823,10 +1872,6 @@ Файловата асоциация се провали. - Please fill out all fields - - - Error while authenticating at google.com: @@ -1873,18 +1918,6 @@ - Successfully posted the issue on hedgewars.googlecode.com - - - - Error during authentication at google.com - - - - Error reporting the issue, please try again later (or visit hedgewars.googlecode.com directly) - - - Main - Error @@ -2032,25 +2065,42 @@ Do you really want to delete the weapon set '%1'? - - - QObject - - Nickname - Прякор - - - Please enter your nickname - Моля въведете прякорът си + + Hedgewars - Nick not registered + + + + System Information Preview + + + + Failed to generate captcha + + + + Failed to download captcha + + + + Please fill out all fields. Email is optional. + + + + Hedgewars - Warning + + + + Hedgewars - Information + + + + Hedgewars + QPushButton - Setup - Настройки - - Play demo Пускане на демо @@ -2103,22 +2153,10 @@ Изтриване - Ready - Готово - - - Random Team - Случаен отбор - - Associate file extensions Асоцииране на файлови разширения - more - повече - - More info @@ -2211,6 +2249,25 @@ + SeedPrompt + + The map seed is the basis for all random values generated by the game. + + + + Cancel + Отказ + + + Set seed + + + + Close + + + + SelWeaponWidget Weapon set @@ -2238,106 +2295,21 @@ - ToggleButtonWidget - - Fort Mode - Режим на фортове - - - Divide Teams - Разделяне на отборите - - - Solid Land - Твърда земя - - - Add Border - Добави гранична ивица - - - Low Gravity - Ниска гравитация - - - Laser Sight - Лазерен мерник - - - Invulnerable - Неуязвимост - - - Vampirism - Вампиризъм - - - Karma - Карма - - - Artillery - Артилерия - - - Random Order - Произволен ред - - - King - Крал - - - Place Hedgehogs - Поставяне на таралежи - - - Clan Shares Ammo - Кланът споделя оръжията - - - Disable Girders - Изкбючване на греди - - - Disable Land Objects - Изключване на обекти по земята - - - AI Survival Mode - Режим ИИ оцеляване - - - Reset Health - Изчистване на здрането - - - Unlimited Attacks - Неограничени атаки - - - Reset Weapons - Изчистване на оръжията - - - Per Hedgehog Ammo - Боеприпаси за всеки таралеж поотделно - - - Disable Wind - Изключване на вятъра - - - More Wind - Още вятър - - - Tag Team - - - - Add Bottom Border - + TeamShowWidget + + %1's team + + + + + ThemePrompt + + Select a theme for this map + + + + Cancel + Отказ @@ -2459,12 +2431,6 @@ Слот 9 - hedgehogs -info - Информация -за играта - - chat Чат @@ -2512,33 +2478,33 @@ record + + hedgehog info + + binds (categories) - Basic controls - Основни контроли - - - Weapon controls - Контроли за оръжията - - - Camera and cursor controls - Контроли за камерата и показалеца - - - Other - Друго + Movement + + + + Weapons + Оръжия + + + Camera + + + + Miscellaneous + binds (descriptions) - Move your hogs and aim: - Преместете таралежите си и се прицелете: - - Traverse gaps and obstacles by jumping: Преодолявайте празнини и препятствия чрез скачане: @@ -2602,6 +2568,10 @@ Record video: + + Hedgehog movement + + binds (keys) diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Locale/hedgewars_cs.ts --- a/share/hedgewars/Data/Locale/hedgewars_cs.ts Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Locale/hedgewars_cs.ts Fri Feb 22 05:05:32 2013 +0100 @@ -20,6 +20,79 @@ + BanDialog + + IP + IP + + + Nick + + + + IP/Nick + + + + Reason + + + + Duration + + + + Ok + + + + Cancel + Zrušit + + + you know why + + + + Warning + + + + Please, specify %1 + + + + nickname + + + + permanent + + + + + DataManager + + Use Default + + + + + FeedbackDialog + + View + + + + Cancel + Zrušit + + + Send Feedback + + + + FreqSpinBox Never @@ -45,13 +118,36 @@ Editovat schémata - When this option is enabled selecting a game scheme will auto-select a weapon - Pokud je tato volba aktivována, výběr herního schématu vybere automaticky i zbraňové schéma - - Game Options + + Game scheme will auto-select a weapon + + + + + HWApplication + + %1 minutes + + + + %1 hour + + + + %1 hours + + + + %1 day + + + + %1 days + + HWAskQuitDialog @@ -102,10 +198,6 @@ Failed to save StyleSheet to %1 - - %1 is not a valid command! - - HWForm @@ -140,20 +232,6 @@ - Your nickname %1 is -registered on Hedgewars.org -Please provide your password below -or pick another nickname in game config: - Tvoje přezdívka %1 je -registrovaná na Hedgewars.org -Prosím, zadej své heslo -nebo si v konfiguraci vyber jinou přezdívku: - - - No password supplied. - - - Nickname Přezdívka @@ -166,6 +244,59 @@ Please pick another nickname: + + %1's Team + + + + Hedgewars - Nick registered + + + + This nick is registered, and you haven't specified a password. + +If this nick isn't yours, please register your own nick at www.hedgewars.org + +Password: + + + + Your nickname is not registered. +To prevent someone else from using it, +please register it at www.hedgewars.org + + + + + +Your password wasn't saved either. + + + + Hedgewars - Empty nickname + + + + Hedgewars - Wrong password + + + + You entered a wrong password. + + + + Try Again + + + + Hedgewars - Connection error + + + + You reconnected too fast. +Please wait a few seconds and try again. + + HWGame @@ -181,18 +312,6 @@ HWMapContainer - Map - Mapa - - - Themes - Témata - - - Filter - Filtr - - All Vše @@ -217,10 +336,6 @@ Šílená - Type - Typ - - Small tunnels Malé tunely @@ -229,28 +344,96 @@ Střední tunely - Large tunnels - Velké tunely - - - Small floating islands - Malé plovoucí ostrovy - - - Medium floating islands - Střední plovoucí ostrovy - - - Large floating islands - Velké plovoucí ostrovy - - Seed Semínko - Set - Sada + Map type: + + + + Image map + + + + Mission map + + + + Hand-drawn + + + + Randomly generated + + + + Random maze + + + + Random + Náhodné + + + Map preview: + + + + Load map drawing + + + + Edit map drawing + + + + Largetunnels + + + + Small islands + + + + Medium islands + + + + Large islands + + + + Map size: + + + + Maze style: + + + + Mission: + + + + Map: + + + + Theme: + + + + Load drawn map + Nahrát nakreslenou mapu + + + Drawn Maps + + + + All files + @@ -322,8 +505,8 @@ HWPasswordDialog - Password - Heslo + Login + @@ -338,6 +521,32 @@ + HatButton + + Change hat (%1) + + + + + HatPrompt + + Select a hat + + + + Filter: + + + + Cancel + Zrušit + + + Use selected hat + + + + KB SDL_ttf returned error while rendering text, most propably it is related to the bug in freetype2. It's recommended to update your freetype lib. @@ -345,6 +554,13 @@ + KeyBinder + + Category + + + + LibavInteraction Duration: %1m %2s @@ -363,6 +579,17 @@ Audio: + + unknown + + + + + MapModel + + No description available. + + PageAdmin @@ -394,6 +621,38 @@ Set data Nastavit data + + General + Obecné + + + Bans + + + + IP/Nick + + + + Expiration + + + + Reason + + + + Refresh + + + + Add + + + + Remove + + PageConnecting @@ -448,8 +707,40 @@ Obecné - Advanced - Rozšířené + Select an action to choose a custom key bind for this team + + + + Use my default + + + + Reset all binds + + + + Custom Controls + + + + Hat + Klobouček + + + Name + Jméno + + + This hedgehog's name + + + + Randomize this hedgehog's name + + + + Random Team + Náhodný tým @@ -536,267 +827,14 @@ PageMain - Simply pick the same color as a friend to play together as a team. Each of you will still control his or her own hedgehogs but they'll win or lose together. - Tips - Jednoduše zvol stejnou barvu jako spoluhráč, abys hrál ve stejném týmu. Každý z vás bude mít kontrolu nad svými vlastními ježky, ale vyhraje nebo prohraje společně. - - - Some weapons might do only low damage but they can be a lot more devastating in the right situation. Try to use the Desert Eagle to knock multiple hedgehogs into the water. - Tips - Některé zbraně mohou způsobovat jen malé poškození, ale mohou být devastující v pravé chvíli. Zkus použít pistoli Desert Eagle ke sražení několika nepřátelských ježků do vody. - - - If you're unsure what to do and don't want to waste ammo, skip one round. But don't let too much time pass as there will be Sudden Death! - Tips - Pokud si nejsi jistý, co dělat a nechceš plýtvat municí, přeskoč tah. Ale nenech uběhnout moc času, protože pak přijde Náhlá smrt! - - - If you'd like to keep others from using your preferred nickname on the official server, register an account at http://www.hedgewars.org/. - Tips - Pokud chceš zabránit ostatním, aby používali tvoji oblíbenou přezdívku na oficiálním serveru, zaregistruj se na http://www.hedgewars.org/. - - - You're bored of default gameplay? Try one of the missions - they'll offer different gameplay depending on the one you picked. - Tips - Jsi znuděn standardní hrou? Vyzkoušej některou misi - nabídnou jiný herní zážitek v závislosti na tom, kterou si vybereš. - - - By default the game will always record the last game played as a demo. Select 'Local Game' and pick the 'Demos' button on the lower right corner to play or manage them. - Tips - Standardně hra vždycky nahrává poslední odehraný zápas jako ukázku. Vyber si 'Místní hru' a zvol tlačítko 'Ukázky' v pravém spodním rohu k jejich přehrávání a správě. - - - Hedgewars is Open Source and Freeware we create in our spare time. If you've got problems, ask on our forums but please don't expect 24/7 support! - Tips - Hedgewars je Open Source a Freeware, který jsme vytvořili v našem volném čase. Pokud máš problémy, zeptej se na našem fóru, ale neočekávej prosím nonstop podporu! - - - Hedgewars is Open Source and Freeware we create in our spare time. If you like it, help us with a small donation or contribute your own work! - Tips - Hedgewars je Open Source a Freeware, který jsme vytvořili v našem volném čase. Pokud se ti líbí, pomož nám malým příspěvkem, nebo se podílej na práci! - - - Hedgewars is Open Source and Freeware we create in our spare time. Share it with your family and friends as you like! - Tips - Hedgewars je Open Source a Freeware, který jsme vytvořili v našem volném čase. Sdílej ho se svoji rodinou a přáteli dle libosti! - - - From time to time there will be official tournaments. Upcoming events will be announced at http://www.hedgewars.org/ some days in advance. - Tips - Čas od času se konají oficiální turnaje. Nadcházející události budou publikovány na http://www.hedgewars.org/ s několika denním předstihem. - - - Hedgewars is available in many languages. If the translation in your language seems to be missing or outdated, feel free to contact us! - Tips - Hedgewars je k dispozici v mnoha jazycích. Pokud překlad do tvého jazyka vypadá zastaralý nebo chybí, neváhej nás kontaktovat! - - - Hedgewars can be run on lots of different operating systems including Microsoft Windows, Mac OS X and Linux. - Tips - Hedgewars může být spuštěno na mnoha různých operačních systémech včetně Microsoft Windows, Mac OS X a Linuxu. - - - Always remember you're able to set up your own games in local and network/online play. You're not restricted to the 'Simple Game' option. - Tips - Vždycky si pamatuj, že můžeš vytvořit vlastní hru na místní síti i internetu. Nejsi odkázán jen na možnost 'Prostá hra'. - - - While playing you should give yourself a short break at least once an hour. - Tips - Během hraní bys měl dělat krátké přestávky alespoň jednou za hodinu. - - - If your graphics card isn't able to provide hardware accelerated OpenGL, try to enable the low quality mode to improve performance. - Tips - Pokud tvoje grafická karta nepodporuje hardwarovou akceleraci OpenGL, zkus zapnout nízkou kvalitu pro zlepšení výkonu. - - - We're open to suggestions and constructive feedback. If you don't like something or got a great idea, let us know! - Tips - Jsme otevřeni návrhům a konstruktivní kritice. Pokud se ti něco nelíbí, nebo máš skvělý nápad, dej nám vědět! - - - Especially while playing online be polite and always remember there might be some minors playing with or against you as well! - Tips - Obzvláště při hře online buď slušný a vždy pamatuj na to, že s tebou nebo proti tobě může hrát někdo z nějaké menšiny! - - - Special game modes such as 'Vampirism' or 'Karma' allow you to develop completely new tactics. Try them in a custom game! - Tips - Speciální herní módy jako třeba 'Vampyrismus' nebo 'Karma' ti dovolují vymýšlet úplně jiné herní taktiky. Vyzkoušej je v nějaké hře! - - - You should never install Hedgewars on computers you don't own (school, university, work, etc.). Please ask the responsible person instead! - Tips - Nikdy bys neměl instalovat Hedgewars na počítači, který ti nepatří (škola, univerzita, práce a jiné). Prosím, zeptej se nejprve zodpovědné osoby! - - - Hedgewars can be perfect for short games during breaks. Just ensure you don't add too many hedgehogs or use an huge map. Reducing time and health might help as well. - Tips - Hedgewars mohou být perfektní pro krátkou hru během pauzy. Jen se ujisti, že jsi nepřidal příliš mnoho ježků nebo nezvolil velkou mapu. Zmenšit čas nebo zdraví také urychlí hru. - - - No hedgehogs were harmed in making this game. - Tips - Žádný ježek nebyl zraněn během vytváření této hry. - - - Hedgewars is Open Source and Freeware we create in our spare time. If someone sold you the game, you should try get a refund! - Tips - Hedgewars je Open Source a Freeware, který jsme vytvořili v našem volném čase. Pokud ti tuto hru někdo prodal, měl bys chtít vrátit peníze! - - - Connect one or more gamepads before starting the game to be able to assign their controls to your teams. - Tips - Připojenim jednoho nebo více gamepadů před začátkem hry ti umožní nastavit je jako ovladač pro tvé týmy. - - - Create an account on %1 to keep others from using your most favourite nickname while playing on the official server. - Tips - Vytvoř si účet na %1, abys zabránil ostatním používat tvoji oblíbenou přezdívku na oficiálním serveru. - - - If your graphics card isn't able to provide hardware accelerated OpenGL, try to update the associated drivers. - Tips - Pokud tvoje grafická karta nepodporuje hardwarovou akceleraci OpenGL, zkus aktualizovat ovladače. - - - There are three different jumps available. Tap [high jump] twice to do a very high/backwards jump. - Tips - K dispozici jsou tři různé druhy skoků. Zmáčkni [Vysoký skok] dvakrát, abys udělal skok do větší výšky a dozadu. - - - Afraid of falling off a cliff? Hold down [precise] to turn [left] or [right] without actually moving. - Tips - Bojíš se pádu z útesu? Stiskni [přesnost], aby ses otočil [vlevo], či [vpravo] bez jakéhokoliv pohybu. - - - Some weapons require special strategies or just lots of training, so don't give up on a particular tool if you miss an enemy once. - Tips - Některé zbraně vyžadují speciální strategii, nebo jen spoustu cvičení. Nezavrhuj hned některou zbraň, pokud jednou mineš cíl. - - - Most weapons won't work once they touch the water. The Homing Bee as well as the Cake are exceptions to this. - Tips - Většina zbraní nefunguje, jakmile se ponoří do vody. Naváděná včela nebo dort jsou vyjímka z tohoto pravidla. - - - The Old Limbuger only causes a small explosion. However the wind affected smelly cloud can poison lots of hogs at once. - Tips - Olomoucké tvarůžky vybuchují jen málo, ale vítr ovlivňuje oblak smradu, který může nakazit mnoho ježků najednou. - - - The Piano Strike is the most damaging air strike. You'll lose the hedgehog performing it, so there's a huge downside as well. - Tips - Útok pianem je nejničivější letecký útok. Na druhé straně ale ztratíš ježka, který tento útok vykoná. - - - Sticky Mines are a perfect tool to create small chain reactions knocking enemy hedgehogs into dire situations ... or water. - Tips - Přisavné miny jsou perfektní nástroj na vytváření malých řetězových reakcí, které mohou nepřátelské ježky dostat do divokých situací ... nebo vody. - - - The Hammer is most effective when used on bridges or girders. Hit hogs will just break through the ground. - Tips - Kladivo je nejefektivnější při použitǐ na mostech a traverzách. Zasažený ježek prostě prorazí skrz zem. - - - If you're stuck behind an enemy hedgehog, use the Hammer to free yourself without getting damaged by an explosion. - Tips - Pokud jsi zaseklý za nepřátelským ježkem, použij kladivo, aby ses osvobodil a nemusel riskovat zranění z exploze. - - - The Cake's maximum walking distance depends on the ground it has to pass. Use [attack] to detonate it early. - Tips - Maximální vzdálenost, do které dort dojde, je ovlivněna terénem, kterým musí jít. Použij [útok] k dřívější explozi. - - - The Flame Thrower is a weapon but it can be used for tunnel digging as well. - Tips - Plamenomet je zbraň, ale dá se použít i pro kopání tunelů. - - - Want to know who's behind the game? Click on the Hedgewars logo in the main menu to see the credits. - Tips - Chceš vědět, kdo stojí za touto hrou? Klikni na logo Hedgewars v hlavním menu a podívej se. - - - Like Hedgewars? Become a fan on %1 or follow us on %2! - Tips - Líbí se ti Hedgewars? Staň se fanouškem na %1 nebo nás sleduj na %2! - - - Feel free to draw your own graves, hats, flags or even maps and themes! But note that you'll have to share them somewhere to use them online. - Tips - Neboj se kreslit vlastní hroby, čepice, vlajky nebo mapy a témata! Ale pamatuj, že je musíš někde sdílet, abys je mohl používat online. - - - Really want to wear a specific hat? Donate to us and receive an exclusive hat of your choice! - Tips - Opravdu chceš nosit specifickou čepici? Daruj nám něco a dostaneš exklusivní čepici dle svého výběru! - - - Keep your video card drivers up to date to avoid issues playing the game. - Tips - Udržuj ovladače grafické karty aktuální, aby ses vyhnul problémům při hře. - - - You can find your Hedgewars configuration files under "My Documents\Hedgewars". Create backups or take the files with you, but don't edit them by hand. - Tips - Své nastavení Hedgewars najdeš v "Dokumenty\Hedgewars". Vytvoř si zálohu nebo si je přenášej s sebou, ale needituj je ručně. - - - You're able to associate Hedgewars related files (savegames and demo recordings) with the game to launch them right from your favorite file or internet browser. - Tips - Můžeš si asociovat Hedgewars soubory (uložené hry a nahrávky) tak, abys je mohl ihned spouštět z internetového prohlížeče nebo prúzkumníka souborů. - - - Want to save ropes? Release the rope in mid air and then shoot again. As long as you don't touch the ground you'll reuse your rope without wasting ammo! - Tips - Chceš ušetřit lana? Uvolni ho ve vzduchu a vystřel znovu. Dokud se nedotkneš země, využíváš ho bez plýtvání munice! - - - You can find your Hedgewars configuration files under "Library/Application Support/Hedgewars" in your home directory. Create backups or take the files with you, but don't edit them by hand. - Tips - Konfigurace Hedgewars je k nalezení ve tvém domovském adresáři pod "Library/Application Support/Hedgewars". Vytvoř si zálohu, přenášej ho s sebou, ale neměň ho ručně. - - - You can find your Hedgewars configuration files under ".hedgewars" in your home directory. Create backups or take the files with you, but don't edit them by hand. - Tips - Konfigurace Hedgewars je k nalezení ve tvém domovském adresáři pod ".hedgewars". Vytvoř si zálohu, přenášej ho s sebou, ale neměň ho ručně. - - - The Windows version of Hedgewars supports Xfire. Make sure to add Hedgewars to its game list so your friends can see you playing. - Tips - Windows verze Hedgewars podporuje Xfire. Přidej si Hedgewars do jeho seznamu her, abys viděl přátele, kteří ho hrají. - - - Use the Molotov or Flame Thrower to temporary keep hedgehogs from passing terrain such as tunnels or platforms. - Tips - Použij Molotov nebo plamenomet, abys dočasně zamezil ježkům v přechodu terénu jako jsou tunely nebo plošiny. - - - The Homing Bee can be tricky to use. Its turn radius depends on its velocity, so try to not use full power. - Tips - - - Downloadable Content - Local Game - - - Play a game on a single computer - Network Game - - - Play a game across a network @@ -824,6 +862,14 @@ Edit game preferences + + Play a game across a local area network + + + + Play a game on an official server + + PageMultiplayer @@ -831,6 +877,10 @@ Start Start + + Edit game preferences + + PageNetGame @@ -838,24 +888,13 @@ Control Ovládání - - - PageNetType - - LAN game - Hra po místní síti - - - Official server - Oficiální server - - - Join hundreds of players online! + + Edit game preferences - Join or host your own game server in a Local Area Network. - + Start + Start @@ -901,10 +940,6 @@ Smazat sadu zbraní - General - Obecné - - Advanced Rozšířené @@ -944,6 +979,94 @@ System proxy settings + + Select an action to change what key controls it + + + + Reset to default + + + + Reset all binds + + + + Game + + + + Graphics + + + + Audio + + + + Controls + + + + Video Recording + + + + Network + + + + Teams + Týmy + + + Schemes + + + + Weapons + Zbraně + + + Frontend + + + + Custom colors + + + + Game audio + + + + Frontend audio + + + + Account + + + + Proxy settings + + + + Miscellaneous + + + + Updates + + + + Check for updates + + + + Video recording options + + PagePlayDemo @@ -1144,18 +1267,10 @@ PageSinglePlayer - Simple Game - - - Play a quick game against the computer with random settings - Multiplayer - - - Play a hotseat game against your friends, or AI teams @@ -1164,26 +1279,14 @@ - Training Mode - - - Practice your skills in a range of training missions - Demos - - - Watch recorded demos - Load - Nahrát - - Load a previously saved game @@ -1230,14 +1333,6 @@ - Date: - - - - Size: - - - encoding @@ -1245,6 +1340,16 @@ uploading + + Date: %1 + + + + + Size: %1 + + + QAction @@ -1257,10 +1362,6 @@ Info - Start - Start - - Restrict Joins Omezit připojení @@ -1308,18 +1409,6 @@ Celá obrazovka - Frontend fullscreen - Celá obrazovka v menu - - - Enable sound - Zapnout zvuky - - - Enable music - Zapnout hudbu - - Show FPS Zobrazovat FPS @@ -1336,18 +1425,6 @@ Ukazovat tipy ke zbraním - Enable frontend sounds - Zapnout zvuky v menu - - - Enable frontend music - Zapnout hudbu v menu - - - Frontend effects - Efekty v menu - - Save password @@ -1367,14 +1444,38 @@ Use game resolution + + Visual effects + + + + Sound + + + + In-game sound effects + + + + Music + + + + In-game music + + + + Frontend sound effects + + + + Frontend music + + QComboBox - generated map... - generovaná mapa... - - Human Člověk @@ -1387,14 +1488,6 @@ (Podle systému) - generated maze... - generovaný labyrint... - - - Mission - Mise - - Community Komunita @@ -1411,10 +1504,6 @@ Probíhá - hand drawn map... - ručně kreslená mapa... - - Disabled Vypnuto @@ -1451,10 +1540,6 @@ Shora-Dolu - Wiggle - Kývat se - - Red/Cyan grayscale @@ -1490,18 +1575,6 @@ Pevnost - Key binds - Nastavení kláves - - - Teams - Týmy - - - Audio/Graphic options - Nastavení audio/video - - Net game Síťová hra @@ -1522,26 +1595,6 @@ Týmová nastavení - Misc - Ostatní - - - Schemes and Weapons - Schémata a zbraně - - - Custom colors - - - - Miscellaneous - - - - Video recording options - - - Videos @@ -1549,10 +1602,6 @@ Description - - Proxy settings - - QLabel @@ -1561,26 +1610,6 @@ Verze - Developers: - Vývojáři: - - - Art: - Grafika: - - - Sounds: - Zvuky: - - - Translations: - Překlady: - - - Special thanks: - Speciální poděkování: - - Weapons Zbraně @@ -1645,10 +1674,6 @@ Shazování beden - Game scheme - Herní schéma - - % Dud Mines % falešných min @@ -1685,10 +1710,6 @@ Tip: - This development build is 'work in progress' and may not be compatible with other versions of the game. Some features might be broken or incomplete. Use at your own risk! - Tato vývojová verze je 'v průběhu práce' a může být kompatibilní s jinými verzemi hry. Některé možnosti mohou být rozbité nebo nekompletní. Používej na vlastní riziko! - - Quality Kvalita @@ -1763,10 +1784,6 @@ - Summary - - - Description @@ -1794,6 +1811,38 @@ Bitrate (Kbps) + + This development build is 'work in progress' and may not be compatible with other versions of the game, while some features might be broken or incomplete! + + + + Fullscreen + Celá obrazovka + + + Fullscreen Resolution + + + + Windowed Resolution + + + + Your Email + + + + Summary + + + + Send system information + + + + Type the security code: + + QLineEdit @@ -1832,10 +1881,6 @@ Asociace souborů selhala. - Please fill out all fields - - - Error while authenticating at google.com: @@ -1882,18 +1927,6 @@ - Successfully posted the issue on hedgewars.googlecode.com - - - - Error during authentication at google.com - - - - Error reporting the issue, please try again later (or visit hedgewars.googlecode.com directly) - - - Main - Error @@ -2042,16 +2075,37 @@ Do you really want to delete the weapon set '%1'? - - - QObject - - Nickname - Přezdívka - - - Please enter your nickname - Prosím zadej svou přezdívku + + Hedgewars - Nick not registered + + + + System Information Preview + + + + Failed to generate captcha + + + + Failed to download captcha + + + + Please fill out all fields. Email is optional. + + + + Hedgewars - Warning + + + + Hedgewars - Information + + + + Hedgewars + @@ -2089,10 +2143,6 @@ Start - Ready - Připraven - - Go! Jedem! @@ -2113,22 +2163,10 @@ Nahrát - Setup - Nastavení - - - Random Team - Náhodný tým - - Associate file extensions Asociovat přípony souborů - more - více - - More info @@ -2221,6 +2259,25 @@ + SeedPrompt + + The map seed is the basis for all random values generated by the game. + + + + Cancel + Zrušit + + + Set seed + + + + Close + + + + SelWeaponWidget Weapon set @@ -2248,107 +2305,22 @@ - ToggleButtonWidget - - Vampirism - Vampyrismus - - - Karma - Karma - - - Artillery - Dělostřelectvo - - - Fort Mode - Pevnosti - - - Divide Teams - Rozděl týmy - - - Solid Land - Pevná zem - - - Add Border - Přidej hranice - - - Low Gravity - Nízká gravitace - - - Laser Sight - Laserové zaměřování - - - Invulnerable - Nesmrtelnost - - - Random Order - Náhodné pořadí - - - King - Král - - - Place Hedgehogs - Umísti ježky - - - Clan Shares Ammo - Klan sdílí munici - - - Disable Girders - Vypni traverzy - - - Disable Land Objects - Vypni teréní objekty - - - AI Survival Mode - Mód 'Počítač přežívá' - - - Reset Health - Obnova zdraví - - - Unlimited Attacks - Neomezeně útoků - - - Reset Weapons - Obnova zbraní - - - Per Hedgehog Ammo - Individuální munice - - - Disable Wind - Vypni vítr - - - More Wind - Více větru - - - Tag Team + TeamShowWidget + + %1's team - - Add Bottom Border + + + ThemePrompt + + Select a theme for this map + + Cancel + Zrušit + binds @@ -2481,11 +2453,6 @@ sejmout - hedgehogs -info - info o ježkovi - - quit ukončit @@ -2521,33 +2488,33 @@ record + + hedgehog info + + binds (categories) - Basic controls - Základní ovládání - - - Weapon controls - Ovládání zbraní - - - Camera and cursor controls - Ovládání kamery a kurzoru - - - Other - Ostatní + Movement + + + + Weapons + Zbraně + + + Camera + + + + Miscellaneous + binds (descriptions) - Move your hogs and aim: - Pohybuj ježkem a miř: - - Traverse gaps and obstacles by jumping: Překonej mezery a překážky skokem: @@ -2611,6 +2578,10 @@ Record video: + + Hedgehog movement + + binds (keys) diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Locale/hedgewars_da.ts --- a/share/hedgewars/Data/Locale/hedgewars_da.ts Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Locale/hedgewars_da.ts Fri Feb 22 05:05:32 2013 +0100 @@ -20,18 +20,76 @@ - DrawMapWidget - - File error - Fejl i fil - - - Cannot open file '%1' for writing - Kan ikke åbne filen '%1' til skrivning - - - Cannot read file '%1' - Kan ikke læse filen '%1' + BanDialog + + IP + Ip + + + Nick + + + + IP/Nick + + + + Reason + + + + Duration + + + + Ok + + + + Cancel + Annuler + + + you know why + + + + Warning + + + + Please, specify %1 + + + + nickname + + + + permanent + + + + + DataManager + + Use Default + + + + + FeedbackDialog + + View + + + + Cancel + Annuler + + + Send Feedback + @@ -55,25 +113,40 @@ Rediger våben - Error - Fejl - - - Illegal ammo scheme - Ugyldig ammunitionssystem - - Edit schemes Rediger spilsystemer - When this option is enabled selecting a game scheme will auto-select a weapon - Når denne indstilling er aktiveret vælges automatisk et våben når et spilsystem vælges - - Game Options Spilindstillinger + + Game scheme will auto-select a weapon + + + + + HWApplication + + %1 minutes + + + + %1 hour + + + + %1 hours + + + + %1 day + + + + %1 days + + HWAskQuitDialog @@ -85,22 +158,6 @@ HWChatWidget - %1 *** %2 has been removed from your ignore list - %1 *** %2 er blevet fjernet fra din ignoreringsliste - - - %1 *** %2 has been added to your ignore list - %1 *** %2 er blevet tilføjet til din ignoreringsliste - - - %1 *** %2 has been removed from your friends list - %1 *** %2 er blevet fjernet fra din venneliste - - - %1 *** %2 has been added to your friends list - %1 *** %2 er blevet tilføjet til din venneliste - - %1 has been removed from your ignore list %1 er blevet fjernet fra din ignoreringsliste @@ -140,42 +197,14 @@ Failed to save StyleSheet to %1 Mislykkedes at gemme typografiark til %1 - - %1 is not a valid command! - %1 er ikke en gyldig kommando! - - - Kicking %1 ... - Smider %1 ud... - HWForm - new - ny - - - Error - Fejl - - - OK - OK - - - Unable to start the server - Ude af stand til at starte serveren - - Cannot save record to file %1 Kan ikke gemme optagelse til fil %1 - Please select record from the list above - Vælg venligst en optagelse fra den ovenstående liste - - DefaultTeam StandardHold @@ -202,38 +231,10 @@ Spil afbrudt - Password - Kodeord - - - Your nickname %1 is -registered on Hedgewars.org -Please provide your password below -or pick another nickname in game config: - Dit brugernavn %1 er -registreret på Hedgewars.org -Indtast venligst dit kodeord nedenfor -eller vælg et andet brugernavn under spilkonfigurationen: - - - No password supplied. - Intet kodeord indtastet. - - Nickname Brugernavn - Some one already uses - your nickname %1 -on the server. -Please pick another nickname: - En eller anden bruger allerede -dit brugernavn %1 -på serveren. -Vælg venligst et andet brugernavn: - - No nickname supplied. Intet brugernavn indtastet. @@ -242,6 +243,59 @@ Please pick another nickname: + + %1's Team + + + + Hedgewars - Nick registered + + + + This nick is registered, and you haven't specified a password. + +If this nick isn't yours, please register your own nick at www.hedgewars.org + +Password: + + + + Your nickname is not registered. +To prevent someone else from using it, +please register it at www.hedgewars.org + + + + + +Your password wasn't saved either. + + + + Hedgewars - Empty nickname + + + + Hedgewars - Wrong password + + + + You entered a wrong password. + + + + Try Again + + + + Hedgewars - Connection error + + + + You reconnected too fast. +Please wait a few seconds and try again. + + HWGame @@ -257,18 +311,6 @@ HWMapContainer - Map - Bane - - - Themes - Temaer - - - Filter - Filter - - All Alle @@ -293,10 +335,6 @@ Skør - Type - Type - - Small tunnels Små tunneler @@ -305,28 +343,96 @@ Mellemstore tunneler - Large tunnels - Store tunneler - - - Small floating islands - Små svævende øer - - - Medium floating islands - Mellemstore svævende øer - - - Large floating islands - Store svævende øer - - Seed Spire - Set - Indstil + Map type: + + + + Image map + + + + Mission map + + + + Hand-drawn + + + + Randomly generated + + + + Random maze + + + + Random + Tilfældig + + + Map preview: + + + + Load map drawing + + + + Edit map drawing + + + + Largetunnels + + + + Small islands + + + + Medium islands + + + + Large islands + + + + Map size: + + + + Maze style: + + + + Mission: + + + + Map: + + + + Theme: + + + + Load drawn map + Indlæs tegnet bane + + + Drawn Maps + Tegnede Baner + + + All files + Alle filer @@ -367,20 +473,6 @@ Du blev smidt ud - Password - Kodeord - - - Your nickname %1 is -registered on Hedgewars.org -Please provide your password -or pick another nickname: - Your nickname %1 is -registered on Hedgewars.org -Please provide your password -or pick another nickname: - - %1 *** %2 has joined the room %1 *** %2 har tilsluttet sig til rummet @@ -397,20 +489,6 @@ %1 *** %2 har forladt - Your nickname %1 is -registered on Hedgewars.org -Please provide your password below -or pick another nickname in game config: - Your nickname %1 is -registered on Hedgewars.org -Please provide your password below -or pick another nickname in game config: - - - Nickname - Brugernavn - - User quit En bruger forlod @@ -426,8 +504,8 @@ HWPasswordDialog - Password - Kodeord + Login + @@ -442,6 +520,32 @@ + HatButton + + Change hat (%1) + + + + + HatPrompt + + Select a hat + + + + Filter: + + + + Cancel + Annuler + + + Use selected hat + + + + KB SDL_ttf returned error while rendering text, most propably it is related to the bug in freetype2. It's recommended to update your freetype lib. @@ -449,6 +553,13 @@ + KeyBinder + + Category + + + + LibavInteraction Duration: %1m %2s @@ -467,18 +578,21 @@ Audio: + + unknown + + + + + MapModel + + No description available. + + PageAdmin - Server message: - Serverbesked: - - - Set message - Indstil besked - - Clear Accounts Cache Ryd Bruger-cache @@ -506,6 +620,38 @@ Set data Indstil data + + General + Generelt + + + Bans + + + + IP/Nick + + + + Expiration + + + + Reason + + + + Refresh + Opdater + + + Add + + + + Remove + + PageConnecting @@ -513,10 +659,6 @@ Connecting... Opretter forbindelse... - - Cancel - Annuler - PageDrawMap @@ -564,31 +706,45 @@ Generelt - Advanced - Advanceret + Select an action to choose a custom key bind for this team + + + + Use my default + + + + Reset all binds + + + + Custom Controls + + + + Hat + Hat + + + Name + Navn + + + This hedgehog's name + + + + Randomize this hedgehog's name + + + + Random Team + Tilfældige Hold PageGameStats - <p>The best shot award was won by <b>%1</b> with <b>%2</b> pts.</p> - <p>Prisen for det bedste skud gik til <b>%1</b> med <b>%2</b> point.</p> - - - <p>The best killer is <b>%1</b> with <b>%2</b> kills in a turn.</p> - - <p>The best killer is <b>%1</b> with <b>%2</b> kill in a turn.</p> - <p>The best killer is <b>%1</b> with <b>%2</b> kills in a turn.</p> - - - - <p>A total of <b>%1</b> hedgehog(s) were killed during this round.</p> - - <p>A total of <b>%1</b> hedgehog was killed during this round.</p> - <p>A total of <b>%1</b> hedgehogs were killed during this round.</p> - - - Details Detaljer @@ -664,275 +820,14 @@ PageMain - Local Game (Play a game on a single computer) - Lokalt spil (Spil et spil på én enkelt computer) - - - Network Game (Play a game across a network) - Netværksspil (Spil et spil over et netværk) - - - Simply pick the same color as a friend to play together as a team. Each of you will still control his or her own hedgehogs but they'll win or lose together. - Tips - Bare vælg samme farve som en ven for at spille sammen som et hold. Hver af jer vil stadig kontrollere sine egne pindsvin, men vil vinde eller tabe sammen. - - - Some weapons might do only low damage but they can be a lot more devastating in the right situation. Try to use the Desert Eagle to knock multiple hedgehogs into the water. - Tips - Nogle våben giver måske ikke særlig meget skade, men de kan være meget mere farlige i de rigtige situationer. Prøv at bruge Desert Eagle-pistolen til at skubbe flere pindsvin i vandet. - - - If you're unsure what to do and don't want to waste ammo, skip one round. But don't let too much time pass as there will be Sudden Death! - Tips - Hvis du er usikker på hvad du skal gøre og ikke vil spilde ammunition, kan du springe en runde over. Men lad der ikke gå alt for meget tid, for ellers indtræffer Pludselig Død! - - - If you'd like to keep others from using your preferred nickname on the official server, register an account at http://www.hedgewars.org/. - Tips - Hvis du ikke vil have at andre anvender dit foretrukne brugernavn på den officielle server, kan du registrere en bruger på http://www.hedgewars.org/. - - - You're bored of default gameplay? Try one of the missions - they'll offer different gameplay depending on the one you picked. - Tips - Er du træt af den almindelige måde at spille på? Prøv en af missionerne - de tilbyder forskellige måder at spille på afhængigt af hvilken en du vælger. - - - By default the game will always record the last game played as a demo. Select 'Local Game' and pick the 'Demos' button on the lower right corner to play or manage them. - Tips - Som standard optager spillet altid det sidste spil du har spillet som en demo. Tryk på 'Lokalt spil' og vælg 'Demoer'-knappen i nederste højre hjørne for at afspille eller administrere dem. - - - Hedgewars is Open Source and Freeware we create in our spare time. If you've got problems, ask on our forums but please don't expect 24/7 support! - Tips - Hedgewars er Open Source og et gratis spil vi laver i vores fritid. Hvis du har problemer er du velkommen til at spørge på forummet, men forvent ikke at få hjælp 24 timer i døgnet! - - - Hedgewars is Open Source and Freeware we create in our spare time. If you like it, help us with a small donation or contribute your own work! - Tips - Hedgewars er Open Source og et gratis spil vi laver i vores fritid. Hvis du holder af det, kan du hjælpe os med en lille donation eller ved at indsende dine egne modifikationer! - - - Hedgewars is Open Source and Freeware we create in our spare time. Share it with your family and friends as you like! - Tips - Hedgewars er Open Source og et gratis spil vi laver i vores fritid. Del det med dine venner og din familie som du ønsker! - - - From time to time there will be official tournaments. Upcoming events will be announced at http://www.hedgewars.org/ some days in advance. - Tips - Fra tid til anden er der officielle turneringer. Kommende begivenheder vil blive annonceret på http://www.hedgewars.org/ et par dage i forvejen. - - - Hedgewars is available in many languages. If the translation in your language seems to be missing or outdated, feel free to contact us! - Tips - Hedgewars er tilgængeligt på mange sprog. Hvis oversættelsen på dit sprog mangler noget eller er uddateret, skal du være velkommen til at kontakte os! - - - Hedgewars can be run on lots of different operating systems including Microsoft Windows, Mac OS X and Linux. - Tips - Hedgewars kan køre på mange forskellige operativsystemer, herunder Microsoft Windows, Mac OS X og Linux. - - - Always remember you're able to set up your own games in local and network/online play. You're not restricted to the 'Simple Game' option. - Tips - Husk altid at du kan sætte dine egne spil op under lokale-, netværks- og online-spil. Du er ikke begrænset til kun at bruge 'Simpelt spil'-muligheden. - - - While playing you should give yourself a short break at least once an hour. - Tips - Mens du spiller bør du tage en kort pause mindst en gang i timen. - - - If your graphics card isn't able to provide hardware accelerated OpenGL, try to enable the low quality mode to improve performance. - Tips - Hvis dit grafikkort ikke understøtter hardware-accelereret OpenGL, kan du prøve at slå indstillingen 'Reduceret kvalitet' til for at forbedre ydelsen. - - - We're open to suggestions and constructive feedback. If you don't like something or got a great idea, let us know! - Tips - Vi er åbne over for foreslag og konstruktive tilbagemeldinger. Fortæl os det hvis der er noget du ikke kan lide eller hvis du har en god idé! - - - Especially while playing online be polite and always remember there might be some minors playing with or against you as well! - Tips - Specielt når du spiller online bør du være venlig og altid huske at du måske også spiller med eller mod børn! - - - Special game modes such as 'Vampirism' or 'Karma' allow you to develop completely new tactics. Try them in a custom game! - Tips - Specielle måder at spille på som f.eks. 'Varmpyr' eller 'Karma' tillader dig at udvikle helt nye taktikker. Prøv dem i et brugerdefineret spil! - - - You should never install Hedgewars on computers you don't own (school, university, work, etc.). Please ask the responsible person instead! - Tips - Du bør aldrig installere Hedgewars på computere du ikke ejer (skole, universitet, arbejde,e.l.). Spørg venligst den ansvarlige person i stedet! - - - Hedgewars can be perfect for short games during breaks. Just ensure you don't add too many hedgehogs or use an huge map. Reducing time and health might help as well. - Tips - Hedgewars er perfekt til korte spil under pauser. Bare par på du ikke tilføjer for mange pindsvin eller bruger en kæmpe bane. Det kan også hjælpe at reducere tid og liv. - - - No hedgehogs were harmed in making this game. - Tips - Ingen pindsvin kom til skade under produktionen af dette spil. - - - Hedgewars is Open Source and Freeware we create in our spare time. If someone sold you the game, you should try get a refund! - Tips - Hedgewars er Open Source og et gratis spil vi laver i vores fritid. Hvis nogen solgte dig spiller skal du bede om at få pengene tilbage! - - - Connect one or more gamepads before starting the game to be able to assign their controls to your teams. - Tips - Tilslut en eller flere gamepads før du starter spiller for at kunne tildele dem til dit hold. - - - Create an account on %1 to keep others from using your most favourite nickname while playing on the official server. - Tips - Opret en bruger på %1 hvis du ikke vil have at andre anvender dit foretrukne brugernavn på den officielle server. - - - If your graphics card isn't able to provide hardware accelerated OpenGL, try to update the associated drivers. - Tips - Hvis du ikke er i stand til at slå hardware-accelereret OpenGL til, bør du prøve at opdatere dine grafikkort-drivere. - - - There are three different jumps available. Tap [high jump] twice to do a very high/backwards jump. - Tips - Der er tre forskellige typer hop tilgængelige. Tryk hurtigt på [hight jump] to gange i træk for at lave et højt, baglæns hop. - - - Afraid of falling off a cliff? Hold down [precise] to turn [left] or [right] without actually moving. - Tips - Er du bange for at falde ned fra en skrænt? Hold [precise] nede for at vende dig mod [left] eller [right] uden at bevæge dig. - - - Some weapons require special strategies or just lots of training, so don't give up on a particular tool if you miss an enemy once. - Tips - Nogle våben kræver specielle strategier eller bare masser af træning, så undlad ikke at bruge et bestemt våben bare fordi du rammer ved siden af én gang. - - - Most weapons won't work once they touch the water. The Homing Bee as well as the Cake are exceptions to this. - Tips - De fleste våben virker ikke så snart de har rørt vandet. Den Målsøgende Bi og Kagen er de eneste undtagelser. - - - The Old Limbuger only causes a small explosion. However the wind affected smelly cloud can poison lots of hogs at once. - Tips - Gamle Ole laver kun en lille eksplosion. Til gengæld kan den stænkende sky den udsender føres rundt af vinden og ramme mange pindsvin på én gang. - - - The Piano Strike is the most damaging air strike. You'll lose the hedgehog performing it, so there's a huge downside as well. - Tips - Klaveranslaget er det luftvåben der giver allermest skade. Til gengæld mister du det pindsvin som bruger angrebet, så der er også en bagside af medaljen. - - - Sticky Mines are a perfect tool to create small chain reactions knocking enemy hedgehogs into dire situations ... or water. - Tips - Klæbrige Miner er det perfekte værktøj til at lave små kædereaktioner og smide pindsvin ud i faretruende situationer... eller bare direkte i vandet. - - - The Hammer is most effective when used on bridges or girders. Hit hogs will just break through the ground. - Tips - Hammeren er mest effektiv når den bruges enten på broer eller bærebjælker. Sigter du mod pindsvin med den, laver du bare huller i jorden. - - - If you're stuck behind an enemy hedgehog, use the Hammer to free yourself without getting damaged by an explosion. - Tips - Hvis du sidder fast bag en af modstanderens pindsvin, kan du bruge Hammeren til at slå dig fri uden at tage skade under en eksplosion. - - - The Cake's maximum walking distance depends on the ground it has to pass. Use [attack] to detonate it early. - Tips - Kagen kan gå kortere eller længere, afhængig af hvad den skal over på vejen. Du kan brrug [attack] til at detonere den før den når sin destination. - - - The Flame Thrower is a weapon but it can be used for tunnel digging as well. - Tips - Flammekasteren er et våben, men den kan også bruges til hurtigt at grave tunneler. - - - Want to know who's behind the game? Click on the Hedgewars logo in the main menu to see the credits. - Tips - Vil du vide hvem der står bag spillet? Klik på Hedgewars-logoet i hovedmenuen for at se rulleteksterne. - - - Like Hedgewars? Become a fan on %1 or follow us on %2! - Tips - Er du glad for Hedgewars? Bliv fan på %1 eller følge vores opdateringer på %2! - - - Feel free to draw your own graves, hats, flags or even maps and themes! But note that you'll have to share them somewhere to use them online. - Tips - Du skal være velkommen til at tegne dine egne gravsten, hatte, flag eller endda baner og temaer! Men læg mærke til at du bliver nød til at dele dem med andre hvis du vil spille med dem online. - - - Really want to wear a specific hat? Donate to us and receive an exclusive hat of your choice! - Tips - Vil du virkelig gerne have en specifik hat? Send os en donation, så kvitterer vi med en eksklusiv hat efter eget valg! - - - Keep your video card drivers up to date to avoid issues playing the game. - Tips - Hold dine grafikkortdrivere opdaterede for at undgå problemmer i spillet. - - - You can find your Hedgewars configuration files under "My Documents\Hedgewars". Create backups or take the files with you, but don't edit them by hand. - Tips - Du kan finde konfigurationsfilerne til Hedgewars under mappen "(Mine) Dokumenter\Hedgewars". Opret gerne en back-up eller tag filerne med dig, men lad være med selv at ændre i dem. - - - You're able to associate Hedgewars related files (savegames and demo recordings) with the game to launch them right from your favorite file or internet browser. - Tips - Du kan indstille Hedgewars-filer (gemte spil og demooptagelser) til automatisk at åbne når du trykker på dem eller åbner dem i din internet-browser. - - - Want to save ropes? Release the rope in mid air and then shoot again. As long as you don't touch the ground you'll reuse your rope without wasting ammo! - Tips - Vil du gerne spare på dine reb? Slip rebet midt i luften og skyd straks igen. Så længe du ikke rører jorden bruger du ikke noget ammunition! - - - You can find your Hedgewars configuration files under "Library/Application Support/Hedgewars" in your home directory. Create backups or take the files with you, but don't edit them by hand. - Tips - Du kan finde konfigurationsfilerne til Hedgewars under mappen "Bibliotek/Application Support/Hedgewars" i din hjemmemappe. Opret gerne en back-up eller tag filerne med dig, men lad være med selv at ændre i dem. - - - You can find your Hedgewars configuration files under ".hedgewars" in your home directory. Create backups or take the files with you, but don't edit them by hand. - Tips - Du kan finde konfigurationsfilerne til Hedgewars under mappen ".hedgewars" i din hjemmemappe. Opret gerne en back-up eller tag filerne med dig, men lad være med selv at ændre i dem. - - - The Windows version of Hedgewars supports Xfire. Make sure to add Hedgewars to its game list so your friends can see you playing. - Tips - Windows-versionen af Hedgewars understøtter integrering med Xfire. Husk at tilføje Hedgewars til din liste med spil så dine venner kan se hvornår du spiller. - - - Use the Molotov or Flame Thrower to temporary keep hedgehogs from passing terrain such as tunnels or platforms. - Tips - Brug en Molotovcocktail eller Flammekasteren til midlertidigt at forhindre pindsvin i at passere et område, f.eks. en tunnel eller platform. - - - The Homing Bee can be tricky to use. Its turn radius depends on its velocity, so try to not use full power. - Tips - Den Målsøgende Bi kan være svær at bruge. Den vender lettere hvis den ikke flyver alt for hurtigt, så prøv at spare på kraften når du affyrer den. - - Downloadable Content Indhold der kan Downloades - Local Game - - - Play a game on a single computer - Network Game - - - Play a game across a network @@ -960,6 +855,14 @@ Edit game preferences + + Play a game across a local area network + + + + Play a game on an official server + + PageMultiplayer @@ -967,16 +870,9 @@ Start Start - - - PageNet - - Error - Fejl - - - Please select server from the list above - Vælg venligst en server fra den ovenstående liste + + Edit game preferences + @@ -986,35 +882,12 @@ Kontrol - Error - Fejl - - - Please enter room name - Indtast venligst navnet på rummet - - - OK - OK - - - - PageNetType - - LAN game - Netværksspil - - - Official server - Officiel server - - - Join or host your own game server in a Local Area Network. + Edit game preferences - Join hundreds of players online! - + Start + Start @@ -1032,18 +905,6 @@ Slet hold - New weapon scheme - Nyt våbensystem - - - Edit weapon scheme - Rediger våbensystem - - - Delete weapon scheme - Slet våbensystem - - You can't edit teams from team selection. Go back to main menu to add, edit or delete teams. Du kan ikke ændre på holdene fra holdvalgsskærmen. Gå tilbage til hovedmenuen for at tilføje, redigere og slette hold. @@ -1072,10 +933,6 @@ Slet våbensæt - General - Generelt - - Advanced Advanceret @@ -1115,18 +972,98 @@ HTTP proxy + + Select an action to change what key controls it + + + + Reset to default + + + + Reset all binds + + + + Game + + + + Graphics + + + + Audio + + + + Controls + + + + Video Recording + + + + Network + Netværk + + + Teams + Hold + + + Schemes + Spilsystemer + + + Weapons + Våben + + + Frontend + + + + Custom colors + + + + Game audio + + + + Frontend audio + + + + Account + + + + Proxy settings + + + + Miscellaneous + + + + Updates + + + + Check for updates + + + + Video recording options + + PagePlayDemo - Error - Fejl - - - OK - OK - - Rename dialog Dialogboks til omdøbelse @@ -1134,18 +1071,6 @@ Enter new file name: Indtast nyt filnavn: - - Cannot rename to - Kan ikke omdøbe til - - - Cannot delete file - Kan ikke slette fil - - - Please select record from the list - Vælg venligst en optagelse fra listen - PageRoomsList @@ -1158,18 +1083,6 @@ Tilslut - Refresh - Opdater - - - Error - Fejl - - - OK - OK - - Admin features Administratorfunktioner @@ -1178,64 +1091,6 @@ Navn på Rum: - This game is in lobby. -You may join and start playing once the game starts. - Dette spil er i lobbyen. -Du kan tilslutte dig og spille med når spillet starter. - - - This game is in progress. -You may join and spectate now but you'll have to wait for the game to end to start playing. - Dette spil er i gang. -Du kan tilslutte dig og kigge med med det samme, men du må vente på at spillet slutter med selv at kunne spille med. - - - %1 is the host. He may adjust settings and start the game. - %1 er værten. Han kan ændre indstillingerne og starte spillet. - - - Random Map - Tilfældig Bane - - - Games may be played on precreated or randomized maps. - Man kan spille enten på allerede lavede eller tilfældigt genererede baner. - - - The Game Scheme defines general options and preferences like Round Time, Sudden Death or Vampirism. - Spilsystemet definerer generelle indstillinger og præferencer, så som rundelængden, Pludselig Død og Vampyr. - - - The Weapon Scheme defines available weapons and their ammunition count. - Våbensystemet definere hvilke våben der er tilgængelige og hvor meget ammunition de har. - - - There are %1 clients connected to this room. - - Der er %1 klient forbundet til dette rum. - Der er %1 klienter forbundet til dette rum. - - - - There are %1 teams participating in this room. - - Der deltager %1 hold i dette rum. - Der deltager %1 hold i dette rum. - - - - Please enter room name - Indtast venligst rummets navn - - - Please select room from the list - Vælg venligst et rum fra listen - - - Random Maze - Tilfældig Labyrint - - Rules: Regler: @@ -1251,16 +1106,6 @@ Clear Ryd - - Warning - Advarsel - - - The game you are trying to join has started. -Do you still want to join the room? - Det spil du forsøge at tilslutte dig er allerede startet. -Har du stadig lyst til at tilslutte dig rummet? - %1 players online @@ -1284,10 +1129,6 @@ Landmassen kan ikke ødelægges! - Add an indestructable border around the terrain - Tilføj en kant rundt om banen som ikke kan destrueres - - Lower gravity Svagere tyngdekraft @@ -1300,10 +1141,6 @@ Alle pindsvin har deres eget personlige kraftfelt - Enable random mines - Aktiver tilfældige miner - - Gain 80% of the damage you do back in health Få 80% af den skade du giver tilbage som liv @@ -1422,42 +1259,10 @@ PageSinglePlayer - Simple Game (a quick game against the computer, settings are chosen for you) - Simpelt spil (et hurtigt spil mod computeren, hvor indstillingerne er valgt på forhånd) - - - Multiplayer (play a hotseat game against your friends, or AI teams) - Multiplayer (spil mod flere venner eller AI hold ved samme computer) - - - Training Mode (Practice your skills in a range of training missions) - Træningsspil (Rafiner dine evner i en række forskellige træningsmissioner) - - - Demos (Watch recorded demos) - Demoer (Afspil optagede demoer) - - - Load (Load a previously saved game) - Indlæs (Indlæs et tidligere gemt spil) - - - Campaign Mode (...) - Kampagnespil (...) - - - Simple Game - - - Play a quick game against the computer with random settings - Multiplayer - - - Play a hotseat game against your friends, or AI teams @@ -1466,26 +1271,14 @@ - Training Mode - - - Practice your skills in a range of training missions - Demos - - - Watch recorded demos - Load - Indlæs - - Load a previously saved game @@ -1531,14 +1324,6 @@ - Date: - - - - Size: - - - encoding @@ -1546,6 +1331,16 @@ uploading + + Date: %1 + + + + + Size: %1 + + + QAction @@ -1558,10 +1353,6 @@ Info - Start - Start - - Restrict Joins Begræns tilslutninger @@ -1609,18 +1400,6 @@ Fuldskærm - Frontend fullscreen - Fullskærm (frontend) - - - Enable sound - Aktiver lyd - - - Enable music - Aktiver musik - - Show FPS Fremvis antal billeder vist per sekund @@ -1633,26 +1412,10 @@ Tilføj dato og tidspunkt til filnavnet for optagelser - Reduced quality - Reduceret kvalitet - - Show ammo menu tooltips Vis værktøjstip i ammunitionsmenuer - Enable frontend sounds - Aktiver lyd (frontend) - - - Enable frontend music - Aktiver musik (frontend) - - - Frontend effects - Effekter (frontend) - - Save password @@ -1672,14 +1435,38 @@ Use game resolution + + Visual effects + + + + Sound + + + + In-game sound effects + + + + Music + + + + In-game music + + + + Frontend sound effects + + + + Frontend music + + QComboBox - generated map... - genereret bane... - - Human Menneske @@ -1692,14 +1479,6 @@ (Systemstandard) - Mission - Mission - - - generated maze... - genereret labyrint... - - Community Fællesskab @@ -1716,14 +1495,6 @@ I gang - Default - Standard - - - hand drawn map... - håndtegnet bane... - - Disabled Deaktiveret @@ -1760,10 +1531,6 @@ Top-Bund - Wiggle - Vrikke - - Red/Cyan grayscale Rød/Cyan gråskala @@ -1799,22 +1566,6 @@ Fort - Key binds - Tasteindstillinger - - - Teams - Hold - - - Weapons - Våben - - - Audio/Graphic options - Lyd-/Grafikindstillinger - - Net game Netspil @@ -1835,30 +1586,6 @@ Holdindstillinger - Misc - Diverse - - - Schemes and Weapons - Spilsystemer og Våben - - - Custom colors - - - - Miscellaneous - - - - Proxy settings - - - - Video recording options - - - Videos @@ -1882,30 +1609,6 @@ Version - This program is distributed under the GNU General Public License - Dette program distribueres under GNU General Public License - - - Developers: - Udviklere: - - - Art: - Grafik: - - - Sounds: - Lyde: - - - Translations: - Oversættelser: - - - Special thanks: - Særlig tak til: - - Weapons Våben @@ -1918,10 +1621,6 @@ Port: - Net nick - Brugernavn - - Resolution Opløsning @@ -1966,10 +1665,6 @@ Antal Kasser - Game scheme - Spilsystem - - % Dud Mines % Miner er Fusere @@ -1998,10 +1693,6 @@ Lokalitet - Restart game to apply - Genstart spil for at anvende - - Explosives Eksplosiver @@ -2010,10 +1701,6 @@ Tip: - This development build is 'work in progress' and may not be compatible with other versions of the game. Some features might be broken or incomplete. Use at your own risk! - Denne udviklerversion er under konstruktion og er ikke nødvendigvis kompatibel med andre versioner af spillet. Nogle funktioner er måske i stykker eller ukomplette. Brug er på eget ansvar! - - Quality Kvalitet @@ -2050,10 +1737,6 @@ Spilsystem - Password - Kodeord - - % Get Away Time % Tid til at Løbe Væk @@ -2092,10 +1775,6 @@ - Summary - - - Description @@ -2123,6 +1802,38 @@ Bitrate (Kbps) + + This development build is 'work in progress' and may not be compatible with other versions of the game, while some features might be broken or incomplete! + + + + Fullscreen + Fuldskærm + + + Fullscreen Resolution + + + + Windowed Resolution + + + + Your Email + + + + Summary + + + + Send system information + + + + Type the security code: + + QLineEdit @@ -2149,10 +1860,6 @@ QMessageBox - Network - Netværk - - Connection to server is lost Forbindelse til serveren er gået tabt @@ -2161,66 +1868,10 @@ Fejl - Failed to open data directory: -%1 -Please check your installation - Det mislykkedes at åbne data mappen: -%1 -Tjek venligst om spillet er installeret korrekt - - - Weapons - Våben - - - Can not edit default weapon set - Kan ikke ændre standardvåbensæt - - - Can not delete default weapon set - Kan ikke slette standardvåbensæt - - - Really delete this weapon set? - Vil du virkelig slette dette våbensæt? - - - Can not overwrite default weapon set '%1'! - Kan ikke overskrive standardvåbensættet '%1'! - - - All file associations have been set. - Alle filtilknytninger er blevet indstillede. - - File association failed. Filtilknytninger mislykkedes. - Teams - Hold - - - Really delete this team? - Vil du virkelig slette dette hold? - - - Schemes - Spilsystemer - - - Can not delete default scheme '%1'! - Kan ikke slette standardspilsystemet '%1'! - - - Really delete this game scheme? - Vil du virkelig slette dette spilsystem? - - - Can not delete default weapon set '%1'! - Kan ikke slette standardvåbensættet '%1'! - - Teams - Are you sure? @@ -2253,22 +1904,6 @@ - Please fill out all fields - - - - Successfully posted the issue on hedgewars.googlecode.com - - - - Error during authentication at google.com - - - - Error reporting the issue, please try again later (or visit hedgewars.googlecode.com directly) - - - Main - Error @@ -2430,28 +2065,37 @@ Do you really want to delete the weapon set '%1'? - - - QObject - - Error - Fejl - - - Cannot create directory %1 - Kan ikke oprette mappe %1 - - - OK - OK - - - Nickname - Brugernavn - - - Please enter your nickname - Indtast venligst dit brugernavn + + Hedgewars - Nick not registered + + + + System Information Preview + + + + Failed to generate captcha + + + + Failed to download captcha + + + + Please fill out all fields. Email is optional. + + + + Hedgewars - Warning + + + + Hedgewars - Information + + + + Hedgewars + @@ -2509,26 +2153,10 @@ Indlæs - Setup - Indstillinger - - - Ready - Klar - - - Random Team - Tilfældige Hold - - Associate file extensions Tilknyt filtyper - more - mere - - More info @@ -2574,37 +2202,6 @@ - QTableWidget - - Room Name - Navn på Rum - - - C - C - - - T - T - - - Owner - Ejer - - - Map - Bane - - - Rules - Regler - - - Weapons - Våben - - - RoomsListModel In progress @@ -2652,6 +2249,25 @@ + SeedPrompt + + The map seed is the basis for all random values generated by the game. + + + + Cancel + Annuler + + + Set seed + + + + Close + + + + SelWeaponWidget Weapon set @@ -2679,125 +2295,21 @@ - TCPBase - - Error - Fejl - - - Unable to start the server: %1. - Ude af stand til at starte serveren: %1. - - - Unable to run engine: %1 ( - Ude af stand til at starte spilmotoren: %1 ( + TeamShowWidget + + %1's team + - ToggleButtonWidget - - Vampirism - Vampyr - - - Karma - Karma - - - Artillery - Artilleri - - - Fort Mode - Brug Forter - - - Divide Teams - Opdel Hold - - - Solid Land - Fastland - - - Add Border - Tilføj Kant - - - Low Gravity - Svag Tyngdekraft - - - Laser Sight - Lasersigte - - - Invulnerable - Udødelighed - - - Add Mines - Tilføj Miner - - - Random Order - Tilfældig Rækkefølge - - - King - Konge - - - Place Hedgehogs - Placer Pindsvin - - - Clan Shares Ammo - Klan Deler Ammunition - - - Disable Girders - Deaktiver Bærebjælker - - - Disable Land Objects - Deaktiver Overfladeobjekter - - - AI Survival Mode - AI Overlevelse - - - Reset Health - Nulstil Liv - - - Unlimited Attacks - Uendelige Angreb - - - Reset Weapons - Nulstil Våben - - - Per Hedgehog Ammo - Indivuel Ammunition per Pindsvin - - - Disable Wind - Deaktiver Vind - - - More Wind - Mere Vind - - - Tag Team - Tagteam - - - Add Bottom Border - Tilføj Kant i Bunden + ThemePrompt + + Select a theme for this map + + + + Cancel + Annuler @@ -2931,12 +2443,6 @@ fang - hedgehogs -info - pindsvin -info - - quit afslut @@ -2972,33 +2478,33 @@ record + + hedgehog info + + binds (categories) - Basic controls - Grundlæggende styring - - - Weapon controls - Våbenstyring - - - Camera and cursor controls - Kamera og musestyring - - - Other - Andet + Movement + + + + Weapons + Våben + + + Camera + + + + Miscellaneous + binds (descriptions) - Move your hogs and aim: - Bevæg dine pindsvin og sigt: - - Traverse gaps and obstacles by jumping: Hop over sprækker og forhinderinger: @@ -3062,6 +2568,10 @@ Record video: + + Hedgehog movement + + binds (keys) diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Locale/hedgewars_de.ts --- a/share/hedgewars/Data/Locale/hedgewars_de.ts Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Locale/hedgewars_de.ts Fri Feb 22 05:05:32 2013 +0100 @@ -20,6 +20,79 @@ + BanDialog + + IP + IP + + + Nick + + + + IP/Nick + + + + Reason + + + + Duration + + + + Ok + + + + Cancel + Abbrechen + + + you know why + + + + Warning + + + + Please, specify %1 + + + + nickname + + + + permanent + + + + + DataManager + + Use Default + + + + + FeedbackDialog + + View + + + + Cancel + Abbrechen + + + Send Feedback + + + + FreqSpinBox Never @@ -44,13 +117,36 @@ Spielprofile bearbeiten - When this option is enabled selecting a game scheme will auto-select a weapon - Wenn diese Option aktiviert ist, wird durch Auswählen eines Spielprofils auch automatisch Waffen ausgewählt - - Game Options Spieloptionen + + Game scheme will auto-select a weapon + + + + + HWApplication + + %1 minutes + + + + %1 hour + + + + %1 hours + + + + %1 day + + + + %1 days + + HWAskQuitDialog @@ -101,10 +197,6 @@ Failed to save StyleSheet to %1 Style-Sheet konnte nich nach %1 gesichert werden - - %1 is not a valid command! - %1 ist kein gültiger Befehl! - HWForm @@ -139,22 +231,6 @@ Spiel abgebrochen - Your nickname %1 is -registered on Hedgewars.org -Please provide your password below -or pick another nickname in game config: - Dein Spitzname '%1' wurde -auf Hedgewars.org registriert. - -Bitte gib dein Passwort ein oder -wähle einen anderen Spitznamen -in den Spieloptionen: - - - No password supplied. - Kein Passwort - - Nickname Spitzname @@ -167,6 +243,59 @@ Please pick another nickname: Dein Spitzname '%1' ist bereits in Verwendung. Bitte wähle einen anderen Spitznamen: + + %1's Team + + + + Hedgewars - Nick registered + + + + This nick is registered, and you haven't specified a password. + +If this nick isn't yours, please register your own nick at www.hedgewars.org + +Password: + + + + Your nickname is not registered. +To prevent someone else from using it, +please register it at www.hedgewars.org + + + + + +Your password wasn't saved either. + + + + Hedgewars - Empty nickname + + + + Hedgewars - Wrong password + + + + You entered a wrong password. + + + + Try Again + + + + Hedgewars - Connection error + + + + You reconnected too fast. +Please wait a few seconds and try again. + + HWGame @@ -182,18 +311,6 @@ HWMapContainer - Map - Karte - - - Themes - Motiv - - - Filter - Filter - - All Alles @@ -218,10 +335,6 @@ Verrückt - Type - Typ - - Small tunnels Kleine Tunnel @@ -230,28 +343,96 @@ Mittlere Tunnel - Large tunnels - Große Tunnel - - - Small floating islands - Kleine schwebende Inseln - - - Medium floating islands - Mittlere schwebende Inseln - - - Large floating islands - Große schwebende Inseln - - Seed Seed - Set - Setzen + Map type: + + + + Image map + + + + Mission map + + + + Hand-drawn + Handgemalt + + + Randomly generated + + + + Random maze + + + + Random + Zufall + + + Map preview: + + + + Load map drawing + + + + Edit map drawing + + + + Largetunnels + + + + Small islands + + + + Medium islands + + + + Large islands + + + + Map size: + + + + Maze style: + + + + Mission: + + + + Map: + + + + Theme: + + + + Load drawn map + Gezeichnete Karte laden + + + Drawn Maps + Gezeichnete Karten + + + All files + Alle Dateien @@ -323,8 +504,8 @@ HWPasswordDialog - Password - Passwort + Login + @@ -339,6 +520,32 @@ + HatButton + + Change hat (%1) + + + + + HatPrompt + + Select a hat + + + + Filter: + + + + Cancel + Abbrechen + + + Use selected hat + + + + KB SDL_ttf returned error while rendering text, most propably it is related to the bug in freetype2. It's recommended to update your freetype lib. @@ -346,6 +553,13 @@ + KeyBinder + + Category + + + + LibavInteraction Duration: %1m %2s @@ -364,25 +578,16 @@ Audio: Audio: + + unknown + + - LibavIteraction - - Duration: %1m %2s - - Dauer: %1m %2s - - - Video: %1x%2, - Video: %1x%2, - - - %1 fps, - %1 fps, - - - Audio: - Audio: + MapModel + + No description available. + @@ -415,6 +620,38 @@ Set data Speichere Daten + + General + Allgemein + + + Bans + + + + IP/Nick + + + + Expiration + + + + Reason + + + + Refresh + + + + Add + + + + Remove + + PageConnecting @@ -469,8 +706,40 @@ Allgemein - Advanced - Erweitert + Select an action to choose a custom key bind for this team + + + + Use my default + + + + Reset all binds + + + + Custom Controls + + + + Hat + Cooliehat + + + Name + Name + + + This hedgehog's name + + + + Randomize this hedgehog's name + + + + Random Team + Zufallsteam @@ -551,267 +820,14 @@ PageMain - Simply pick the same color as a friend to play together as a team. Each of you will still control his or her own hedgehogs but they'll win or lose together. - Tips - Wähle einfach die gleiche Farbe wie dein Freund um als ein Team zu spielen. Jeder von euch wird trotzdem seine eigenen Igel kontrollieren, aber sie gewinnen oder verlieren zusammen. - - - Some weapons might do only low damage but they can be a lot more devastating in the right situation. Try to use the Desert Eagle to knock multiple hedgehogs into the water. - Tips - Manche Waffen richten nur einen geringen Schaden an, können aber in der richtigen Situation sehr nützlich sein. Benutze die Desert Eagle um mehrere Igel ins Wasser zu schießen. - - - If you're unsure what to do and don't want to waste ammo, skip one round. But don't let too much time pass as there will be Sudden Death! - Tips - Wenn du dir nicht sicher bist was du tun sollst und keine Munition verschwenden willst, überspringe eine Runde. Aber lass nicht zu viele Runden verstreichen, denn später kommt es zum Sudden Death! - - - If you'd like to keep others from using your preferred nickname on the official server, register an account at http://www.hedgewars.org/. - Tips - Wenn du andere daran hindern willst deinen bevorzugten Nickname auf dem offiziellen Server zu nutzen, registriere dich auf http://www.hedgewars.org/. - - - You're bored of default gameplay? Try one of the missions - they'll offer different gameplay depending on the one you picked. - Tips - Du bist von dem Standardspiel gelangweilt? Probiere die Missionen aus - sie ermöglichen dir verschiedene Spielarten je nachdem welche du wählst. - - - By default the game will always record the last game played as a demo. Select 'Local Game' and pick the 'Demos' button on the lower right corner to play or manage them. - Tips - Das Spiel wird automatisch das letzte Spiel als Demo aufnehmen. Wähle 'Lokales Spiel' und wähle den 'Demos'-Knopf in der unteren rechten Ecke um sie zu spielen oder zu verwalten. - - - Hedgewars is Open Source and Freeware we create in our spare time. If you've got problems, ask on our forums but please don't expect 24/7 support! - Tips - Hedgewars ist freie und kostenlose Software, die wir in unserer Freizeit entwickeln. Wenn du Probleme hast, frag in unseren Foren, aber erwarte bitte keinen 24/7-Support! - - - Hedgewars is Open Source and Freeware we create in our spare time. If you like it, help us with a small donation or contribute your own work! - Tips - Hedgewars ist freie und kostenlose Software, die wir in unserer Freizeit entwickeln. Wenn du es magst, hilf uns mit einer kleinen Spende oder trage deine eigene Arbeit bei! - - - Hedgewars is Open Source and Freeware we create in our spare time. Share it with your family and friends as you like! - Tips - Hedgewars ist freie und kostenlose Software, die wir in unserer Freizeit entwickeln. Teile es mit deiner Familie und deinen Freunden! - - - From time to time there will be official tournaments. Upcoming events will be announced at http://www.hedgewars.org/ some days in advance. - Tips - Von Zeit zu Zeit wird es offizielle Turniere geben. Anstehede Events werden frühzeitig auf http://www.hedgewars.org/ bekannt gegeben. - - - Hedgewars is available in many languages. If the translation in your language seems to be missing or outdated, feel free to contact us! - Tips - Hedgewars ist in vielen Sprachen verfügbar. Wenn die Übersetzung in deiner Sprache fehlt oder veraltet ist scheue dich nicht uns zu kontaktieren! - - - Hedgewars can be run on lots of different operating systems including Microsoft Windows, Mac OS X and Linux. - Tips - Hedgewars läuft auf vielen verschiedenen Betriebssystemen wie Microsoft Windows, Mac OS X und Linux. - - - Always remember you're able to set up your own games in local and network/online play. You're not restricted to the 'Simple Game' option. - Tips - Bedenke immer, dass du auch eigene Spiele im lokalen und Netzwerk/Online-Spiel erstellen kannst. Du bist nicht an die 'Einfaches Spiel'-Option gebunden. - - - While playing you should give yourself a short break at least once an hour. - Tips - Du solltest dir wenigstens einmal pro Stunde eine Pause gönnen. - - - If your graphics card isn't able to provide hardware accelerated OpenGL, try to enable the low quality mode to improve performance. - Tips - Wenn deine Grafikkarte keine hardwarebeschleunigtes OpenGL unterstützt, versuche die Qualtität in den Einstellungen runterzuschrauben. - - - We're open to suggestions and constructive feedback. If you don't like something or got a great idea, let us know! - Tips - Wir sind offen für Vorschläge oder konstruktive Rückmeldungen. Wenn dir etwas nicht gefällt oder du eine gute Idee hat, lass es uns wissen! - - - Especially while playing online be polite and always remember there might be some minors playing with or against you as well! - Tips - Sei gerade beim Spielen in Internet höflich und vergiss nie, dass eventuell auch Kinder mit dir oder gegen dich spielen! - - - Special game modes such as 'Vampirism' or 'Karma' allow you to develop completely new tactics. Try them in a custom game! - Tips - Spezielle Spielmodi wie 'Vampirismus' oder 'Karma' erlauben es dir völlig neue Taktiken zu entwickeln. Probier sie einem eigenen Spiel aus! - - - You should never install Hedgewars on computers you don't own (school, university, work, etc.). Please ask the responsible person instead! - Tips - Du solltest nie Hedgewars auf einem Computer installieren, der dir nicht gehört (Schule, Universität, Arbeit, etc.). Frag bitte stattdessen die verantwortliche Person! - - - Hedgewars can be perfect for short games during breaks. Just ensure you don't add too many hedgehogs or use an huge map. Reducing time and health might help as well. - Tips - Hedgewars ist perfekt für kurze Spielchen zwischendurch. Schaue nur, dass du nicht zu viele Igel oder eine zu große Karte nimmst. Das Verringern der Zeit oder Lebenspunkte kann auch helfen. - - - No hedgehogs were harmed in making this game. - Tips - Bei der Erstellung des Spiels wurden keine Igel verletzt. - - - Hedgewars is Open Source and Freeware we create in our spare time. If someone sold you the game, you should try get a refund! - Tips - Hedgewars ist freie und kostenlose Software, die wir in unserer Freizeit entwickeln. Wenn dir jemand das Spiel verkauft hat, solltest du versuchen es dir erstatten zu lassen! - - - Connect one or more gamepads before starting the game to be able to assign their controls to your teams. - Tips - Verbinde ein oder mehrere Gamepads bevor du das Spiel startest um damit deine Teams kontrollieren zu können. - - - Create an account on %1 to keep others from using your most favourite nickname while playing on the official server. - Tips - Erstellen einen Account auf %1 um andere daran zu deinen favorisierten Benutzernamen zu benutzen, wenn du auf dem offiziellen Server spielst. - - - If your graphics card isn't able to provide hardware accelerated OpenGL, try to update the associated drivers. - Tips - Wenn deine Grafikkarte kein hardwarebeschleunigtes OpenGL bietet, versuche die entsprechenden Treiber zu aktualisieren. - - - There are three different jumps available. Tap [high jump] twice to do a very high/backwards jump. - Tips - Es gibt drei Arten von Sprüngen: Drücke zweimal die Taste zum Hochspringen, um noch höher/rückwärts zu springen. - - - Afraid of falling off a cliff? Hold down [precise] to turn [left] or [right] without actually moving. - Tips - Angst eine Klippe herunterzufallen? Halte [Umschalt] um dich nach links oder rechts zu drehen, ohne dich wirklich zu bewegen. - - - Some weapons require special strategies or just lots of training, so don't give up on a particular tool if you miss an enemy once. - Tips - Manche Waffen brauchen spezielle Strategieren oder einfach nur eine Menge Übung, also gib eine Waffe nicht direkt auf wenn du deinen Gegner einmal verfehlst. - - - Most weapons won't work once they touch the water. The Homing Bee as well as the Cake are exceptions to this. - Tips - Die meisten Waffen funktionieren nicht mehr, sobald sie das Wasser berühren. Die zielsuchende Biene oder die Torte sind Ausnahmen hierfür. - - - The Old Limbuger only causes a small explosion. However the wind affected smelly cloud can poison lots of hogs at once. - Tips - Der Alte Limburger versucht nur einen kleinen Schaden. Die durch den Wind beeinflussbare Stinkwolke jedoch kann viele Igel auf einmal vergiften. - - - The Piano Strike is the most damaging air strike. You'll lose the hedgehog performing it, so there's a huge downside as well. - Tips - Der Piano-Angriff ist der verheerenste Luftangriff. Du verlierst allerdings den Igel der ihn vollführt, er hat also auch seine Schattenseite. - - - Sticky Mines are a perfect tool to create small chain reactions knocking enemy hedgehogs into dire situations ... or water. - Tips - Haftminen sind perfekte Werkzeuge um Kettenreaktionen auszulösen oder Igel in die gewünschte Richtung zu lenken ... oder ins Wasser. - - - The Hammer is most effective when used on bridges or girders. Hit hogs will just break through the ground. - Tips - Der Hammer ist die effektivste Waffe auf Brücken oder Klippen. Getroffene Igel fallen einfach durch den Boden. - - - If you're stuck behind an enemy hedgehog, use the Hammer to free yourself without getting damaged by an explosion. - Tips - Wenn du hinter einem Igel feststeckst, benutze den Hammer um dich zu befreien ohne durch eine Explosion verletzt zu werden. - - - The Cake's maximum walking distance depends on the ground it has to pass. Use [attack] to detonate it early. - Tips - Die maximale Laufdistanz der Torte hängt vom abzulaufenden Untergrund ab. Benutze [Angriff] um sie früher zu zünden. - - - The Flame Thrower is a weapon but it can be used for tunnel digging as well. - Tips - Der Flammenwerfer ist zwar eine Waffe, kann aber auch zum Tunnelgraben genutzt werden. - - - Want to know who's behind the game? Click on the Hedgewars logo in the main menu to see the credits. - Tips - Du willst wissen wer hinter Hedgewars steckt? Klicke auf das Hedgewars-Logo im Hauptmenü um die Credits zu sehen. - - - Like Hedgewars? Become a fan on %1 or follow us on %2! - Tips - Du magst Hedgewars? Werde ein Fan auf %1 oder folge uns auf %2! - - - Feel free to draw your own graves, hats, flags or even maps and themes! But note that you'll have to share them somewhere to use them online. - Tips - Du kannst gerne deine eigenen Grabsteine, Hüte, Flaggen oder sogar Karten und Themes erstellen! Aber vergiss nicht, dass du sie auch verteilen musst um sie online zu nutzen. - - - Really want to wear a specific hat? Donate to us and receive an exclusive hat of your choice! - Tips - Du willst einen besonderen Hut tragen? Spende etwas an uns und du kriegst einen exklusiven Hut deiner Wahl! - - - Keep your video card drivers up to date to avoid issues playing the game. - Tips - Halte deine Grafiktreiber aktuell um Probleme beim Spielen zu vermeiden. - - - You can find your Hedgewars configuration files under "My Documents\Hedgewars". Create backups or take the files with you, but don't edit them by hand. - Tips - Du findest deine Hedgewars Konfigurationsdateien unter "Eigene Dateien\Hedgewars". Erstelle Backups oder kopiere deine Dateien, aber editiere sie besser nicht selbst. - - - You're able to associate Hedgewars related files (savegames and demo recordings) with the game to launch them right from your favorite file or internet browser. - Tips - Du kannst Dateien wie Speicherstände oder Demos mit Hedgewars verknüpfen um sie so direkt mit deinem Datei- oder Internetbrowser zu öffnen. - - - Want to save ropes? Release the rope in mid air and then shoot again. As long as you don't touch the ground you'll reuse your rope without wasting ammo! - Tips - Du willst Seile sparen? Lass das Seil in der Luft los und schieß nochmal. Solange du nicht den Boden berührst kannst du es wiederverwenden ohne Munition zu verschwenden! - - - You can find your Hedgewars configuration files under "Library/Application Support/Hedgewars" in your home directory. Create backups or take the files with you, but don't edit them by hand. - Tips - Du findest die Hedgewars Konfigurationsdateien unter "Library/Application Support/Hedgewars" in deinem Home-Verzeichnis. Erstelle Backups oder kopiere deine Dateien, aber editiere sie besser nicht selbst. - - - You can find your Hedgewars configuration files under ".hedgewars" in your home directory. Create backups or take the files with you, but don't edit them by hand. - Tips - Du findest die Hedgewars Konfigurationsdateien unter ".hedgewars" in deinem Home-Verzeichnis. Erstelle Backups oder kopiere deine Dateien, aber editiere sie besser nicht selbst. - - - The Windows version of Hedgewars supports Xfire. Make sure to add Hedgewars to its game list so your friends can see you playing. - Tips - Die Windows version von Hedgewars unterstützt Xfire. Füge Hedgewars zu deiner Spieleliste hinzu damit deine Freunde dich spielen sehen können. - - - Use the Molotov or Flame Thrower to temporary keep hedgehogs from passing terrain such as tunnels or platforms. - Tips - Benutze den Molotov-Cocktail oder den Flammenwerfer um Igel vorübergehend am passieren von Gelände wie z.B. Tunnels oder Platformen zu hindern. - - - The Homing Bee can be tricky to use. Its turn radius depends on its velocity, so try to not use full power. - Tips - Die Verwendung der Zielsuchende Biene ist ein bisschen knifflig. Ihr Wenderadius hängt von der Geschwindigkeit ab, versuche sie also nicht mit voller Stärke wegzuschießen. - - Downloadable Content Herunterladbare Inhalte - Local Game - Lokales Spiel - - Play a game on a single computer Spiele auf einem einzelnen PC - Network Game - Netzwerkspiel - - Play a game across a network Spiele über ein Netwerk @@ -839,6 +855,14 @@ Edit game preferences Bearbeite Spieleinstellungen + + Play a game across a local area network + + + + Play a game on an official server + + PageMultiplayer @@ -846,6 +870,10 @@ Start Start + + Edit game preferences + Bearbeite Spieleinstellungen + PageNetGame @@ -854,31 +882,12 @@ Steuerung - DLC - DLC - - - Downloadable Content - Herunterladbare Inhalte - - - - PageNetType - - LAN game - Eigener Server (LAN oder Internet) - - - Official server - Offizieller Server - - - Join hundreds of players online! - Treffe hunderte Spieler online! - - - Join or host your own game server in a Local Area Network. - Erstelle einen eigenen Spiel-Server oder verbinde dich zu einem bestehenden Server im Netzwerk. + Edit game preferences + Bearbeite Spieleinstellungen + + + Start + Start @@ -924,10 +933,6 @@ Waffenprofil löschen - General - Allgemein - - Advanced Erweitert @@ -967,6 +972,94 @@ System proxy settings Betriebsystem Proxy-Einstellungen + + Select an action to change what key controls it + + + + Reset to default + + + + Reset all binds + + + + Game + + + + Graphics + + + + Audio + + + + Controls + + + + Video Recording + + + + Network + + + + Teams + Teams + + + Schemes + + + + Weapons + Waffen + + + Frontend + + + + Custom colors + Benutzerdefinierte Farben + + + Game audio + + + + Frontend audio + + + + Account + + + + Proxy settings + Proxy-Einstellungen + + + Miscellaneous + Verschiedenes + + + Updates + + + + Check for updates + + + + Video recording options + Videoaufnahmeoptionen + PagePlayDemo @@ -1166,18 +1259,10 @@ PageSinglePlayer - Simple Game - Einfaches Spiel - - Play a quick game against the computer with random settings Spiele ein schnelles Spiel gegen den Computer - mit Zufallseinstellungen - Multiplayer - Multiplayer - - Play a hotseat game against your friends, or AI teams Spiele gegen deine Freunde oder Computer-Teams. @@ -1186,26 +1271,14 @@ Kampagnenmodus - Training Mode - Trainingsmodus - - Practice your skills in a range of training missions Verbessere deine Fähigkeiten in verschiedenen Trainingsmissionen - Demos - Demos - - Watch recorded demos Sehe aufgenommene Demos an - Load - Laden - - Load a previously saved game Lade ein vormals gespeichtes Spiel @@ -1251,14 +1324,6 @@ (in Bearbeitung...) - Date: - Datum: - - - Size: - Größe: - - encoding encoden @@ -1266,6 +1331,16 @@ uploading hochladen + + Date: %1 + + + + + Size: %1 + + + QAction @@ -1274,10 +1349,6 @@ Rauswerfen - Start - Start - - Restrict Joins Zugang beschränken @@ -1325,10 +1396,6 @@ Vollbild - Enable sound - Klänge im Spiel - - Show FPS FPS anzeigen @@ -1337,14 +1404,6 @@ Alternativen Schaden anzeigen - Enable music - Musik im Spiel - - - Frontend fullscreen - Frontend im Vollbild - - Append date and time to record file name Datum und Uhrzeit an Aufnahmedatei anhängen @@ -1357,18 +1416,6 @@ Kurzinfos für Waffen anzeigen - Enable frontend sounds - Klänge im Frontend - - - Enable frontend music - Musik im Frontend - - - Frontend effects - Animationen im Frontend - - Save password Passwort speichern @@ -1388,14 +1435,38 @@ Use game resolution Spielauflösung verwenden + + Visual effects + + + + Sound + + + + In-game sound effects + + + + Music + + + + In-game music + + + + Frontend sound effects + + + + Frontend music + + QComboBox - generated map... - Zufallskarte... - - Human Mensch @@ -1408,14 +1479,6 @@ (Systemstandard) - Mission - Mission - - - generated maze... - Zufallslabyrinth... - - Community @@ -1432,10 +1495,6 @@ Im Spiel - hand drawn map... - Handgezeichnete Karte - - Disabled Deaktiviert @@ -1472,10 +1531,6 @@ Übereinander - Wiggle - Wackeln - - Red/Cyan grayscale Rot/Türkis Graustufen @@ -1507,22 +1562,10 @@ Teammitglieder - Key binds - Tastenkombinationen - - Fort Festung - Teams - Teams - - - Audio/Graphic options - Audio-/Grafik-Einstellungen - - Net game Netzwerkspiel @@ -1543,26 +1586,6 @@ Teameinstellungen - Misc - Verschiedenes - - - Schemes and Weapons - Spielprofile und Waffen - - - Custom colors - Benutzerdefinierte Farben - - - Miscellaneous - Verschiedenes - - - Video recording options - Videoaufnahmeoptionen - - Videos Videos @@ -1570,30 +1593,10 @@ Description Beschreibung - - Proxy settings - Proxy-Einstellungen - QLabel - Developers: - Entwickler: - - - Art: - Grafiken: - - - Translations: - Übersetzer: - - - Special thanks: - Besonderer Dank geht an: - - Weapons Waffen @@ -1626,10 +1629,6 @@ Version - Sounds: - Sounds: - - Initial sound volume Ausgangslautstärke @@ -1666,10 +1665,6 @@ Kistenabwurf - Game scheme - Spielprofil - - % Dud Mines % Blindgänger @@ -1706,10 +1701,6 @@ Tipp: - This development build is 'work in progress' and may not be compatible with other versions of the game. Some features might be broken or incomplete. Use at your own risk! - Dieser Entwicklungsbuild ist 'in Arbeit' und kann inkompatibel zu anderen Versionen des Spiels sein. Manche Funktionen könnten unbrauchbar oder unvollständig sein. Benutzung auf eigene Gefahr! - - Quality Qualität @@ -1786,10 +1777,6 @@ Tags (durch Beistriche getrennt) - Summary - Zusammenfassung - - Description Beschreibung @@ -1817,6 +1804,38 @@ Bitrate (Kbps) Bitrate (Kbps) + + This development build is 'work in progress' and may not be compatible with other versions of the game, while some features might be broken or incomplete! + + + + Fullscreen + Vollbild + + + Fullscreen Resolution + + + + Windowed Resolution + + + + Your Email + + + + Summary + + + + Send system information + + + + Type the security code: + + QLineEdit @@ -1855,10 +1874,6 @@ Dateizuordnung fehlgeschlagen. - Please fill out all fields - Bitte fülle alle Felder aus - - Error while authenticating at google.com: Fehler während Authentifizierung auf google.com: @@ -1907,18 +1922,6 @@ Alle Dateizuordnungen wurden gesetzt - Successfully posted the issue on hedgewars.googlecode.com - - - - Error during authentication at google.com - - - - Error reporting the issue, please try again later (or visit hedgewars.googlecode.com directly) - - - Main - Error Hedgewars - Fehler @@ -2069,16 +2072,37 @@ Do you really want to delete the weapon set '%1'? Willst du das Waffenprofil '%1' wirklich löschen? - - - QObject - - Nickname - Spitzname - - - Please enter your nickname - Bitte gib deinen Spitznamen ein + + Hedgewars - Nick not registered + + + + System Information Preview + + + + Failed to generate captcha + + + + Failed to download captcha + + + + Please fill out all fields. Email is optional. + + + + Hedgewars - Warning + + + + Hedgewars - Information + + + + Hedgewars + @@ -2136,26 +2160,10 @@ Laden - Setup - Einstellungen - - - Ready - Bereit - - - Random Team - Zufallsteam - - Associate file extensions Ordne Dateitypen zu - more - mehr - - More info Mehr Info @@ -2248,6 +2256,25 @@ + SeedPrompt + + The map seed is the basis for all random values generated by the game. + + + + Cancel + Abbrechen + + + Set seed + + + + Close + + + + SelWeaponWidget Weapon set @@ -2275,106 +2302,21 @@ - ToggleButtonWidget - - Vampirism - Vampirismus - - - Karma - Karma - - - Artillery - Artillerie - - - Fort Mode - Festungs-Modus - - - Divide Teams - Teams getrennt aufstellen - - - Solid Land - Unzerstörbares Terrain - - - Add Border - Randbegrenzung einfügen - - - Low Gravity - Verringerte Schwerkraft - - - Laser Sight - Laservisier - - - Invulnerable - Unverwundbarkeit - - - Random Order - Zufällige Reihenfolge - - - King - Schützt den König - - - Place Hedgehogs - Igel platzieren - - - Clan Shares Ammo - Gemeinsames Arsenal - - - Disable Girders - Keine Bauträger - - - Disable Land Objects - Deaktivere Landschaftsobjekte - - - AI Survival Mode - KI Überlebensmodus - - - Reset Health - Gesundheit zurücksetzen - - - Unlimited Attacks - Unbegrenzte Angriffe - - - Reset Weapons - Waffen zurücksetzen - - - Per Hedgehog Ammo - Waffen pro Igel - - - Disable Wind - Kein Wind - - - More Wind - Mehr Wind - - - Tag Team - Tag Team - - - Add Bottom Border - Untere Randbegrenzung hinzufügen + TeamShowWidget + + %1's team + + + + + ThemePrompt + + Select a theme for this map + + + + Cancel + Abbrechen @@ -2492,12 +2434,6 @@ Bildschirmfoto - hedgehogs -info - Igel -Statistik - - quit Beenden @@ -2549,33 +2485,33 @@ record aufnehmen + + hedgehog info + + binds (categories) - Basic controls - Grundsteuerung - - - Weapon controls - Waffensteuerung - - - Camera and cursor controls - Kamera- und Zeigersteuerung - - - Other - Andere + Movement + + + + Weapons + Waffen + + + Camera + + + + Miscellaneous + Verschiedenes binds (descriptions) - Move your hogs and aim: - Bewege und ziele mit deinen Igeln: - - Traverse gaps and obstacles by jumping: Überwinde Abgründe und Hindernisse mit Sprüngen: @@ -2639,6 +2575,10 @@ Record video: Video aufnehmen: + + Hedgehog movement + + binds (keys) diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Locale/hedgewars_el.ts --- a/share/hedgewars/Data/Locale/hedgewars_el.ts Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Locale/hedgewars_el.ts Fri Feb 22 05:05:32 2013 +0100 @@ -20,6 +20,79 @@ + BanDialog + + IP + IP + + + Nick + + + + IP/Nick + + + + Reason + + + + Duration + + + + Ok + + + + Cancel + Άκυρο + + + you know why + + + + Warning + + + + Please, specify %1 + + + + nickname + + + + permanent + + + + + DataManager + + Use Default + + + + + FeedbackDialog + + View + + + + Cancel + Άκυρο + + + Send Feedback + + + + FreqSpinBox Never @@ -40,27 +113,38 @@ Επεξεργασία όπλων - Error - Σφάλμα - - - Illegal ammo scheme - Ασύμβατος σχεδιασμός όπλων - - Edit schemes Επεξεργασία σχεδιασμών - When this option is enabled selecting a game scheme will auto-select a weapon (and viceversa) - Όταν αυτή η επιλογη είναι ενεργοποιημένη, επιλέγοντας ένα σχεδιασμό παιχνιδιού θα επιλέγεται αυτομάτως ένα όπλο (και αντιστρόφως) - - Game Options - When this option is enabled selecting a game scheme will auto-select a weapon + Game scheme will auto-select a weapon + + + + + HWApplication + + %1 minutes + + + + %1 hour + + + + %1 hours + + + + %1 day + + + + %1 days @@ -74,22 +158,6 @@ HWChatWidget - %1 *** %2 has been removed from your ignore list - %1 *** %2 αφαιρέθηκε από τη "μαύρη" λίστα - - - %1 *** %2 has been added to your ignore list - %1 *** %2 προστέθηκε στη "μαύρη" λίστα - - - %1 *** %2 has been removed from your friends list - %1 *** %2 αφαιρέθηκε από τη λίστα φίλων - - - %1 *** %2 has been added to your friends list - %1 *** %2 προστέθηκε στη λίστα φίλων - - %1 has been removed from your ignore list @@ -129,38 +197,14 @@ Failed to save StyleSheet to %1 - - %1 is not a valid command! - - HWForm - new - Νέο - - - Error - Σφάλμα - - - OK - Εντάξει - - - Unable to start the server - Δεν είναι δυνατόν να ξεκινήσει ο εξυπηρετητής - - Cannot save record to file %1 Δεν μπορεί να σωθεί η εγγραφή στο αρχείο %1 - Please select record from the list above - Παρακαλώ επέλεξε εγγραφή από την παραπάνω λίστα - - DefaultTeam Ομάδα εξ' ορισμού @@ -181,21 +225,6 @@ - Your nickname %1 is -registered on Hedgewars.org -Please provide your password below -or pick another nickname in game config: - Το ψευδώνυμο %1 είναι ήδη -καταχωρημένο στο Hedgewars.org -Παρακαλώ εισάγετε τον κωδικό σας -ή επιλέξτε άλλο ψευδώνυμο από τις -ρυθμίσεις του παιχνιδιού: - - - No password supplied. - - - Nickname Ψευδώνυμο @@ -216,14 +245,63 @@ Demo name: + + %1's Team + + + + Hedgewars - Nick registered + + + + This nick is registered, and you haven't specified a password. + +If this nick isn't yours, please register your own nick at www.hedgewars.org + +Password: + + + + Your nickname is not registered. +To prevent someone else from using it, +please register it at www.hedgewars.org + + + + + +Your password wasn't saved either. + + + + Hedgewars - Empty nickname + + + + Hedgewars - Wrong password + + + + You entered a wrong password. + + + + Try Again + + + + Hedgewars - Connection error + + + + You reconnected too fast. +Please wait a few seconds and try again. + + HWGame - el.txt - el.txt - - Cannot open demofile %1 Δεν μπορεί να φορτωθεί το αρχείο επιδείξεων %1 @@ -235,18 +313,6 @@ HWMapContainer - Map - Χάρτης - - - Themes - Θέματα - - - Filter - Φίλτρο - - All Όλα @@ -271,10 +337,6 @@ Εξωφρενικό - Type - Τύπος - - Small tunnels Μικρές σήραγγες @@ -283,27 +345,95 @@ Μέτριες σήραγγες - Large tunnels - Μεγάλες σήραγγες - - - Small floating islands - Μικρά επιπλέοντα νησιά - - - Medium floating islands - Μέτρια επιπλέοντα νησιά - - - Large floating islands - Μεγάλα επιπλέοντα νησιά - - Seed - Set + Map type: + + + + Image map + + + + Mission map + + + + Hand-drawn + + + + Randomly generated + + + + Random maze + + + + Random + Τυχαίο + + + Map preview: + + + + Load map drawing + + + + Edit map drawing + + + + Largetunnels + + + + Small islands + + + + Medium islands + + + + Large islands + + + + Map size: + + + + Maze style: + + + + Mission: + + + + Map: + + + + Theme: + + + + Load drawn map + + + + Drawn Maps + + + + All files @@ -345,20 +475,6 @@ Σε πέταξαν έξω - Password - Κωδικός - - - Your nickname %1 is -registered on Hedgewars.org -Please provide your password -or pick another nickname: - Your nickname %1 is -registered on Hedgewars.org -Please provide your password -or pick another nickname: - - %1 *** %2 has joined the room %1 *** %2 εισήλθε στο δωμάτιο @@ -375,17 +491,6 @@ %1 *** %2 εγκατέλειψε - Your nickname %1 is -registered on Hedgewars.org -Please provide your password below -or pick another nickname in game config: - Το ψευδώνυμο %1 είναι ήδη -καταχωρημένο στο Hedgewars.org -Παρακαλώ εισάγετε τον κωδικό σας -ή επιλέξτε άλλο ψευδώνυμο από τις -ρυθμίσεις του παιχνιδιού: - - User quit @@ -401,8 +506,8 @@ HWPasswordDialog - Password - Κωδικός + Login + @@ -417,6 +522,32 @@ + HatButton + + Change hat (%1) + + + + + HatPrompt + + Select a hat + + + + Filter: + + + + Cancel + Άκυρο + + + Use selected hat + + + + KB SDL_ttf returned error while rendering text, most propably it is related to the bug in freetype2. It's recommended to update your freetype lib. @@ -424,6 +555,13 @@ + KeyBinder + + Category + + + + LibavInteraction Duration: %1m %2s @@ -442,18 +580,21 @@ Audio: + + unknown + + + + + MapModel + + No description available. + + PageAdmin - Server message: - Server message: - - - Set message - Set message - - Clear Accounts Cache Καθαρισμός μνήμης λογαριασμών @@ -481,6 +622,38 @@ Set data Τοποθέτηση δεδομένων + + General + Γενικά + + + Bans + + + + IP/Nick + + + + Expiration + + + + Reason + + + + Refresh + Ανανέωση + + + Add + + + + Remove + + PageConnecting @@ -535,31 +708,45 @@ Γενικά - Advanced - Για προχωρημένους + Select an action to choose a custom key bind for this team + + + + Use my default + + + + Reset all binds + + + + Custom Controls + + + + Hat + Καπέλο + + + Name + Όνομα + + + This hedgehog's name + + + + Randomize this hedgehog's name + + + + Random Team + Τυχαία Ομάδα PageGameStats - <p>The best shot award was won by <b>%1</b> with <b>%2</b> pts.</p> - <p>The best shot award was won by <b>%1</b> with <b>%2</b> pts.</p> - - - <p>The best killer is <b>%1</b> with <b>%2</b> kills in a turn.</p> - - <p>The best killer is <b>%1</b> with <b>%2</b> kill in a turn.</p> - <p>The best killer is <b>%1</b> with <b>%2</b> kills in a turn.</p> - - - - <p>A total of <b>%1</b> hedgehog(s) were killed during this round.</p> - - <p>A total of <b>%1</b> hedgehog was killed during this round.</p> - <p>A total of <b>%1</b> hedgehogs were killed during this round.</p> - - - Details Λεπτομέρειες @@ -635,271 +822,10 @@ PageMain - Local Game (Play a game on a single computer) - Τοπικό Παιχνίδι (Παίξιμο παιχνιδιού σε ένα υπολογιστή) - - - Network Game (Play a game across a network) - Δικτυακό Παιχνίδι (Παίξιμο παιχνιδιού σε δίκτυο) - - - Simply pick the same color as a friend to play together as a team. Each of you will still control his or her own hedgehogs but they'll win or lose together. - Tips - Απλώς επιλέξτε το ίδιο χρώμα με το φίλο σας για να παίξετε μαζί σαν ομάδα. Ο καθένας από σας θα μπορεί ακόμα να ελέγχει τους δικούς του ή τους δικούς της σκατζόχοιρους, αλλά χάνετε ή κερδίζετε μαζί. - - - Some weapons might do only low damage but they can be a lot more devastating in the right situation. Try to use the Desert Eagle to knock multiple hedgehogs into the water. - Tips - Μερικά όπλα μπορεί να κάνουν μόνο λίγη ζημιά αλλά μπορεί να είναι πολύ πιο καταστρεπτικά στην κατάλληλη περίσταση. Δοκιμάστε να χρησιμοποιήσετε το Desert Eagle για να ρίξετε πολλαπλούς σκατζόχοιρους στο νερό. - - - If you're unsure what to do and don't want to waste ammo, skip one round. But don't let too much time pass as there will be Sudden Death! - Tips - Εαν δεν ξέρετε τι να κάνετε και δεν θέλετε να σπαταλήσετε πυρομαχικά, "πηδήξτε" ένα γύρο. Αλλά μην αφήσετε πολύ ώρα να περάσει διότι θα επέλθει Ξαφνικός Θάνατος! - - - If you'd like to keep others from using your preferred nickname on the official server, register an account at http://www.hedgewars.org/. - Tips - Εαν θα θέλατε να αποτρέψετε τρίτους από το να χρησιμοποιούν το ψευδώνυμό σας στον επίσημο εξυπηρετητή, φτιάξτε ένα λογαριασμό στην ιστοσελίδα : http://www.hedgewars.org/. - - - You're bored of default gameplay? Try one of the missions - they'll offer different gameplay depending on the one you picked. - Tips - Βαριέστε το παραδοσιακό παίξιμο; Δοκιμάστε μια από τις αποστολές! Θα σας προσφέρουν ένα διαφορετικό τρόπο παιχνιδιού, αναλόγως την αποστολή. - - - By default the game will always record the last game played as a demo. Select 'Local Game' and pick the 'Demos' button on the lower right corner to play or manage them. - Tips - Εξ'ορισμού το παιχνίδι πάντα θα καταγράφει την πιο πρόσφατη παρτίδα σαν επίδειξη. Επιλέξτε "Τοπικό Παιχνίδι" και κατόπιν επιλέξτε "Επιδείξεις" στην κάτω δεξιά γωνία για να τις αναπαράγετε ή να τις διαχειριστείτε. - - - Hedgewars is Open Source and Freeware we create in our spare time. If you've got problems, ask on our forums but please don't expect 24/7 support! - Tips - Το Hedgewars είναι λογισμικό Ανοικτού Κώδικα (Open Source) και Ελεύθερο Λογισμικό (Free Software) το οποίο δημιουργούμε στον ελεύθερο χρόνο μας. Άν έχετε προβλήματα ρωτήστε στο forum αλλά παρακαλώ μην περιμένετε υποστήριξη 24/7! - - - Hedgewars is Open Source and Freeware we create in our spare time. If you like it, help us with a small donation or contribute your own work! - Tips - Το Hedgewars είναι λογισμικό Ανοικτού Κώδικα (Open Source) και Ελεύθερο Λογισμικό (Free Software) το οποίο δημιουργούμε στον ελεύθερο χρόνο μας. Άν σας αρέσει βοηθήστε μας με μια μικρή δωρεά ή συνεισφέρετε την δική σας δουλειά! - - - Hedgewars is Open Source and Freeware we create in our spare time. Share it with your family and friends as you like! - Tips - Το Hedgewars είναι λογισμικό Ανοικτού Κώδικα (Open Source) και Ελεύθερο Λογισμικό (Free Software) το οποίο δημιουργούμε στον ελεύθερο χρόνο μας. Μοιραστείτε το με την οικογένειά σας και τους φίλους σας όπως εσείς επιθυμείτε! - - - From time to time there will be official tournaments. Upcoming events will be announced at http://www.hedgewars.org/ some days in advance. - Tips - Συχνά-πυκνά θα υπάρχουν επίσημα πρωταθλήματα. Τα επικείμενα γεγονότα θα ανακοινώνονται στην ιστοσελίδα : http://www.hedgewars.org/ μερικές ημέρες νωρίτερα. - - - Hedgewars is available in many languages. If the translation in your language seems to be missing or outdated, feel free to contact us! - Tips - Το Hedgewars είναι διαθέσιμο σε πολλές γλώσσες. Εάν η μετάφραση για τη γλώσσα σας μοιάζει απαρχαιωμένη ή λείπει, μην διστάσετε να επικοινωνίσετε μαζί μας! - - - Hedgewars can be run on lots of different operating systems including Microsoft Windows, Mac OS X and Linux. - Tips - Το Hedgewars μπορεί να τρέξει σε μια μεγάλη ποικιλία λειτουργικών συστημάτων εκ των οποίων συμπεριλαμβάνονται τα Microsoft Windows, Mac OS X και το GNU/Linux. - - - Always remember you're able to set up your own games in local and network/online play. You're not restricted to the 'Simple Game' option. - Tips - Μην ξεχνάτε ότι έχετε τη δυνατότητα να "στήσετε" τα δικά σας σενάρια παιχνιδιού σε τοπικό και δικτυακό/διαδικτυακό παιχνίδι. Δεν είστε περιορισμένοι στην επιλογή "Απλό Παιχνίδι". - - - While playing you should give yourself a short break at least once an hour. - Tips - Ενόσω παίζετε πρέπει να κάνετε τακτικά διαλείμματα, τουλάχιστον κάθε μία ώρα. - - - If your graphics card isn't able to provide hardware accelerated OpenGL, try to enable the low quality mode to improve performance. - Tips - Εαν η κάρτα γραφικών σας δεν μπορεί να παρέχει επιτάχυνση υλικού για το OpenGL (hardware accelerated OpenGL) προσπαθήστε να ενεργοποιήσετε την επιλογή χαμηλής ποιότητας έτσι ώστε να βελτιωθεί η απόδοση του παιχνιδιού. - - - We're open to suggestions and constructive feedback. If you don't like something or got a great idea, let us know! - Tips - Είμαστε ανοικτοί σε συμβουλές και εποικοδομητικό διάλογο. Εαν δεν σας αρέσει κάτι ή έχετε μια τρομερή ιδέα, τότε ενημερώστε μας! - - - Especially while playing online be polite and always remember there might be some minors playing with or against you as well! - Tips - Ειδικώς όταν παίζετε στο διαδίκτυο, να είστε ευγενικοί και να θυμάστε πάντα οτι μπορεί να παίζουν ανήλικοι, είτε μαζί σας ή εναντίον σας! - - - Special game modes such as 'Vampirism' or 'Karma' allow you to develop completely new tactics. Try them in a custom game! - Tips - Ειδικοί τρόποι παιχνιδιού όπως το "Βαμπιρισμός" ή το "Μοίρα" σας επιτρέπουν να αναπτύξετε εντελώς νέες τακτικές. Δοκιμάστε τους σε ένα προσαρμόσιμο παιχνίδι! - - - The Windows version of Hedgewars supports Xfire. Make sure to add Hedgwars to its game list so your friends can see you playing. - Tips - Η έκδοση Hedgewars για Windows υποστηρίζει Xfire. Σιγουρευτείτε οτι προσθέσατε το Hedgewars στη λίστα παιχνιδιών του, ώστε οι φίλοι σας να μπορούν να σας δουν όταν εσείς παίζετε. - - - You should never install Hedgewars on computers you don't own (school, university, work, etc.). Please ask the responsible person instead! - Tips - Δεν πρέπει ποτέ να εγκαταστήσετε το Hedgewars σε υπολογιστές που δεν σας ανήκουν (σχολείο, πανεπιστήμιο, εργασία, κ.λπ.). Αντ 'αυτού, ζητήστε το από τον υπεύθυνο! - - - Hedgewars can be perfect for short games during breaks. Just ensure you don't add too many hedgehogs or use an huge map. Reducing time and health might help as well. - Tips - Το Hedgewars είναι ιδανικό για σύντομα παιχνίδια κατά τη διάρκεια του διαλείμματος. Απλά βεβαιωθείτε ότι δεν προσθέσατε πολλούς σκαντζόχοιρους ή χρησιμοποιείτε ένα τεράστιο χάρτη. Μείωση του χρόνου και της υγείας μπορεί να βοηθήσει επίσης. - - - No hedgehogs were harmed in making this game. - Tips - Κανένας σκατζόχοιρος δεν βλάφτηκε στην δημιουργία αυτού του παιχνιδιού. - - - Hedgewars is Open Source and Freeware we create in our spare time. If someone sold you the game, you should try get a refund! - Tips - Το Hedgewars είναι λογισμικό Ανοικτού Κώδικα (Open Source) και Ελεύθερο Λογισμικό (Free Software) το οποίο δημιουργούμε στον ελεύθερο χρόνο μας. Εαν κάποιος σας πούλησε το παιχνίδι, πρέπει να διεκδικήσετε αποζημίωση! - - - Connect one or more gamepads before starting the game to be able to assign their controls to your teams. - Tips - Συνδέστε ένα ή περισσότερα gamepad πριν από την έναρξη του παιχνιδιού έτσι ώστε να είναι σε θέση να αναθέτει τους χειρισμούς του στις ομάδες σας. - - - Create an account on %1 to keep others from using your most favourite nickname while playing on the official server. - Tips - Δημιουργήστε έναν λογαριασμό στο %1 για να αποτρέψετε τους άλλους από το να χρησιμοποιούν το ψευδώνυμό σας ενόσω παίζετε στον επίσημο εξυπηρετητή. - - - If your graphics card isn't able to provide hardware accelerated OpenGL, try to update the associated drivers. - Tips - Εαν η κάρτα γραφικών σας δεν μπορεί να παρέχει επιτάχυνση υλικού για το OpenGL (hardware accelerated OpenGL) προσπαθήστε να αναβαθμίσετε τους αντίστοιχους οδηγούς υλικού. - - - There are three different jumps available. Tap [high jump] twice to do a very high/backwards jump. - Tips - Υπάρχουν τρία διαφορετικά άλματα διαθέσιμα. Άλμα εις μήκος, άλμα εις ύψος [με ένα πάτημα],πολύ υψηλό / οπίσθιο άλμα [με δύο πατήματα]. - - - Afraid of falling off a cliff? Hold down [precise] to turn [left] or [right] without actually moving. - Tips - Φοβάστε μήπως πέσετε στο γκρεμό; Κρατήστε πατημένο το πλήκτρο ακρίβειας [Left Shift] και έπειτα αριστερά ή δεξιά χωρίς να κινήστε στην πραγματικότητα. - - - Some weapons require special strategies or just lots of training, so don't give up on a particular tool if you miss an enemy once. - Tips - Ορισμένα όπλα απαιτούν ειδικές στρατηγικές ή απλώς πολύ εκπαίδευση, γι 'αυτό μην εγκαταλείπετε ένα συγκεκριμένο εργαλείο, εάν αστοχήσετε μια φορά σε έναν εχθρό. - - - Most weapons won't work once they touch the water. The Homing Bee as well as the Cake are exceptions to this. - Tips - Τα περισσότερα όπλα δεν λειτουργούν μόλις αγγίζουν το νερό. Η Αυτοκαθοδηγούμενη Μέλισσα καθώς και η Τούρτα αποτελούν εξαιρέσεις σε αυτό. - - - The Old Limbuger only causes a small explosion. However the wind affected smelly cloud can poison lots of hogs at once. - Tips - Η Χαλασμένη Φέτα προκαλεί μόνο μια μικρή έκρηξη. Ωστόσο, το δύσοσμο σύννεφο το οποίο επιρρεάζεται από τον άνεμο μπορεί να δηλητηριάσει πολλούς σκατζόχοιρους με τη μία. - - - The Piano Strike is the most damaging air strike. You'll lose the hedgehog performing it, so there's a huge downside as well. - Tips - Το Πιάνο είναι η πιο επιζήμια αεροπορική επίθεση. Θα χάσετε το σκαντζόχοιρο ο οποίος την εκτελεί, έτσι υπάρχει ένα τεράστιο μειονέκτημα επίσης. - - - The Homing Bee can be tricky to use. It's turn radius depends on it's velocity, so try to not use full power. - Tips - Η Αυτοκαθοδηγούμενη Μέλισσα μπορεί να είναι δύσκολη στη χρήση. Η ακτίνα καμπυλότητάς της εξαρτάται από την ταχύτητά της, επομένως προσπαθήστε να μην χρησιμοποιείτε την πλήρη ισχύ. - - - Sticky Mines are a perfect tool to create small chain reactions knocking enemy hedgehogs into dire situations ... or water. - Tips - Οι Αυτοκόλλητες Νάρκες είναι ένα τέλειο εργαλείο για να δημιουργηθούν μικρές αλυσιδωτές αντιδράσεις που βάζουν τους αντίπαλους σκαντζόχοιρους σε έντονες καταστάσεις ... ή στο νερό. - - - The Hammer is most effective when used on bridges or girders. Hit hogs will just break through the ground. - Tips - Το Σφυρί είναι πιο αποτελεσματικό όταν χρησιμοποιείται σε γέφυρες ή δοκούς. Οι σκατζόχοιροι απλώς θα "φυτευθούν" στο έδαφος. - - - If you're stuck behind an enemy hedgehog, use the Hammer to free yourself without getting damaged by an explosion. - Tips - Εάν είστε κολλημένοι πίσω από έναν εχθρικό σκαντζόχοιρο, χρησιμοποιήστε το Σφυρί για να ελευθερώσετε τον εαυτό σας χωρίς να πάθετε ζημιές από έκρηξη. - - - The Cake's maximum walking distance depends on the ground it has to pass. Use [attack] to detonate it early. - Tips - Η μέγιστη απόσταση που διανύει η Τούρτα εξαρτάται από το έδαφος το οποίο πρέπει να διαβεί. Χρησιμοποιήστε το κουμπί της επίθεσης για προκαλέσετε την έκρηξη νωρίτερα. - - - The Flame Thrower is a weapon but it can be used for tunnel digging as well. - Tips - Το φλογοβόλο είναι όπλο μεν, αλλά μπορεί να χρησιμοποιηθεί εξίσου καλά για σκάψιμο σήραγγας. - - - Use the Incinerating Grenade to temporary keep hedgehogs from passing terrain such as tunnels or platforms. - Tips - Χρησιμοποιήστε την Καυστική Χειροβομβίδα για να εμποδίσετε προσωρινώς τους σκατζόχοιρους από το να διασχίσουν έδαφος, όπως σήραγγες ή εξέδρες. - - - Want to know who's behind the game? Click on the Hedgewars logo in the main menu to see the credits. - Tips - Θέλετε να μάθετε ποιός είναι πίσω από το παιχνίδι; Πατήστε το λογότυπο Hedgewars στο κυρίως μενου για να δείτε τα credits. - - - Like Hedgewars? Become a fan on %1 or follow us on %2! - Tips - Σας αρέσει το Hedgewars; Γίνετε οπαδός στο %1 ή ακολουθήστε μας στο %2! - - - Feel free to draw your own graves, hats, flags or even maps and themes! But note that you'll have to share them somewhere to use them online. - Tips - Δημιουργήστε ελεύθερα τους δικούς σας τύμβους, τα καπέλα σας, σημαίες ή ακόμα χάρτες και θέματα! Σημειώστε όμως ότι θα πρέπει να τα μοιραστείτε κάπου για να τα χρησιμοποιήσετε σε διαδικτυακό παιχνίδι. - - - Really want to wear a specific hat? Donate to us and receive an exclusive hat of your choice! - Tips - Σας αρέσει πραγματικά να φοράτε ένα συγκεκριμένο καπέλο; Κάντε μια δωρεά σε μας και λάβετε ένα αποκλειστικό καπέλο της επιλογής σας! - - - Keep your video card drivers up to date to avoid issues playing the game. - Tips - Αναβαθμίστε τους οδηγούς της κάρτας γραφικών σας για να αποφύγετε τυχόν προβλήματα παίζοντας το παιχνίδι. - - - You can find your Hedgewars configuration files under "My Documents\Hedgewars". Create backups or take the files with you, but don't edit them by hand. - Tips - Μπορείτε να βρείτε τα αρχεία ρυθμίσεων του Hedgewars στο "My Documents\Hedgewars". Δημιουργήστε αντίγραφα ασφαλείας ή πάρτε τα αρχεία μαζί σας, αλλά μην τα επεξεργαστείτε χειροκίνητα. - - - You're able to associate Hedgewars related files (savegames and demo recordings) with the game to launch them right from your favorite file or internet browser. - Tips - Μπορείτε να αντιστοιχίσετε τα αντίστοιχα αρχεία του Hedgewars (σωσμένα παιχνίδια και εγγραφές επίδειξης) με το παιχνίδι, έτσι ώστε να τα τρέχετε απευθείας από τον αγαπημένο σας περιηγητή αρχείων ή διαδικτύου. - - - Want to save ropes? Release the rope in mid air and then shoot again. As long as you don't touch the ground you'll reuse your rope without wasting ammo! - Tips - Θέλετε να κάνετε οικονομία στα σχοινιά; Αφήστε το σχοινί ενώσο βρίσκεστε στον αέρα και στη συνέχεια πυροβολήστε ξανά. Όσο δεν αγγίζετε το έδαφος θα επαναχρησιμοποιείτε το σχοινί σας χωρίς σπατάλη πυρομαχικών! - - - You can find your Hedgewars configuration files under "Library/Application Support/Hedgewars" in your home directory. Create backups or take the files with you, but don't edit them by hand. - Tips - Μπορείτε να βρείτε τα αρχεία ρυθμίσεων του Hedgewars στο "Library/Application Support/Hedgewars" στον προσωπικό σας φάκελο. Δημιουργήστε αντίγραφα ασφαλείας ή πάρτε τα αρχεία μαζί σας, αλλά μην τα επεξεργαστείτε χειροκίνητα. - - - You can find your Hedgewars configuration files under ".hedgewars" in your home directory. Create backups or take the files with you, but don't edit them by hand. - Tips - Μπορείτε να βρείτε τα αρχεία ρυθμίσεων του Hedgewars στο ".hedgewars" στον προσωπικό σας φάκελο. Δημιουργήστε αντίγραφα ασφαλείας ή πάρτε τα αρχεία μαζί σας, αλλά μην τα επεξεργαστείτε χειροκίνητα. - - - Local Game - - - Play a game on a single computer - Network Game - - - Play a game across a network @@ -932,18 +858,11 @@ - The Windows version of Hedgewars supports Xfire. Make sure to add Hedgewars to its game list so your friends can see you playing. - Tips + Play a game across a local area network - The Homing Bee can be tricky to use. Its turn radius depends on its velocity, so try to not use full power. - Tips - - - - Use the Molotov or Flame Thrower to temporary keep hedgehogs from passing terrain such as tunnels or platforms. - Tips + Play a game on an official server @@ -953,16 +872,9 @@ Start Εκκίνηση - - - PageNet - - Error - Σφάλμα - - - Please select server from the list above - Παρακαλώ επιλέξτε εξυπηρετητή από την παρακάτω λίστα + + Edit game preferences + @@ -971,24 +883,13 @@ Control Έλεγχος - - - PageNetType - - LAN game - Παιχνίδι σε δίκτυο (LAN) - - - Official server - Επίσημος εξυπηρετητής - - - Join or host your own game server in a Local Area Network. + + Edit game preferences - Join hundreds of players online! - + Start + Εκκίνηση @@ -1006,26 +907,10 @@ Διαγραφή ομάδας - New weapon scheme - Νέος σχεδιασμός όπλων - - - Edit weapon scheme - Επεξεργασία σχεδιασμού όπλων - - - Delete weapon scheme - Διαγραφή σχεδιασμού όπλων - - You can't edit teams from team selection. Go back to main menu to add, edit or delete teams. Δεν μπορείτε να επεξεργαστείτε τις ομάδες από την επιλογή ομάδων. Πηγαίνετε πίσω στην κύρια σελίδα για να προσθέσετε, να επεξεργαστείτε ή να διαγράψετε ομάδες. - General - Γενικά - - Advanced Για προχωρημένους @@ -1089,18 +974,98 @@ HTTP proxy + + Select an action to change what key controls it + + + + Reset to default + + + + Reset all binds + + + + Game + + + + Graphics + + + + Audio + + + + Controls + + + + Video Recording + + + + Network + Δίκτυο + + + Teams + Ομάδες + + + Schemes + + + + Weapons + Όπλα + + + Frontend + + + + Custom colors + + + + Game audio + + + + Frontend audio + + + + Account + + + + Proxy settings + + + + Miscellaneous + + + + Updates + + + + Check for updates + + + + Video recording options + + PagePlayDemo - Error - Σφάλμα - - - OK - Εντάξει - - Rename dialog Μετονομασία διαλόγου @@ -1108,18 +1073,6 @@ Enter new file name: Εισάγετε το όνομα του νέου αρχείου : - - Cannot rename to - Δεν μπορεί να γίνει μετονομασία σε - - - Cannot delete file - Δεν μπορεί να διαγραφεί το αρχείο - - - Please select record from the list - Παρακαλώ επιλέξτε εγγραφή από την λίστα - PageRoomsList @@ -1132,18 +1085,6 @@ Σύνδεση - Refresh - Ανανέωση - - - Error - Σφάλμα - - - OK - Εντάξει - - Admin features Χαρακτηριστικά διαχειριστή @@ -1152,68 +1093,6 @@ Όνομα δωματίου : - This game is in lobby. -You may join and start playing once the game starts. - Αυτό το παιχνίδι είναι σε αναμονή. -Μπορείτε να συνδεθείτε και να παίξετε μόλις το παιχνίδι ξεκινήσει. - - - This game is in progress. -You may join and spectate now but you'll have to wait for the game to end to start playing. - Αυτό το παιχνίδι είναι σε εξέλιξη. -Μπορείτε να συνδεθείτε και να παρακολουθείτε την εξέλιξη αλλά θα πρέπει να περιμένετε να τελειώσει το παιχνίδι για να ξεκινήσετε να παίζετε. - - - %1 is the host. He may adjust settings and start the game. - %1 είναι ο οικοδεσπότης. Μπορεί να προσαρμόζει τις ρυθμίσεις και να ξεκινά το παιχνίδι. - - - Random Map - Τυχαίος χάρτης - - - Games may be played on precreated or randomized maps. - Τα παιχνίδια μπορούν να παίζονται σε προκατασκευασμένους ή τυχαιοποιημένους χάρτες. - - - The Game Scheme defines general options and preferences like Round Time, Sudden Death or Vampirism. - Ο σχεδιασμός του παιχνιδιού καθορίζει τις γενικές επιλογές και τις προτιμήσεις όπως τον Χρόνο του Γύρου, τον Ξαφνικό Θάνατο ή τον Βαμπιρισμό. - - - The Weapon Scheme defines available weapons and their ammunition count. - Ο Σχεδιασμός των Όπλων καθορίζει τα διαθέσιμα όπλα και το ποσό των πυρομαχικών. - - - There are %1 clients connected to this room. - - Υπάρχει %1 χρήστης συνδεδεμένος σε αυτό το δωμάτιο. - Υπάρχουν %1 χρήστες συνδεδεμένοι σε αυτό το δωμάτιο. - - - - There are %1 teams participating in this room. - - %1 ομάδα συμμετέχει σε αυτό το δωμάτιο. - %1 ομάδες συμμετέχουν σε αυτό το δωμάτιο. - - - - Please enter room name - Εισάγετε το όνομα του δωματίου - - - Please select room from the list - Παρακαλώ επιλέξτε δωμάτιο από τη λίστα - - - Random Maze - Τυχαίος Λαβύρινθος - - - State: - Κατάσταση : - - Rules: Κανόνες : @@ -1229,16 +1108,6 @@ Clear Καθαρισμός - - Warning - Προσοχή - - - The game you are trying to join has started. -Do you still want to join the room? - Το παιχνίδι στο οποίο προσπαθείτε να συνδεθείτε έχει ήδη ξεκινήσει. -Θέλετε ακόμα να συνδεθείτε με το δωμάτιο; - %1 players online @@ -1262,10 +1131,6 @@ Το έδαφος δεν μπορεί να καταστραφεί! - Add an indestructable border around the terrain - Προσθήκη ενός άφθαρτου συνόρου γύρω από την πίστα - - Lower gravity Μικροβαρύτητα @@ -1278,10 +1143,6 @@ Όλοιοι σκατζόχοιροι έχουν ατομικό πεδίο δυνάμεων - Enable random mines - Enable random mines - - Gain 80% of the damage you do back in health Κερδίστε το 80% της ζημιάς που προκαλείτε σε υγεία @@ -1400,42 +1261,10 @@ PageSinglePlayer - Simple Game (a quick game against the computer, settings are chosen for you) - Απλό Παιχνίδι (ένα γρήγορο παιχνίδι εναντίον του υπολογιστή, οι ρυθμίσεις είναι προεπιλεγμένεs) - - - Multiplayer (play a hotseat game against your friends, or AI teams) - Πολλοί Παίχτες (ένα παιχνίδι εναντίον των φίλων σας ή του υπολογιστή) - - - Training Mode (Practice your skills in a range of training missions). IN DEVELOPMENT - Εξάσκηση (Εξασκήστε τις δεξιότητές σας σε ένα εύρος εκπαιδευτικών αποστολών). ΣΕ ΕΞΕΛΙΞΗ - - - Demos (Watch recorded demos) - Επιδείξεις (Παρακολουθήστε καταγεγραμμένες επιδείξεις) - - - Load (Load a previously saved game) - Φόρτωση Σωσμένου Παιχνιδιού (Φορτώστε ένα σωσμένο παιχνίδι) - - - Campaign Mode (...). IN DEVELOPMENT - Εκστρατεία ΣΕ ΕΞΕΛΙΞΗ - - - Simple Game - - - Play a quick game against the computer with random settings - Multiplayer - - - Play a hotseat game against your friends, or AI teams @@ -1444,26 +1273,14 @@ - Training Mode - - - Practice your skills in a range of training missions - Demos - - - Watch recorded demos - Load - Φόρτωση - - Load a previously saved game @@ -1509,14 +1326,6 @@ - Date: - - - - Size: - - - encoding @@ -1524,6 +1333,16 @@ uploading + + Date: %1 + + + + + Size: %1 + + + QAction @@ -1536,10 +1355,6 @@ Πληροφορίες - Start - Έναρξη - - Restrict Joins Περιορισμός συνδέσεων @@ -1587,18 +1402,6 @@ Πλήρης οθόνη - Frontend fullscreen - Διεπαφή σε πλήρη οθόνη - - - Enable sound - Ενεργοποίηση ήχου - - - Enable music - Ενεργοποίηση μουσικής - - Show FPS Προβολή FPS @@ -1611,26 +1414,10 @@ Προσάρτηση ημερομηνίας και ώρας στην εγγραφή του ονόματος αρχείου - Reduced quality - Reduced quality - - Show ammo menu tooltips Προβολή συμβουλών στον κατάλογο των πυρομαχικών - Enable frontend sounds - Ενεργοποίηση ήχων διεπαφής - - - Enable frontend music - Ενεργοποίηση μουσικής διεπαφής - - - Frontend effects - Ενεργοποίηση εφε διεπαφής - - Save password @@ -1650,14 +1437,38 @@ Use game resolution + + Visual effects + + + + Sound + + + + In-game sound effects + + + + Music + + + + In-game music + + + + Frontend sound effects + + + + Frontend music + + QComboBox - generated map... - Δημιουργημένος χάρτης... - - Human Άνθρωπος @@ -1670,14 +1481,6 @@ (Εξ'ορισμού συστήματος) - Mission - Αποστολή - - - generated maze... - Δημιουργημένος λαβύρινθος... - - Community Κοινότητα @@ -1694,14 +1497,6 @@ Σε εξέλιξη - Default - Default - - - hand drawn map... - - - Disabled @@ -1738,10 +1533,6 @@ - Wiggle - - - Red/Cyan grayscale @@ -1777,22 +1568,6 @@ Φρούριο - Key binds - Δεσμεύσεις κουμπιών - - - Teams - Ομάδες - - - Weapons - Όπλα - - - Audio/Graphic options - Επιλογές Ήχου/Γραφικών - - Net game Δικτυακό παιχνίδι @@ -1813,30 +1588,6 @@ Ρυθμίσεις ομάδας - Misc - Διάφορα - - - Schemes and Weapons - - - - Custom colors - - - - Miscellaneous - - - - Proxy settings - - - - Video recording options - - - Videos @@ -1860,30 +1611,6 @@ Έκδοση - This program is distributed under the GNU General Public License - Το πρόγραμμα αυτό διανέμεται κάτω από την GNU General Public License - - - Developers: - Προγραμματιστές : - - - Art: - Γραφικά: - - - Sounds: - Ήχοι: - - - Translations: - Μεταγλωττίσεις: - - - Special thanks: - Ειδικές ευχαριστίες: - - Weapons Όπλα @@ -1896,10 +1623,6 @@ Θύρα : - Net nick - Ψευδώνυμο - - Resolution Ανάλυση @@ -1944,10 +1667,6 @@ Ρίψεις κιβωτίων - Game scheme - Σχεδιασμός Παιχνιδιού - - % Dud Mines % Τζούφιες Νάρκες @@ -1976,10 +1695,6 @@ Γλώσσα - Restart game to apply - Επανεκκινήστε το παιχνίδι για εφαρμογή των αλλαγών - - Explosives Εκρηκτικά @@ -1988,10 +1703,6 @@ Συμβουλή : - This development build is 'work in progress' and may not be compatible with other versions of the game. Some features might be broken or incomplete. Use at your own risk! - Αυτή η διανομή είναι «έργο σε εξέλιξη» και μπορεί να μην είναι συμβατή με άλλες εκδόσεις του παιχνιδιού. Ορισμένες λειτουργίες μπορεί να μη δουλεύουν ή να είναι ελλιπείς. Χρησιμοποιήστε την με δική σας ευθύνη! - - Quality Ποιότητα @@ -2012,10 +1723,6 @@ Μείωση Υγείας στον Ξαφνικό Θάνατο - Bind schemes and weapons - Σύζευξη σχεδιασμών και όπλων - - There are videos that are currently being processed. Exiting now will abort them. Do you really want to quit? @@ -2046,10 +1753,6 @@ - Summary - - - Description @@ -2101,6 +1804,38 @@ Scheme + + This development build is 'work in progress' and may not be compatible with other versions of the game, while some features might be broken or incomplete! + + + + Fullscreen + Πλήρης οθόνη + + + Fullscreen Resolution + + + + Windowed Resolution + + + + Your Email + + + + Summary + + + + Send system information + + + + Type the security code: + + QLineEdit @@ -2127,10 +1862,6 @@ QMessageBox - Network - Δίκτυο - - Connection to server is lost Η σύνδεση με τον εξυπηρετητή διακόπηκε @@ -2139,38 +1870,6 @@ Σφάλμα - Failed to open data directory: -%1 -Please check your installation - Αποτυχία ανοίγματος φακέλου δεδομένων : - %1 -Παρακαλώ ελέγξτε την εγκατάστασή σας - - - Weapons - Όπλα - - - Can not edit default weapon set - Can not edit default weapon set - - - Can not delete default weapon set - Δεν μπορεί να διαγραφεί η βασική σειρά όπλων - - - Really delete this weapon set? - Σίγουρα να διαγραφεί αυτή η σειρά όπλων ; - - - Can not overwrite default weapon set '%1'! - Δεν μπορεί να αντικατασταθεί η βασική σειρά όπλων '%1'! - - - All file associations have been set. - Όλες οι αντιστοιχίσεις αρχείων έχουν τεθεί. - - File association failed. Η αντιστοίχιση του αρχείου απέτυχε. @@ -2207,22 +1906,6 @@ - Please fill out all fields - - - - Successfully posted the issue on hedgewars.googlecode.com - - - - Error during authentication at google.com - - - - Error reporting the issue, please try again later (or visit hedgewars.googlecode.com directly) - - - Main - Error @@ -2384,28 +2067,37 @@ Do you really want to delete the weapon set '%1'? - - - QObject - - Error - Σφάλμα - - - Cannot create directory %1 - Δεν μπορεί να δημιουργηθεί ο κατάλογος %1 - - - OK - Εντάξει - - - Nickname - Ψευδώνυμο - - - Please enter your nickname - Παρακαλώ εισάγετε το ψευδώνυμό σας + + Hedgewars - Nick not registered + + + + System Information Preview + + + + Failed to generate captcha + + + + Failed to download captcha + + + + Please fill out all fields. Email is optional. + + + + Hedgewars - Warning + + + + Hedgewars - Information + + + + Hedgewars + @@ -2463,18 +2155,6 @@ Φόρτωση - Setup - Ρύθμιση - - - Ready - Έτοιμο - - - Random Team - Τυχαία Ομάδα - - Associate file extensions Αντιστοίχηση επεκτάσεων αρχείων @@ -2522,41 +2202,6 @@ Cancel uploading - - more - - - - - QTableWidget - - Room Name - Όνομα Δωματίου - - - C - C - - - T - T - - - Owner - Ιδιοκτήτης - - - Map - Χάρτης - - - Rules - Κανόνες - - - Weapons - Όπλα - RoomsListModel @@ -2606,6 +2251,25 @@ + SeedPrompt + + The map seed is the basis for all random values generated by the game. + + + + Cancel + Άκυρο + + + Set seed + + + + Close + + + + SelWeaponWidget Weapon set @@ -2633,125 +2297,21 @@ - TCPBase - - Error - Σφάλμα - - - Unable to start the server: %1. - Δεν είναι δυνατόν να ξεκινήσει ο εξυπηρετητής : %1. - - - Unable to run engine: %1 ( - Δεν είναι δυνατόν να τρέξει η μηχανή : %1 ( + TeamShowWidget + + %1's team + - ToggleButtonWidget - - Vampirism - Βαμπιρισμός - - - Karma - Μοίρα - - - Artillery - Πυροβολικό - - - Fort Mode - Λειτουργία Φρούριου - - - Divide Teams - Διαίρεση Ομάδων - - - Solid Land - Στερεό Έδαφος - - - Add Border - Προσθήκη Συνόρου - - - Low Gravity - Μικροβαρύτητα - - - Laser Sight - Διόπτρα Laser - - - Invulnerable - Άτρωτος - - - Add Mines - Add Mines - - - Random Order - Τυχαία Σειρά - - - King - Βασιλέας - - - Place Hedgehogs - Τοποθέτηση σκατζόχοιρων - - - Clan Shares Ammo - Η συμμορία μοιράζεται τα πυρομαχικά - - - Disable Girders - Απενεργοποίηση δοκών - - - Disable Land Objects - Απενεργοποίηση Αντικειμένων Εδάφους - - - AI Survival Mode - Λειτουργία Επιβίωσης για τον υπολογιστή - - - Reset Health - Επαναφορά Υγείας - - - Unlimited Attacks - Απεριόριστες Επιθέσεις - - - Reset Weapons - Επαναφορά Όπλων - - - Per Hedgehog Ammo - Πυρομαχικά ανά σκατζόχοιρο - - - Disable Wind + ThemePrompt + + Select a theme for this map - More Wind - - - - Tag Team - - - - Add Bottom Border - + Cancel + Άκυρο @@ -2885,12 +2445,6 @@ αιχμαλώτιση - hedgehogs -info - πληροφορίες -σκατζόχοιρου - - quit έξοδος @@ -2926,33 +2480,33 @@ record + + hedgehog info + + binds (categories) - Basic controls - Βασικές Ρυθμίσεις - - - Weapon controls - Ρυθμίσεις Όπλων - - - Camera and cursor controls - Ρυθμίσεις κάμερας και δείκτη ποντικιού - - - Other - Διάφορα + Movement + + + + Weapons + Όπλα + + + Camera + + + + Miscellaneous + binds (descriptions) - Move your hogs and aim: - Μετακινήστε τους σκατζόχοιρούς σας και σημαδέψτε : - - Traverse gaps and obstacles by jumping: Διασχίστε κενά και εμπόδια πηδώντας : @@ -3016,6 +2570,10 @@ Record video: + + Hedgehog movement + + binds (keys) diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Locale/hedgewars_en.ts --- a/share/hedgewars/Data/Locale/hedgewars_en.ts Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Locale/hedgewars_en.ts Fri Feb 22 05:05:32 2013 +0100 @@ -20,6 +20,79 @@ + BanDialog + + IP + IP + + + Nick + + + + IP/Nick + + + + Reason + + + + Duration + + + + Ok + + + + Cancel + Cancel + + + you know why + + + + Warning + + + + Please, specify %1 + + + + nickname + + + + permanent + + + + + DataManager + + Use Default + + + + + FeedbackDialog + + View + + + + Cancel + Cancel + + + Send Feedback + + + + FreqSpinBox Never @@ -44,13 +117,36 @@ Edit schemes - When this option is enabled selecting a game scheme will auto-select a weapon - - - Game Options + + Game scheme will auto-select a weapon + + + + + HWApplication + + %1 minutes + + + + %1 hour + + + + %1 hours + + + + %1 day + + + + %1 days + + HWAskQuitDialog @@ -101,10 +197,6 @@ Failed to save StyleSheet to %1 - - %1 is not a valid command! - - HWForm @@ -139,20 +231,6 @@ - Your nickname %1 is -registered on Hedgewars.org -Please provide your password below -or pick another nickname in game config: - Your nickname %1 is -registered on Hedgewars.org -Please provide your password below -or pick another nickname in game config: - - - No password supplied. - - - Nickname Nickname @@ -165,6 +243,59 @@ Please pick another nickname: + + %1's Team + + + + Hedgewars - Nick registered + + + + This nick is registered, and you haven't specified a password. + +If this nick isn't yours, please register your own nick at www.hedgewars.org + +Password: + + + + Your nickname is not registered. +To prevent someone else from using it, +please register it at www.hedgewars.org + + + + + +Your password wasn't saved either. + + + + Hedgewars - Empty nickname + + + + Hedgewars - Wrong password + + + + You entered a wrong password. + + + + Try Again + + + + Hedgewars - Connection error + + + + You reconnected too fast. +Please wait a few seconds and try again. + + HWGame @@ -180,18 +311,6 @@ HWMapContainer - Map - Map - - - Themes - Themes - - - Filter - Filter - - All All @@ -216,10 +335,6 @@ Wacky - Type - Type - - Small tunnels @@ -228,27 +343,95 @@ - Large tunnels - - - - Small floating islands - - - - Medium floating islands - - - - Large floating islands - - - Seed - Set + Map type: + + + + Image map + + + + Mission map + + + + Hand-drawn + + + + Randomly generated + + + + Random maze + + + + Random + Random + + + Map preview: + + + + Load map drawing + + + + Edit map drawing + + + + Largetunnels + + + + Small islands + + + + Medium islands + + + + Large islands + + + + Map size: + + + + Maze style: + + + + Mission: + + + + Map: + + + + Theme: + + + + Load drawn map + + + + Drawn Maps + + + + All files @@ -321,8 +504,8 @@ HWPasswordDialog - Password - Password + Login + @@ -337,6 +520,32 @@ + HatButton + + Change hat (%1) + + + + + HatPrompt + + Select a hat + + + + Filter: + + + + Cancel + Cancel + + + Use selected hat + + + + KB SDL_ttf returned error while rendering text, most propably it is related to the bug in freetype2. It's recommended to update your freetype lib. @@ -344,6 +553,13 @@ + KeyBinder + + Category + + + + LibavInteraction Duration: %1m %2s @@ -362,6 +578,17 @@ Audio: + + unknown + + + + + MapModel + + No description available. + + PageAdmin @@ -393,6 +620,38 @@ Set data + + General + General + + + Bans + + + + IP/Nick + + + + Expiration + + + + Reason + + + + Refresh + + + + Add + + + + Remove + + PageConnecting @@ -447,8 +706,40 @@ General - Advanced - Advanced + Select an action to choose a custom key bind for this team + + + + Use my default + + + + Reset all binds + + + + Custom Controls + + + + Hat + + + + Name + Name + + + This hedgehog's name + + + + Randomize this hedgehog's name + + + + Random Team + Random Team @@ -529,267 +820,14 @@ PageMain - Simply pick the same color as a friend to play together as a team. Each of you will still control his or her own hedgehogs but they'll win or lose together. - Tips - - - - Some weapons might do only low damage but they can be a lot more devastating in the right situation. Try to use the Desert Eagle to knock multiple hedgehogs into the water. - Tips - - - - If you're unsure what to do and don't want to waste ammo, skip one round. But don't let too much time pass as there will be Sudden Death! - Tips - - - - If you'd like to keep others from using your preferred nickname on the official server, register an account at http://www.hedgewars.org/. - Tips - - - - You're bored of default gameplay? Try one of the missions - they'll offer different gameplay depending on the one you picked. - Tips - - - - By default the game will always record the last game played as a demo. Select 'Local Game' and pick the 'Demos' button on the lower right corner to play or manage them. - Tips - - - - Hedgewars is Open Source and Freeware we create in our spare time. If you've got problems, ask on our forums but please don't expect 24/7 support! - Tips - - - - Hedgewars is Open Source and Freeware we create in our spare time. If you like it, help us with a small donation or contribute your own work! - Tips - - - - Hedgewars is Open Source and Freeware we create in our spare time. Share it with your family and friends as you like! - Tips - - - - From time to time there will be official tournaments. Upcoming events will be announced at http://www.hedgewars.org/ some days in advance. - Tips - - - - Hedgewars is available in many languages. If the translation in your language seems to be missing or outdated, feel free to contact us! - Tips - - - - Hedgewars can be run on lots of different operating systems including Microsoft Windows, Mac OS X and Linux. - Tips - - - - Always remember you're able to set up your own games in local and network/online play. You're not restricted to the 'Simple Game' option. - Tips - - - - While playing you should give yourself a short break at least once an hour. - Tips - - - - If your graphics card isn't able to provide hardware accelerated OpenGL, try to enable the low quality mode to improve performance. - Tips - - - - We're open to suggestions and constructive feedback. If you don't like something or got a great idea, let us know! - Tips - - - - Especially while playing online be polite and always remember there might be some minors playing with or against you as well! - Tips - - - - Special game modes such as 'Vampirism' or 'Karma' allow you to develop completely new tactics. Try them in a custom game! - Tips - - - - You should never install Hedgewars on computers you don't own (school, university, work, etc.). Please ask the responsible person instead! - Tips - - - - Hedgewars can be perfect for short games during breaks. Just ensure you don't add too many hedgehogs or use an huge map. Reducing time and health might help as well. - Tips - - - - No hedgehogs were harmed in making this game. - Tips - - - - Hedgewars is Open Source and Freeware we create in our spare time. If someone sold you the game, you should try get a refund! - Tips - - - - Connect one or more gamepads before starting the game to be able to assign their controls to your teams. - Tips - - - - Create an account on %1 to keep others from using your most favourite nickname while playing on the official server. - Tips - - - - If your graphics card isn't able to provide hardware accelerated OpenGL, try to update the associated drivers. - Tips - - - - There are three different jumps available. Tap [high jump] twice to do a very high/backwards jump. - Tips - - - - Afraid of falling off a cliff? Hold down [precise] to turn [left] or [right] without actually moving. - Tips - - - - Some weapons require special strategies or just lots of training, so don't give up on a particular tool if you miss an enemy once. - Tips - - - - Most weapons won't work once they touch the water. The Homing Bee as well as the Cake are exceptions to this. - Tips - - - - The Old Limbuger only causes a small explosion. However the wind affected smelly cloud can poison lots of hogs at once. - Tips - - - - The Piano Strike is the most damaging air strike. You'll lose the hedgehog performing it, so there's a huge downside as well. - Tips - - - - Sticky Mines are a perfect tool to create small chain reactions knocking enemy hedgehogs into dire situations ... or water. - Tips - - - - The Hammer is most effective when used on bridges or girders. Hit hogs will just break through the ground. - Tips - - - - If you're stuck behind an enemy hedgehog, use the Hammer to free yourself without getting damaged by an explosion. - Tips - - - - The Cake's maximum walking distance depends on the ground it has to pass. Use [attack] to detonate it early. - Tips - - - - The Flame Thrower is a weapon but it can be used for tunnel digging as well. - Tips - - - - Want to know who's behind the game? Click on the Hedgewars logo in the main menu to see the credits. - Tips - - - - Like Hedgewars? Become a fan on %1 or follow us on %2! - Tips - - - - Feel free to draw your own graves, hats, flags or even maps and themes! But note that you'll have to share them somewhere to use them online. - Tips - - - - Really want to wear a specific hat? Donate to us and receive an exclusive hat of your choice! - Tips - - - - Keep your video card drivers up to date to avoid issues playing the game. - Tips - - - - You can find your Hedgewars configuration files under "My Documents\Hedgewars". Create backups or take the files with you, but don't edit them by hand. - Tips - - - - You're able to associate Hedgewars related files (savegames and demo recordings) with the game to launch them right from your favorite file or internet browser. - Tips - - - - Want to save ropes? Release the rope in mid air and then shoot again. As long as you don't touch the ground you'll reuse your rope without wasting ammo! - Tips - - - - You can find your Hedgewars configuration files under "Library/Application Support/Hedgewars" in your home directory. Create backups or take the files with you, but don't edit them by hand. - Tips - - - - You can find your Hedgewars configuration files under ".hedgewars" in your home directory. Create backups or take the files with you, but don't edit them by hand. - Tips - - - - The Windows version of Hedgewars supports Xfire. Make sure to add Hedgewars to its game list so your friends can see you playing. - Tips - - - - Use the Molotov or Flame Thrower to temporary keep hedgehogs from passing terrain such as tunnels or platforms. - Tips - - - - The Homing Bee can be tricky to use. Its turn radius depends on its velocity, so try to not use full power. - Tips - - - Downloadable Content - Local Game - - - Play a game on a single computer - Network Game - - - Play a game across a network @@ -817,6 +855,14 @@ Edit game preferences + + Play a game across a local area network + + + + Play a game on an official server + + PageMultiplayer @@ -824,6 +870,10 @@ Start Start + + Edit game preferences + + PageNetGame @@ -831,24 +881,13 @@ Control Control - - - PageNetType - - LAN game - LAN game - - - Official server - Official server - - - Join hundreds of players online! - - - - Join or host your own game server in a Local Area Network. - + + Edit game preferences + + + + Start + Start @@ -894,10 +933,6 @@ - General - General - - Advanced Advanced @@ -937,6 +972,94 @@ System proxy settings + + Select an action to change what key controls it + + + + Reset to default + + + + Reset all binds + + + + Game + + + + Graphics + + + + Audio + + + + Controls + + + + Video Recording + + + + Network + + + + Teams + Teams + + + Schemes + + + + Weapons + Weapons + + + Frontend + + + + Custom colors + + + + Game audio + + + + Frontend audio + + + + Account + + + + Proxy settings + + + + Miscellaneous + + + + Updates + + + + Check for updates + + + + Video recording options + + PagePlayDemo @@ -1136,18 +1259,10 @@ PageSinglePlayer - Simple Game - - - Play a quick game against the computer with random settings - Multiplayer - - - Play a hotseat game against your friends, or AI teams @@ -1156,26 +1271,14 @@ - Training Mode - - - Practice your skills in a range of training missions - Demos - - - Watch recorded demos - Load - Load - - Load a previously saved game @@ -1221,14 +1324,6 @@ - Date: - - - - Size: - - - encoding @@ -1236,6 +1331,16 @@ uploading + + Date: %1 + + + + + Size: %1 + + + QAction @@ -1248,10 +1353,6 @@ Info - Start - Start - - Restrict Joins Restrict Joins @@ -1299,18 +1400,6 @@ Fullscreen - Frontend fullscreen - Frontend fullscreen - - - Enable sound - Enable sound - - - Enable music - Enable music - - Show FPS Show FPS @@ -1327,18 +1416,6 @@ Show ammo menu tooltips - Enable frontend sounds - Enable frontend sounds - - - Enable frontend music - Enable frontend music - - - Frontend effects - Frontend effects - - Save password @@ -1358,14 +1435,38 @@ Use game resolution + + Visual effects + + + + Sound + + + + In-game sound effects + + + + Music + + + + In-game music + + + + Frontend sound effects + + + + Frontend music + + QComboBox - generated map... - generated map... - - Human Human @@ -1378,14 +1479,6 @@ (System default) - Mission - Mission - - - generated maze... - - - Community @@ -1402,10 +1495,6 @@ - hand drawn map... - - - Disabled @@ -1442,10 +1531,6 @@ - Wiggle - - - Red/Cyan grayscale @@ -1481,18 +1566,6 @@ Fort - Key binds - Key binds - - - Teams - Teams - - - Audio/Graphic options - Audio/Graphic options - - Net game Net game @@ -1513,26 +1586,6 @@ Team Settings - Misc - Misc - - - Schemes and Weapons - - - - Custom colors - - - - Miscellaneous - - - - Video recording options - - - Videos @@ -1540,10 +1593,6 @@ Description - - Proxy settings - - QLabel @@ -1560,26 +1609,6 @@ Version - Developers: - Developers: - - - Art: - Art: - - - Sounds: - Sounds: - - - Translations: - Translations: - - - Special thanks: - Special thanks: - - Weapons Weapons @@ -1636,10 +1665,6 @@ Crate Drops - Game scheme - Game scheme - - % Dud Mines % Dud Mines @@ -1676,10 +1701,6 @@ - This development build is 'work in progress' and may not be compatible with other versions of the game. Some features might be broken or incomplete. Use at your own risk! - - - Quality @@ -1754,10 +1775,6 @@ - Summary - - - Description @@ -1785,6 +1802,38 @@ Bitrate (Kbps) + + This development build is 'work in progress' and may not be compatible with other versions of the game, while some features might be broken or incomplete! + + + + Fullscreen + Fullscreen + + + Fullscreen Resolution + + + + Windowed Resolution + + + + Your Email + + + + Summary + + + + Send system information + + + + Type the security code: + + QLineEdit @@ -1823,10 +1872,6 @@ - Please fill out all fields - - - Error while authenticating at google.com: @@ -1873,18 +1918,6 @@ - Successfully posted the issue on hedgewars.googlecode.com - - - - Error during authentication at google.com - - - - Error reporting the issue, please try again later (or visit hedgewars.googlecode.com directly) - - - Main - Error @@ -2032,16 +2065,37 @@ Do you really want to delete the weapon set '%1'? - - - QObject - - Nickname - Nickname - - - Please enter your nickname - Please enter your nickname + + Hedgewars - Nick not registered + + + + System Information Preview + + + + Failed to generate captcha + + + + Failed to download captcha + + + + Please fill out all fields. Email is optional. + + + + Hedgewars - Warning + + + + Hedgewars - Information + + + + Hedgewars + @@ -2099,26 +2153,10 @@ Load - Setup - Setup - - - Ready - Ready - - - Random Team - Random Team - - Associate file extensions Associate file extensions - more - - - More info @@ -2211,6 +2249,25 @@ + SeedPrompt + + The map seed is the basis for all random values generated by the game. + + + + Cancel + Cancel + + + Set seed + + + + Close + + + + SelWeaponWidget Weapon set @@ -2238,106 +2295,21 @@ - ToggleButtonWidget - - Vampirism - Vampirism - - - Karma - Karma - - - Artillery - Artillery - - - Fort Mode - Fort Mode - - - Divide Teams - Divide Teams - - - Solid Land - Solid Land - - - Add Border - Add Border - - - Low Gravity - Low Gravity - - - Laser Sight - Laser Sight - - - Invulnerable - Invulnerable - - - Random Order - Random Order - - - King - King - - - Place Hedgehogs - Place Hedgehogs - - - Clan Shares Ammo - Clan Shares Ammo - - - Disable Girders - Disable Girders - - - Disable Land Objects - - - - AI Survival Mode - - - - Reset Health - - - - Unlimited Attacks - - - - Reset Weapons - - - - Per Hedgehog Ammo - - - - Disable Wind - - - - More Wind - - - - Tag Team - - - - Add Bottom Border - + TeamShowWidget + + %1's team + + + + + ThemePrompt + + Select a theme for this map + + + + Cancel + Cancel @@ -2471,12 +2443,6 @@ capture - hedgehogs -info - hedgehogs -info - - quit quit @@ -2512,33 +2478,33 @@ record + + hedgehog info + + binds (categories) - Basic controls - Basic controls - - - Weapon controls - Weapon controls - - - Camera and cursor controls - Camera and cursor controls - - - Other - Other + Movement + + + + Weapons + Weapons + + + Camera + + + + Miscellaneous + binds (descriptions) - Move your hogs and aim: - Move your hogs and aim: - - Traverse gaps and obstacles by jumping: Traverse gaps and obstacles by jumping: @@ -2602,6 +2568,10 @@ Record video: + + Hedgehog movement + + binds (keys) diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Locale/hedgewars_es.ts --- a/share/hedgewars/Data/Locale/hedgewars_es.ts Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Locale/hedgewars_es.ts Fri Feb 22 05:05:32 2013 +0100 @@ -20,6 +20,79 @@ + BanDialog + + IP + IP + + + Nick + + + + IP/Nick + + + + Reason + + + + Duration + + + + Ok + + + + Cancel + Cancelar + + + you know why + + + + Warning + + + + Please, specify %1 + + + + nickname + + + + permanent + + + + + DataManager + + Use Default + + + + + FeedbackDialog + + View + + + + Cancel + Cancelar + + + Send Feedback + + + + FreqSpinBox Never @@ -44,13 +117,36 @@ Editar modos de juego - When this option is enabled selecting a game scheme will auto-select a weapon - Cuando esta opción esté activada escoger un modo de juego escogerá el set de armas correspondiente - - Game Options Opciones de juego + + Game scheme will auto-select a weapon + + + + + HWApplication + + %1 minutes + + + + %1 hour + + + + %1 hours + + + + %1 day + + + + %1 days + + HWAskQuitDialog @@ -101,10 +197,6 @@ Failed to save StyleSheet to %1 - - %1 is not a valid command! - - HWForm @@ -139,20 +231,6 @@ - Your nickname %1 is -registered on Hedgewars.org -Please provide your password below -or pick another nickname in game config: - El nick %1 ya está registrado -en Hedgewars.org. Por favor, -introduce ahora tu clave de acceso -o elige otro nick en las preferencias del juego: - - - No password supplied. - - - Nickname Nick @@ -165,6 +243,59 @@ Please pick another nickname: + + %1's Team + + + + Hedgewars - Nick registered + + + + This nick is registered, and you haven't specified a password. + +If this nick isn't yours, please register your own nick at www.hedgewars.org + +Password: + + + + Your nickname is not registered. +To prevent someone else from using it, +please register it at www.hedgewars.org + + + + + +Your password wasn't saved either. + + + + Hedgewars - Empty nickname + + + + Hedgewars - Wrong password + + + + You entered a wrong password. + + + + Try Again + + + + Hedgewars - Connection error + + + + You reconnected too fast. +Please wait a few seconds and try again. + + HWGame @@ -180,18 +311,6 @@ HWMapContainer - Map - Mapa - - - Themes - Temas - - - Filter - Filtro - - All Todos @@ -216,10 +335,6 @@ Lunático - Type - Tipo - - Small tunnels Túneles estrechos @@ -228,28 +343,96 @@ Túneles normales - Large tunnels - Túneles anchos - - - Small floating islands - Islas pequeñas - - - Medium floating islands - Islas medianas - - - Large floating islands - Islas grandes - - Seed Semilla - Set - Cambiar + Map type: + + + + Image map + + + + Mission map + + + + Hand-drawn + + + + Randomly generated + + + + Random maze + + + + Random + Aleatorio + + + Map preview: + + + + Load map drawing + + + + Edit map drawing + + + + Largetunnels + + + + Small islands + + + + Medium islands + + + + Large islands + + + + Map size: + + + + Maze style: + + + + Mission: + + + + Map: + + + + Theme: + + + + Load drawn map + Cargar mapa + + + Drawn Maps + Mapas dibujados a mano + + + All files + Todos los ficheros @@ -321,8 +504,8 @@ HWPasswordDialog - Password - Contraseña + Login + @@ -337,6 +520,32 @@ + HatButton + + Change hat (%1) + + + + + HatPrompt + + Select a hat + + + + Filter: + + + + Cancel + Cancelar + + + Use selected hat + + + + KB SDL_ttf returned error while rendering text, most propably it is related to the bug in freetype2. It's recommended to update your freetype lib. @@ -344,6 +553,13 @@ + KeyBinder + + Category + + + + LibavInteraction Duration: %1m %2s @@ -362,6 +578,17 @@ Audio: + + unknown + + + + + MapModel + + No description available. + + PageAdmin @@ -393,6 +620,38 @@ Set data Enviar datos + + General + General + + + Bans + + + + IP/Nick + + + + Expiration + + + + Reason + + + + Refresh + + + + Add + + + + Remove + + PageConnecting @@ -447,8 +706,40 @@ General - Advanced - Avanzado + Select an action to choose a custom key bind for this team + + + + Use my default + + + + Reset all binds + + + + Custom Controls + + + + Hat + Sombrero + + + Name + Nombre + + + This hedgehog's name + + + + Randomize this hedgehog's name + + + + Random Team + Equipo aleatorio @@ -529,267 +820,14 @@ PageMain - Simply pick the same color as a friend to play together as a team. Each of you will still control his or her own hedgehogs but they'll win or lose together. - Tips - Elige el mismo color que tus amigos para hacer una alianza con ellos. Cada uno de vosotros controlará sus propios erizos, pero la victoria o derrota será compartida por vuestra facción. - - - Some weapons might do only low damage but they can be a lot more devastating in the right situation. Try to use the Desert Eagle to knock multiple hedgehogs into the water. - Tips - Puede que algunas armas hagan poco daño, pero pueden ser realmente devastadoras si son usadas en el momento correcto. Prueba a usar la Desert eagle para empujar erizos enemigos al agua, por ejemplo. - - - If you're unsure what to do and don't want to waste ammo, skip one round. But don't let too much time pass as there will be Sudden Death! - Tips - Si no tienes claro qué vas a hacer y prefieres no desperdiciar munición puedes pasar un turno. ¡Pero ten cuidado, si dejas pasar muchos turnos puede que empiece la muerte súbita! - - - If you'd like to keep others from using your preferred nickname on the official server, register an account at http://www.hedgewars.org/. - Tips - Si prefieres que nadie más use tu nick en el servidor oficial puedes registrarlo en http://www.hedgewars.org/. - - - You're bored of default gameplay? Try one of the missions - they'll offer different gameplay depending on the one you picked. - Tips - ¿Estás cansado del modo de juego de siempre? Prueba alguna de las misiones, encontrarás en ellas nuevos tipos de juego dependiendo de la que elijas. - - - By default the game will always record the last game played as a demo. Select 'Local Game' and pick the 'Demos' button on the lower right corner to play or manage them. - Tips - El juego intentará guardar la última partida como una demo de forma predeterminada. Más tarde puedes ir a "Juego local" y visitar la sección de "Demos" en la esquina inferior derecha para reproducirlas o gestionarlas. - - - Hedgewars is Open Source and Freeware we create in our spare time. If you've got problems, ask on our forums but please don't expect 24/7 support! - Tips - Hedgewars es un juego gratuito de código abierto que hemos creado en nuestro tiempo libre. Si tienes algún problema estaremos encantados de ayudarte en nuestros foros o canal de IRC, pero ¡no esperes que estemos allí las 24 horas del día! - - - Hedgewars is Open Source and Freeware we create in our spare time. If you like it, help us with a small donation or contribute your own work! - Tips - Hedgewars es un juego gratuito de código abierto que hemos creado en nuestro tiempo libre. ¡Si te gusta podrías considerar el ayudarnos con una pequeña donación o contribuyendo con tu propio trabajo! - - - Hedgewars is Open Source and Freeware we create in our spare time. Share it with your family and friends as you like! - Tips - Hedgewars es un juego gratuito de código abierto que hemos creado en nuestro tiempo libre. ¡Compártelo con tu família y amigos tanto como quieras! - - - From time to time there will be official tournaments. Upcoming events will be announced at http://www.hedgewars.org/ some days in advance. - Tips - De cuando en cuando celebramos torneos oficiales. Puedes mantenerte al día sobre los próximos eventos en http://www.hedgewars.org. - - - Hedgewars is available in many languages. If the translation in your language seems to be missing or outdated, feel free to contact us! - Tips - Hedgewars está disponible en varios idiomas. Si no encuentras traducción a tu idioma o piensas que la actual es de baja calidad o está desactualizada estaremos encantados de aceptar tu colaboración para mejorarla. - - - Hedgewars can be run on lots of different operating systems including Microsoft Windows, Mac OS X and Linux. - Tips - Hedgewars es un juego multiplataforma que puede ser ejecutado en diversos sistemas operativos, incluyendo Windows, Mac OS X y Linux. - - - Always remember you're able to set up your own games in local and network/online play. You're not restricted to the 'Simple Game' option. - Tips - Recuerda: puedes crear tus propias partidas multijugador tanto en local como por red, no estás limitado a jugar contra la máquina. - - - While playing you should give yourself a short break at least once an hour. - Tips - Tu salud es lo primero. Recuerda descansar unos minutos al menos una vez por cada hora de juego. - - - If your graphics card isn't able to provide hardware accelerated OpenGL, try to enable the low quality mode to improve performance. - Tips - Si tu tarjeta gráfica no soporta aceleración gráfica mediante OpenGL prueba a habilitar el modo de baja calidad gráfica en la pantalla de opciones, puede que mejore el rendimiento del juego. - - - We're open to suggestions and constructive feedback. If you don't like something or got a great idea, let us know! - Tips - Siempre estamos abiertos a sugerencias y opiniones constructivas. Si hay algo que no te guste o tienes grandes ideas que te gustaría ver en el juego, ¡háznoslo saber! - - - Especially while playing online be polite and always remember there might be some minors playing with or against you as well! - Tips - Si juegas a través de internet recuerda mantener tus buenos modales y siempre ten en cuenta que puede que estés jugando con o contra menores de edad. - - - Special game modes such as 'Vampirism' or 'Karma' allow you to develop completely new tactics. Try them in a custom game! - Tips - Los modos de juego especiales como "vampirismo" o "karma" te permiten desarrollar tácticas de juego completamente nuevas. ¡Pruébalos en tu próxima partida! - - - You should never install Hedgewars on computers you don't own (school, university, work, etc.). Please ask the responsible person instead! - Tips - ¡Nunca instales Hedgewars en ordenadores que no te pertenezcan tales como los de tu escuela, universidad o trabajo sin perdir permiso primero a las personas responsables de los mismos! - - - Hedgewars can be perfect for short games during breaks. Just ensure you don't add too many hedgehogs or use an huge map. Reducing time and health might help as well. - Tips - Hedgewars es realmente genial para jugar partidas rápidas durante pausas o descansos; sólo recuerda no añadir muchos erizos y no usar mapas excesivamente grandes para que la partida no se alargue demasiado. Reducir la duración de los turnos o la vida inicial también puede ayudar. - - - No hedgehogs were harmed in making this game. - Tips - Ningún erizo fue lastimado durante la creación de este juego. - - - Hedgewars is Open Source and Freeware we create in our spare time. If someone sold you the game, you should try get a refund! - Tips - Hedgewars es un juego gratuito de código abierto que hemos creado en nuestro tiempo libre. Si alguien te ha vendido el juego deberías pedirle que te devuelva tu dinero. - - - Connect one or more gamepads before starting the game to be able to assign their controls to your teams. - Tips - Conecta tus mandos al ordenador antes de iniciar el juego para poder asignar correctamente los controles de a equipo. - - - Create an account on %1 to keep others from using your most favourite nickname while playing on the official server. - Tips - Crea una cuenta con tu nick en %1 para evitar que otras personas puedan usarlo en el servidor oficial. - - - If your graphics card isn't able to provide hardware accelerated OpenGL, try to update the associated drivers. - Tips - Si tu tarjeta gráfica no es capaz de usar aceleración gráfica mediante OpenGL prueba a instalar drivers más actualizados. - - - There are three different jumps available. Tap [high jump] twice to do a very high/backwards jump. - Tips - Hay tres tipos de salto en el juego. Presiona [salto alto] dos veces para realizar un salto muy alto, vertical y ligeramente hacia atrás. - - - Afraid of falling off a cliff? Hold down [precise] to turn [left] or [right] without actually moving. - Tips - ¿Te da miedo caerte por una cornisa? Mantén presionado [aumentar precisión] para voltearte a [izquierda] o [derecha] sin moverte del sitio. - - - Some weapons require special strategies or just lots of training, so don't give up on a particular tool if you miss an enemy once. - Tips - Algunas armas pueden requerir estrategias especiales o mucho entrenamiento antes de ser usadas correctamente. No tires la a toalla con alguna de ellas sólo porque has fallado el tiro la primera vez. - - - Most weapons won't work once they touch the water. The Homing Bee as well as the Cake are exceptions to this. - Tips - La mayoría de armas se desactivarán al tocar el agua. El abejorro y la tarta son algunas de las excepciones a la regla. - - - The Old Limbuger only causes a small explosion. However the wind affected smelly cloud can poison lots of hogs at once. - Tips - La explosión del limbuger añejo es relativamente pequeña, pero produce una nube de gas venenoso que será arrastrada por el viento, siendo capaz de intoxicar a varios erizos a la vez. - - - The Piano Strike is the most damaging air strike. You'll lose the hedgehog performing it, so there's a huge downside as well. - Tips - El piano es el ataque aéreo más destructivo del juego, aunque perderás el erizo que lo lance, así que úsalo con cuidado. - - - Sticky Mines are a perfect tool to create small chain reactions knocking enemy hedgehogs into dire situations ... or water. - Tips - Las bombas lapa son perfectas para crear reacciones en cadena y mandar a tus enemigos al agua... o la Luna. - - - The Hammer is most effective when used on bridges or girders. Hit hogs will just break through the ground. - Tips - El mazo es mucho más efectivo si lo usas sobre vigas o puentes. Los erizos golpeados simplemente caerán por el agujero como Alicia por la madriguera. - - - If you're stuck behind an enemy hedgehog, use the Hammer to free yourself without getting damaged by an explosion. - Tips - Si estás atrapado tras un erizo enemigo puedes usar el mazo para abrirte paso sin resultar dañado por una explosión. - - - The Cake's maximum walking distance depends on the ground it has to pass. Use [attack] to detonate it early. - Tips - El alcance de la tarta depende de lo escarpado del terreno que tenga que atravesar, aunque puedes pulsar [atacar] para detonarla antes de que el contador llegue a cero. - - - The Flame Thrower is a weapon but it can be used for tunnel digging as well. - Tips - El lanzallamas es un arma, pero puede usarse para excavar túneles en caso de necesidad. - - - Want to know who's behind the game? Click on the Hedgewars logo in the main menu to see the credits. - Tips - ¿Quieres saber quiénes son los desarrolladores del juego? Pulsa el logo del juego en la pantalla principal para ver los créditos. - - - Like Hedgewars? Become a fan on %1 or follow us on %2! - Tips - ¿Te gusta Hedgewars? ¡Hazte fan en %1 o síguenos en %2! - - - Feel free to draw your own graves, hats, flags or even maps and themes! But note that you'll have to share them somewhere to use them online. - Tips - ¡Puedes dibujar tus propias tumbas, sombreros, banderas o incluso mapas y temas! Sólo ten en cuenta que el juego no es capaz de enviar archivos todavía, así que tendrás que enviar tú mismo los archivos a tus amigos para poder jugar en red con ellos. - - - Really want to wear a specific hat? Donate to us and receive an exclusive hat of your choice! - Tips - ¿Te gustaría poder usar un sombrero especial, sólo para ti? Haz una donación y dinos qué sombrero quieres, lo dibujaremos para ti. - - - Keep your video card drivers up to date to avoid issues playing the game. - Tips - Mantén los drivers de tu tarjeta gráfica actualizados para evitar posibles problemas con este y otros juegos. - - - You can find your Hedgewars configuration files under "My Documents\Hedgewars". Create backups or take the files with you, but don't edit them by hand. - Tips - Puedes encontrar los archivos de configuración del juego en la carpeta "Mis Documentos\Hedgewars". Haz copias de seguridad de los mismos o cópialos a otro ordenador si lo deseas, pero no intentes editarlos a mano para evitar posibles pérdidas de datos. - - - You're able to associate Hedgewars related files (savegames and demo recordings) with the game to launch them right from your favorite file or internet browser. - Tips - Puedes asociar los tipos de archivo relacionados, partidas guardadas y demos, con Hedgewars para lanzarlos directamente desde tu gestor de archivos o navegador favoritos. - - - Want to save ropes? Release the rope in mid air and then shoot again. As long as you don't touch the ground you'll reuse your rope without wasting ammo! - Tips - ¿Necesitas conservar cuerdas? Cuando estés usando una cuerda puedes desengancharla y volver a lanzarla de nuevo. ¡Mientras no toques el suelo seguirás usando la misma cuerda continuamente sin desperdiciar munición adicional! - - - You can find your Hedgewars configuration files under "Library/Application Support/Hedgewars" in your home directory. Create backups or take the files with you, but don't edit them by hand. - Tips - Puedes encontrar los archivos de configuración del juego en la carpeta "Library/Application Support/Hedgewars" dentro de tu directorio personal. Puedes hacer copias de seguridad de los mismos o copiarlos a otro ordenador si lo deseas, pero no intentes editarlos a mano para evitar posibles pérdidas de datos. - - - You can find your Hedgewars configuration files under ".hedgewars" in your home directory. Create backups or take the files with you, but don't edit them by hand. - Tips - Puedes encontrar los archivos de configuración del juego en la carpeta ".hedgewars" dentro de tu directorio personal. Puedes hacer copias de seguridad de los mismos o copiarlos a otro ordenador si lo deseas, pero no intentes editarlos a mano para evitar posibles pérdidas de datos. - - - The Windows version of Hedgewars supports Xfire. Make sure to add Hedgewars to its game list so your friends can see you playing. - Tips - La versión de Hedgewars para Windows soporta Xfire. Recuerda agregar Hedgewars a tu lista de juegos para que tus amigos puedan saber cuándo estás jugando. - - - Use the Molotov or Flame Thrower to temporary keep hedgehogs from passing terrain such as tunnels or platforms. - Tips - Puedes usar el cóctel molotov o el lanzallamas para evitar que erizos enemigos crucen túneles angostos o puentes. - - - The Homing Bee can be tricky to use. Its turn radius depends on its velocity, so try to not use full power. - Tips - El abejorro puede ser complicado de usar. Su maniobrabilidad depende de su velocidad, así que intenta no lanzarlo a máxima potencia. - - Downloadable Content Contenido adicional - Local Game - - - Play a game on a single computer - Network Game - - - Play a game across a network @@ -817,6 +855,14 @@ Edit game preferences + + Play a game across a local area network + + + + Play a game on an official server + + PageMultiplayer @@ -824,6 +870,10 @@ Start Empezar + + Edit game preferences + + PageNetGame @@ -832,27 +882,12 @@ Opciones - Downloadable Content - Contenido adicional - - - - PageNetType - - LAN game - Red local - - - Official server - Servidor oficial - - - Join hundreds of players online! + Edit game preferences - Join or host your own game server in a Local Area Network. - + Start + Empezar @@ -898,10 +933,6 @@ Eliminar set de armas - General - General - - Advanced Avanzado @@ -941,6 +972,94 @@ System proxy settings + + Select an action to change what key controls it + + + + Reset to default + + + + Reset all binds + + + + Game + + + + Graphics + + + + Audio + + + + Controls + + + + Video Recording + + + + Network + + + + Teams + Equipos + + + Schemes + + + + Weapons + Set de armas + + + Frontend + + + + Custom colors + + + + Game audio + + + + Frontend audio + + + + Account + + + + Proxy settings + + + + Miscellaneous + + + + Updates + + + + Check for updates + + + + Video recording options + + PagePlayDemo @@ -1140,18 +1259,10 @@ PageSinglePlayer - Simple Game - - - Play a quick game against the computer with random settings - Multiplayer - - - Play a hotseat game against your friends, or AI teams @@ -1160,26 +1271,14 @@ - Training Mode - - - Practice your skills in a range of training missions - Demos - - - Watch recorded demos - Load - Cargar - - Load a previously saved game @@ -1225,14 +1324,6 @@ - Date: - - - - Size: - - - encoding @@ -1240,6 +1331,16 @@ uploading + + Date: %1 + + + + + Size: %1 + + + QAction @@ -1248,10 +1349,6 @@ Expulsar - Start - Empezar - - Restrict Joins Impedir que entren más jugadores @@ -1299,10 +1396,6 @@ Pantalla completa - Enable sound - Habilitar sonidos del juego - - Show FPS Mostrar FPS @@ -1311,14 +1404,6 @@ Mostrar el daño según ocurre - Enable music - Habilitar música del juego - - - Frontend fullscreen - Interfaz a pantalla completa - - Append date and time to record file name Agregar fecha y hora al nombre de los ficheros @@ -1331,18 +1416,6 @@ Mostrar globos de ayuda sobre el armamento - Enable frontend sounds - Habilitar sonidos del interfaz - - - Enable frontend music - Habilitar música del interfaz - - - Frontend effects - Habilitar efectos del interfaz - - Save password @@ -1362,14 +1435,38 @@ Use game resolution + + Visual effects + + + + Sound + + + + In-game sound effects + + + + Music + + + + In-game music + + + + Frontend sound effects + + + + Frontend music + + QComboBox - generated map... - Terreno aleatorio... - - Human Humano @@ -1382,14 +1479,6 @@ (Predeterminado del sistema) - generated maze... - Laberinto aleatorio... - - - Mission - Misión - - Community Comunidad @@ -1406,10 +1495,6 @@ En progreso - hand drawn map... - Mapa dibujado a mano... - - Disabled Deshabilitado @@ -1446,10 +1531,6 @@ Arriba-Abajo - Wiggle - Temblor - - Red/Cyan grayscale Rojo/Cian en escala de grises @@ -1481,22 +1562,10 @@ Miembros del equipo - Key binds - Asociaciones de teclas - - Fort Fuerte - Teams - Equipos - - - Audio/Graphic options - Opciones de Audio y Gráficos - - Net game Juego en red @@ -1517,26 +1586,6 @@ Opciones del equipo - Misc - Otras opciones - - - Schemes and Weapons - Modos de juego y sets de armas - - - Custom colors - - - - Miscellaneous - - - - Video recording options - - - Videos @@ -1544,30 +1593,10 @@ Description - - Proxy settings - - QLabel - Developers: - Desarrolladores: - - - Art: - Gráficos: - - - Translations: - Traducciones: - - - Special thanks: - Agradecimientos: - - Weapons Set de armas @@ -1600,10 +1629,6 @@ Versión - Sounds: - Sonidos: - - Initial sound volume Volumen de sonido por defecto @@ -1640,10 +1665,6 @@ Aparición de cajas - Game scheme - Modo de juego - - % Dud Mines % minas defectuosas @@ -1680,12 +1701,6 @@ Consejo: - This development build is 'work in progress' and may not be compatible with other versions of the game. Some features might be broken or incomplete. Use at your own risk! - Esta es una versión experimental del juego y puede no ser compatible con otras versiones del mismo, -así como carecer de algunas funcionalidades o simplemente funcionar mal. -¡Úsalo bajo tu propia responsabilidad! - - Quality Calidad @@ -1760,10 +1775,6 @@ - Summary - - - Description @@ -1791,6 +1802,38 @@ Bitrate (Kbps) + + This development build is 'work in progress' and may not be compatible with other versions of the game, while some features might be broken or incomplete! + + + + Fullscreen + Pantalla completa + + + Fullscreen Resolution + + + + Windowed Resolution + + + + Your Email + + + + Summary + + + + Send system information + + + + Type the security code: + + QLineEdit @@ -1829,10 +1872,6 @@ No se pudieron asociar los tipos de fichero. - Please fill out all fields - - - Error while authenticating at google.com: @@ -1879,18 +1918,6 @@ - Successfully posted the issue on hedgewars.googlecode.com - - - - Error during authentication at google.com - - - - Error reporting the issue, please try again later (or visit hedgewars.googlecode.com directly) - - - Main - Error @@ -2038,16 +2065,37 @@ Do you really want to delete the weapon set '%1'? - - - QObject - - Nickname - Nick - - - Please enter your nickname - Por favor introduce tu nick + + Hedgewars - Nick not registered + + + + System Information Preview + + + + Failed to generate captcha + + + + Failed to download captcha + + + + Please fill out all fields. Email is optional. + + + + Hedgewars - Warning + + + + Hedgewars - Information + + + + Hedgewars + @@ -2105,26 +2153,10 @@ Cargar - Setup - Configuración - - - Ready - Listo - - - Random Team - Equipo aleatorio - - Associate file extensions Asociar tipos de archivo - more - más - - More info @@ -2217,6 +2249,25 @@ + SeedPrompt + + The map seed is the basis for all random values generated by the game. + + + + Cancel + Cancelar + + + Set seed + + + + Close + + + + SelWeaponWidget Weapon set @@ -2244,106 +2295,21 @@ - ToggleButtonWidget - - Vampirism - Vampirismo - - - Karma - Karma - - - Artillery - Artillería - - - Fort Mode - Fuertes - - - Divide Teams - Separar equipos - - - Solid Land - Terreno indestructible - - - Add Border - Añadir borde - - - Low Gravity - Baja gravedad - - - Laser Sight - Mira láser - - - Invulnerable - Invulnerabilidad - - - Random Order - Orden aleatorio - - - King - Rey - - - Place Hedgehogs - Posicionar erizos - - - Clan Shares Ammo - Compartir munición - - - Disable Girders - Deshabilitar vigas - - - Disable Land Objects - Deshabilitar decoraciones - - - AI Survival Mode - Supervivencia contra la computadora - - - Unlimited Attacks - Ataques ilimitados - - - Reset Weapons - Reiniciar munición - - - Per Hedgehog Ammo - Munición individualizada - - - Reset Health - Restaurar salud - - - Disable Wind - Deshabilitar viento - - - More Wind - Más viento - - - Tag Team - Tag team - - - Add Bottom Border - Añadir borde inferior + TeamShowWidget + + %1's team + + + + + ThemePrompt + + Select a theme for this map + + + + Cancel + Cancelar @@ -2461,12 +2427,6 @@ capturar - hedgehogs -info - información de -los erizos - - quit salir @@ -2518,33 +2478,33 @@ record + + hedgehog info + + binds (categories) - Basic controls - Controles básicos - - - Weapon controls - Armas - - - Camera and cursor controls - Cámara y cursor - - - Other - Otros + Movement + + + + Weapons + Set de armas + + + Camera + + + + Miscellaneous + binds (descriptions) - Move your hogs and aim: - Mueve tus erizos y apunta: - - Traverse gaps and obstacles by jumping: Sortea huecos y obstáculos saltando: @@ -2608,6 +2568,10 @@ Record video: + + Hedgehog movement + + binds (keys) diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Locale/hedgewars_fi.ts --- a/share/hedgewars/Data/Locale/hedgewars_fi.ts Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Locale/hedgewars_fi.ts Fri Feb 22 05:05:32 2013 +0100 @@ -20,6 +20,79 @@ + BanDialog + + IP + IP + + + Nick + + + + IP/Nick + + + + Reason + + + + Duration + + + + Ok + + + + Cancel + Peruuta + + + you know why + + + + Warning + + + + Please, specify %1 + + + + nickname + + + + permanent + + + + + DataManager + + Use Default + + + + + FeedbackDialog + + View + + + + Cancel + Peruuta + + + Send Feedback + + + + FreqSpinBox Never @@ -44,11 +117,34 @@ Muokkaa kaavaa - When this option is enabled selecting a game scheme will auto-select a weapon + Game Options + + + + Game scheme will auto-select a weapon + + + + + HWApplication + + %1 minutes - Game Options + %1 hour + + + + %1 hours + + + + %1 day + + + + %1 days @@ -101,10 +197,6 @@ Failed to save StyleSheet to %1 - - %1 is not a valid command! - - HWForm @@ -139,20 +231,6 @@ - Your nickname %1 is -registered on Hedgewars.org -Please provide your password below -or pick another nickname in game config: - Nimimerkkisi %1 on -rekisteröity Hedgewars.org-sivustolla -Ole hyvä ja syötä salasanasi -tai aseta eri nimimerkki asetuksissa: - - - No password supplied. - - - Nickname Nimimerkki @@ -165,6 +243,59 @@ Please pick another nickname: + + %1's Team + + + + Hedgewars - Nick registered + + + + This nick is registered, and you haven't specified a password. + +If this nick isn't yours, please register your own nick at www.hedgewars.org + +Password: + + + + Your nickname is not registered. +To prevent someone else from using it, +please register it at www.hedgewars.org + + + + + +Your password wasn't saved either. + + + + Hedgewars - Empty nickname + + + + Hedgewars - Wrong password + + + + You entered a wrong password. + + + + Try Again + + + + Hedgewars - Connection error + + + + You reconnected too fast. +Please wait a few seconds and try again. + + HWGame @@ -180,14 +311,6 @@ HWMapContainer - Map - Kartta - - - Filter - Suodatin - - All Kaikki @@ -212,14 +335,6 @@ Sekopäinen - Themes - Teemat - - - Type - Tyyppi - - Small tunnels Pieniä tunneleita @@ -228,27 +343,95 @@ Keskikokoisia tunneleita - Large tunnels - Laajoja tunneleita - - - Small floating islands - Pieniä kelluvia saaria - - - Medium floating islands - Keskikokoisia kelluvia saaria - - - Large floating islands - Suuria kelluvia saaria - - Seed - Set + Map type: + + + + Image map + + + + Mission map + + + + Hand-drawn + + + + Randomly generated + + + + Random maze + + + + Random + Satunnainen + + + Map preview: + + + + Load map drawing + + + + Edit map drawing + + + + Largetunnels + + + + Small islands + + + + Medium islands + + + + Large islands + + + + Map size: + + + + Maze style: + + + + Mission: + + + + Map: + + + + Theme: + + + + Load drawn map + + + + Drawn Maps + + + + All files @@ -321,8 +504,8 @@ HWPasswordDialog - Password - Salasana + Login + @@ -337,6 +520,32 @@ + HatButton + + Change hat (%1) + + + + + HatPrompt + + Select a hat + + + + Filter: + + + + Cancel + Peruuta + + + Use selected hat + + + + KB SDL_ttf returned error while rendering text, most propably it is related to the bug in freetype2. It's recommended to update your freetype lib. @@ -344,6 +553,13 @@ + KeyBinder + + Category + + + + LibavInteraction Duration: %1m %2s @@ -362,6 +578,17 @@ Audio: + + unknown + + + + + MapModel + + No description available. + + PageAdmin @@ -393,6 +620,38 @@ Set data Aseta tiedot + + General + Yleiset + + + Bans + + + + IP/Nick + + + + Expiration + + + + Reason + + + + Refresh + + + + Add + + + + Remove + + PageConnecting @@ -447,8 +706,40 @@ Yleiset - Advanced - Lisäasetukset + Select an action to choose a custom key bind for this team + + + + Use my default + + + + Reset all binds + + + + Custom Controls + + + + Hat + Hattu + + + Name + Nimi + + + This hedgehog's name + + + + Randomize this hedgehog's name + + + + Random Team + Satunnainen joukkue @@ -529,267 +820,14 @@ PageMain - Simply pick the same color as a friend to play together as a team. Each of you will still control his or her own hedgehogs but they'll win or lose together. - Tips - Valitse sama väri kaverisi kanssa pelataksesi samassa joukkueessa. Kumpikin ohjaa omia siilejään, mutta voitatte ja häviätte yhdessä. - - - Some weapons might do only low damage but they can be a lot more devastating in the right situation. Try to use the Desert Eagle to knock multiple hedgehogs into the water. - Tips - Jotkut aseet tekevät vain vähän vahinkoa, mutta voivat olla tuhoisampia oikeassa tilanteessa. Kokeile ampua useampi siili veteen Desert Eaglella. - - - If you're unsure what to do and don't want to waste ammo, skip one round. But don't let too much time pass as there will be Sudden Death! - Tips - Jos et tiedä mitä tehdä etkä halua tuhlata ammuksia, jätä vuoro väliin. Mutta älä anna ajan kulua liikaa koska Äkkikuolema koittaa ennemmin tai myöhemmin! - - - If you'd like to keep others from using your preferred nickname on the official server, register an account at http://www.hedgewars.org/. - Tips - Jos haluat estää muita käyttämästä nimimerkkiäsi virallisella palvelimella, rekisteröi tunnus osoitteessa http://www.hedgewars.org/. - - - You're bored of default gameplay? Try one of the missions - they'll offer different gameplay depending on the one you picked. - Tips - Kyllästyttääkö normaali peli? Kokeila tehtäviä - Ne tarjoaa erilaisia pelitapoja riippuen valinnasta. - - - By default the game will always record the last game played as a demo. Select 'Local Game' and pick the 'Demos' button on the lower right corner to play or manage them. - Tips - Oletuksena viimeisin peli nauhoitetaan demoksi. Valitse 'Demot' vasemmasta alakulmasta katsoaksesi ja hallitaksesi niitä. - - - Hedgewars is Open Source and Freeware we create in our spare time. If you've got problems, ask on our forums but please don't expect 24/7 support! - Tips - Hedgewars on avointa lähdekoodia ja ilmainen ohjelma jota me luomme vapaa-aikanamme. Jos sinulla on ongelmia, kysy keskustelualueilta apua, mutta älä odota 24/7-tukea! - - - Hedgewars is Open Source and Freeware we create in our spare time. If you like it, help us with a small donation or contribute your own work! - Tips - Hedgewars on avointa lähdekoodia ja ilmainen ohjelma jota me luomme vapaa-aikanamme. Jos pidät siitä, voit auttaa meitä pienellä lahjoituksella tai omaa työllä! - - - Hedgewars is Open Source and Freeware we create in our spare time. Share it with your family and friends as you like! - Tips - Hedgewars on avointa lähdekoodia ja ilmainen ohjelma jota me luomme vapaa-aikanamme. Jaa sitä perheesi ja ystäviesi kesken miten haluat! - - - From time to time there will be official tournaments. Upcoming events will be announced at http://www.hedgewars.org/ some days in advance. - Tips - Toisinaan järjestetään virallisia turnauksia. Tulevista tapahtumista tiedotetaan osoitteessa http://www.hedgewars.org/ muutama päivä etukäteen. - - - Hedgewars is available in many languages. If the translation in your language seems to be missing or outdated, feel free to contact us! - Tips - Hedgewars on saatavilla monilla kielillä. Jos oman kielinen käännös puuttuu tai on vanhentunut, ota yhteyttä! - - - Hedgewars can be run on lots of different operating systems including Microsoft Windows, Mac OS X and Linux. - Tips - Hedgewars toimii useilla eri käyttöjärjestelmillä, kuten Microsoft Windowsissa, Mac OS X:ssä ja Linuxissa. - - - Always remember you're able to set up your own games in local and network/online play. You're not restricted to the 'Simple Game' option. - Tips - Muista että voit aina luoda oman pelisi paikallisesti ja verkkopelissä. Et ole rajoitettu yksinkertaiseen peliin. - - - While playing you should give yourself a short break at least once an hour. - Tips - Pelatessa sinun pitäisi pitää lyhyt tauko vähintään kerran tunnissa. - - - If your graphics card isn't able to provide hardware accelerated OpenGL, try to enable the low quality mode to improve performance. - Tips - Jos näytönohjaimesi ei tarjoa laitteistokiihdytettä OpenGL:ää, kokeile heikennetyn laadun tilaa parantaaksesi suorituskykyä. - - - We're open to suggestions and constructive feedback. If you don't like something or got a great idea, let us know! - Tips - Me olemme avoimia ehdotuksille ja rakentavalle palautteelle. Jos et pidä jostain tai sinulla on loistava idea, kerro meille! - - - Especially while playing online be polite and always remember there might be some minors playing with or against you as well! - Tips - Erityisesti verkossa pelattaessa ole kohtelias ja muista että alaikäisiä saattaa myös olla pelaamassa. - - - Special game modes such as 'Vampirism' or 'Karma' allow you to develop completely new tactics. Try them in a custom game! - Tips - Erityispelimoodit kuten 'Vampyrismi' ja 'Karma' mahdollistavat kokonaan uusien taktiikoiden kehittämisen. Kokeile niitä muokatussa pelissä! - - - You should never install Hedgewars on computers you don't own (school, university, work, etc.). Please ask the responsible person instead! - Tips - Sinun ei ikinä tulisi asentaa Hedgewarsia tietokoneille joita et omista (koulu, yliopisto, työpaikka jne.). Ole hvä ja pyydä vastuuhenkilöä tekemään se! - - - Hedgewars can be perfect for short games during breaks. Just ensure you don't add too many hedgehogs or use an huge map. Reducing time and health might help as well. - Tips - Hedgewars voi olla täydellinen peli tauoille. Mutta varmista ettet lisää liian montaa siiltä ta käytä liian suurta karttaa. Ajan ja terveyden vähentäminen voi myös auttaa. - - - No hedgehogs were harmed in making this game. - Tips - Yhtään siiliä ei vahingoitettu tämän pelin tekemisen aikana. - - - Hedgewars is Open Source and Freeware we create in our spare time. If someone sold you the game, you should try get a refund! - Tips - Hedgewars on avointa lähdekoodia ja ilmainen ohjelma jota me luomme vapaa-aikanamme. Jos joku myi sinulle tämän pelin, koita saada rahasi takaisin! - - - Connect one or more gamepads before starting the game to be able to assign their controls to your teams. - Tips - Yhdistä yksi tai useampi peliohjain ennen pelin käynnistämistä liittääksesi niiden kontrollit omaan joukkueeseesi. - - - Create an account on %1 to keep others from using your most favourite nickname while playing on the official server. - Tips - Luo käyttäjätili osoitteessa %1 estääksesi muita käyttämästä suosikkinimimerkkiäsi pelatessasi virallisella palvelimella. - - - If your graphics card isn't able to provide hardware accelerated OpenGL, try to update the associated drivers. - Tips - Jos näytönohjaimesi ei tue laitteistokiihdytettyä OpenGL:ää, kokeile päivittää ajurit. - - - There are three different jumps available. Tap [high jump] twice to do a very high/backwards jump. - Tips - Hyppyjä on saatavilla kolmea erilaista. Napauta [korkea hyppy]-nappai kahdesti tehdäksesi todella korkean/taaksepäin hypyn. - - - Afraid of falling off a cliff? Hold down [precise] to turn [left] or [right] without actually moving. - Tips - Pelkäätkö että putoat kielekkeeltä? Pidä [tarkkuus]-näppäintä pohjassa kääntyäksesi [vasemmalle] ja [oikealle] liikkumatta. - - - Some weapons require special strategies or just lots of training, so don't give up on a particular tool if you miss an enemy once. - Tips - Jotkut aseet vaativat erityisstrategiaa tai todella paljon harjoittelua, joten älä anna periksi vaikka et kerran osuisikaan. - - - Most weapons won't work once they touch the water. The Homing Bee as well as the Cake are exceptions to this. - Tips - - - - The Old Limbuger only causes a small explosion. However the wind affected smelly cloud can poison lots of hogs at once. - Tips - Vanha Limburger-juusto aiheuttaa vain pienen räjähdyksen, mutta tuulen vaikuttama hajupilvi voi myrkyttää suuren määrän siiliä kerralla. - - - The Piano Strike is the most damaging air strike. You'll lose the hedgehog performing it, so there's a huge downside as well. - Tips - Pianoisku on vahingollisin ilmaisku. Menetät siilen joka sen esittää, joten sillä on myös suuri huono puoli. - - - Sticky Mines are a perfect tool to create small chain reactions knocking enemy hedgehogs into dire situations ... or water. - Tips - Tarttuvat miinat ovat täydellinen työkalu luomaan pieniä ketjureaktioita jotka vie vihollissiilit kauheisiin tilanteisiin...tai veteen. - - - The Hammer is most effective when used on bridges or girders. Hit hogs will just break through the ground. - Tips - Vasara on tehokkaimmillaan silloilla ja palkeilla. Lyödyt siilit iskeytyvät maan läpi. - - - If you're stuck behind an enemy hedgehog, use the Hammer to free yourself without getting damaged by an explosion. - Tips - Jos olet jumissa vihollissiilin takana, käytä vasaraa vapauttaaksesi itsesi ilman että vahingoidut räjädyksen voimasta. - - - The Cake's maximum walking distance depends on the ground it has to pass. Use [attack] to detonate it early. - Tips - Kakun pisin mahdollinen kulkumatka riippuu maastosta. Käytä [hyökkäystä] räjäyttääksesi sen aikaisemmin. - - - The Flame Thrower is a weapon but it can be used for tunnel digging as well. - Tips - Liekinheitin on ase mutta sitä voi käyttää myös tunneleiden kaivamiseen. - - - Want to know who's behind the game? Click on the Hedgewars logo in the main menu to see the credits. - Tips - Haluatko tietää ketkä ovat pelin takana? Klikkaa Hedgewars-logoa päävalikossa nähdäksesi tekijäluettelon. - - - Like Hedgewars? Become a fan on %1 or follow us on %2! - Tips - - - - Feel free to draw your own graves, hats, flags or even maps and themes! But note that you'll have to share them somewhere to use them online. - Tips - Piirrä vapaasti omia hautoja, hattuja, lippuja ja jopa karttoja ja teemoja! Mutta huomaa että sinun pitää jakaa ne jossain käyttääksesi niitä verkossa. - - - Really want to wear a specific hat? Donate to us and receive an exclusive hat of your choice! - Tips - Haluatko todella pitää tiettyä hattua? Lahjoita meille niin saat yksinoikeudella vapaavalintaisen hatun! - - - Keep your video card drivers up to date to avoid issues playing the game. - Tips - Pidä näytönohjaimesi ajurit ajantasall välttääksesi ongelmat pelin pelaamisessa. - - - You can find your Hedgewars configuration files under "My Documents\Hedgewars". Create backups or take the files with you, but don't edit them by hand. - Tips - Löydät Hedgewars-asetustiedostot hakemistosta "Omat tiedostot\Hedgewars". Ota varmuuskopio tai ota ne mukaasi, mutta älä muokkaa niitä käsin. - - - You're able to associate Hedgewars related files (savegames and demo recordings) with the game to launch them right from your favorite file or internet browser. - Tips - - - - Want to save ropes? Release the rope in mid air and then shoot again. As long as you don't touch the ground you'll reuse your rope without wasting ammo! - Tips - - - - You can find your Hedgewars configuration files under "Library/Application Support/Hedgewars" in your home directory. Create backups or take the files with you, but don't edit them by hand. - Tips - - - - You can find your Hedgewars configuration files under ".hedgewars" in your home directory. Create backups or take the files with you, but don't edit them by hand. - Tips - - - - The Windows version of Hedgewars supports Xfire. Make sure to add Hedgewars to its game list so your friends can see you playing. - Tips - - - - Use the Molotov or Flame Thrower to temporary keep hedgehogs from passing terrain such as tunnels or platforms. - Tips - - - - The Homing Bee can be tricky to use. Its turn radius depends on its velocity, so try to not use full power. - Tips - - - Downloadable Content - Local Game - - - Play a game on a single computer - Network Game - - - Play a game across a network @@ -817,6 +855,14 @@ Edit game preferences + + Play a game across a local area network + + + + Play a game on an official server + + PageMultiplayer @@ -824,6 +870,10 @@ Start Aloita + + Edit game preferences + + PageNetGame @@ -831,23 +881,12 @@ Control Säädöt - - - PageNetType - - LAN game - Lähiverkkopeli - - - Official server - Virallinen palvelin - - - Join hundreds of players online! + + Edit game preferences - Join or host your own game server in a Local Area Network. + Start @@ -894,10 +933,6 @@ - General - Yleiset - - Advanced Lisäasetukset @@ -937,6 +972,94 @@ System proxy settings + + Select an action to change what key controls it + + + + Reset to default + + + + Reset all binds + + + + Game + + + + Graphics + + + + Audio + + + + Controls + + + + Video Recording + + + + Network + + + + Teams + Joukkueet + + + Schemes + + + + Weapons + Aseet + + + Frontend + + + + Custom colors + + + + Game audio + + + + Frontend audio + + + + Account + + + + Proxy settings + + + + Miscellaneous + + + + Updates + + + + Check for updates + + + + Video recording options + + PagePlayDemo @@ -1136,18 +1259,10 @@ PageSinglePlayer - Simple Game - - - Play a quick game against the computer with random settings - Multiplayer - - - Play a hotseat game against your friends, or AI teams @@ -1156,26 +1271,14 @@ - Training Mode - - - Practice your skills in a range of training missions - Demos - - - Watch recorded demos - Load - Lataa - - Load a previously saved game @@ -1221,14 +1324,6 @@ - Date: - - - - Size: - - - encoding @@ -1236,6 +1331,16 @@ uploading + + Date: %1 + + + + + Size: %1 + + + QAction @@ -1248,10 +1353,6 @@ Tietoja - Start - Aloita - - Restrict Joins Rajoita liittymisiä @@ -1299,18 +1400,6 @@ Koko ruutu - Frontend fullscreen - Koko ruutu käyttöliittymälle - - - Enable sound - Äänet päälle - - - Enable music - Musiikki päälle - - Show FPS Näytä FPS @@ -1327,18 +1416,6 @@ Näytä asevalikon vihjeet - Enable frontend sounds - Kytke käyttöliittymän äänet päälle - - - Enable frontend music - Kytke käyttöliittymän musiikki päälle - - - Frontend effects - Käyttöliittymän tehosteet - - Save password @@ -1358,14 +1435,38 @@ Use game resolution + + Visual effects + + + + Sound + + + + In-game sound effects + + + + Music + + + + In-game music + + + + Frontend sound effects + + + + Frontend music + + QComboBox - generated map... - generoitu kartta... - - Human Ihminen @@ -1378,14 +1479,6 @@ (Järjestelmän oletus) - generated maze... - Generoitu sokkelo... - - - Mission - Tehtävä - - Community Yhteisö @@ -1402,10 +1495,6 @@ Kesken - hand drawn map... - - - Disabled @@ -1442,10 +1531,6 @@ - Wiggle - - - Red/Cyan grayscale @@ -1481,14 +1566,6 @@ Linnake - Key binds - Näppäinasettelut - - - Teams - Joukkueet - - Net game Verkkopeli @@ -1497,10 +1574,6 @@ Pelaavat joukkueet - Audio/Graphic options - Ääni/grafiikka-asetukset - - Game Modifiers Pelimuuttujat @@ -1513,26 +1586,6 @@ Joukkueasetukset - Misc - Muut - - - Schemes and Weapons - - - - Custom colors - - - - Miscellaneous - - - - Video recording options - - - Videos @@ -1540,10 +1593,6 @@ Description - - Proxy settings - - QLabel @@ -1560,26 +1609,6 @@ Versio - Developers: - Kehittäjät: - - - Art: - Taide: - - - Sounds: - Äänet: - - - Translations: - Käännökset: - - - Special thanks: - Erikoiskiitokset: - - Weapons Aseet @@ -1636,10 +1665,6 @@ Laatikkojen pudotukset - Game scheme - Pelikaava - - % Dud Mines % suutarimiinoja @@ -1676,10 +1701,6 @@ Vinkki: - This development build is 'work in progress' and may not be compatible with other versions of the game. Some features might be broken or incomplete. Use at your own risk! - Tämä kehitysversio on keskeneräinen ja ei välttämättä ole yhteensopiva muiden versioiden kanssa. Jotkut ominaisuudet voivat olla rikki tai kesken. Käytä omalla vastuulla! - - Quality Laatu @@ -1754,10 +1775,6 @@ - Summary - - - Description @@ -1785,6 +1802,38 @@ Bitrate (Kbps) + + This development build is 'work in progress' and may not be compatible with other versions of the game, while some features might be broken or incomplete! + + + + Fullscreen + Koko ruutu + + + Fullscreen Resolution + + + + Windowed Resolution + + + + Your Email + + + + Summary + + + + Send system information + + + + Type the security code: + + QLineEdit @@ -1823,10 +1872,6 @@ - Please fill out all fields - - - Error while authenticating at google.com: @@ -1873,18 +1918,6 @@ - Successfully posted the issue on hedgewars.googlecode.com - - - - Error during authentication at google.com - - - - Error reporting the issue, please try again later (or visit hedgewars.googlecode.com directly) - - - Main - Error @@ -2032,16 +2065,37 @@ Do you really want to delete the weapon set '%1'? - - - QObject - - Nickname - Nimimerkki - - - Please enter your nickname - Ole hyvä ja syötä nimimerkkisi + + Hedgewars - Nick not registered + + + + System Information Preview + + + + Failed to generate captcha + + + + Failed to download captcha + + + + Please fill out all fields. Email is optional. + + + + Hedgewars - Warning + + + + Hedgewars - Information + + + + Hedgewars + @@ -2099,26 +2153,10 @@ Lataa - Setup - Asetukset - - - Ready - Valmis - - - Random Team - Satunnainen joukkue - - Associate file extensions - more - - - More info @@ -2211,6 +2249,25 @@ + SeedPrompt + + The map seed is the basis for all random values generated by the game. + + + + Cancel + Peruuta + + + Set seed + + + + Close + + + + SelWeaponWidget Weapon set @@ -2238,106 +2295,21 @@ - ToggleButtonWidget - - Vampirism - Vampyrismi - - - Karma - Karma - - - Artillery - Tykistö - - - Fort Mode - Linnoitustila - - - Divide Teams - Jaa joukkueet - - - Solid Land - Tuhoutumaton maa - - - Add Border - Lisää reunat - - - Low Gravity - Matala painovoima - - - Laser Sight - Lasertähtäin - - - Invulnerable - Vahingoittumaton - - - Random Order - Satunnainen Järjestys - - - King - Kuningas - - - Place Hedgehogs - Sijoita siilet - - - Clan Shares Ammo - Saman väriset jakavat ammukset - - - Disable Girders - Ei palkkeja - - - Disable Land Objects - Ei maaobjekteja - - - AI Survival Mode - Tekoäly selviytymistila - - - Reset Health + TeamShowWidget + + %1's team - - Unlimited Attacks - - - - Reset Weapons - - - - Per Hedgehog Ammo + + + ThemePrompt + + Select a theme for this map - Disable Wind - - - - More Wind - - - - Tag Team - - - - Add Bottom Border - + Cancel + Peruuta @@ -2471,12 +2443,6 @@ kaappaa - hedgehogs -info - siilien -tiedot - - quit poistu @@ -2512,33 +2478,33 @@ record + + hedgehog info + + binds (categories) - Basic controls - Peruskontrollit - - - Weapon controls - Asekontrollit - - - Camera and cursor controls - Kameran ja kursorin kontrollit - - - Other - Muu + Movement + + + + Weapons + Aseet + + + Camera + + + + Miscellaneous + binds (descriptions) - Move your hogs and aim: - Liikuta siiliäsi ja tähtää: - - Traverse gaps and obstacles by jumping: Ylitä aukot ja esteet hyyppäämällä: @@ -2602,6 +2568,10 @@ Record video: + + Hedgehog movement + + binds (keys) diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Locale/hedgewars_fr.ts --- a/share/hedgewars/Data/Locale/hedgewars_fr.ts Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Locale/hedgewars_fr.ts Fri Feb 22 05:05:32 2013 +0100 @@ -20,6 +20,79 @@ + BanDialog + + IP + IP + + + Nick + + + + IP/Nick + + + + Reason + + + + Duration + + + + Ok + + + + Cancel + Annuler + + + you know why + + + + Warning + + + + Please, specify %1 + + + + nickname + + + + permanent + + + + + DataManager + + Use Default + + + + + FeedbackDialog + + View + + + + Cancel + Annuler + + + Send Feedback + + + + FreqSpinBox Never @@ -44,13 +117,36 @@ Éditer les paramètres - When this option is enabled selecting a game scheme will auto-select a weapon - Une fois cette option activée, choisir les paramètres de jeu sélectionne automatiquement les armes correspondantes - - Game Options + + Game scheme will auto-select a weapon + + + + + HWApplication + + %1 minutes + + + + %1 hour + + + + %1 hours + + + + %1 day + + + + %1 days + + HWAskQuitDialog @@ -101,10 +197,6 @@ Failed to save StyleSheet to %1 - - %1 is not a valid command! - - HWForm @@ -139,20 +231,6 @@ - Your nickname %1 is -registered on Hedgewars.org -Please provide your password below -or pick another nickname in game config: - Votre pseudo %1 est -enregistré sur Hedgewars.org -Veuillez fournir votre mot de passe -ou choisir un nouveau pseudo : - - - No password supplied. - - - Nickname Pseudo @@ -165,6 +243,59 @@ Please pick another nickname: + + %1's Team + + + + Hedgewars - Nick registered + + + + This nick is registered, and you haven't specified a password. + +If this nick isn't yours, please register your own nick at www.hedgewars.org + +Password: + + + + Your nickname is not registered. +To prevent someone else from using it, +please register it at www.hedgewars.org + + + + + +Your password wasn't saved either. + + + + Hedgewars - Empty nickname + + + + Hedgewars - Wrong password + + + + You entered a wrong password. + + + + Try Again + + + + Hedgewars - Connection error + + + + You reconnected too fast. +Please wait a few seconds and try again. + + HWGame @@ -180,18 +311,6 @@ HWMapContainer - Map - Carte - - - Themes - Thèmes - - - Filter - Filtre - - All Toutes @@ -216,10 +335,6 @@ Farfelu - Type - Type - - Small tunnels Petits tunnels @@ -228,28 +343,96 @@ Tunnels moyens - Large tunnels - Grand tunnels - - - Small floating islands - Petites Îles flottantes - - - Medium floating islands - Îles flottantes moyennes - - - Large floating islands - Grandes îles flottantes - - Seed Graine - Set - Valider + Map type: + + + + Image map + + + + Mission map + + + + Hand-drawn + + + + Randomly generated + + + + Random maze + + + + Random + Aléatoire + + + Map preview: + + + + Load map drawing + + + + Edit map drawing + + + + Largetunnels + + + + Small islands + + + + Medium islands + + + + Large islands + + + + Map size: + + + + Maze style: + + + + Mission: + + + + Map: + + + + Theme: + + + + Load drawn map + Charger une carte dessinée + + + Drawn Maps + + + + All files + @@ -321,8 +504,8 @@ HWPasswordDialog - Password - Mot de passe + Login + @@ -337,6 +520,32 @@ + HatButton + + Change hat (%1) + + + + + HatPrompt + + Select a hat + + + + Filter: + + + + Cancel + Annuler + + + Use selected hat + + + + KB SDL_ttf returned error while rendering text, most propably it is related to the bug in freetype2. It's recommended to update your freetype lib. @@ -344,6 +553,13 @@ + KeyBinder + + Category + + + + LibavInteraction Duration: %1m %2s @@ -362,6 +578,17 @@ Audio: + + unknown + + + + + MapModel + + No description available. + + PageAdmin @@ -393,6 +620,38 @@ Set data Enregistrer les données + + General + Général + + + Bans + + + + IP/Nick + + + + Expiration + + + + Reason + + + + Refresh + + + + Add + + + + Remove + + PageConnecting @@ -447,8 +706,40 @@ Général - Advanced - Avancé + Select an action to choose a custom key bind for this team + + + + Use my default + + + + Reset all binds + + + + Custom Controls + + + + Hat + Chapeau + + + Name + Nom + + + This hedgehog's name + + + + Randomize this hedgehog's name + + + + Random Team + Équipes aléatoires @@ -529,267 +820,14 @@ PageMain - Simply pick the same color as a friend to play together as a team. Each of you will still control his or her own hedgehogs but they'll win or lose together. - Tips - Choisissez la même couleur qu'un ami pour jouer dans la même équipe. Chacun de vous continuera à contrôler son ou ses hérissons mais ils gagneront ou perdront ensembles. - - - Some weapons might do only low damage but they can be a lot more devastating in the right situation. Try to use the Desert Eagle to knock multiple hedgehogs into the water. - Tips - Certaines armes peuvent occasionner seulement de faibles dommages mais être beaucoup plus dévastatrices dans la situation adéquate. Essayez le Révolver pour envoyer plusieurs hérissons à l'eau. - - - If you're unsure what to do and don't want to waste ammo, skip one round. But don't let too much time pass as there will be Sudden Death! - Tips - Si vous ne savez pas quoi faire et ne voulez pas gaspiller de munitions, passez un tour. Mais ne laissez pas trop filer le temps ou ce sera la Mort Subite ! - - - If you'd like to keep others from using your preferred nickname on the official server, register an account at http://www.hedgewars.org/. - Tips - Si vous voulez empêcher les autres d'utiliser votre pseudo sur le serveur officiel, créez un compte sur http://www.hedgewars.org/. - - - You're bored of default gameplay? Try one of the missions - they'll offer different gameplay depending on the one you picked. - Tips - Assez du mode par défaut ? Essayez une des missions - elles offrent différents types de jeu suivant votre choix. - - - By default the game will always record the last game played as a demo. Select 'Local Game' and pick the 'Demos' button on the lower right corner to play or manage them. - Tips - Par défaut le jeu enregistre la dernière partie jouée comme une démonstration. Sélectionnez « Jeu en local » puis « Démonstrations » en bas à droite pour les visionner ou les gérer. - - - Hedgewars is Open Source and Freeware we create in our spare time. If you've got problems, ask on our forums but please don't expect 24/7 support! - Tips - Hedgewars est un jeu libre et gratuit créé sur notre temps libre. Si vous avez des problèmes, demandez sur nos forums mais n'attendez pas de support 24h/24. - - - Hedgewars is Open Source and Freeware we create in our spare time. If you like it, help us with a small donation or contribute your own work! - Tips - Hedgewars est un jeu libre et gratuit créé sur notre temps libre. Si vous l'aimez, aidez-nous avec un petit don ou contribuez par votre travail ! - - - Hedgewars is Open Source and Freeware we create in our spare time. Share it with your family and friends as you like! - Tips - Hedgewars est un jeu libre et gratuit créé sur notre temps libre. Partagez-le avec votre famille et vos amis comme vous le voulez ! - - - From time to time there will be official tournaments. Upcoming events will be announced at http://www.hedgewars.org/ some days in advance. - Tips - De temps en temps il y aura des tournois officiels. Les évènements à venir seront annoncés sur http://www.hedgewars.org/ quelques jours à l'avance. - - - Hedgewars is available in many languages. If the translation in your language seems to be missing or outdated, feel free to contact us! - Tips - Hedgewars est disponible dans de nombreuses langues. Si la traduction dans votre langue est partielle ou obsolète, contactez-nous ! - - - Hedgewars can be run on lots of different operating systems including Microsoft Windows, Mac OS X and Linux. - Tips - Hedgewars peux être exécuté sur de nombreux systèmes d'exploitation différents, incluant Microsoft Windows, Mac OS X et Linux. - - - Always remember you're able to set up your own games in local and network/online play. You're not restricted to the 'Simple Game' option. - Tips - Souvenez-vous que vous pouvez créer votre propres parties en local et en ligne. Vous n'est pas limités aux options de jeu par défaut. - - - While playing you should give yourself a short break at least once an hour. - Tips - Vous devriez faire une petite pause au moins une fois par heure. - - - If your graphics card isn't able to provide hardware accelerated OpenGL, try to enable the low quality mode to improve performance. - Tips - Si votre carte graphique ne peut pas fournir d'accélération matérielle pour OpenGL, essayez le mode de faible qualité pour améliorer les performances. - - - We're open to suggestions and constructive feedback. If you don't like something or got a great idea, let us know! - Tips - Nous sommes ouverts aux suggestions et au critiques constructives. Si vous n'aimez pas quelque chose ou avez une grande idée, contactez-nous ! - - - Especially while playing online be polite and always remember there might be some minors playing with or against you as well! - Tips - Particulièrement quand vous jouez en ligne soyez polis et n'oubliez pas que certains joueurs peuvent être mineurs. - - - Special game modes such as 'Vampirism' or 'Karma' allow you to develop completely new tactics. Try them in a custom game! - Tips - Les modes de jeu spéciaux comme « Vampirisme » ou « Karma » vous permettent de développer de nouvelles tactiques. Essayez-les en parties personnalisées ! - - - You should never install Hedgewars on computers you don't own (school, university, work, etc.). Please ask the responsible person instead! - Tips - Vous ne devriez jamais installer Hedgewars sur des ordinateurs ne vous appartenant pas (école, université, travail, etc...). Demandez au responsable ! - - - Hedgewars can be perfect for short games during breaks. Just ensure you don't add too many hedgehogs or use an huge map. Reducing time and health might help as well. - Tips - Hedgewars peut être parfait pour des parties courtes pendant une pause. Assurez-vous juste de ne pas avoir mis trop de hérissons ou de ne pas utiliser une carte énorme. Réduire le temps ou la santé peuvent aider également. - - - No hedgehogs were harmed in making this game. - Tips - Aucun hérisson n'a été blessé durant la conception de ce jeu. - - - Hedgewars is Open Source and Freeware we create in our spare time. If someone sold you the game, you should try get a refund! - Tips - Hedgewars est un jeu libre et gratuit créé sur notre temps libre. Si quelqu'un vous l'a vendu, vous devriez vous faire rembourser ! - - - Connect one or more gamepads before starting the game to be able to assign their controls to your teams. - Tips - Branchez une ou plusieurs manettes avant de lancer le jeu pour pouvoir contrôler vos équipes avec. - - - Create an account on %1 to keep others from using your most favourite nickname while playing on the official server. - Tips - Créer un compte sur %1 vous permet d'empêcher les autres d'utiliser votre pseudo favori sur le serveur officiel. - - - If your graphics card isn't able to provide hardware accelerated OpenGL, try to update the associated drivers. - Tips - Si votre carte graphique ne peut pas fournir d'accélération matérielle pour OpenGL, essayez d'installer les drivers associés. - - - There are three different jumps available. Tap [high jump] twice to do a very high/backwards jump. - Tips - Il y a différents types de saut disponibles. Pressez [high jump] deux fois pour faire un très haut saut un peu en arrière. - - - Afraid of falling off a cliff? Hold down [precise] to turn [left] or [right] without actually moving. - Tips - Peur de tomber d'une falaise ? Maintenez [precise] pour tourner [left] ou [right] sans bouger. - - - Some weapons require special strategies or just lots of training, so don't give up on a particular tool if you miss an enemy once. - Tips - Certaines armes demandent de la stratégie ou juste beaucoup d'entrainement, alors ne laissez pas tomber une arme si vous avez raté une fois un ennemi. - - - Most weapons won't work once they touch the water. The Homing Bee as well as the Cake are exceptions to this. - Tips - La plupart des armes ne fonctionnent pas une fois qu'elles ont touché l'eau. L'Abeille Missile ou le Gâteau sont des exceptions. - - - The Old Limbuger only causes a small explosion. However the wind affected smelly cloud can poison lots of hogs at once. - Tips - Le vieux Limburger cause seulement une petite explosion. En revanche le vent affecte le petit nuage empoisonné qui peut contaminer de nombreux hérissons à la fois. - - - The Piano Strike is the most damaging air strike. You'll lose the hedgehog performing it, so there's a huge downside as well. - Tips - L'attaque du Piano est la plus dévastatrice des attaques aériennes. Mais la contrepartie est grande puisque vous perdrez le hérisson qui la lance. - - - Sticky Mines are a perfect tool to create small chain reactions knocking enemy hedgehogs into dire situations ... or water. - Tips - Les Mines adhésives sont l'outil parfait pour créer de petites réactions en chaines envoyant les ennemis dans des situations délicates ... ou dans l'eau. - - - The Hammer is most effective when used on bridges or girders. Hit hogs will just break through the ground. - Tips - Le Marteau est plus efficace utilisé sur des ponts ou des poutrelles. Les hérissons touchés vont passer à travers le sol. - - - If you're stuck behind an enemy hedgehog, use the Hammer to free yourself without getting damaged by an explosion. - Tips - Si vous êtes coincés derrière un hérisson ennemi, utilisez le Marteau pour vous libérer sans subir les dégâts d'une explosion. - - - The Cake's maximum walking distance depends on the ground it has to pass. Use [attack] to detonate it early. - Tips - La distance maximale que le Gâteau peux parcourir dépend du terrain qu'il doit franchir. Utiliser [attack] pour le faire exploser avant. - - - The Flame Thrower is a weapon but it can be used for tunnel digging as well. - Tips - Le Lance-flammes est une arme mais peut aussi être utilisé pour creuser un tunnel. - - - Want to know who's behind the game? Click on the Hedgewars logo in the main menu to see the credits. - Tips - Vous voulez savoir qui est derrière le jeu ? Cliquez sur le logo Hedgewars dans le menu principal pour voir les crédits. - - - Feel free to draw your own graves, hats, flags or even maps and themes! But note that you'll have to share them somewhere to use them online. - Tips - Soyez libre de dessiner vos propres tombes, chapeaux, drapeaux ou même cartes et thèmes ! Mais pour les utiliser en ligne vous devrez les partager quelque part. - - - Really want to wear a specific hat? Donate to us and receive an exclusive hat of your choice! - Tips - Vous voulez vraiment un chapeau spécifique ? Faites un don et recevez un chapeau exclusif de votre choix. - - - Keep your video card drivers up to date to avoid issues playing the game. - Tips - Conservez les pilotes de votre carte graphique à jour pour éviter les problèmes en jouant. - - - You can find your Hedgewars configuration files under "My Documents\Hedgewars". Create backups or take the files with you, but don't edit them by hand. - Tips - Vous pouvez trouver vos fichiers de configuration Hedgewars sous « Mes Documents\Hedgewars ». Créez des sauvegardes ou prenez les fichiers avec vous, mais ne les modifiez pas à la main ! - - - You're able to associate Hedgewars related files (savegames and demo recordings) with the game to launch them right from your favorite file or internet browser. - Tips - Vous pouvez associer les fichiers relatifs à Hedgewars (parties enregistrées ou démonstrations) au jeu pour les lancer depuis votre navigateur de fichiers ou internet. - - - Like Hedgewars? Become a fan on %1 or follow us on %2! - Tips - Vous aimez Hedgewars ? Devenez un fan sur %1 ou suivez-nous sur %2 ! - - - Want to save ropes? Release the rope in mid air and then shoot again. As long as you don't touch the ground you'll reuse your rope without wasting ammo! - Tips - Envie d'économiser des Cordes Ninja ? Relâchez la Corde Ninja en l'air et tirez à nouveau. Du moment que vous ne touchez pas le sol, vous réutiliserez votre Corde Ninja sans gaspiller de munitions. - - - You can find your Hedgewars configuration files under "Library/Application Support/Hedgewars" in your home directory. Create backups or take the files with you, but don't edit them by hand. - Tips - Vous pouvez trouver vos fichiers de configuration Hedgewars sous « Library/Application Support/Hedgewars » dans votre répertoire personnel. Créez des sauvegardes ou prenez les fichiers avec vous, mais ne les modifiez pas à la main ! - - - You can find your Hedgewars configuration files under ".hedgewars" in your home directory. Create backups or take the files with you, but don't edit them by hand. - Tips - Vous pouvez trouver vos fichiers de configuration Hedgewars sous « .hedgewars » dans votre répertoire personnel. Créez des sauvegardes ou prenez les fichiers avec vous, mais ne les modifiez pas à la main ! - - - The Windows version of Hedgewars supports Xfire. Make sure to add Hedgewars to its game list so your friends can see you playing. - Tips - La version Windows de Hedgewars supporte Xfire. Ajoutez Hedgewars à la liste des jeux pour que vos amis puissent vous voir jouer - - - Use the Molotov or Flame Thrower to temporary keep hedgehogs from passing terrain such as tunnels or platforms. - Tips - Utilisez le Lance-Flammes ou le Cocktail Molotov pour empêcher temporairement les hérissons de circuler dans les tunnels ou sur les plateformes. - - - The Homing Bee can be tricky to use. Its turn radius depends on its velocity, so try to not use full power. - Tips - - - Downloadable Content - Local Game - - - Play a game on a single computer - Network Game - - - Play a game across a network @@ -817,6 +855,14 @@ Edit game preferences + + Play a game across a local area network + + + + Play a game on an official server + + PageMultiplayer @@ -824,6 +870,10 @@ Start Démarrer + + Edit game preferences + + PageNetGame @@ -831,24 +881,13 @@ Control Contrôles - - - PageNetType - - LAN game - Jeu en réseau local (LAN) - - - Official server - Serveur officiel - - - Join hundreds of players online! + + Edit game preferences - Join or host your own game server in a Local Area Network. - + Start + Démarrer @@ -894,10 +933,6 @@ Supprimer un ensemble d'armes - General - Général - - Advanced Avancé @@ -937,6 +972,94 @@ System proxy settings + + Select an action to change what key controls it + + + + Reset to default + + + + Reset all binds + + + + Game + + + + Graphics + + + + Audio + + + + Controls + + + + Video Recording + + + + Network + + + + Teams + Équipes + + + Schemes + + + + Weapons + Armes + + + Frontend + + + + Custom colors + + + + Game audio + + + + Frontend audio + + + + Account + + + + Proxy settings + + + + Miscellaneous + + + + Updates + + + + Check for updates + + + + Video recording options + + PagePlayDemo @@ -1136,18 +1259,10 @@ PageSinglePlayer - Simple Game - - - Play a quick game against the computer with random settings - Multiplayer - - - Play a hotseat game against your friends, or AI teams @@ -1156,26 +1271,14 @@ - Training Mode - - - Practice your skills in a range of training missions - Demos - - - Watch recorded demos - Load - Charger - - Load a previously saved game @@ -1221,14 +1324,6 @@ - Date: - - - - Size: - - - encoding @@ -1236,6 +1331,16 @@ uploading + + Date: %1 + + + + + Size: %1 + + + QAction @@ -1244,10 +1349,6 @@ Exclure - Start - Démarrer - - Restrict Joins Restreindre les accès @@ -1291,10 +1392,6 @@ QCheckBox - Enable sound - Activer le son - - Fullscreen Plein écran @@ -1307,14 +1404,6 @@ Affichage de dommages alternatif - Enable music - Activer la musique - - - Frontend fullscreen - Affichage en plein écran de l'interface - - Append date and time to record file name Ajouter la date et l'heure au nom du fichier @@ -1327,18 +1416,6 @@ Montrer les astuces du menu des armes. - Enable frontend sounds - Activer les sons du menu principal - - - Enable frontend music - Activer la musique du menu principal - - - Frontend effects - Effets du menu principal - - Save password @@ -1358,14 +1435,38 @@ Use game resolution + + Visual effects + + + + Sound + + + + In-game sound effects + + + + Music + + + + In-game music + + + + Frontend sound effects + + + + Frontend music + + QComboBox - generated map... - carte générée... - - Human Humain @@ -1378,14 +1479,6 @@ Réglage du système - generated maze... - Labyrinthe généré - - - Mission - Mission - - Community Communauté @@ -1402,10 +1495,6 @@ En cours - hand drawn map... - Carte dessinée - - Disabled @@ -1442,10 +1531,6 @@ - Wiggle - - - Red/Cyan grayscale @@ -1481,18 +1566,6 @@ Fort - Key binds - Raccourcis clavier - - - Teams - Équipes - - - Audio/Graphic options - Options audio/vidéo - - Playing teams Équipes participantes @@ -1513,26 +1586,6 @@ Réglages de l'équipe - Misc - Divers - - - Schemes and Weapons - Paramètres et Armes - - - Custom colors - - - - Miscellaneous - - - - Video recording options - - - Videos @@ -1540,10 +1593,6 @@ Description - - Proxy settings - - QLabel @@ -1556,22 +1605,6 @@ Limite de FPS - Developers: - Développeurs: - - - Art: - Graphismes: - - - Translations: - Traductions: - - - Special thanks: - Remerciements spéciaux: - - Server name: Nom du serveur: @@ -1596,10 +1629,6 @@ Version - Sounds: - Sons: - - Initial sound volume Volume du son initial @@ -1636,10 +1665,6 @@ Lachers de caisse - Game scheme - Paramètres de jeu - - % Dud Mines % de Mines défectueuses @@ -1676,10 +1701,6 @@ Conseil : - This development build is 'work in progress' and may not be compatible with other versions of the game. Some features might be broken or incomplete. Use at your own risk! - Cette version de développement est un travail en cours, il peut ne pas être compatible avec les autres versions du jeu. Certaines fonctionnalités peuvent être cassées ou incomplètes. - - Quality Qualité @@ -1754,10 +1775,6 @@ - Summary - - - Description @@ -1785,6 +1802,38 @@ Bitrate (Kbps) + + This development build is 'work in progress' and may not be compatible with other versions of the game, while some features might be broken or incomplete! + + + + Fullscreen + Plein écran + + + Fullscreen Resolution + + + + Windowed Resolution + + + + Your Email + + + + Summary + + + + Send system information + + + + Type the security code: + + QLineEdit @@ -1823,10 +1872,6 @@ Les associations d'extensions de fichiers ont échoué. - Please fill out all fields - - - Error while authenticating at google.com: @@ -1873,18 +1918,6 @@ - Successfully posted the issue on hedgewars.googlecode.com - - - - Error during authentication at google.com - - - - Error reporting the issue, please try again later (or visit hedgewars.googlecode.com directly) - - - Main - Error @@ -2031,25 +2064,42 @@ Do you really want to delete the weapon set '%1'? - - - QObject - - Nickname - Pseudo - - - Please enter your nickname - Veuillez entrer votre pseudo + + Hedgewars - Nick not registered + + + + System Information Preview + + + + Failed to generate captcha + + + + Failed to download captcha + + + + Please fill out all fields. Email is optional. + + + + Hedgewars - Warning + + + + Hedgewars - Information + + + + Hedgewars + QPushButton - Setup - Configuration - - Play demo Jouer la démo @@ -2102,22 +2152,10 @@ Supprimer - Ready - Prêt - - - Random Team - Équipes aléatoires - - Associate file extensions Associer les extensions de fichiers - more - plus - - More info @@ -2210,6 +2248,25 @@ + SeedPrompt + + The map seed is the basis for all random values generated by the game. + + + + Cancel + Annuler + + + Set seed + + + + Close + + + + SelWeaponWidget Weapon set @@ -2237,107 +2294,22 @@ - ToggleButtonWidget - - Vampirism - Vampirisme - - - Karma - Karma - - - Artillery - Artillerie - - - Fort Mode - Mode Forteresse - - - Divide Teams - Diviser les Équipes - - - Solid Land - Terrain Solide - - - Add Border - Ajouter des Bordures - - - Low Gravity - Gravité Fable - - - Laser Sight - Visée Laser - - - Invulnerable - Invulnérable - - - Random Order - Ordre aléatoire - - - King - Roi - - - Place Hedgehogs - Placer les hérissons - - - Clan Shares Ammo - Les Clans partagent les munitions - - - Disable Girders - Désactiver les poutres - - - Disable Land Objects - Désactiver les objets de terrain - - - AI Survival Mode - Mode de survie de l'IA - - - Reset Health - Réinitialiser la Santé - - - Unlimited Attacks - Attaques illimitées - - - Reset Weapons - Réinitialiser les Armes - - - Per Hedgehog Ammo - Munitions par hérisson - - - Disable Wind - Désactiver le vent - - - More Wind - Davantage de vent - - - Tag Team + TeamShowWidget + + %1's team - - Add Bottom Border + + + ThemePrompt + + Select a theme for this map + + Cancel + Annuler + binds @@ -2458,12 +2430,6 @@ slot 9 - hedgehogs -info - infos -hérissons - - chat chat @@ -2512,33 +2478,33 @@ record + + hedgehog info + + binds (categories) - Basic controls - Contrôles de base - - - Weapon controls - Contrôles des armes - - - Camera and cursor controls - Contrôles de la caméra et du curseur - - - Other - Autres + Movement + + + + Weapons + Armes + + + Camera + + + + Miscellaneous + binds (descriptions) - Move your hogs and aim: - Déplacez votre hérisson et visez: - - Traverse gaps and obstacles by jumping: Traversez des trous et des obstacles en sautant: @@ -2602,6 +2568,10 @@ Record video: + + Hedgehog movement + + binds (keys) diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Locale/hedgewars_gl.ts --- a/share/hedgewars/Data/Locale/hedgewars_gl.ts Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Locale/hedgewars_gl.ts Fri Feb 22 05:05:32 2013 +0100 @@ -20,6 +20,79 @@ + BanDialog + + IP + IP + + + Nick + + + + IP/Nick + + + + Reason + + + + Duration + + + + Ok + + + + Cancel + Cancelar + + + you know why + + + + Warning + + + + Please, specify %1 + + + + nickname + + + + permanent + + + + + DataManager + + Use Default + + + + + FeedbackDialog + + View + + + + Cancel + Cancelar + + + Send Feedback + + + + FreqSpinBox Never @@ -40,14 +113,6 @@ Editar os armamentos - Error - Erro - - - Illegal ammo scheme - Non se permite ese armamento - - Edit schemes Editar os modos de xogo @@ -56,7 +121,30 @@ - When this option is enabled selecting a game scheme will auto-select a weapon + Game scheme will auto-select a weapon + + + + + HWApplication + + %1 minutes + + + + %1 hour + + + + %1 hours + + + + %1 day + + + + %1 days @@ -109,38 +197,14 @@ Failed to save StyleSheet to %1 - - %1 is not a valid command! - - HWForm - new - novo - - - Error - Erro - - - OK - Aceptar - - - Unable to start the server - Non se puido iniciar o servidor - - Cannot save record to file %1 Non se pode gardar a gravación no ficheiro %1 - Please select record from the list above - Selecciona unha gravación da seguinte lista - - DefaultTeam @@ -149,17 +213,6 @@ - Your nickname %1 is -registered on Hedgewars.org -Please provide your password below -or pick another nickname in game config: - - - - No password supplied. - - - Nickname Alcume @@ -190,14 +243,63 @@ Demo name: + + %1's Team + + + + Hedgewars - Nick registered + + + + This nick is registered, and you haven't specified a password. + +If this nick isn't yours, please register your own nick at www.hedgewars.org + +Password: + + + + Your nickname is not registered. +To prevent someone else from using it, +please register it at www.hedgewars.org + + + + + +Your password wasn't saved either. + + + + Hedgewars - Empty nickname + + + + Hedgewars - Wrong password + + + + You entered a wrong password. + + + + Try Again + + + + Hedgewars - Connection error + + + + You reconnected too fast. +Please wait a few seconds and try again. + + HWGame - Error reading training config file - Houbo un erro ao ler o ficheiro de configuración do adestramento - - en.txt gl.txt @@ -209,18 +311,6 @@ HWMapContainer - Map - Mapa - - - Themes - Temas visuais - - - Filter - Filtro - - All Todos @@ -245,10 +335,6 @@ Absurdo - Type - - - Small tunnels @@ -257,27 +343,95 @@ - Large tunnels - - - - Small floating islands - - - - Medium floating islands - - - - Large floating islands - - - Seed - Set + Map type: + + + + Image map + + + + Mission map + + + + Hand-drawn + + + + Randomly generated + + + + Random maze + + + + Random + Ao chou + + + Map preview: + + + + Load map drawing + + + + Edit map drawing + + + + Largetunnels + + + + Small islands + + + + Medium islands + + + + Large islands + + + + Map size: + + + + Maze style: + + + + Mission: + + + + Map: + + + + Theme: + + + + Load drawn map + + + + Drawn Maps + + + + All files @@ -319,20 +473,6 @@ Botáronte - Password - Contrasinal - - - Your nickname %1 is -registered on Hedgewars.org -Please provide your password -or pick another nickname: - O teu alcume, «%1» -está rexistrado en Hedgewars.org -Introduce o contrasinal ou -escolle outro alcume: - - %1 *** %2 has joined the room %1 *** %2 entrou na sala @@ -364,8 +504,8 @@ HWPasswordDialog - Password - Contrasinal + Login + @@ -380,6 +520,32 @@ + HatButton + + Change hat (%1) + + + + + HatPrompt + + Select a hat + + + + Filter: + + + + Cancel + Cancelar + + + Use selected hat + + + + KB SDL_ttf returned error while rendering text, most propably it is related to the bug in freetype2. It's recommended to update your freetype lib. @@ -387,6 +553,13 @@ + KeyBinder + + Category + + + + LibavInteraction Duration: %1m %2s @@ -405,18 +578,21 @@ Audio: + + unknown + + + + + MapModel + + No description available. + + PageAdmin - Server message: - Mensaxe do servidor: - - - Set message - Establecer a mensaxe - - Clear Accounts Cache Borrar a caché das contas @@ -444,6 +620,38 @@ Set data + + General + Xeral + + + Bans + + + + IP/Nick + + + + Expiration + + + + Reason + + + + Refresh + Actualizar + + + Add + + + + Remove + + PageConnecting @@ -498,31 +706,45 @@ Xeral - Advanced - Avanzado + Select an action to choose a custom key bind for this team + + + + Use my default + + + + Reset all binds + + + + Custom Controls + + + + Hat + Sombreiro + + + Name + + + + This hedgehog's name + + + + Randomize this hedgehog's name + + + + Random Team + PageGameStats - <p>The best shot award was won by <b>%1</b> with <b>%2</b> pts.</p> - <p>O mellor tirador foi <b>%1</b>, con <b>%2</b> puntos.</p> - - - <p>The best killer is <b>%1</b> with <b>%2</b> kills in a turn.</p> - - <p>O mellor asasino é <b>%1</b>, con <b>%2</b> vítima nunha rolda.</p> - <p>O mellor asasino é <b>%1</b>, con <b>%2</b> vítimas nunha rolda.</p> - - - - <p>A total of <b>%1</b> hedgehog(s) were killed during this round.</p> - - <p>Nesta rolda morrereu <b>un</b> ourizo.</p> - <p>Nesta rolda morreron <b>%1</b> ourizos.</p> - - - Details @@ -598,26 +820,10 @@ PageMain - Local Game (Play a game on a single computer) - Partida local (xoga unha partida nun só computador) - - - Network Game (Play a game across a network) - Partida na rede (xoga unha partida na rede) - - - Local Game - - - Play a game on a single computer - Network Game - - - Play a game across a network @@ -650,248 +856,11 @@ - Simply pick the same color as a friend to play together as a team. Each of you will still control his or her own hedgehogs but they'll win or lose together. - Tips - - - - Some weapons might do only low damage but they can be a lot more devastating in the right situation. Try to use the Desert Eagle to knock multiple hedgehogs into the water. - Tips - - - - If you're unsure what to do and don't want to waste ammo, skip one round. But don't let too much time pass as there will be Sudden Death! - Tips - - - - Want to save ropes? Release the rope in mid air and then shoot again. As long as you don't touch the ground you'll reuse your rope without wasting ammo! - Tips - - - - If you'd like to keep others from using your preferred nickname on the official server, register an account at http://www.hedgewars.org/. - Tips - - - - You're bored of default gameplay? Try one of the missions - they'll offer different gameplay depending on the one you picked. - Tips - - - - By default the game will always record the last game played as a demo. Select 'Local Game' and pick the 'Demos' button on the lower right corner to play or manage them. - Tips - - - - Hedgewars is Open Source and Freeware we create in our spare time. If you've got problems, ask on our forums but please don't expect 24/7 support! - Tips - - - - Hedgewars is Open Source and Freeware we create in our spare time. If you like it, help us with a small donation or contribute your own work! - Tips - - - - Hedgewars is Open Source and Freeware we create in our spare time. Share it with your family and friends as you like! - Tips - - - - Hedgewars is Open Source and Freeware we create in our spare time. If someone sold you the game, you should try get a refund! - Tips - - - - From time to time there will be official tournaments. Upcoming events will be announced at http://www.hedgewars.org/ some days in advance. - Tips - - - - Hedgewars is available in many languages. If the translation in your language seems to be missing or outdated, feel free to contact us! - Tips - - - - Hedgewars can be run on lots of different operating systems including Microsoft Windows, Mac OS X and Linux. - Tips - - - - Always remember you're able to set up your own games in local and network/online play. You're not restricted to the 'Simple Game' option. - Tips - - - - Connect one or more gamepads before starting the game to be able to assign their controls to your teams. - Tips - - - - Create an account on %1 to keep others from using your most favourite nickname while playing on the official server. - Tips - - - - While playing you should give yourself a short break at least once an hour. - Tips - - - - If your graphics card isn't able to provide hardware accelerated OpenGL, try to enable the low quality mode to improve performance. - Tips - - - - If your graphics card isn't able to provide hardware accelerated OpenGL, try to update the associated drivers. - Tips - - - - We're open to suggestions and constructive feedback. If you don't like something or got a great idea, let us know! - Tips - - - - Especially while playing online be polite and always remember there might be some minors playing with or against you as well! - Tips - - - - Special game modes such as 'Vampirism' or 'Karma' allow you to develop completely new tactics. Try them in a custom game! - Tips - - - - The Windows version of Hedgewars supports Xfire. Make sure to add Hedgewars to its game list so your friends can see you playing. - Tips - - - - You should never install Hedgewars on computers you don't own (school, university, work, etc.). Please ask the responsible person instead! - Tips - - - - Hedgewars can be perfect for short games during breaks. Just ensure you don't add too many hedgehogs or use an huge map. Reducing time and health might help as well. - Tips - - - - No hedgehogs were harmed in making this game. - Tips - - - - There are three different jumps available. Tap [high jump] twice to do a very high/backwards jump. - Tips - - - - Afraid of falling off a cliff? Hold down [precise] to turn [left] or [right] without actually moving. - Tips - - - - Some weapons require special strategies or just lots of training, so don't give up on a particular tool if you miss an enemy once. - Tips - - - - Most weapons won't work once they touch the water. The Homing Bee as well as the Cake are exceptions to this. - Tips - - - - The Old Limbuger only causes a small explosion. However the wind affected smelly cloud can poison lots of hogs at once. - Tips - - - - The Piano Strike is the most damaging air strike. You'll lose the hedgehog performing it, so there's a huge downside as well. - Tips - - - - The Homing Bee can be tricky to use. Its turn radius depends on its velocity, so try to not use full power. - Tips - - - - Sticky Mines are a perfect tool to create small chain reactions knocking enemy hedgehogs into dire situations ... or water. - Tips - - - - The Hammer is most effective when used on bridges or girders. Hit hogs will just break through the ground. - Tips - - - - If you're stuck behind an enemy hedgehog, use the Hammer to free yourself without getting damaged by an explosion. - Tips - - - - The Cake's maximum walking distance depends on the ground it has to pass. Use [attack] to detonate it early. - Tips - - - - The Flame Thrower is a weapon but it can be used for tunnel digging as well. - Tips - - - - Use the Molotov or Flame Thrower to temporary keep hedgehogs from passing terrain such as tunnels or platforms. - Tips - - - - Want to know who's behind the game? Click on the Hedgewars logo in the main menu to see the credits. - Tips - - - - Like Hedgewars? Become a fan on %1 or follow us on %2! - Tips - - - - Feel free to draw your own graves, hats, flags or even maps and themes! But note that you'll have to share them somewhere to use them online. - Tips - - - - Really want to wear a specific hat? Donate to us and receive an exclusive hat of your choice! - Tips - - - - Keep your video card drivers up to date to avoid issues playing the game. - Tips - - - - You're able to associate Hedgewars related files (savegames and demo recordings) with the game to launch them right from your favorite file or internet browser. - Tips - - - - You can find your Hedgewars configuration files under "My Documents\Hedgewars". Create backups or take the files with you, but don't edit them by hand. - Tips - - - - You can find your Hedgewars configuration files under "Library/Application Support/Hedgewars" in your home directory. Create backups or take the files with you, but don't edit them by hand. - Tips - - - - You can find your Hedgewars configuration files under ".hedgewars" in your home directory. Create backups or take the files with you, but don't edit them by hand. - Tips + Play a game across a local area network + + + + Play a game on an official server @@ -901,16 +870,9 @@ Start Iniciar - - - PageNet - - Error - Erro - - - Please select server from the list above - Selecciona un servidor da seguinte lista + + Edit game preferences + @@ -919,24 +881,13 @@ Control Control - - - PageNetType - - LAN game - Partida na rede local - - - Official server - Servidor oficial - - - Join or host your own game server in a Local Area Network. - - - - Join hundreds of players online! - + + Edit game preferences + + + + Start + Iniciar @@ -950,18 +901,6 @@ Editar o equipo - Weapons set - Armamento - - - Edit - Editar - - - General - Xeral - - Advanced Avanzado @@ -1033,18 +972,98 @@ HTTP proxy + + Select an action to change what key controls it + + + + Reset to default + + + + Reset all binds + + + + Game + + + + Graphics + + + + Audio + + + + Controls + + + + Video Recording + + + + Network + Rede + + + Teams + Equipos + + + Schemes + + + + Weapons + Armamento + + + Frontend + + + + Custom colors + + + + Game audio + + + + Frontend audio + + + + Account + + + + Proxy settings + + + + Miscellaneous + + + + Updates + + + + Check for updates + + + + Video recording options + + PagePlayDemo - Error - Erro - - - OK - Aceptar - - Rename dialog Diálogo de cambio de nome @@ -1052,18 +1071,6 @@ Enter new file name: Introduce un novo nome para o ficheiro: - - Cannot rename to - Non se pode cambiar o nome a - - - Cannot delete file - Non se pode borrar o ficheiro - - - Please select record from the list - Selecciona unha gravación da lista - PageRoomsList @@ -1076,18 +1083,6 @@ Entrar - Refresh - Actualizar - - - Error - Erro - - - OK - Aceptar - - Admin features Administración @@ -1096,60 +1091,6 @@ Nome da sala: - This game is in lobby. -You may join and start playing once the game starts. - Aínda non comezou a partida. -Podes entrar e empezar a xogar cando comece. - - - This game is in progress. -You may join and spectate now but you'll have to wait for the game to end to start playing. - A partida estase xogando. -Poder entrar a ver, pero terás que agardar a que remate para xogar ti. - - - %1 is the host. He may adjust settings and start the game. - %1 é o anfitrión. Pode configurar e iniciar a partida. - - - Random Map - Mapa ao chou - - - Games may be played on precreated or randomized maps. - Pódese xogar en mapas elaborados ou mapas xerados ao chou. - - - The Game Scheme defines general options and preferences like Round Time, Sudden Death or Vampirism. - O modo de xogo establece as opcións xerais tales coma "tempo por rolda", "morte súbita" ou "vampirismo". - - - The Weapon Scheme defines available weapons and their ammunition count. - O armamento establece as armas dispoñibles e a cantidade de munición para cada unha. - - - There are %1 clients connected to this room. - - Hai un cliente conectado a esta sala. - Hai %1 clientes conectados a esta sala. - - - - There are %1 teams participating in this room. - - Hai un equipo participando nesta sala. - Hai %1 equipos participando nesta sala. - - - - Please enter room name - Introduce o nome da sala - - - Please select room from the list - Selecciona unha sala da lista - - Rules: @@ -1188,10 +1129,6 @@ Non se pode destruír o terreo! - Add an indestructable border around the terrain - Engade un bordo indestructible arredor do terreo - - Lower gravity Baixa gravidade @@ -1204,10 +1141,6 @@ Todos os ourizos teñen un escudo protector - Enable random mines - Activar as minas esparexidas - - Gain 80% of the damage you do back in health Gañar o 80% do daño inflixido en vida @@ -1326,38 +1259,10 @@ PageSinglePlayer - Simple Game (a quick game against the computer, settings are chosen for you) - Partida simple (unha partida rápida xa configurada contra a intelixencia artificial) - - - Multiplayer (play a hotseat game against your friends, or AI teams) - Partida colectiva (xoga no teu computador contra os teus amigos ou contra a intelixencia artificial) - - - Training Mode (Practice your skills in a range of training missions). IN DEVELOPMENT - Adestramento (practica as túas habilidades nunha serie de misións de adestramento). EN DESENVOLVEMENTO - - - Demos (Watch recorded demos) - Demostracións (reproduce demostracións gravadas) - - - Load (Load a previously saved game) - Cargar (carga unha partida gardada) - - - Simple Game - - - Play a quick game against the computer with random settings - Multiplayer - - - Play a hotseat game against your friends, or AI teams @@ -1366,26 +1271,14 @@ - Training Mode - - - Practice your skills in a range of training missions - Demos - - - Watch recorded demos - Load - Cargar - - Load a previously saved game @@ -1431,14 +1324,6 @@ - Date: - - - - Size: - - - encoding @@ -1446,6 +1331,16 @@ uploading + + Date: %1 + + + + + Size: %1 + + + QAction @@ -1458,10 +1353,6 @@ Información - Start - Iniciar - - Restrict Joins Restrinxir a entrada @@ -1509,18 +1400,6 @@ Partidas a pantalla completa - Frontend fullscreen - Interface a pantalla completa - - - Enable sound - Activar os sons - - - Enable music - Activar a música - - Show FPS Amosar as FPS @@ -1533,14 +1412,6 @@ Engadir a data e maila hora ao nome dos ficheiros de gravación - Frontend effects (requires restart) - Efectos na interface (hai que reiniciar) - - - Reduced quality - Baixa calidade - - Save password @@ -1553,18 +1424,6 @@ - Frontend effects - - - - Enable frontend sounds - - - - Enable frontend music - - - Show ammo menu tooltips @@ -1576,14 +1435,38 @@ Use game resolution + + Visual effects + + + + Sound + + + + In-game sound effects + + + + Music + + + + In-game music + + + + Frontend sound effects + + + + Frontend music + + QComboBox - generated map... - Mapa xerado... - - Human Xogador @@ -1592,18 +1475,6 @@ Nivel - generated maze... - - - - hand drawn map... - - - - Mission - - - Community @@ -1648,10 +1519,6 @@ - Wiggle - - - Red/Cyan grayscale @@ -1695,30 +1562,10 @@ Membros do equipo - Team - Equipo - - Fort Forte - Key binds - Controis - - - Teams - Equipos - - - Weapons - Armamento - - - Audio/Graphic options - Configuración audiovisual - - Net game Partida na rede @@ -1739,30 +1586,6 @@ - Schemes and Weapons - - - - Misc - - - - Custom colors - - - - Miscellaneous - - - - Proxy settings - - - - Video recording options - - - Videos @@ -1786,30 +1609,6 @@ Versión - This program is distributed under the GNU General Public License - Esta aplicación distribúese baixo a GNU General Public License - - - Developers: - Desenvolvedores: - - - Art: - Gráficos: - - - Sounds: - Sons: - - - Translations: - Traducións: - - - Special thanks: - Un especial agradecemento a: - - Weapons Armamento @@ -1822,10 +1621,6 @@ Porto: - Net nick - Alcume - - Resolution Resolución @@ -1870,10 +1665,6 @@ Caída de caixas - Game scheme - Modo de xogo - - There are videos that are currently being processed. Exiting now will abort them. Do you really want to quit? @@ -1924,10 +1715,6 @@ - Summary - - - Description @@ -1936,10 +1723,6 @@ - This development build is 'work in progress' and may not be compatible with other versions of the game. Some features might be broken or incomplete. Use at your own risk! - - - Locale @@ -2019,6 +1802,38 @@ Scheme + + This development build is 'work in progress' and may not be compatible with other versions of the game, while some features might be broken or incomplete! + + + + Fullscreen + Partidas a pantalla completa + + + Fullscreen Resolution + + + + Windowed Resolution + + + + Your Email + + + + Summary + + + + Send system information + + + + Type the security code: + + QLineEdit @@ -2045,10 +1860,6 @@ QMessageBox - Network - Rede - - Connection to server is lost Perdeuse a conexión co servidor @@ -2057,30 +1868,6 @@ Erro - Failed to open data directory: -%1 -Please check your installation - Non se puido abrir o directorio dos datos: - %1 -Verifica a instalación - - - Weapons - Armamento - - - Can not edit default weapon set - Non se pode editar o armamento por defecto - - - Can not delete default weapon set - Non se pode borrar o armamento por defecto - - - Really delete this weapon set? - Seguro que queres borrar este armamento? - - Teams - Are you sure? @@ -2117,22 +1904,6 @@ - Please fill out all fields - - - - Successfully posted the issue on hedgewars.googlecode.com - - - - Error during authentication at google.com - - - - Error reporting the issue, please try again later (or visit hedgewars.googlecode.com directly) - - - Main - Error @@ -2293,28 +2064,37 @@ Do you really want to delete the weapon set '%1'? - - - QObject - - Error - Erro - - - Cannot create directory %1 - Non se puido crear o directorio %1 - - - OK - Aceptar - - - Nickname - Alcume - - - Please enter your nickname - Introduce o teu alcume + + Hedgewars - Nick not registered + + + + System Information Preview + + + + Failed to generate captcha + + + + Failed to download captcha + + + + Please fill out all fields. Email is optional. + + + + Hedgewars - Warning + + + + Hedgewars - Information + + + + Hedgewars + @@ -2372,22 +2152,10 @@ Cargar - Setup - Configuración - - - Ready - Preparado - - More info - Random Team - - - Associate file extensions @@ -2431,41 +2199,6 @@ Cancel uploading - - more - - - - - QTableWidget - - Room Name - Nome da sala - - - C - C - - - T - T - - - Owner - Dono - - - Map - Mapa - - - Rules - Regras - - - Weapons - Armamento - RoomsListModel @@ -2515,6 +2248,25 @@ + SeedPrompt + + The map seed is the basis for all random values generated by the game. + + + + Cancel + Cancelar + + + Set seed + + + + Close + + + + SelWeaponWidget Weapon set @@ -2542,125 +2294,21 @@ - TCPBase - - Error - Erro - - - Unable to start the server: %1. - Non se puido iniciar o servidor: %1. - - - Unable to run engine: %1 ( - Non se puido executar o motor: %1 ( + TeamShowWidget + + %1's team + - ToggleButtonWidget - - Vampirism - Vampirismo - - - Karma - Karma - - - Artillery - Artillería - - - Fort Mode - Modo fortaleza - - - Divide Teams - Equipos divididos - - - Solid Land - Terreo indestructible - - - Add Border - Con bordos - - - Low Gravity - Baixa gravidade - - - Laser Sight - Mira láser - - - Invulnerable - Invulnerable - - - Add Mines - Engadir minas - - - Reset Health - - - - Random Order - - - - King - - - - Place Hedgehogs - - - - Clan Shares Ammo - - - - Disable Girders - - - - Disable Land Objects - - - - AI Survival Mode - - - - Unlimited Attacks - - - - Reset Weapons - - - - Per Hedgehog Ammo - - - - Disable Wind - - - - More Wind - - - - Tag Team - - - - Add Bottom Border - + ThemePrompt + + Select a theme for this map + + + + Cancel + Cancelar @@ -2794,12 +2442,6 @@ capturar - hedgehogs -info - información -dos ourizos - - quit saír @@ -2835,33 +2477,33 @@ record + + hedgehog info + + binds (categories) - Basic controls - Controis básicos - - - Weapon controls - Controis das armas - - - Camera and cursor controls - Controis da cámara e mailo cursor - - - Other - Outros + Movement + + + + Weapons + Armamento + + + Camera + + + + Miscellaneous + binds (descriptions) - Move your hogs and aim: - Move os teus ourizos e apunta: - - Traverse gaps and obstacles by jumping: Supera os obstáculos saltando: @@ -2925,6 +2567,10 @@ Record video: + + Hedgehog movement + + binds (keys) diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Locale/hedgewars_hu.ts --- a/share/hedgewars/Data/Locale/hedgewars_hu.ts Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Locale/hedgewars_hu.ts Fri Feb 22 05:05:32 2013 +0100 @@ -20,6 +20,79 @@ + BanDialog + + IP + IP + + + Nick + + + + IP/Nick + + + + Reason + + + + Duration + + + + Ok + + + + Cancel + Mégse + + + you know why + + + + Warning + + + + Please, specify %1 + + + + nickname + + + + permanent + + + + + DataManager + + Use Default + + + + + FeedbackDialog + + View + + + + Cancel + Mégse + + + Send Feedback + + + + FreqSpinBox Never @@ -43,11 +116,34 @@ Sémák szerkesztése - When this option is enabled selecting a game scheme will auto-select a weapon + Game Options + + + + Game scheme will auto-select a weapon + + + + + HWApplication + + %1 minutes - Game Options + %1 hour + + + + %1 hours + + + + %1 day + + + + %1 days @@ -100,10 +196,6 @@ Failed to save StyleSheet to %1 - - %1 is not a valid command! - - HWForm @@ -138,17 +230,6 @@ - Your nickname %1 is -registered on Hedgewars.org -Please provide your password below -or pick another nickname in game config: - - - - No password supplied. - - - Nickname Becenév @@ -161,6 +242,59 @@ Please pick another nickname: + + %1's Team + + + + Hedgewars - Nick registered + + + + This nick is registered, and you haven't specified a password. + +If this nick isn't yours, please register your own nick at www.hedgewars.org + +Password: + + + + Your nickname is not registered. +To prevent someone else from using it, +please register it at www.hedgewars.org + + + + + +Your password wasn't saved either. + + + + Hedgewars - Empty nickname + + + + Hedgewars - Wrong password + + + + You entered a wrong password. + + + + Try Again + + + + Hedgewars - Connection error + + + + You reconnected too fast. +Please wait a few seconds and try again. + + HWGame @@ -176,18 +310,6 @@ HWMapContainer - Map - Pálya - - - Themes - Témák - - - Filter - Szűrő - - All Minden @@ -212,10 +334,6 @@ Őrült - Type - Típus - - Small tunnels Szűk alagutak @@ -224,27 +342,95 @@ Átlagos alagutak - Large tunnels - Tágas alagutak - - - Small floating islands - Apró lebegő szigetek - - - Medium floating islands - Közepes lebegő szigetek - - - Large floating islands - Nagy lebegő szigetek - - Seed - Set + Map type: + + + + Image map + + + + Mission map + + + + Hand-drawn + + + + Randomly generated + + + + Random maze + + + + Random + Véletlen + + + Map preview: + + + + Load map drawing + + + + Edit map drawing + + + + Largetunnels + + + + Small islands + + + + Medium islands + + + + Large islands + + + + Map size: + + + + Maze style: + + + + Mission: + + + + Map: + + + + Theme: + + + + Load drawn map + + + + Drawn Maps + + + + All files @@ -317,8 +503,8 @@ HWPasswordDialog - Password - JElszó + Login + @@ -333,6 +519,32 @@ + HatButton + + Change hat (%1) + + + + + HatPrompt + + Select a hat + + + + Filter: + + + + Cancel + Mégse + + + Use selected hat + + + + KB SDL_ttf returned error while rendering text, most propably it is related to the bug in freetype2. It's recommended to update your freetype lib. @@ -340,6 +552,13 @@ + KeyBinder + + Category + + + + LibavInteraction Duration: %1m %2s @@ -358,6 +577,17 @@ Audio: + + unknown + + + + + MapModel + + No description available. + + PageAdmin @@ -389,6 +619,38 @@ Set data Adat beállítása + + General + Általános + + + Bans + + + + IP/Nick + + + + Expiration + + + + Reason + + + + Refresh + + + + Add + + + + Remove + + PageConnecting @@ -443,8 +705,40 @@ Általános - Advanced - Haladó + Select an action to choose a custom key bind for this team + + + + Use my default + + + + Reset all binds + + + + Custom Controls + + + + Hat + Kalap + + + Name + Név + + + This hedgehog's name + + + + Randomize this hedgehog's name + + + + Random Team + Véletlen csapat @@ -519,267 +813,14 @@ PageMain - Simply pick the same color as a friend to play together as a team. Each of you will still control his or her own hedgehogs but they'll win or lose together. - Tips - - - - Some weapons might do only low damage but they can be a lot more devastating in the right situation. Try to use the Desert Eagle to knock multiple hedgehogs into the water. - Tips - - - - If you're unsure what to do and don't want to waste ammo, skip one round. But don't let too much time pass as there will be Sudden Death! - Tips - - - - If you'd like to keep others from using your preferred nickname on the official server, register an account at http://www.hedgewars.org/. - Tips - - - - You're bored of default gameplay? Try one of the missions - they'll offer different gameplay depending on the one you picked. - Tips - - - - By default the game will always record the last game played as a demo. Select 'Local Game' and pick the 'Demos' button on the lower right corner to play or manage them. - Tips - - - - Hedgewars is Open Source and Freeware we create in our spare time. If you've got problems, ask on our forums but please don't expect 24/7 support! - Tips - - - - Hedgewars is Open Source and Freeware we create in our spare time. If you like it, help us with a small donation or contribute your own work! - Tips - - - - Hedgewars is Open Source and Freeware we create in our spare time. Share it with your family and friends as you like! - Tips - - - - Hedgewars is Open Source and Freeware we create in our spare time. If someone sold you the game, you should try get a refund! - Tips - - - - From time to time there will be official tournaments. Upcoming events will be announced at http://www.hedgewars.org/ some days in advance. - Tips - - - - Hedgewars is available in many languages. If the translation in your language seems to be missing or outdated, feel free to contact us! - Tips - - - - Hedgewars can be run on lots of different operating systems including Microsoft Windows, Mac OS X and Linux. - Tips - - - - Always remember you're able to set up your own games in local and network/online play. You're not restricted to the 'Simple Game' option. - Tips - - - - Connect one or more gamepads before starting the game to be able to assign their controls to your teams. - Tips - - - - Create an account on %1 to keep others from using your most favourite nickname while playing on the official server. - Tips - - - - While playing you should give yourself a short break at least once an hour. - Tips - - - - If your graphics card isn't able to provide hardware accelerated OpenGL, try to enable the low quality mode to improve performance. - Tips - - - - If your graphics card isn't able to provide hardware accelerated OpenGL, try to update the associated drivers. - Tips - - - - We're open to suggestions and constructive feedback. If you don't like something or got a great idea, let us know! - Tips - - - - Especially while playing online be polite and always remember there might be some minors playing with or against you as well! - Tips - - - - Special game modes such as 'Vampirism' or 'Karma' allow you to develop completely new tactics. Try them in a custom game! - Tips - - - - You should never install Hedgewars on computers you don't own (school, university, work, etc.). Please ask the responsible person instead! - Tips - - - - Hedgewars can be perfect for short games during breaks. Just ensure you don't add too many hedgehogs or use an huge map. Reducing time and health might help as well. - Tips - - - - No hedgehogs were harmed in making this game. - Tips - - - - There are three different jumps available. Tap [high jump] twice to do a very high/backwards jump. - Tips - - - - Afraid of falling off a cliff? Hold down [precise] to turn [left] or [right] without actually moving. - Tips - - - - Some weapons require special strategies or just lots of training, so don't give up on a particular tool if you miss an enemy once. - Tips - - - - Most weapons won't work once they touch the water. The Homing Bee as well as the Cake are exceptions to this. - Tips - - - - The Old Limbuger only causes a small explosion. However the wind affected smelly cloud can poison lots of hogs at once. - Tips - - - - The Piano Strike is the most damaging air strike. You'll lose the hedgehog performing it, so there's a huge downside as well. - Tips - - - - Sticky Mines are a perfect tool to create small chain reactions knocking enemy hedgehogs into dire situations ... or water. - Tips - - - - The Hammer is most effective when used on bridges or girders. Hit hogs will just break through the ground. - Tips - - - - If you're stuck behind an enemy hedgehog, use the Hammer to free yourself without getting damaged by an explosion. - Tips - - - - The Cake's maximum walking distance depends on the ground it has to pass. Use [attack] to detonate it early. - Tips - - - - The Flame Thrower is a weapon but it can be used for tunnel digging as well. - Tips - - - - Want to know who's behind the game? Click on the Hedgewars logo in the main menu to see the credits. - Tips - - - - Like Hedgewars? Become a fan on %1 or follow us on %2! - Tips - - - - Feel free to draw your own graves, hats, flags or even maps and themes! But note that you'll have to share them somewhere to use them online. - Tips - - - - Really want to wear a specific hat? Donate to us and receive an exclusive hat of your choice! - Tips - - - - Keep your video card drivers up to date to avoid issues playing the game. - Tips - - - - You can find your Hedgewars configuration files under "My Documents\Hedgewars". Create backups or take the files with you, but don't edit them by hand. - Tips - - - - You're able to associate Hedgewars related files (savegames and demo recordings) with the game to launch them right from your favorite file or internet browser. - Tips - - - - Want to save ropes? Release the rope in mid air and then shoot again. As long as you don't touch the ground you'll reuse your rope without wasting ammo! - Tips - - - - You can find your Hedgewars configuration files under "Library/Application Support/Hedgewars" in your home directory. Create backups or take the files with you, but don't edit them by hand. - Tips - - - - You can find your Hedgewars configuration files under ".hedgewars" in your home directory. Create backups or take the files with you, but don't edit them by hand. - Tips - - - - The Windows version of Hedgewars supports Xfire. Make sure to add Hedgewars to its game list so your friends can see you playing. - Tips - - - - Use the Molotov or Flame Thrower to temporary keep hedgehogs from passing terrain such as tunnels or platforms. - Tips - - - - The Homing Bee can be tricky to use. Its turn radius depends on its velocity, so try to not use full power. - Tips - - - Downloadable Content - Local Game - - - Play a game on a single computer - Network Game - - - Play a game across a network @@ -807,6 +848,14 @@ Edit game preferences + + Play a game across a local area network + + + + Play a game on an official server + + PageMultiplayer @@ -814,6 +863,10 @@ Start Start + + Edit game preferences + + PageNetGame @@ -821,24 +874,13 @@ Control Irányítás - - - PageNetType - - LAN game - LAN játék - - - Official server - Hivatalos szerver - - - Join hundreds of players online! + + Edit game preferences - Join or host your own game server in a Local Area Network. - + Start + Start @@ -884,10 +926,6 @@ - General - Általános - - Advanced Haladó @@ -927,6 +965,94 @@ System proxy settings + + Select an action to change what key controls it + + + + Reset to default + + + + Reset all binds + + + + Game + + + + Graphics + + + + Audio + + + + Controls + + + + Video Recording + + + + Network + + + + Teams + Csapatok + + + Schemes + + + + Weapons + Fegyverek + + + Frontend + + + + Custom colors + + + + Game audio + + + + Frontend audio + + + + Account + + + + Proxy settings + + + + Miscellaneous + + + + Updates + + + + Check for updates + + + + Video recording options + + PagePlayDemo @@ -1125,18 +1251,10 @@ PageSinglePlayer - Simple Game - - - Play a quick game against the computer with random settings - Multiplayer - - - Play a hotseat game against your friends, or AI teams @@ -1145,26 +1263,14 @@ - Training Mode - - - Practice your skills in a range of training missions - Demos - - - Watch recorded demos - Load - Betöltés - - Load a previously saved game @@ -1209,14 +1315,6 @@ - Date: - - - - Size: - - - encoding @@ -1224,6 +1322,16 @@ uploading + + Date: %1 + + + + + Size: %1 + + + QAction @@ -1236,10 +1344,6 @@ Info - Start - Start - - Restrict Joins Csatlakozások korlátozása @@ -1287,18 +1391,6 @@ Teljes képernyő - Frontend fullscreen - Frontend teljesképernyő - - - Enable sound - Hangok engedélyezése - - - Enable music - Zene engedélyezése - - Show FPS FPS megjelenítése @@ -1315,18 +1407,6 @@ Lőszer menü tippjeinek mutatása - Enable frontend sounds - Frontend hangok engedélyezése - - - Enable frontend music - Frontend zenéjének engedélyezése - - - Frontend effects - Frontend effektusok - - Save password @@ -1346,14 +1426,38 @@ Use game resolution + + Visual effects + + + + Sound + + + + In-game sound effects + + + + Music + + + + In-game music + + + + Frontend sound effects + + + + Frontend music + + QComboBox - generated map... - a létrehozott pálya... - - Human Ember @@ -1366,14 +1470,6 @@ (rendszer default) - Mission - Küldetés - - - generated maze... - a létrehozott labirintus... - - Community @@ -1390,10 +1486,6 @@ - hand drawn map... - - - Disabled @@ -1430,10 +1522,6 @@ - Wiggle - - - Red/Cyan grayscale @@ -1469,18 +1557,6 @@ Erőd - Key binds - Billentyűzet testreszabása - - - Teams - Csapatok - - - Audio/Graphic options - Hang- és képi beállítások - - Net game Netes játék @@ -1501,26 +1577,6 @@ Csapat beállítások - Misc - Egyéb - - - Schemes and Weapons - - - - Custom colors - - - - Miscellaneous - - - - Video recording options - - - Videos @@ -1528,10 +1584,6 @@ Description - - Proxy settings - - QLabel @@ -1548,26 +1600,6 @@ Verzió - Developers: - Fejlesztők: - - - Art: - Grafika: - - - Sounds: - Hangok: - - - Translations: - Fordítások: - - - Special thanks: - Külön köszönet: - - Weapons Fegyverek @@ -1624,10 +1656,6 @@ Csomagok érkezése - Game scheme - Játék sémája - - % Dud Mines % hamis aknák @@ -1664,10 +1692,6 @@ - This development build is 'work in progress' and may not be compatible with other versions of the game. Some features might be broken or incomplete. Use at your own risk! - - - Quality @@ -1742,10 +1766,6 @@ - Summary - - - Description @@ -1773,6 +1793,38 @@ Bitrate (Kbps) + + This development build is 'work in progress' and may not be compatible with other versions of the game, while some features might be broken or incomplete! + + + + Fullscreen + Teljes képernyő + + + Fullscreen Resolution + + + + Windowed Resolution + + + + Your Email + + + + Summary + + + + Send system information + + + + Type the security code: + + QLineEdit @@ -1811,10 +1863,6 @@ - Please fill out all fields - - - Error while authenticating at google.com: @@ -1861,18 +1909,6 @@ - Successfully posted the issue on hedgewars.googlecode.com - - - - Error during authentication at google.com - - - - Error reporting the issue, please try again later (or visit hedgewars.googlecode.com directly) - - - Main - Error @@ -2018,16 +2054,37 @@ Do you really want to delete the weapon set '%1'? - - - QObject - - Nickname - Becenév - - - Please enter your nickname - Add meg a beceneved + + Hedgewars - Nick not registered + + + + System Information Preview + + + + Failed to generate captcha + + + + Failed to download captcha + + + + Please fill out all fields. Email is optional. + + + + Hedgewars - Warning + + + + Hedgewars - Information + + + + Hedgewars + @@ -2085,26 +2142,10 @@ Betöltés - Setup - Beállítás - - - Ready - Kész - - - Random Team - Véletlen csapat - - Associate file extensions - more - - - More info @@ -2197,6 +2238,25 @@ + SeedPrompt + + The map seed is the basis for all random values generated by the game. + + + + Cancel + Mégse + + + Set seed + + + + Close + + + + SelWeaponWidget Weapon set @@ -2224,106 +2284,21 @@ - ToggleButtonWidget - - Vampirism - Vámpírizmus - - - Karma - Karma - - - Artillery - Tüzérség - - - Fort Mode - Erődítmény - - - Divide Teams - Csapatok felosztása - - - Solid Land - Szilárd talaj - - - Add Border - Határok felállítása - - - Low Gravity - Alacsony gravitáció - - - Laser Sight - Lézeres mutató - - - Invulnerable - Sérthetetlenség - - - Random Order - Véletlen sorrend - - - King - Király - - - Place Hedgehogs - Sünik elhelyezése - - - Clan Shares Ammo - Közös lőszerek - - - Disable Girders - Hidak tiltása - - - Disable Land Objects - Tereptárgyak tiltása - - - Reset Health + TeamShowWidget + + %1's team - - AI Survival Mode - - - - Unlimited Attacks - - - - Reset Weapons - - - - Per Hedgehog Ammo + + + ThemePrompt + + Select a theme for this map - Disable Wind - - - - More Wind - - - - Tag Team - - - - Add Bottom Border - + Cancel + Mégse @@ -2457,12 +2432,6 @@ elfogás - hedgehogs -info - süni -info - - quit kilépés @@ -2498,33 +2467,33 @@ record + + hedgehog info + + binds (categories) - Basic controls - Alap irányítás - - - Weapon controls - Fegyverek kezelése - - - Camera and cursor controls - Kamera és kurzor irányítása - - - Other - Egyéb + Movement + + + + Weapons + Fegyverek + + + Camera + + + + Miscellaneous + binds (descriptions) - Move your hogs and aim: - Süni mozgatása és célzás: - - Traverse gaps and obstacles by jumping: Gödrök és akadályok leküzdése ugrással: @@ -2588,6 +2557,10 @@ Record video: + + Hedgehog movement + + binds (keys) diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Locale/hedgewars_it.ts --- a/share/hedgewars/Data/Locale/hedgewars_it.ts Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Locale/hedgewars_it.ts Fri Feb 22 05:05:32 2013 +0100 @@ -20,6 +20,79 @@ + BanDialog + + IP + IP + + + Nick + Soprannome + + + IP/Nick + IP/Soprannome + + + Reason + Motivo + + + Duration + Durata + + + Ok + Ok + + + Cancel + Annulla + + + you know why + + + + Warning + Avviso + + + Please, specify %1 + Per favore, specifica %1 + + + nickname + soprannome + + + permanent + permanente + + + + DataManager + + Use Default + + + + + FeedbackDialog + + View + Leggi + + + Cancel + Annulla + + + Send Feedback + Invia Commento + + + FreqSpinBox Never @@ -44,13 +117,36 @@ Modifica schemi - When this option is enabled selecting a game scheme will auto-select a weapon - Quando questa opzione è attiva, la scelta di uno schema di gioco selezionerà automaticamente le armi appropriate - - Game Options Opzioni di Gioco + + Game scheme will auto-select a weapon + + + + + HWApplication + + %1 minutes + %1 minuti + + + %1 hour + %1 ora + + + %1 hours + %1 ore + + + %1 day + %1 giorno + + + %1 days + %1 giorni + HWAskQuitDialog @@ -101,10 +197,6 @@ Failed to save StyleSheet to %1 Impossibile salvare la StyleSheet in %1! Errore interno! - - %1 is not a valid command! - %1 non è un comando valido! - HWForm @@ -139,20 +231,6 @@ Gioco concluso per volere del giocatore - Your nickname %1 is -registered on Hedgewars.org -Please provide your password below -or pick another nickname in game config: - Il nickname %1 è -registrato su Hedgewars.org -Per favore inserisci la tua password -o scegli un altro nickname: - - - No password supplied. - Nessuna password valida inserita. - - Nickname Nickname @@ -163,6 +241,60 @@ Someone already uses your nickname %1 on the server. Please pick another nickname: + Qualcun altro sta già usando il tuo nickname %1 sul server. +Per favore scegli un altro nickname: + + + %1's Team + Squadra di %1 + + + Hedgewars - Nick registered + Hedgewars - Nome registrato + + + This nick is registered, and you haven't specified a password. + +If this nick isn't yours, please register your own nick at www.hedgewars.org + +Password: + Questo nome è + + + Your nickname is not registered. +To prevent someone else from using it, +please register it at www.hedgewars.org + + + + + +Your password wasn't saved either. + + + + Hedgewars - Empty nickname + + + + Hedgewars - Wrong password + + + + You entered a wrong password. + + + + Try Again + + + + Hedgewars - Connection error + + + + You reconnected too fast. +Please wait a few seconds and try again. @@ -180,18 +312,6 @@ HWMapContainer - Map - Mappa - - - Themes - Temi - - - Filter - Filtro - - All Tutte @@ -216,10 +336,6 @@ Stramba - Type - Tipo - - Small tunnels Gallerie piccole @@ -228,28 +344,96 @@ Gallerie medie - Large tunnels - Gallerie grandi - - - Small floating islands - Isole piccole - - - Medium floating islands - Isole medie - - - Large floating islands - Isole grandi - - Seed Seed - Set - Imposta + Map type: + + + + Image map + + + + Mission map + + + + Hand-drawn + Disegnata a mano + + + Randomly generated + + + + Random maze + + + + Random + Casuale + + + Map preview: + + + + Load map drawing + + + + Edit map drawing + + + + Largetunnels + + + + Small islands + + + + Medium islands + + + + Large islands + + + + Map size: + + + + Maze style: + + + + Mission: + + + + Map: + + + + Theme: + + + + Load drawn map + Carica mappa disegnata + + + Drawn Maps + Mappe disegnate + + + All files + Tutti i file @@ -321,8 +505,8 @@ HWPasswordDialog - Password - Password + Login + @@ -337,6 +521,32 @@ + HatButton + + Change hat (%1) + + + + + HatPrompt + + Select a hat + + + + Filter: + + + + Cancel + Annulla + + + Use selected hat + + + + KB SDL_ttf returned error while rendering text, most propably it is related to the bug in freetype2. It's recommended to update your freetype lib. @@ -344,43 +554,41 @@ + KeyBinder + + Category + + + + LibavInteraction Duration: %1m %2s - Durata: %1m %2s + Durata: %1m %2s Video: %1x%2, - Video: %1x%2, + Video: %1x%2, %1 fps, - %1 fps, + %1 fps, Audio: - Audio: + Audio: + + + unknown + - LibavIteraction - - Duration: %1m %2s - - Durata: %1m %2s - - - Video: %1x%2, - Video: %1x%2, - - - %1 fps, - %1 fps, - - - Audio: - Audio: + MapModel + + No description available. + @@ -413,6 +621,38 @@ Set data Imposta dati + + General + Generale + + + Bans + + + + IP/Nick + + + + Expiration + + + + Reason + + + + Refresh + + + + Add + + + + Remove + + PageConnecting @@ -467,8 +707,40 @@ Generale - Advanced - Avanzato + Select an action to choose a custom key bind for this team + + + + Use my default + + + + Reset all binds + + + + Custom Controls + + + + Hat + Cappello + + + Name + Nome + + + This hedgehog's name + + + + Randomize this hedgehog's name + + + + Random Team + Squadra Casuale @@ -536,7 +808,7 @@ PageInGame In game... - In Game.... + In gioco... @@ -549,267 +821,14 @@ PageMain - Simply pick the same color as a friend to play together as a team. Each of you will still control his or her own hedgehogs but they'll win or lose together. - Tips - Scegli lo stesso colore di un amico per giocare in squadra. Ciascuno controllerà i propri ricci ma la vittoria o la sconfitta saranno comuni. - - - Some weapons might do only low damage but they can be a lot more devastating in the right situation. Try to use the Desert Eagle to knock multiple hedgehogs into the water. - Tips - Alcune armi potrebbero fare pochi danni ma possono essere devastanti se usate al momento giusto. Prova ad esempio ad utilizzare la Desert Eagle per spingere più ricci in acqua. - - - If you're unsure what to do and don't want to waste ammo, skip one round. But don't let too much time pass as there will be Sudden Death! - Tips - Se non sai cosa fare e non vuoi sprecare munizioni, salta il turno. Ma non farlo troppe volte perché c'è il Sudden Death! - - - If you'd like to keep others from using your preferred nickname on the official server, register an account at http://www.hedgewars.org/. - Tips - Se vuoi evitare che altri possano impersonarti, utilizzando il tuo nickname, sul server ufficiale, registrati su http://www.hedgewars.org/. - - - You're bored of default gameplay? Try one of the missions - they'll offer different gameplay depending on the one you picked. - Tips - Sei stanco delle partite preimpostate? Prova una missione - le missioni offrono interessanti modalità differenti di partite in base alle tue scelte. - - - By default the game will always record the last game played as a demo. Select 'Local Game' and pick the 'Demos' button on the lower right corner to play or manage them. - Tips - Il gioco salverà sempre l'ultima partita giocata come demo. Seleziona 'Gioco locale' e clicca il bottone 'Demos' nell'angolo in basso a destra per gestirle. - - - Hedgewars is Open Source and Freeware we create in our spare time. If you've got problems, ask on our forums but please don't expect 24/7 support! - Tips - Hedgewars è un programma Open Source e gratuito che noi creiamo nel nostro tempo libero. Se hai problemi, chiedi nei nostri forum ma, per favore, non aspettarti un supporto 24/7! - - - Hedgewars is Open Source and Freeware we create in our spare time. If you like it, help us with a small donation or contribute your own work! - Tips - Hedgewars è un programma Open Source e gratuito che creiamo nel nostro tempo libero. Se ti piace, aiutaci con una piccola donazione o contribuisci con il tuo lavoro! - - - Hedgewars is Open Source and Freeware we create in our spare time. Share it with your family and friends as you like! - Tips - Hedgewars è un programma Open Source e gratuito che creiamo nel nostro tempo libero. Condividilo con tutta la famiglia e e con gli amici come più ti piace! - - - From time to time there will be official tournaments. Upcoming events will be announced at http://www.hedgewars.org/ some days in advance. - Tips - Di tanto in tanto ci saranno tornei ufficiali. Gli eventi saranno annunciati su http://www.hedgewars.org/ con qualche giorno di anticipo. - - - Hedgewars is available in many languages. If the translation in your language seems to be missing or outdated, feel free to contact us! - Tips - Hedgewars è disponibile in molte lingue. Se la traduzione nella tua lingua sembra mancante o non aggiornata, sentiti libero di contattaci! - - - Hedgewars can be run on lots of different operating systems including Microsoft Windows, Mac OS X and Linux. - Tips - Hedgewars può essere usato su molti sistemi operativi differenti come Microsoft Windows - XP, Vista, 7 -, Mac OS X e Linux. - - - Always remember you're able to set up your own games in local and network/online play. You're not restricted to the 'Simple Game' option. - Tips - Ricordati che sei sempre in grado di configurare partire personalizzate in locale e online. Non devi sentirti limitato alle opzioni predefinite! - - - While playing you should give yourself a short break at least once an hour. - Tips - Durante il gioco dovresti fare una breve pausa almeno ogni ora. In caso di partite più lunghe, sospendi l'attività per almeno 30 minuti al termine del gioco! - - - If your graphics card isn't able to provide hardware accelerated OpenGL, try to enable the low quality mode to improve performance. - Tips - Se la tua scheda grafica non è in grado di fornire OpenGL con accelerazione hardware, prova ad abilitare la modalità a bassa qualità per migliorare le prestazioni. - - - We're open to suggestions and constructive feedback. If you don't like something or got a great idea, let us know! - Tips - Siamo aperti a suggerimenti e consigli costruttivi. Se non ti piace qualcosa o hai una buona idea, comunicacelo! - - - Especially while playing online be polite and always remember there might be some minors playing with or against you as well! - Tips - In particolare quando giochi online sii educato e ricorda che potrebbero esserci dei minorenni che stanno giocando con te o contro di te! - - - Special game modes such as 'Vampirism' or 'Karma' allow you to develop completely new tactics. Try them in a custom game! - Tips - Le modalità di gioco speciali, come 'Vampirismo' o 'Karma' ti permettono di sviluppare nuove tattiche. Provale in una partita personalizzata! - - - You should never install Hedgewars on computers you don't own (school, university, work, etc.). Please ask the responsible person instead! - Tips - Non dovresti mai installare Hedgewars su computer che non possiedi (scuola, università, lavoro, ecc.). Per favore, chiedi ai responsabili! - - - Hedgewars can be perfect for short games during breaks. Just ensure you don't add too many hedgehogs or use an huge map. Reducing time and health might help as well. - Tips - Hedgewars può essere perfetto per brevi partite durante le pause. Assicurati solamente di non aver aggiunto troppi ricci o di usare una mappa troppo grande. Ridurre tempo e vita può aiutare allo stesso modo. - - - No hedgehogs were harmed in making this game. - Tips - Nessun riccio è stato maltrattato durante lo sviluppo di questo gioco. - - - Hedgewars is Open Source and Freeware we create in our spare time. If someone sold you the game, you should try get a refund! - Tips - Hedgewars è un programma Open Source e gratuito che creiamo nel nostro tempo libero. Se qualcuno ti ha venduto il gioco, dovresti chiedere un rimborso! - - - Connect one or more gamepads before starting the game to be able to assign their controls to your teams. - Tips - Collega uno o più gamepad prima di iniziare il gioco per poterli assegnare alle tue squadra. - - - Create an account on %1 to keep others from using your most favourite nickname while playing on the official server. - Tips - Crea un account su %1 per evitare che altri possano usare il tuo nickname preferito mentre giochi sul server ufficiale. - - - If your graphics card isn't able to provide hardware accelerated OpenGL, try to update the associated drivers. - Tips - Se la tua scheda grafica non è in grado di fornire OpenGL con accelerazione hardware, prova ad aggiornarne i driver. - - - There are three different jumps available. Tap [high jump] twice to do a very high/backwards jump. - Tips - Ci sono tre salti disponibili. Premi [salto in alto] due volte per eseguire un salto in alto all'indietro. - - - Afraid of falling off a cliff? Hold down [precise] to turn [left] or [right] without actually moving. - Tips - Paura di cadere da un dirupo? Premi [mirino di precisione] per girare a [sinistra] o a [destra] senza muoverti. - - - Some weapons require special strategies or just lots of training, so don't give up on a particular tool if you miss an enemy once. - Tips - Alcune armi richiedono strategie particolari o semplicemente molto allenamento, quindi non arrenderti nell'utilizzo di un'arma specifica se manchi il nemico una volta. - - - Most weapons won't work once they touch the water. The Homing Bee as well as the Cake are exceptions to this. - Tips - Molte armi non funzionano quando toccano l'acqua. L'Ape a Ricerca così come la Torta sono delle eccezioni. - - - The Old Limbuger only causes a small explosion. However the wind affected smelly cloud can poison lots of hogs at once. - Tips - Il vecchio Limburger causa solo una piccola esplosione. Tuttavia il vento influisce sulla nuvola puzzolente e può avvelenare più ricci contemporaneamente. - - - The Piano Strike is the most damaging air strike. You'll lose the hedgehog performing it, so there's a huge downside as well. - Tips - L'Ultima Sonata è l'attacco aereo più dannoso. Perderai il tuo riccio, eseguendolo, quindi ci sono anche delle grosse controindicazioni. - - - Sticky Mines are a perfect tool to create small chain reactions knocking enemy hedgehogs into dire situations ... or water. - Tips - Le Mine Adesive sono lo strumento perfetto per creare piccole reazioni a catena e spingere i ricci nemici in situazioni difficili... o in acqua. - - - The Hammer is most effective when used on bridges or girders. Hit hogs will just break through the ground. - Tips - Il Martello è più efficate se usato su ponti o travi. Colpire i ricci li farà sprofondare attraverso il terreno. - - - If you're stuck behind an enemy hedgehog, use the Hammer to free yourself without getting damaged by an explosion. - Tips - Se sei bloccato dietro un riccio nemico, usa il Martello per liberarti senza essere danneggiato da un'esplosione. - - - The Cake's maximum walking distance depends on the ground it has to pass. Use [attack] to detonate it early. - Tips - La distanza massima di cammino della Torta dipende dal terreno che deve attraversare. Usa [attacca] per farla esplodere prima. - - - The Flame Thrower is a weapon but it can be used for tunnel digging as well. - Tips - Il Lanciafiamme è un'arma che può essere usata anche per scavare gallerie. - - - Want to know who's behind the game? Click on the Hedgewars logo in the main menu to see the credits. - Tips - Vuoi sapere chi c'è dietro il gioco? Clicca sul logo Hedgewars nel menu principale per vederne gli autori e sviluppatori. - - - Like Hedgewars? Become a fan on %1 or follow us on %2! - Tips - Ti piace Hedgewars? Diventa fan su %1 o seguici su %2! - - - Feel free to draw your own graves, hats, flags or even maps and themes! But note that you'll have to share them somewhere to use them online. - Tips - Sentiti libero di disegnare tombe, cappelli, bandiere o anche mappe e temi personalizzati - lo puoi fare con TheGIMP! Ma nota che dovrai condividerli in qualche modo per usarli online. - - - Really want to wear a specific hat? Donate to us and receive an exclusive hat of your choice! - Tips - Vuoi proprio un cappello specifico? Facci una piccola donazione e riceverai un cappello esclusivo a tua scelta! - - - Keep your video card drivers up to date to avoid issues playing the game. - Tips - Mantieni aggiornati i driver della tua scheda video, per evitare problemi durante il gioco. - - - You can find your Hedgewars configuration files under "My Documents\Hedgewars". Create backups or take the files with you, but don't edit them by hand. - Tips - Puoi trovare i file di configurazione del gioco in "Documenti\Hedgewars". Crea delle copie di sicurezza o prendi i file con te, ma non modificarli manualmente! - - - You're able to associate Hedgewars related files (savegames and demo recordings) with the game to launch them right from your favorite file or internet browser. - Tips - Puoi associare i file relativi a Hedgewars (partite salvate e registrazioni demo) al gioco, in modo da lanciarli direttamente dal tuo gestore file o browser Internet. - - - Want to save ropes? Release the rope in mid air and then shoot again. As long as you don't touch the ground you'll reuse your rope without wasting ammo! - Tips - Vuoi utilizzare più a lungo la corda? Rilascia la corda a mezz'aria e spara di nuovo. Finché non tocchi il terreno potrai riusare la corda senza sprecare munizioni! - - - You can find your Hedgewars configuration files under "Library/Application Support/Hedgewars" in your home directory. Create backups or take the files with you, but don't edit them by hand. - Tips - Puoi trovare i file di configurazione del gioco in "Library/Application Support/Hedgewars" nella tua cartella utente. Crea una copia di sicurezza o porta i file con te, ma non modificarli mai manualmente. - - - You can find your Hedgewars configuration files under ".hedgewars" in your home directory. Create backups or take the files with you, but don't edit them by hand. - Tips - Puoi trovare i file di configurazione del gioco in ".hedgewars" nella tua cartella home. Crea una copia di sicurezza o porta i file con te, ma non modificarli mai manualmente. - - - The Windows version of Hedgewars supports Xfire. Make sure to add Hedgewars to its game list so your friends can see you playing. - Tips - La versione Windows di Hedgewars supporta Xfire. Assicurati di aggiungere Hedgewars alla sua lista giochi, così i tuoi amici potranno vederti giocare. - - - Use the Molotov or Flame Thrower to temporary keep hedgehogs from passing terrain such as tunnels or platforms. - Tips - Usa la Bomba Molotov o il Lanciafiamme per impedire temporaneamente ai ricci di attraversari terreni pianeggianti, tunnel o collinette. - - - The Homing Bee can be tricky to use. Its turn radius depends on its velocity, so try to not use full power. - Tips - L'Ape a Ricerca può essere difficile da usare. Il suo raggio di curvatura dipende dalla sua velocità, quindi cerca di non usarla a piena potenza. - - Downloadable Content Contenuti Scaricabili - Local Game - Gioco in locale - - Play a game on a single computer Gioca una partita offline - Network Game - Gioco in rete - - Play a game across a network Gioca una partita attraverso una rete @@ -837,6 +856,14 @@ Edit game preferences Modifica preferenze + + Play a game across a local area network + + + + Play a game on an official server + + PageMultiplayer @@ -844,6 +871,10 @@ Start Gioca + + Edit game preferences + Modifica preferenze + PageNetGame @@ -852,31 +883,12 @@ Controllo - DLC - DLC - - - Downloadable Content - Contenuti Scaricabili - - - - PageNetType - - LAN game - Gioco in LAN - - - Official server - Server ufficiale - - - Join hundreds of players online! - Incontra centinaia di giocatori online! - - - Join or host your own game server in a Local Area Network. - Unisciti ad un server o creane uno nuovo per il gioco online in una rete LAN. + Edit game preferences + Modifica preferenze + + + Start + Gioca @@ -922,10 +934,6 @@ Elimina set delle armi - General - Generale - - Advanced Avanzate @@ -935,36 +943,124 @@ Proxy host - + Server proxy Proxy port - + Porta proxy Proxy login - + Login Proxy Proxy password - + Password proxy No proxy - + Nessun proxy Socks5 proxy - + Proxy Socks5 HTTP proxy - + Proxy HTTP System proxy settings + Impostazioni proxy di sistema + + + Select an action to change what key controls it + + Reset to default + + + + Reset all binds + + + + Game + + + + Graphics + + + + Audio + + + + Controls + + + + Video Recording + + + + Network + + + + Teams + Squadre + + + Schemes + + + + Weapons + Armi + + + Frontend + + + + Custom colors + Colori personalizzati + + + Game audio + + + + Frontend audio + + + + Account + + + + Proxy settings + + + + Miscellaneous + Varie + + + Updates + + + + Check for updates + + + + Video recording options + Opzioni di registrazione video + PagePlayDemo @@ -1164,18 +1260,10 @@ PageSinglePlayer - Simple Game - Partita Semplice - - Play a quick game against the computer with random settings Gioca una partita rapida contro il computer con impostazioni casuali - Multiplayer - Multiplayer - - Play a hotseat game against your friends, or AI teams Gioca una partira controlo un amico oppure contro il computer @@ -1184,26 +1272,14 @@ Modalità Campagna - Training Mode - Modalità allenamento - - Practice your skills in a range of training missions Metti alla prova le tue capacità in una vasta gamma di missioni di addestramento - Demos - Demo - - Watch recorded demos Visualizza demo registrate - Load - Carica - - Load a previously saved game Carica un gioco salvato in precedenza @@ -1240,8 +1316,8 @@ %1 bytes - %1 bytes - %1 bytes + %1 byte + %1 byte @@ -1249,14 +1325,6 @@ (in corso...) - Date: - Data: - - - Size: - Dimensione: - - encoding encoding @@ -1264,6 +1332,16 @@ uploading caricamento + + Date: %1 + + + + + Size: %1 + + + QAction @@ -1272,10 +1350,6 @@ Caccia via - Start - Gioca - - Restrict Joins Limita le entrate @@ -1323,10 +1397,6 @@ Schermo intero - Enable sound - Abilita il suono - - Show FPS Mostra FPS @@ -1339,14 +1409,6 @@ Controlla aggiornamenti all'avvio - Enable music - Abilita musica - - - Frontend fullscreen - Frontend schermo intero - - Append date and time to record file name Concatena data e ora di registrazione al nome file @@ -1355,18 +1417,6 @@ Mostra suggerimenti nel menu armi - Enable frontend sounds - Abilita suoni nel frontend - - - Enable frontend music - Abilita la musica nel frontend - - - Frontend effects - Effetti speciali nel frontend - - Save password Salva password @@ -1386,14 +1436,38 @@ Use game resolution Usa la risoluzione del gioco + + Visual effects + + + + Sound + + + + In-game sound effects + + + + Music + + + + In-game music + + + + Frontend sound effects + + + + Frontend music + + QComboBox - generated map... - Mappa generata... - - Human Umano @@ -1406,14 +1480,6 @@ (Predefinito) - generated maze... - Labirinto generato... - - - Mission - Missione - - Community Comunità @@ -1430,10 +1496,6 @@ In corso - hand drawn map... - Mappa disegnata... - - Disabled Disabilitato @@ -1470,10 +1532,6 @@ Dall'alto in basso - Wiggle - Movimento continuo - - Red/Cyan grayscale Scala di grigi rosso/azzurro @@ -1505,22 +1563,10 @@ Membri della squadra - Key binds - Associazione tasti - - Fort Fortino - Teams - Squadre - - - Audio/Graphic options - Opzioni Audio/Grafica - - Net game Gioco in rete @@ -1541,26 +1587,6 @@ Impostazioni delle Squadre - Misc - Varie - - - Schemes and Weapons - Schemi di Gioco e Armi - - - Custom colors - Colori personalizzati - - - Miscellaneous - Varie - - - Video recording options - Opzioni di registrazione video - - Videos Video @@ -1568,10 +1594,6 @@ Description Descrizione - - Proxy settings - - QLabel @@ -1584,22 +1606,6 @@ Mine - Developers: - Sviluppatori: - - - Art: - Grafica: - - - Translations: - Traduttori: - - - Special thanks: - Ringraziamenti speciali: - - Weapons Armi @@ -1632,10 +1638,6 @@ Versione - Sounds: - Suoni: - - Initial sound volume Volume sonoro iniziale @@ -1664,10 +1666,6 @@ Caduta Casse - Game scheme - Schema di gioco - - % Dud Mines % Mine Difettose @@ -1704,10 +1702,6 @@ Suggerimento: - This development build is 'work in progress' and may not be compatible with other versions of the game. Some features might be broken or incomplete. Use at your own risk! - Questa versione di sviluppo è in corso d'opera e può non essere compatibile con le altre versioni del gioco. Alcune funzionalità potrebbero essere incomplete o non funzionanti. Usatela a vostro rischio! - - Quality Qualità @@ -1784,10 +1778,6 @@ Tag (separate da una virgola): - Summary - Riassunto - - Description Descrizione @@ -1815,6 +1805,38 @@ Bitrate (Kbps) Bitrate (Kbps) + + This development build is 'work in progress' and may not be compatible with other versions of the game, while some features might be broken or incomplete! + + + + Fullscreen + Schermo intero + + + Fullscreen Resolution + + + + Windowed Resolution + + + + Your Email + + + + Summary + + + + Send system information + + + + Type the security code: + + QLineEdit @@ -1853,10 +1875,6 @@ Associazione delle estensioni a Hedgewars fallita. - Please fill out all fields - E' necessario compilare tutti i campi - - Error while authenticating at google.com: Errore durante l'autenticazione su google.com: @@ -1872,206 +1890,218 @@ Teams - Are you sure? - + Squadre - Sei sicuro? Do you really want to delete the team '%1'? - + Vuoi davvero cancellare la squadra '%1'? Cannot delete default scheme '%1'! - + Non posso cancellare lo schema di default '%1'! Please select a record from the list - + Per favore scegli una voce dalla lista Unable to start server - + Impossibile avviare il server Hedgewars - Error - + Hedgewars - Errore Hedgewars - Success - + Hedgewars - Completato All file associations have been set - - - - Successfully posted the issue on hedgewars.googlecode.com - - - - Error during authentication at google.com - - - - Error reporting the issue, please try again later (or visit hedgewars.googlecode.com directly) - + Tutte le associazioni di file sono state impostate Main - Error - + Main - Errore Cannot create directory %1 - Impossibile creare la directory %1 + Impossibile creare la directory %1 Failed to open data directory: %1 Please check your installation! - + Impossibile creare la directory dati: +%1 + +Per favore controlla l'installazione! TCP - Error - + TCP - Errore Unable to start the server: %1. - Impossibile avviare il server: %1. + Impossibile avviare il server: %1. Unable to run engine at - + Impossibile avviare il motore a Error code: %1 - + Codice di errore: %1 Video upload - Error - + Caricamento video - Errore Netgame - Error - + Gioco in rete - Errore Please select a server from the list - + Per favore scegli un server dalla lista Please enter room name - Inserisci il nome della stanza + Inserisci il nome della stanza Record Play - Error - + Registrazione gioco - Errore Please select record from the list - Seleziona un record dalla lista + Seleziona un record dalla lista Cannot rename to - + Impossibile rinominare a Cannot delete file - + Impossibile cancellare il file Room Name - Error - + Nome stanza - Errore Please select room from the list - Seleziona la stanza dalla lista + Seleziona la stanza dalla lista Room Name - Are you sure? - + Nome stanza - Sei sicuro? The game you are trying to join has started. Do you still want to join the room? - La partita a cui stai cercando di unirti è già iniziata. + La partita a cui stai cercando di unirti è già iniziata. Voui comunque entrare nella stanza? Schemes - Warning - + Schemi - Attenzione Schemes - Are you sure? - + Schemi - Sei sicuro? Do you really want to delete the game scheme '%1'? - + Vuoi davvero cancellare lo schema di gioco '%1'? Videos - Are you sure? - + Video - Sei sicuro? Do you really want to delete the video '%1'? - + Vuoi davvero cancellare il video '%1'? Do you really want to remove %1 file(s)? - - - + + Vuoi davvero cancellare il file? + Vuoi davvero cancellare %1 file? Do you really want to cancel uploading %1? - + Vuoi davvero terminare di caricare %1? File error - Errore con il file + Errore con il file Cannot open '%1' for writing - + Non posso aprire '%1' in scrittura Cannot open '%1' for reading - + Non posso aprire '%1' in lettura Cannot use the ammo '%1'! - + Non posso usare le munizioni '%1'! Weapons - Warning - + Armi - Attenzione Cannot overwrite default weapon set '%1'! - + Non posso sovrascrivere l'insieme base di armi '%1'! Cannot delete default weapon set '%1'! - + Non posso cancellare l'insieme base di armi '%1'! Weapons - Are you sure? - + Armi - Sei sicuro? Do you really want to delete the weapon set '%1'? + Vuoi davvero cancellare l'insieme di armi '%1'? + + + Hedgewars - Nick not registered - - - QObject - - Nickname - Nickname - - - Please enter your nickname - Per favore inserisci il tuo nickname + + System Information Preview + + + + Failed to generate captcha + + + + Failed to download captcha + + + + Please fill out all fields. Email is optional. + + + + Hedgewars - Warning + + + + Hedgewars - Information + + + + Hedgewars + @@ -2129,26 +2159,10 @@ Carica - Setup - Impostazioni - - - Ready - Pronto - - - Random Team - Squadra Casuale - - Associate file extensions Associa estensioni a Hedgewars - more - altro - - More info Più informazioni @@ -2174,23 +2188,23 @@ Restore default coding parameters - + Ripristina i parametri di base della codifica Open the video directory in your system - + Apri la directory video sul tuo sistema Play this video - + Riproduci questo video Delete this video - + Cancella questo video Upload this video to your Youtube account - + Cariva questo video nel tuo account Youtube @@ -2241,6 +2255,25 @@ + SeedPrompt + + The map seed is the basis for all random values generated by the game. + + + + Cancel + Annulla + + + Set seed + + + + Close + + + + SelWeaponWidget Weapon set @@ -2268,106 +2301,21 @@ - ToggleButtonWidget - - Vampirism - Vampirismo - - - Karma - Karma - - - Artillery - Artiglieria - - - Fort Mode - Modalità Fortino - - - Divide Teams - Dividi le Squadre - - - Solid Land - Terreno Solido - - - Add Border - Aggiunta Bordo - - - Low Gravity - Gravità Zero - - - Laser Sight - Vista Laser - - - Invulnerable - Invulnerabilità - - - Random Order - Ordine Casuale - - - King - Re - - - Place Hedgehogs - Posiziona Ricci - - - Clan Shares Ammo - Munizioni Condivise - - - Disable Girders - Disabilita Travi - - - Disable Land Objects - Disabilita Oggetti Terreno - - - AI Survival Mode - Modalità Sopravvivenza AI - - - Reset Health - Resetta la vita allo stato di partenza - - - Unlimited Attacks - Attacchi Illimitati - - - Reset Weapons - Resetta le armi allo stato di partenza - - - Per Hedgehog Ammo - Munzioni non condivise con gli altri ricci - - - Disable Wind - Disabilita Vento - - - More Wind - Più Vento - - - Tag Team - Tag Team - - - Add Bottom Border - Aggiungi Bordo Inferiore + TeamShowWidget + + %1's team + + + + + ThemePrompt + + Select a theme for this map + + + + Cancel + Annulla @@ -2485,12 +2433,6 @@ cattura - hedgehogs -info - informazioni -ricci - - quit esci @@ -2542,33 +2484,33 @@ record registra + + hedgehog info + + binds (categories) - Basic controls - Controlli di base - - - Weapon controls - Controlli per le armi - - - Camera and cursor controls - Controlli camera e cursore - - - Other - Altro + Movement + + + + Weapons + Armi + + + Camera + + + + Miscellaneous + Varie binds (descriptions) - Move your hogs and aim: - Muovi i tuoi ricci e punta: - - Traverse gaps and obstacles by jumping: Scavalca buchi e ostacoli saltando: @@ -2632,6 +2574,10 @@ Record video: Registra video: + + Hedgehog movement + + binds (keys) diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Locale/hedgewars_ja.ts --- a/share/hedgewars/Data/Locale/hedgewars_ja.ts Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Locale/hedgewars_ja.ts Fri Feb 22 05:05:32 2013 +0100 @@ -20,6 +20,79 @@ + BanDialog + + IP + ホスト名/IP + + + Nick + + + + IP/Nick + + + + Reason + + + + Duration + + + + Ok + + + + Cancel + キャンセル + + + you know why + + + + Warning + + + + Please, specify %1 + + + + nickname + + + + permanent + + + + + DataManager + + Use Default + + + + + FeedbackDialog + + View + + + + Cancel + キャンセル + + + Send Feedback + + + + FreqSpinBox Never @@ -43,13 +116,36 @@ しくみを編集 - When this option is enabled selecting a game scheme will auto-select a weapon - このオプションを有効にして、しくみを選ぶと武器を自動選択 - - Game Options + + Game scheme will auto-select a weapon + + + + + HWApplication + + %1 minutes + + + + %1 hour + + + + %1 hours + + + + %1 day + + + + %1 days + + HWAskQuitDialog @@ -100,10 +196,6 @@ Failed to save StyleSheet to %1 - - %1 is not a valid command! - - HWForm @@ -138,21 +230,6 @@ - Your nickname %1 is -registered on Hedgewars.org -Please provide your password below -or pick another nickname in game config: - あなたの「%1」というニック名は -Hedgewars.orgに登録されました。 -下にパスワードを入力して、または -ゲーム構成に別の名を選択してください: - - - - No password supplied. - - - Nickname @@ -165,6 +242,59 @@ Please pick another nickname: + + %1's Team + + + + Hedgewars - Nick registered + + + + This nick is registered, and you haven't specified a password. + +If this nick isn't yours, please register your own nick at www.hedgewars.org + +Password: + + + + Your nickname is not registered. +To prevent someone else from using it, +please register it at www.hedgewars.org + + + + + +Your password wasn't saved either. + + + + Hedgewars - Empty nickname + + + + Hedgewars - Wrong password + + + + You entered a wrong password. + + + + Try Again + + + + Hedgewars - Connection error + + + + You reconnected too fast. +Please wait a few seconds and try again. + + HWGame @@ -180,18 +310,6 @@ HWMapContainer - Map - 地図 - - - Themes - テーマ - - - Filter - 濾過 - - All 全部 @@ -216,10 +334,6 @@ むちゃくちゃ - Type - - - Small tunnels 小トンネル @@ -228,27 +342,95 @@ 中トンネル - Large tunnels - 大トンネル - - - Small floating islands - 子浮く島 - - - Medium floating islands - 中浮く島 - - - Large floating islands - 大浮く島 - - Seed 乱数シード - Set + Map type: + + + + Image map + + + + Mission map + + + + Hand-drawn + + + + Randomly generated + + + + Random maze + + + + Random + + + + Map preview: + + + + Load map drawing + + + + Edit map drawing + + + + Largetunnels + + + + Small islands + + + + Medium islands + + + + Large islands + + + + Map size: + + + + Maze style: + + + + Mission: + + + + Map: + + + + Theme: + + + + Load drawn map + + + + Drawn Maps + + + + All files @@ -321,8 +503,8 @@ HWPasswordDialog - Password - パスワード + Login + @@ -337,6 +519,32 @@ + HatButton + + Change hat (%1) + + + + + HatPrompt + + Select a hat + + + + Filter: + + + + Cancel + キャンセル + + + Use selected hat + + + + KB SDL_ttf returned error while rendering text, most propably it is related to the bug in freetype2. It's recommended to update your freetype lib. @@ -344,6 +552,13 @@ + KeyBinder + + Category + + + + LibavInteraction Duration: %1m %2s @@ -362,6 +577,17 @@ Audio: + + unknown + + + + + MapModel + + No description available. + + PageAdmin @@ -393,6 +619,38 @@ Set data + + General + 一般 + + + Bans + + + + IP/Nick + + + + Expiration + + + + Reason + + + + Refresh + + + + Add + + + + Remove + + PageConnecting @@ -447,8 +705,40 @@ 一般 - Advanced - 高級 + Select an action to choose a custom key bind for this team + + + + Use my default + + + + Reset all binds + + + + Custom Controls + + + + Hat + + + + Name + + + + This hedgehog's name + + + + Randomize this hedgehog's name + + + + Random Team + @@ -523,267 +813,14 @@ PageMain - Simply pick the same color as a friend to play together as a team. Each of you will still control his or her own hedgehogs but they'll win or lose together. - Tips - - - - Some weapons might do only low damage but they can be a lot more devastating in the right situation. Try to use the Desert Eagle to knock multiple hedgehogs into the water. - Tips - - - - If you're unsure what to do and don't want to waste ammo, skip one round. But don't let too much time pass as there will be Sudden Death! - Tips - - - - If you'd like to keep others from using your preferred nickname on the official server, register an account at http://www.hedgewars.org/. - Tips - - - - You're bored of default gameplay? Try one of the missions - they'll offer different gameplay depending on the one you picked. - Tips - - - - By default the game will always record the last game played as a demo. Select 'Local Game' and pick the 'Demos' button on the lower right corner to play or manage them. - Tips - - - - Hedgewars is Open Source and Freeware we create in our spare time. If you've got problems, ask on our forums but please don't expect 24/7 support! - Tips - - - - Hedgewars is Open Source and Freeware we create in our spare time. If you like it, help us with a small donation or contribute your own work! - Tips - - - - Hedgewars is Open Source and Freeware we create in our spare time. Share it with your family and friends as you like! - Tips - - - - From time to time there will be official tournaments. Upcoming events will be announced at http://www.hedgewars.org/ some days in advance. - Tips - - - - Hedgewars is available in many languages. If the translation in your language seems to be missing or outdated, feel free to contact us! - Tips - - - - Hedgewars can be run on lots of different operating systems including Microsoft Windows, Mac OS X and Linux. - Tips - - - - Always remember you're able to set up your own games in local and network/online play. You're not restricted to the 'Simple Game' option. - Tips - - - - While playing you should give yourself a short break at least once an hour. - Tips - - - - If your graphics card isn't able to provide hardware accelerated OpenGL, try to enable the low quality mode to improve performance. - Tips - - - - We're open to suggestions and constructive feedback. If you don't like something or got a great idea, let us know! - Tips - - - - Especially while playing online be polite and always remember there might be some minors playing with or against you as well! - Tips - - - - Special game modes such as 'Vampirism' or 'Karma' allow you to develop completely new tactics. Try them in a custom game! - Tips - - - - You should never install Hedgewars on computers you don't own (school, university, work, etc.). Please ask the responsible person instead! - Tips - - - - Hedgewars can be perfect for short games during breaks. Just ensure you don't add too many hedgehogs or use an huge map. Reducing time and health might help as well. - Tips - - - - No hedgehogs were harmed in making this game. - Tips - - - - Hedgewars is Open Source and Freeware we create in our spare time. If someone sold you the game, you should try get a refund! - Tips - - - - Connect one or more gamepads before starting the game to be able to assign their controls to your teams. - Tips - - - - Create an account on %1 to keep others from using your most favourite nickname while playing on the official server. - Tips - - - - If your graphics card isn't able to provide hardware accelerated OpenGL, try to update the associated drivers. - Tips - - - - There are three different jumps available. Tap [high jump] twice to do a very high/backwards jump. - Tips - - - - Afraid of falling off a cliff? Hold down [precise] to turn [left] or [right] without actually moving. - Tips - - - - Some weapons require special strategies or just lots of training, so don't give up on a particular tool if you miss an enemy once. - Tips - - - - Most weapons won't work once they touch the water. The Homing Bee as well as the Cake are exceptions to this. - Tips - - - - The Old Limbuger only causes a small explosion. However the wind affected smelly cloud can poison lots of hogs at once. - Tips - - - - The Piano Strike is the most damaging air strike. You'll lose the hedgehog performing it, so there's a huge downside as well. - Tips - - - - Sticky Mines are a perfect tool to create small chain reactions knocking enemy hedgehogs into dire situations ... or water. - Tips - - - - The Hammer is most effective when used on bridges or girders. Hit hogs will just break through the ground. - Tips - - - - If you're stuck behind an enemy hedgehog, use the Hammer to free yourself without getting damaged by an explosion. - Tips - - - - The Cake's maximum walking distance depends on the ground it has to pass. Use [attack] to detonate it early. - Tips - - - - The Flame Thrower is a weapon but it can be used for tunnel digging as well. - Tips - - - - Want to know who's behind the game? Click on the Hedgewars logo in the main menu to see the credits. - Tips - - - - Like Hedgewars? Become a fan on %1 or follow us on %2! - Tips - - - - Feel free to draw your own graves, hats, flags or even maps and themes! But note that you'll have to share them somewhere to use them online. - Tips - - - - Really want to wear a specific hat? Donate to us and receive an exclusive hat of your choice! - Tips - - - - Keep your video card drivers up to date to avoid issues playing the game. - Tips - - - - You can find your Hedgewars configuration files under "My Documents\Hedgewars". Create backups or take the files with you, but don't edit them by hand. - Tips - - - - You're able to associate Hedgewars related files (savegames and demo recordings) with the game to launch them right from your favorite file or internet browser. - Tips - - - - Want to save ropes? Release the rope in mid air and then shoot again. As long as you don't touch the ground you'll reuse your rope without wasting ammo! - Tips - - - - You can find your Hedgewars configuration files under "Library/Application Support/Hedgewars" in your home directory. Create backups or take the files with you, but don't edit them by hand. - Tips - - - - You can find your Hedgewars configuration files under ".hedgewars" in your home directory. Create backups or take the files with you, but don't edit them by hand. - Tips - - - - The Windows version of Hedgewars supports Xfire. Make sure to add Hedgewars to its game list so your friends can see you playing. - Tips - - - - Use the Molotov or Flame Thrower to temporary keep hedgehogs from passing terrain such as tunnels or platforms. - Tips - - - - The Homing Bee can be tricky to use. Its turn radius depends on its velocity, so try to not use full power. - Tips - - - Downloadable Content - Local Game - - - Play a game on a single computer - Network Game - - - Play a game across a network @@ -811,6 +848,14 @@ Edit game preferences + + Play a game across a local area network + + + + Play a game on an official server + + PageMultiplayer @@ -818,6 +863,10 @@ Start スタート + + Edit game preferences + + PageNetGame @@ -825,24 +874,13 @@ Control コントロール - - - PageNetType - - LAN game - - - - Official server - - - - Join hundreds of players online! - - - - Join or host your own game server in a Local Area Network. - + + Edit game preferences + + + + Start + スタート @@ -888,10 +926,6 @@ - General - 一般 - - Advanced 高級 @@ -931,6 +965,94 @@ System proxy settings + + Select an action to change what key controls it + + + + Reset to default + + + + Reset all binds + + + + Game + + + + Graphics + + + + Audio + + + + Controls + + + + Video Recording + + + + Network + + + + Teams + チーム + + + Schemes + + + + Weapons + 武器 + + + Frontend + + + + Custom colors + + + + Game audio + + + + Frontend audio + + + + Account + + + + Proxy settings + + + + Miscellaneous + + + + Updates + + + + Check for updates + + + + Video recording options + + PagePlayDemo @@ -1129,18 +1251,10 @@ PageSinglePlayer - Simple Game - - - Play a quick game against the computer with random settings - Multiplayer - - - Play a hotseat game against your friends, or AI teams @@ -1149,26 +1263,14 @@ - Training Mode - - - Practice your skills in a range of training missions - Demos - - - Watch recorded demos - Load - ロード - - Load a previously saved game @@ -1213,14 +1315,6 @@ - Date: - - - - Size: - - - encoding @@ -1228,6 +1322,16 @@ uploading + + Date: %1 + + + + + Size: %1 + + + QAction @@ -1240,10 +1344,6 @@ 情報 - Start - スタート - - Restrict Joins Restrict Joins @@ -1291,18 +1391,6 @@ フルスクリーン - Frontend fullscreen - フルスクリーン メニュー - - - Enable sound - サウンド - - - Enable music - 音楽 - - Show FPS FPSを示す @@ -1319,18 +1407,6 @@ - Enable frontend sounds - - - - Enable frontend music - - - - Frontend effects - - - Save password @@ -1350,14 +1426,38 @@ Use game resolution + + Visual effects + + + + Sound + + + + In-game sound effects + + + + Music + + + + In-game music + + + + Frontend sound effects + + + + Frontend music + + QComboBox - generated map... - 生成地図... - - Human 人間 @@ -1370,14 +1470,6 @@ - generated maze... - - - - Mission - - - Community @@ -1394,10 +1486,6 @@ - hand drawn map... - - - Disabled @@ -1434,10 +1522,6 @@ - Wiggle - - - Red/Cyan grayscale @@ -1473,18 +1557,6 @@ 台場 - Key binds - キー binds - - - Teams - チーム - - - Audio/Graphic options - オディオ/画面 設定 - - Net game ネットゲーム @@ -1505,26 +1577,6 @@ - Misc - - - - Schemes and Weapons - - - - Custom colors - - - - Miscellaneous - - - - Video recording options - - - Videos @@ -1532,10 +1584,6 @@ Description - - Proxy settings - - QLabel @@ -1552,26 +1600,6 @@ バーション - Developers: - 開発者: - - - Art: - アート: - - - Sounds: - 音楽・音: - - - Translations: - 通訳者: - - - Special thanks: - 特別感謝: - - Weapons 武器 @@ -1628,10 +1656,6 @@ - Game scheme - - - % Dud Mines @@ -1668,10 +1692,6 @@ - This development build is 'work in progress' and may not be compatible with other versions of the game. Some features might be broken or incomplete. Use at your own risk! - - - Quality @@ -1746,10 +1766,6 @@ - Summary - - - Description @@ -1777,6 +1793,38 @@ Bitrate (Kbps) + + This development build is 'work in progress' and may not be compatible with other versions of the game, while some features might be broken or incomplete! + + + + Fullscreen + フルスクリーン + + + Fullscreen Resolution + + + + Windowed Resolution + + + + Your Email + + + + Summary + + + + Send system information + + + + Type the security code: + + QLineEdit @@ -1815,10 +1863,6 @@ - Please fill out all fields - - - Error while authenticating at google.com: @@ -1865,18 +1909,6 @@ - Successfully posted the issue on hedgewars.googlecode.com - - - - Error during authentication at google.com - - - - Error reporting the issue, please try again later (or visit hedgewars.googlecode.com directly) - - - Main - Error @@ -2022,15 +2054,36 @@ Do you really want to delete the weapon set '%1'? - - - QObject - - Nickname - - - - Please enter your nickname + + Hedgewars - Nick not registered + + + + System Information Preview + + + + Failed to generate captcha + + + + Failed to download captcha + + + + Please fill out all fields. Email is optional. + + + + Hedgewars - Warning + + + + Hedgewars - Information + + + + Hedgewars @@ -2089,26 +2142,10 @@ ロード - Setup - 設定 - - - Ready - - - - Random Team - - - Associate file extensions - more - - - More info @@ -2201,6 +2238,25 @@ + SeedPrompt + + The map seed is the basis for all random values generated by the game. + + + + Cancel + キャンセル + + + Set seed + + + + Close + + + + SelWeaponWidget Weapon set @@ -2228,106 +2284,21 @@ - ToggleButtonWidget - - Vampirism - - - - Karma - - - - Artillery - - - - Fort Mode - - - - Divide Teams - - - - Solid Land - - - - Add Border - - - - Low Gravity - - - - Laser Sight - - - - Invulnerable - - - - Random Order - - - - King - - - - Place Hedgehogs - - - - Clan Shares Ammo - - - - Disable Girders - - - - Disable Land Objects - - - - AI Survival Mode - - - - Reset Health - - - - Unlimited Attacks - - - - Reset Weapons - - - - Per Hedgehog Ammo - - - - Disable Wind - - - - More Wind - - - - Tag Team - - - - Add Bottom Border - + TeamShowWidget + + %1's team + + + + + ThemePrompt + + Select a theme for this map + + + + Cancel + キャンセル @@ -2461,12 +2432,6 @@ 録画 - hedgehogs -info - 針鼠 -情報 - - quit 退出 @@ -2502,33 +2467,33 @@ record + + hedgehog info + + binds (categories) - Basic controls - 基本コントロール - - - Weapon controls - 武器コントロール - - - Camera and cursor controls - カメラとカーソルのコントロール - - - Other - その他 + Movement + + + + Weapons + 武器 + + + Camera + + + + Miscellaneous + binds (descriptions) - Move your hogs and aim: - ‘ズミをうごかすとねらう: - - Traverse gaps and obstacles by jumping: 穴と障害を跳んで超える: @@ -2592,6 +2557,10 @@ Record video: + + Hedgehog movement + + binds (keys) diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Locale/hedgewars_ko.ts --- a/share/hedgewars/Data/Locale/hedgewars_ko.ts Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Locale/hedgewars_ko.ts Fri Feb 22 05:05:32 2013 +0100 @@ -20,6 +20,79 @@ + BanDialog + + IP + + + + Nick + + + + IP/Nick + + + + Reason + + + + Duration + + + + Ok + + + + Cancel + + + + you know why + + + + Warning + + + + Please, specify %1 + + + + nickname + + + + permanent + + + + + DataManager + + Use Default + + + + + FeedbackDialog + + View + + + + Cancel + + + + Send Feedback + + + + FreqSpinBox Never @@ -43,13 +116,36 @@ - When this option is enabled selecting a game scheme will auto-select a weapon - - - Game Options + + Game scheme will auto-select a weapon + + + + + HWApplication + + %1 minutes + + + + %1 hour + + + + %1 hours + + + + %1 day + + + + %1 days + + HWAskQuitDialog @@ -100,10 +196,6 @@ Failed to save StyleSheet to %1 - - %1 is not a valid command! - - HWForm @@ -138,17 +230,6 @@ - Your nickname %1 is -registered on Hedgewars.org -Please provide your password below -or pick another nickname in game config: - - - - No password supplied. - - - Nickname @@ -161,6 +242,59 @@ Please pick another nickname: + + %1's Team + + + + Hedgewars - Nick registered + + + + This nick is registered, and you haven't specified a password. + +If this nick isn't yours, please register your own nick at www.hedgewars.org + +Password: + + + + Your nickname is not registered. +To prevent someone else from using it, +please register it at www.hedgewars.org + + + + + +Your password wasn't saved either. + + + + Hedgewars - Empty nickname + + + + Hedgewars - Wrong password + + + + You entered a wrong password. + + + + Try Again + + + + Hedgewars - Connection error + + + + You reconnected too fast. +Please wait a few seconds and try again. + + HWGame @@ -176,18 +310,6 @@ HWMapContainer - Map - - - - Themes - - - - Filter - - - All @@ -212,10 +334,6 @@ - Type - - - Small tunnels @@ -224,27 +342,95 @@ - Large tunnels - - - - Small floating islands - - - - Medium floating islands - - - - Large floating islands - - - Seed - Set + Map type: + + + + Image map + + + + Mission map + + + + Hand-drawn + + + + Randomly generated + + + + Random maze + + + + Random + + + + Map preview: + + + + Load map drawing + + + + Edit map drawing + + + + Largetunnels + + + + Small islands + + + + Medium islands + + + + Large islands + + + + Map size: + + + + Maze style: + + + + Mission: + + + + Map: + + + + Theme: + + + + Load drawn map + + + + Drawn Maps + + + + All files @@ -317,7 +503,7 @@ HWPasswordDialog - Password + Login @@ -333,6 +519,32 @@ + HatButton + + Change hat (%1) + + + + + HatPrompt + + Select a hat + + + + Filter: + + + + Cancel + + + + Use selected hat + + + + KB SDL_ttf returned error while rendering text, most propably it is related to the bug in freetype2. It's recommended to update your freetype lib. @@ -340,6 +552,13 @@ + KeyBinder + + Category + + + + LibavInteraction Duration: %1m %2s @@ -358,6 +577,17 @@ Audio: + + unknown + + + + + MapModel + + No description available. + + PageAdmin @@ -389,6 +619,38 @@ Set data + + General + + + + Bans + + + + IP/Nick + + + + Expiration + + + + Reason + + + + Refresh + + + + Add + + + + Remove + + PageConnecting @@ -443,7 +705,39 @@ - Advanced + Select an action to choose a custom key bind for this team + + + + Use my default + + + + Reset all binds + + + + Custom Controls + + + + Hat + + + + Name + + + + This hedgehog's name + + + + Randomize this hedgehog's name + + + + Random Team @@ -519,267 +813,14 @@ PageMain - Simply pick the same color as a friend to play together as a team. Each of you will still control his or her own hedgehogs but they'll win or lose together. - Tips - - - - Some weapons might do only low damage but they can be a lot more devastating in the right situation. Try to use the Desert Eagle to knock multiple hedgehogs into the water. - Tips - - - - If you're unsure what to do and don't want to waste ammo, skip one round. But don't let too much time pass as there will be Sudden Death! - Tips - - - - If you'd like to keep others from using your preferred nickname on the official server, register an account at http://www.hedgewars.org/. - Tips - - - - You're bored of default gameplay? Try one of the missions - they'll offer different gameplay depending on the one you picked. - Tips - - - - By default the game will always record the last game played as a demo. Select 'Local Game' and pick the 'Demos' button on the lower right corner to play or manage them. - Tips - - - - Hedgewars is Open Source and Freeware we create in our spare time. If you've got problems, ask on our forums but please don't expect 24/7 support! - Tips - - - - Hedgewars is Open Source and Freeware we create in our spare time. If you like it, help us with a small donation or contribute your own work! - Tips - - - - Hedgewars is Open Source and Freeware we create in our spare time. Share it with your family and friends as you like! - Tips - - - - From time to time there will be official tournaments. Upcoming events will be announced at http://www.hedgewars.org/ some days in advance. - Tips - - - - Hedgewars is available in many languages. If the translation in your language seems to be missing or outdated, feel free to contact us! - Tips - - - - Hedgewars can be run on lots of different operating systems including Microsoft Windows, Mac OS X and Linux. - Tips - - - - Always remember you're able to set up your own games in local and network/online play. You're not restricted to the 'Simple Game' option. - Tips - - - - While playing you should give yourself a short break at least once an hour. - Tips - - - - If your graphics card isn't able to provide hardware accelerated OpenGL, try to enable the low quality mode to improve performance. - Tips - - - - We're open to suggestions and constructive feedback. If you don't like something or got a great idea, let us know! - Tips - - - - Especially while playing online be polite and always remember there might be some minors playing with or against you as well! - Tips - - - - Special game modes such as 'Vampirism' or 'Karma' allow you to develop completely new tactics. Try them in a custom game! - Tips - - - - You should never install Hedgewars on computers you don't own (school, university, work, etc.). Please ask the responsible person instead! - Tips - - - - Hedgewars can be perfect for short games during breaks. Just ensure you don't add too many hedgehogs or use an huge map. Reducing time and health might help as well. - Tips - - - - No hedgehogs were harmed in making this game. - Tips - - - - Hedgewars is Open Source and Freeware we create in our spare time. If someone sold you the game, you should try get a refund! - Tips - - - - Connect one or more gamepads before starting the game to be able to assign their controls to your teams. - Tips - - - - Create an account on %1 to keep others from using your most favourite nickname while playing on the official server. - Tips - - - - If your graphics card isn't able to provide hardware accelerated OpenGL, try to update the associated drivers. - Tips - - - - There are three different jumps available. Tap [high jump] twice to do a very high/backwards jump. - Tips - - - - Afraid of falling off a cliff? Hold down [precise] to turn [left] or [right] without actually moving. - Tips - - - - Some weapons require special strategies or just lots of training, so don't give up on a particular tool if you miss an enemy once. - Tips - - - - Most weapons won't work once they touch the water. The Homing Bee as well as the Cake are exceptions to this. - Tips - - - - The Old Limbuger only causes a small explosion. However the wind affected smelly cloud can poison lots of hogs at once. - Tips - - - - The Piano Strike is the most damaging air strike. You'll lose the hedgehog performing it, so there's a huge downside as well. - Tips - - - - Sticky Mines are a perfect tool to create small chain reactions knocking enemy hedgehogs into dire situations ... or water. - Tips - - - - The Hammer is most effective when used on bridges or girders. Hit hogs will just break through the ground. - Tips - - - - If you're stuck behind an enemy hedgehog, use the Hammer to free yourself without getting damaged by an explosion. - Tips - - - - The Cake's maximum walking distance depends on the ground it has to pass. Use [attack] to detonate it early. - Tips - - - - The Flame Thrower is a weapon but it can be used for tunnel digging as well. - Tips - - - - Want to know who's behind the game? Click on the Hedgewars logo in the main menu to see the credits. - Tips - - - - Like Hedgewars? Become a fan on %1 or follow us on %2! - Tips - - - - Feel free to draw your own graves, hats, flags or even maps and themes! But note that you'll have to share them somewhere to use them online. - Tips - - - - Really want to wear a specific hat? Donate to us and receive an exclusive hat of your choice! - Tips - - - - Keep your video card drivers up to date to avoid issues playing the game. - Tips - - - - You can find your Hedgewars configuration files under "My Documents\Hedgewars". Create backups or take the files with you, but don't edit them by hand. - Tips - - - - You're able to associate Hedgewars related files (savegames and demo recordings) with the game to launch them right from your favorite file or internet browser. - Tips - - - - Want to save ropes? Release the rope in mid air and then shoot again. As long as you don't touch the ground you'll reuse your rope without wasting ammo! - Tips - - - - You can find your Hedgewars configuration files under "Library/Application Support/Hedgewars" in your home directory. Create backups or take the files with you, but don't edit them by hand. - Tips - - - - You can find your Hedgewars configuration files under ".hedgewars" in your home directory. Create backups or take the files with you, but don't edit them by hand. - Tips - - - - The Windows version of Hedgewars supports Xfire. Make sure to add Hedgewars to its game list so your friends can see you playing. - Tips - - - - Use the Molotov or Flame Thrower to temporary keep hedgehogs from passing terrain such as tunnels or platforms. - Tips - - - - The Homing Bee can be tricky to use. Its turn radius depends on its velocity, so try to not use full power. - Tips - - - Downloadable Content - Local Game - - - Play a game on a single computer - Network Game - - - Play a game across a network @@ -807,6 +848,14 @@ Edit game preferences + + Play a game across a local area network + + + + Play a game on an official server + + PageMultiplayer @@ -814,6 +863,10 @@ Start + + Edit game preferences + + PageNetGame @@ -821,23 +874,12 @@ Control - - - PageNetType - - LAN game - - - - Official server - - - - Join hundreds of players online! - - - - Join or host your own game server in a Local Area Network. + + Edit game preferences + + + + Start @@ -884,10 +926,6 @@ - General - - - Advanced @@ -927,6 +965,94 @@ System proxy settings + + Select an action to change what key controls it + + + + Reset to default + + + + Reset all binds + + + + Game + + + + Graphics + + + + Audio + + + + Controls + + + + Video Recording + + + + Network + + + + Teams + + + + Schemes + + + + Weapons + + + + Frontend + + + + Custom colors + + + + Game audio + + + + Frontend audio + + + + Account + + + + Proxy settings + + + + Miscellaneous + + + + Updates + + + + Check for updates + + + + Video recording options + + PagePlayDemo @@ -1125,18 +1251,10 @@ PageSinglePlayer - Simple Game - - - Play a quick game against the computer with random settings - Multiplayer - - - Play a hotseat game against your friends, or AI teams @@ -1145,26 +1263,14 @@ - Training Mode - - - Practice your skills in a range of training missions - Demos - - - Watch recorded demos - Load - - - Load a previously saved game @@ -1209,14 +1315,6 @@ - Date: - - - - Size: - - - encoding @@ -1224,6 +1322,16 @@ uploading + + Date: %1 + + + + + Size: %1 + + + QAction @@ -1236,10 +1344,6 @@ - Start - - - Restrict Joins @@ -1287,18 +1391,6 @@ - Frontend fullscreen - - - - Enable sound - - - - Enable music - - - Show FPS @@ -1315,18 +1407,6 @@ - Enable frontend sounds - - - - Enable frontend music - - - - Frontend effects - - - Save password @@ -1346,14 +1426,38 @@ Use game resolution + + Visual effects + + + + Sound + + + + In-game sound effects + + + + Music + + + + In-game music + + + + Frontend sound effects + + + + Frontend music + + QComboBox - generated map... - - - Human @@ -1366,14 +1470,6 @@ - Mission - - - - generated maze... - - - Community @@ -1390,10 +1486,6 @@ - hand drawn map... - - - Disabled @@ -1430,10 +1522,6 @@ - Wiggle - - - Red/Cyan grayscale @@ -1469,18 +1557,6 @@ - Key binds - - - - Teams - - - - Audio/Graphic options - - - Net game @@ -1501,26 +1577,6 @@ - Misc - - - - Schemes and Weapons - - - - Custom colors - - - - Miscellaneous - - - - Video recording options - - - Videos @@ -1528,10 +1584,6 @@ Description - - Proxy settings - - QLabel @@ -1548,26 +1600,6 @@ - Developers: - - - - Art: - - - - Sounds: - - - - Translations: - - - - Special thanks: - - - Weapons @@ -1624,10 +1656,6 @@ - Game scheme - - - % Dud Mines @@ -1664,10 +1692,6 @@ - This development build is 'work in progress' and may not be compatible with other versions of the game. Some features might be broken or incomplete. Use at your own risk! - - - Quality @@ -1742,10 +1766,6 @@ - Summary - - - Description @@ -1773,6 +1793,38 @@ Bitrate (Kbps) + + This development build is 'work in progress' and may not be compatible with other versions of the game, while some features might be broken or incomplete! + + + + Fullscreen + + + + Fullscreen Resolution + + + + Windowed Resolution + + + + Your Email + + + + Summary + + + + Send system information + + + + Type the security code: + + QLineEdit @@ -1811,10 +1863,6 @@ - Please fill out all fields - - - Error while authenticating at google.com: @@ -1861,18 +1909,6 @@ - Successfully posted the issue on hedgewars.googlecode.com - - - - Error during authentication at google.com - - - - Error reporting the issue, please try again later (or visit hedgewars.googlecode.com directly) - - - Main - Error @@ -2018,15 +2054,36 @@ Do you really want to delete the weapon set '%1'? - - - QObject - - Nickname - - - - Please enter your nickname + + Hedgewars - Nick not registered + + + + System Information Preview + + + + Failed to generate captcha + + + + Failed to download captcha + + + + Please fill out all fields. Email is optional. + + + + Hedgewars - Warning + + + + Hedgewars - Information + + + + Hedgewars @@ -2085,26 +2142,10 @@ - Setup - - - - Ready - - - - Random Team - - - Associate file extensions - more - - - More info @@ -2197,6 +2238,25 @@ + SeedPrompt + + The map seed is the basis for all random values generated by the game. + + + + Cancel + + + + Set seed + + + + Close + + + + SelWeaponWidget Weapon set @@ -2224,105 +2284,20 @@ - ToggleButtonWidget - - Vampirism - - - - Karma - - - - Artillery - - - - Fort Mode - - - - Divide Teams - - - - Solid Land - - - - Add Border - - - - Low Gravity - - - - Laser Sight - - - - Invulnerable - - - - Random Order - - - - King - - - - Place Hedgehogs - - - - Clan Shares Ammo - - - - Disable Girders - - - - Disable Land Objects - - - - AI Survival Mode - - - - Reset Health - - - - Unlimited Attacks - - - - Reset Weapons - - - - Per Hedgehog Ammo - - - - Disable Wind - - - - More Wind - - - - Tag Team - - - - Add Bottom Border + TeamShowWidget + + %1's team + + + + + ThemePrompt + + Select a theme for this map + + + + Cancel @@ -2457,11 +2432,6 @@ - hedgehogs -info - - - quit @@ -2497,33 +2467,33 @@ record + + hedgehog info + + binds (categories) - Basic controls - - - - Weapon controls - - - - Camera and cursor controls - - - - Other + Movement + + + + Weapons + + + + Camera + + + + Miscellaneous binds (descriptions) - Move your hogs and aim: - - - Traverse gaps and obstacles by jumping: @@ -2587,6 +2557,10 @@ Record video: + + Hedgehog movement + + binds (keys) diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Locale/hedgewars_lt.ts --- a/share/hedgewars/Data/Locale/hedgewars_lt.ts Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Locale/hedgewars_lt.ts Fri Feb 22 05:05:32 2013 +0100 @@ -4,7 +4,7 @@ AbstractPage - + Go back @@ -23,6 +23,96 @@ + BanDialog + + + permanent + + + + + + IP + + + + + Nick + + + + + IP/Nick + + + + + Reason + + + + + Duration + + + + + Ok + + + + + Cancel + + + + + you know why + + + + + Warning + + + + + Please, specify %1 + + + + + nickname + + + + + DataManager + + + Use Default + + + + + FeedbackDialog + + + View + + + + + Cancel + + + + + Send Feedback + + + + FreqSpinBox @@ -42,23 +132,56 @@ GameCFGWidget - + Game Options - + Edit schemes - + Edit weapons - - When this option is enabled selecting a game scheme will auto-select a weapon + + Game scheme will auto-select a weapon + + + + + HWApplication + + + + %1 minutes + + + + + %1 hour + + + + + + + %1 hours + + + + + %1 day + + + + + + + %1 days @@ -73,128 +196,175 @@ HWChatWidget - + %1 has been removed from your ignore list - + %1 has been added to your ignore list - + %1 has been removed from your friends list - + %1 has been added to your friends list - + Stylesheet imported from %1 - + Enter %1 if you want to use the current StyleSheet in future, enter %2 to reset! - + Couldn't read %1 - + StyleSheet discarded + + StyleSheet saved to %1 + + + - StyleSheet saved to %1 - - - - Failed to save StyleSheet to %1 - - - %1 is not a valid command! - - HWForm - - + DefaultTeam - + Game aborted - - Your nickname %1 is -registered on Hedgewars.org -Please provide your password below -or pick another nickname in game config: - - - - - No password supplied. - - - - + Nickname - + + No nickname supplied. - + Someone already uses your nickname %1 on the server. Please pick another nickname: - - + + %1's Team + + + + + Hedgewars - Nick registered + + + + + This nick is registered, and you haven't specified a password. + +If this nick isn't yours, please register your own nick at www.hedgewars.org + +Password: + + + + + Your nickname is not registered. +To prevent someone else from using it, +please register it at www.hedgewars.org + + + + + + +Your password wasn't saved either. + + + + + + Hedgewars - Empty nickname + + + + + Hedgewars - Wrong password + + + + + You entered a wrong password. + + + + + Try Again + + + + + Hedgewars - Connection error + + + + + You reconnected too fast. +Please wait a few seconds and try again. + + + + + Cannot save record to file %1 - + Hedgewars Demo File File Types - + Hedgewars Save File File Types - + Demo name - + Demo name: @@ -202,13 +372,13 @@ HWGame - - + + en.txt lt.txt - + Cannot open demofile %1 @@ -216,95 +386,161 @@ HWMapContainer - - Map - - - - - Filter - - - - - All - - - - - Small - - - - - Medium - - - - - Large - - - - Cavern - - - - - Wacky + Map type: + + + + + Image map + + + + + Mission map + + + + + Hand-drawn - Type - - - - + Randomly generated + + + + + Random maze + + + + + Random + + + + + Map preview: + + + + + Load map drawing + + + + + Edit map drawing + + + + + All + + + + + Small + + + + + Medium + + + + + Large + + + + + Cavern + + + + + Wacky + + + + + Largetunnels + + + + + Small islands + + + + + Medium islands + + + + + Large islands + + + + + Map size: + + + + + Maze style: + + + + + Mission: + + + + + Map: + + + + + + Theme: + + + + + Load drawn map + + + + + Drawn Maps + + + + + All files + + + + Small tunnels - + Medium tunnels - - Large tunnels - - - - - Small floating islands - - - - - Medium floating islands - - - - - Large floating islands - - - - - Themes - - - - + Seed - - - Set - - HWNetServersModel @@ -327,65 +563,65 @@ HWNewNet - + User quit - + Remote host has closed connection - + The host was not found. Please check the host name and port settings. - + Connection refused - + The server is too old. Disconnecting now. - + Room destroyed - + You got kicked - - + + %1 *** %2 has joined the room - + %1 *** %2 has joined - - + + %1 *** %2 has left - - + + %1 *** %2 has left (%3) - + Quit reason: @@ -394,7 +630,7 @@ HWPasswordDialog - Password + Login @@ -412,6 +648,37 @@ + HatButton + + + Change hat (%1) + + + + + HatPrompt + + + Select a hat + + + + + Filter: + + + + + Cancel + + + + + Use selected hat + + + + KB @@ -420,6 +687,14 @@ + KeyBinder + + + Category + + + + LibavInteraction @@ -442,44 +717,97 @@ Audio: + + + unknown + + + + + MapModel + + + No description available. + + PageAdmin - + + General + + + + + Bans + + + + Fetch data - + Server message for latest version: - + Server message for previous versions: - + Latest version protocol number: - + MOTD preview: - + Clear Accounts Cache - + Set data + + + IP/Nick + + + + + Expiration + + + + + Reason + + + + + Refresh + + + + + Add + + + + + Remove + + PageConnecting @@ -543,12 +871,52 @@ PageEditTeam + Select an action to choose a custom key bind for this team + + + + + Use my default + + + + + Reset all binds + + + + General - - Advanced + + Custom Controls + + + + + Hat + + + + + Name + + + + + This hedgehog's name + + + + + Randomize this hedgehog's name + + + + + Random Team @@ -570,12 +938,12 @@ - + The best shot award was won by <b>%1</b> with <b>%2</b> pts. - + The best killer is <b>%1</b> with <b>%2</b> kills in a turn. @@ -584,7 +952,7 @@ - + A total of <b>%1</b> hedgehog(s) were killed during this round. @@ -593,7 +961,7 @@ - + (%1 kill) @@ -602,7 +970,7 @@ - + <b>%1</b> thought it's good to shoot his own hedgehogs with <b>%2</b> pts. @@ -611,7 +979,7 @@ - + <b>%1</b> killed <b>%2</b> of his own hedgehogs. @@ -620,7 +988,7 @@ - + <b>%1</b> was scared and skipped turn <b>%2</b> times. @@ -649,358 +1017,69 @@ PageMain - Local Game - - - - Play a game on a single computer - Network Game - - - - Play a game across a network - + + Play a game across a local area network + + + + + Play a game on an official server + + + + Read about who is behind the Hedgewars Project - + Leave a feedback here reporting issues, suggesting features or just saying how you like Hedgewars - + Downloadable Content - + Access the user created content downloadable from our website - + Exit game - + Manage videos recorded from game - + Edit game preferences - - - Simply pick the same color as a friend to play together as a team. Each of you will still control his or her own hedgehogs but they'll win or lose together. - Tips - - - - - Some weapons might do only low damage but they can be a lot more devastating in the right situation. Try to use the Desert Eagle to knock multiple hedgehogs into the water. - Tips - - - - - If you're unsure what to do and don't want to waste ammo, skip one round. But don't let too much time pass as there will be Sudden Death! - Tips - - - - - Want to save ropes? Release the rope in mid air and then shoot again. As long as you don't touch the ground you'll reuse your rope without wasting ammo! - Tips - - - - - If you'd like to keep others from using your preferred nickname on the official server, register an account at http://www.hedgewars.org/. - Tips - - - - - You're bored of default gameplay? Try one of the missions - they'll offer different gameplay depending on the one you picked. - Tips - - - - - By default the game will always record the last game played as a demo. Select 'Local Game' and pick the 'Demos' button on the lower right corner to play or manage them. - Tips - - - - - Hedgewars is Open Source and Freeware we create in our spare time. If you've got problems, ask on our forums but please don't expect 24/7 support! - Tips - - - - - Hedgewars is Open Source and Freeware we create in our spare time. If you like it, help us with a small donation or contribute your own work! - Tips - - - - - Hedgewars is Open Source and Freeware we create in our spare time. Share it with your family and friends as you like! - Tips - - - - - Hedgewars is Open Source and Freeware we create in our spare time. If someone sold you the game, you should try get a refund! - Tips - - - - - From time to time there will be official tournaments. Upcoming events will be announced at http://www.hedgewars.org/ some days in advance. - Tips - - - - - Hedgewars is available in many languages. If the translation in your language seems to be missing or outdated, feel free to contact us! - Tips - - - - - Hedgewars can be run on lots of different operating systems including Microsoft Windows, Mac OS X and Linux. - Tips - - - - - Always remember you're able to set up your own games in local and network/online play. You're not restricted to the 'Simple Game' option. - Tips - - - - - Connect one or more gamepads before starting the game to be able to assign their controls to your teams. - Tips - - - - - Create an account on %1 to keep others from using your most favourite nickname while playing on the official server. - Tips - - - - - While playing you should give yourself a short break at least once an hour. - Tips - - - - - If your graphics card isn't able to provide hardware accelerated OpenGL, try to enable the low quality mode to improve performance. - Tips - - - - - If your graphics card isn't able to provide hardware accelerated OpenGL, try to update the associated drivers. - Tips - - - - - We're open to suggestions and constructive feedback. If you don't like something or got a great idea, let us know! - Tips - - - - - Especially while playing online be polite and always remember there might be some minors playing with or against you as well! - Tips - - - - - Special game modes such as 'Vampirism' or 'Karma' allow you to develop completely new tactics. Try them in a custom game! - Tips - - - - - The Windows version of Hedgewars supports Xfire. Make sure to add Hedgewars to its game list so your friends can see you playing. - Tips - - - - - You should never install Hedgewars on computers you don't own (school, university, work, etc.). Please ask the responsible person instead! - Tips - - - - - Hedgewars can be perfect for short games during breaks. Just ensure you don't add too many hedgehogs or use an huge map. Reducing time and health might help as well. - Tips - - - - - No hedgehogs were harmed in making this game. - Tips - - - - - There are three different jumps available. Tap [high jump] twice to do a very high/backwards jump. - Tips - - - - - Afraid of falling off a cliff? Hold down [precise] to turn [left] or [right] without actually moving. - Tips - - - - - Some weapons require special strategies or just lots of training, so don't give up on a particular tool if you miss an enemy once. - Tips - - - - - Most weapons won't work once they touch the water. The Homing Bee as well as the Cake are exceptions to this. - Tips - - - - - The Old Limbuger only causes a small explosion. However the wind affected smelly cloud can poison lots of hogs at once. - Tips - - - - - The Piano Strike is the most damaging air strike. You'll lose the hedgehog performing it, so there's a huge downside as well. - Tips - - - - - The Homing Bee can be tricky to use. Its turn radius depends on its velocity, so try to not use full power. - Tips - - - - - Sticky Mines are a perfect tool to create small chain reactions knocking enemy hedgehogs into dire situations ... or water. - Tips - - - - - The Hammer is most effective when used on bridges or girders. Hit hogs will just break through the ground. - Tips - - - - - If you're stuck behind an enemy hedgehog, use the Hammer to free yourself without getting damaged by an explosion. - Tips - - - - - The Cake's maximum walking distance depends on the ground it has to pass. Use [attack] to detonate it early. - Tips - - - - - The Flame Thrower is a weapon but it can be used for tunnel digging as well. - Tips - - - - - Use the Molotov or Flame Thrower to temporary keep hedgehogs from passing terrain such as tunnels or platforms. - Tips - - - - - Want to know who's behind the game? Click on the Hedgewars logo in the main menu to see the credits. - Tips - - - - - Like Hedgewars? Become a fan on %1 or follow us on %2! - Tips - - - - - Feel free to draw your own graves, hats, flags or even maps and themes! But note that you'll have to share them somewhere to use them online. - Tips - - - - - Really want to wear a specific hat? Donate to us and receive an exclusive hat of your choice! - Tips - - - - - Keep your video card drivers up to date to avoid issues playing the game. - Tips - - - - - You're able to associate Hedgewars related files (savegames and demo recordings) with the game to launch them right from your favorite file or internet browser. - Tips - - - - - You can find your Hedgewars configuration files under "My Documents\Hedgewars". Create backups or take the files with you, but don't edit them by hand. - Tips - - - - - You can find your Hedgewars configuration files under "Library/Application Support/Hedgewars" in your home directory. Create backups or take the files with you, but don't edit them by hand. - Tips - - - - - You can find your Hedgewars configuration files under ".hedgewars" in your home directory. Create backups or take the files with you, but don't edit them by hand. - Tips - - PageMultiplayer - + + Edit game preferences + + + + Start @@ -1008,141 +1087,234 @@ PageNetGame - + + Edit game preferences + + + + Control - - - PageNetType - - - LAN game - - - - - Join or host your own game server in a Local Area Network. - - - - - Official server - - - - - Join hundreds of players online! + + + Start PageOptions - - General - - - - + + Select an action to change what key controls it + + + + + Reset to default + + + + + Reset all binds + + + + + + Game + + + + + Graphics + + + + + Audio + + + + + Controls + + + + + Video Recording + + + + + Network + + + + Advanced - + + Teams + + + + New team - + Edit team - + Delete team - - You can't edit teams from team selection. Go back to main menu to add, edit or delete teams. - - - - - New scheme - - - - - Edit scheme - - - - - Delete scheme - - - - - New weapon set - - - - Edit weapon set + You can't edit teams from team selection. Go back to main menu to add, edit or delete teams. + Schemes + + + + + New scheme + + + + + Edit scheme + + + + + Delete scheme + + + + + Weapons + + + + + New weapon set + + + + + Edit weapon set + + + + Delete weapon set - + + Frontend + + + + + Custom colors + + + + Reset to default colors - + + Game audio + + + + + Frontend audio + + + + + Account + + + + + Proxy settings + + + + Proxy host - + Proxy port - + Proxy login - + Proxy password - + No proxy - + System proxy settings - + Socks5 proxy - + HTTP proxy + + + Miscellaneous + + + + + Updates + + + + + Check for updates + + + + + Video recording options + + PagePlayDemo @@ -1200,7 +1372,7 @@ - + %1 players online @@ -1212,152 +1384,152 @@ PageScheme - + Defend your fort and destroy the opponents, two team colours max! - + Teams will start on opposite sides of the terrain, two team colours max! - + Land can not be destroyed! + + Add an indestructible border around the terrain + + + - Add an indestructible border around the terrain - - - - Lower gravity - + Assisted aiming with laser sight - + All hogs have a personal forcefield + + All (living) hedgehogs are fully restored at the end of turn + + + + + Gain 80% of the damage you do back in health + + + - All (living) hedgehogs are fully restored at the end of turn - - - - - Gain 80% of the damage you do back in health - - - - Share your opponents pain, share their damage - + Your hogs are unable to move, put your artillery skills to the test + + Order of play is random instead of in room order. + + + + + Play with a King. If he dies, your side dies. + + + + + Take turns placing your hedgehogs before the start of play. + + + - Order of play is random instead of in room order. - - - - - Play with a King. If he dies, your side dies. - - - - - Take turns placing your hedgehogs before the start of play. - - - - Ammo is shared between all teams that share a colour. + + Disable girders when generating random maps. + + + + + Disable land objects when generating random maps. + + + + + AI respawns on death. + + + + + Attacking does not end your turn. + + + - Disable girders when generating random maps. - - - - - Disable land objects when generating random maps. - - - - - AI respawns on death. - - - - - Attacking does not end your turn. + Weapons are reset to starting values each turn. + + + + + Each hedgehog has its own ammo. It does not share with the team. + + + + + You will not have to worry about wind anymore. + + + + + Wind will affect almost everything. + + + + + Teams in each clan take successive turns sharing their turn time. - Weapons are reset to starting values each turn. - - - - - Each hedgehog has its own ammo. It does not share with the team. - - - - - You will not have to worry about wind anymore. - - - - - Wind will affect almost everything. - - - - - Teams in each clan take successive turns sharing their turn time. - - - - Add an indestructible border along the bottom - + Random - + Seconds - + Copy - + New - + Delete @@ -1389,57 +1561,31 @@ PageSinglePlayer - Simple Game - - - - Play a quick game against the computer with random settings - - Multiplayer - - - - + Play a hotseat game against your friends, or AI teams - - + Campaign Mode - - Training Mode - - - - + Practice your skills in a range of training missions - - Demos - - - - + Watch recorded demos - - Load - - - - + Load a previously saved game @@ -1457,12 +1603,12 @@ - + No description available - + Select a mission! @@ -1470,17 +1616,17 @@ PageVideos - + Name - + Size - + %1 bytes @@ -1489,27 +1635,29 @@ - + (in progress...) - - Date: - - - - - Size: - - - - + + Date: %1 + + + + + + Size: %1 + + + + + encoding - + uploading @@ -1517,133 +1665,135 @@ QAction - + Info - + Kick - + Ban - + Follow - - + + Ignore - - + + Add friend - + Unignore - + Remove friend - + Update - + Restrict Joins - + Restrict Team Additions - - - Start - - QCheckBox - + Show ammo menu tooltips - + Alternative damage show - + + Visual effects + + + + + + Sound + + + + + In-game sound effects + + + + + + Music + + + + + In-game music + + + + + Frontend sound effects + + + + + Frontend music + + + + Append date and time to record file name - + Check for updates at startup - - Frontend fullscreen - - - - - Frontend effects - - - - - Enable frontend sounds - - - - - Enable frontend music - - - - + Fullscreen - - Enable sound - - - - - Enable music - - - - + Show FPS - - + + Save password @@ -1658,12 +1808,12 @@ - + Record audio - + Use game resolution @@ -1671,129 +1821,104 @@ QComboBox - - Mission - - - - - generated map... - - - - - generated maze... - - - - - hand drawn map... - - - - + Human - + Level - + Community - + (System default) + + Disabled + + + - Disabled + Red/Cyan - Red/Cyan + Cyan/Red - Cyan/Red + Red/Blue - Red/Blue + Blue/Red - Blue/Red + Red/Green - Red/Green + Green/Red + + + + + Side-by-side + + + + + Top-Bottom - Green/Red + Red/Cyan grayscale - Side-by-side + Cyan/Red grayscale - Top-Bottom + Red/Blue grayscale - Wiggle + Blue/Red grayscale - Red/Cyan grayscale + Red/Green grayscale - Cyan/Red grayscale - - - - - Red/Blue grayscale - - - - - Blue/Red grayscale - - - - - Red/Green grayscale - - - - Green/Red grayscale - + Any @@ -1811,66 +1936,26 @@ QGroupBox - + Team Members - + Team Settings - + Fort - - Key binds - - - Net game - - Teams - - - - - Schemes and Weapons - - - - - Misc - - - - - Audio/Graphic options - - - - - Custom colors - - - - - Miscellaneous - - - - - Proxy settings - - - Game Modifiers @@ -1881,22 +1966,17 @@ - + Playing teams - - Video recording options - - - - + Videos - + Description @@ -1904,53 +1984,27 @@ QLabel - + Version - + This program is distributed under the GNU General Public License v2 - - Developers: - - - - - Art: - - - - - Sounds: - - - - - Translations: - - - - - Special thanks: - - - - + Style - + Scheme - - + Weapons @@ -1965,38 +2019,38 @@ - + Name - + Type - + Grave - + Flag - + Voice - + Tip: - - This development build is 'work in progress' and may not be compatible with other versions of the game. Some features might be broken or incomplete. Use at your own risk! + + This development build is 'work in progress' and may not be compatible with other versions of the game, while some features might be broken or incomplete! @@ -2010,123 +2064,132 @@ - - Game scheme - - - - + Locale - + Nickname - - + Resolution - + Quality - + + Fullscreen + + + + + Fullscreen Resolution + + + + + Windowed Resolution + + + + Stereo rendering - + Initial sound volume - + FPS limit - + Damage Modifier - + Turn Time - + Initial Health - + Sudden Death Timeout - + Sudden Death Water Rise - + Sudden Death Health Decrease - + % Rope Length - + Crate Drops - + % Health Crates - + Health in Crates - + Mines Time - + Mines - + % Dud Mines - + Explosives - + % Get Away Time - + Scheme Name: @@ -2168,37 +2231,52 @@ - - Summary - - - - + + Your Email + + + + + Summary + + + + + Send system information + + + + Description - + + Type the security code: + + + + Format - + Audio codec - + Video codec - + Framerate - + Bitrate (Kbps) @@ -2206,18 +2284,18 @@ QLineEdit - + unnamed - - + + hedgehog %1 - + anonymous @@ -2225,7 +2303,7 @@ QMainWindow - + Hedgewars %1 @@ -2233,87 +2311,90 @@ QMessageBox - - + Teams - Are you sure? - - + Do you really want to delete the team '%1'? - - + + Cannot delete default scheme '%1'! - + Please select a record from the list - + + Hedgewars - Nick not registered + + + + Unable to start server - + Connection to server is lost - + Hedgewars - Error - - + + System Information Preview + + + + + + Failed to generate captcha + + + + + Failed to download captcha + + + + + Please fill out all fields. Email is optional. + + + + + Hedgewars - Success - + All file associations have been set - - Successfully posted the issue on hedgewars.googlecode.com - - - - - - Error during authentication at google.com - - - - - Error reporting the issue, please try again later (or visit hedgewars.googlecode.com directly) - - - - + File association failed. - - Please fill out all fields - - - - + Error - + Cannot use the ammo '%1'! @@ -2341,18 +2422,18 @@ - - + + Main - Error - + Cannot create directory %1 - + Failed to open data directory: %1 @@ -2360,29 +2441,29 @@ - - + + TCP - Error - + Unable to start the server: %1. - + Unable to run engine at - + Error code: %1 - + Netgame - Error @@ -2392,8 +2473,8 @@ - - + + Please enter room name @@ -2422,56 +2503,56 @@ - - + + Room Name - Error - + Please select room from the list - + Room Name - Are you sure? - + The game you are trying to join has started. Do you still want to join the room? - + Schemes - Warning - + Schemes - Are you sure? - + Do you really want to delete the game scheme '%1'? - - - + + + Videos - Are you sure? - + Do you really want to delete the video '%1'? - + Do you really want to remove %1 file(s)? @@ -2480,13 +2561,14 @@ - + Do you really want to cancel uploading %1? + File error @@ -2497,6 +2579,7 @@ + Cannot open '%1' for reading @@ -2526,17 +2609,19 @@ Do you really want to delete the weapon set '%1'? - - - QObject - - - Nickname - - - - - Please enter your nickname + + + Hedgewars - Warning + + + + + Hedgewars - Information + + + + + Hedgewars @@ -2555,33 +2640,17 @@ - + Cancel - - more - - - Go! - - Random Team - - - - - - Setup - - - Start server @@ -2602,17 +2671,12 @@ - - Ready - - - Start - + Associate file extensions @@ -2629,8 +2693,8 @@ - - + + Delete @@ -2645,53 +2709,54 @@ - + Set default options - + Restore default coding parameters - + Open videos directory - + Open the video directory in your system - + Play - + Play this video - + Delete this video - - + + + Upload to YouTube - + Upload this video to your Youtube account - + Cancel uploading @@ -2739,22 +2804,45 @@ - + Random Map - - Random Maze - - - + Random Maze + + + + Hand-drawn + SeedPrompt + + + The map seed is the basis for all random values generated by the game. + + + + + Cancel + + + + + Set seed + + + + + Close + + + + SelWeaponWidget @@ -2790,130 +2878,23 @@ - ToggleButtonWidget - - - Fort Mode - - - - - Divide Teams - - - - - Solid Land - - - - - Add Border - - - - - Low Gravity - - - - - Laser Sight - - - - - Invulnerable - - - - - Reset Health - - - - - Vampirism - - - - - Karma - - - - - Artillery - - - - - Random Order - - - - - King - - - - - Place Hedgehogs - - - - - Clan Shares Ammo - - - - - Disable Girders - - - - - Disable Land Objects - - - - - AI Survival Mode - - - - - Unlimited Attacks - - - - - Reset Weapons - - - - - Per Hedgehog Ammo - - - - - Disable Wind - - - - - More Wind - - - - - Tag Team - - - - - Add Bottom Border + TeamShowWidget + + + %1's team + + + + + ThemePrompt + + + Select a theme for this map + + + + + Cancel @@ -2959,97 +2940,97 @@ + + attack + + + + + put + + + - attack + switch - put + ammo menu - switch + slot 1 - ammo menu + slot 2 - slot 1 + slot 3 - slot 2 + slot 4 - slot 3 + slot 5 - slot 4 + slot 6 - slot 5 + slot 7 - slot 6 + slot 8 - slot 7 + slot 9 - slot 8 + slot 10 - slot 9 + timer 1 sec - slot 10 + timer 2 sec - timer 1 sec + timer 3 sec - timer 2 sec + timer 4 sec - timer 3 sec - - - - - timer 4 sec - - - - timer 5 sec @@ -3125,12 +3106,11 @@ - hedgehogs -info - - - - + hedgehog info + + + + record @@ -3139,59 +3119,59 @@ binds (categories) - Basic controls - - - - - Weapon controls + Movement + + + + + Weapons - Camera and cursor controls + Camera - Other + Miscellaneous binds (descriptions) - - Move your hogs and aim: - - - Traverse gaps and obstacles by jumping: + + Fire your selected weapon or trigger an utility item: + + + + + Pick a weapon or a target location under the cursor: + + + - Fire your selected weapon or trigger an utility item: + Switch your currently active hog (if possible): + + + + + Hedgehog movement - Pick a weapon or a target location under the cursor: - - - - - Switch your currently active hog (if possible): - - - - Pick a weapon or utility item: - + Set the timer on bombs and timed weapons: @@ -3241,7 +3221,7 @@ - + Record video: @@ -3249,44 +3229,44 @@ binds (keys) - + Axis - - - (Up) - - - + (Up) + + + + + (Down) - + Hat - - (Left) - - - + (Left) + + + + (Right) - + Button - + Keyboard diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Locale/hedgewars_ms.ts --- a/share/hedgewars/Data/Locale/hedgewars_ms.ts Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Locale/hedgewars_ms.ts Fri Feb 22 05:05:32 2013 +0100 @@ -4,7 +4,7 @@ AbstractPage - + Go back @@ -23,6 +23,96 @@ + BanDialog + + + permanent + + + + + + IP + + + + + Nick + + + + + IP/Nick + + + + + Reason + + + + + Duration + + + + + Ok + + + + + Cancel + + + + + you know why + + + + + Warning + + + + + Please, specify %1 + + + + + nickname + + + + + DataManager + + + Use Default + + + + + FeedbackDialog + + + View + + + + + Cancel + + + + + Send Feedback + + + + FreqSpinBox @@ -40,23 +130,56 @@ GameCFGWidget - + Game Options - + Edit schemes - + Edit weapons - - When this option is enabled selecting a game scheme will auto-select a weapon + + Game scheme will auto-select a weapon + + + + + HWApplication + + + + %1 minutes + + + + + %1 hour + + + + + + + %1 hours + + + + + %1 day + + + + + + + %1 days @@ -71,128 +194,175 @@ HWChatWidget - + %1 has been removed from your ignore list - + %1 has been added to your ignore list - + %1 has been removed from your friends list - + %1 has been added to your friends list - + Stylesheet imported from %1 - + Enter %1 if you want to use the current StyleSheet in future, enter %2 to reset! - + Couldn't read %1 - + StyleSheet discarded + + StyleSheet saved to %1 + + + - StyleSheet saved to %1 - - - - Failed to save StyleSheet to %1 - - - %1 is not a valid command! - - HWForm - - + DefaultTeam - + + %1's Team + + + + Game aborted - - Your nickname %1 is -registered on Hedgewars.org -Please provide your password below -or pick another nickname in game config: - - - - - No password supplied. - - - - + + Hedgewars - Nick registered + + + + + This nick is registered, and you haven't specified a password. + +If this nick isn't yours, please register your own nick at www.hedgewars.org + +Password: + + + + + Your nickname is not registered. +To prevent someone else from using it, +please register it at www.hedgewars.org + + + + + + +Your password wasn't saved either. + + + + Nickname - + Someone already uses your nickname %1 on the server. Please pick another nickname: - + + No nickname supplied. - - + + + Hedgewars - Empty nickname + + + + + Hedgewars - Wrong password + + + + + You entered a wrong password. + + + + + Try Again + + + + + Hedgewars - Connection error + + + + + You reconnected too fast. +Please wait a few seconds and try again. + + + + + Cannot save record to file %1 - + Hedgewars Demo File File Types - + Hedgewars Save File File Types - + Demo name - + Demo name: @@ -200,13 +370,13 @@ HWGame - - + + en.txt ms.txt - + Cannot open demofile %1 @@ -214,95 +384,161 @@ HWMapContainer - - Map - - - - - Filter - - - - - All - - - - - Small - - - - - Medium - - - - - Large - - - - Cavern - - - - - Wacky + Map type: + + + + + Image map + + + + + Mission map + + + + + Hand-drawn - Type - - - - + Randomly generated + + + + + Random maze + + + + + Random + + + + + Map preview: + + + + + Load map drawing + + + + + Edit map drawing + + + + + All + + + + + Small + + + + + Medium + + + + + Large + + + + + Cavern + + + + + Wacky + + + + + Largetunnels + + + + + Small islands + + + + + Medium islands + + + + + Large islands + + + + + Map size: + + + + + Maze style: + + + + + Mission: + + + + + Map: + + + + + + Theme: + + + + + Load drawn map + + + + + Drawn Maps + + + + + All files + + + + Small tunnels - + Medium tunnels - - Large tunnels - - - - - Small floating islands - - - - - Medium floating islands - - - - - Large floating islands - - - - - Themes - - - - + Seed - - - Set - - HWNetServersModel @@ -325,65 +561,65 @@ HWNewNet - + Quit reason: - + User quit - + Remote host has closed connection - + The host was not found. Please check the host name and port settings. - + Connection refused - + The server is too old. Disconnecting now. - + You got kicked - + %1 *** %2 has joined - - + + %1 *** %2 has left - - + + %1 *** %2 has left (%3) - - + + %1 *** %2 has joined the room - + Room destroyed @@ -392,7 +628,7 @@ HWPasswordDialog - Password + Login @@ -410,6 +646,37 @@ + HatButton + + + Change hat (%1) + + + + + HatPrompt + + + Select a hat + + + + + Filter: + + + + + Cancel + + + + + Use selected hat + + + + KB @@ -418,6 +685,14 @@ + KeyBinder + + + Category + + + + LibavInteraction @@ -440,44 +715,97 @@ Audio: + + + unknown + + + + + MapModel + + + No description available. + + PageAdmin - + + General + + + + + Bans + + + + Fetch data - + Server message for latest version: - + Server message for previous versions: - + Latest version protocol number: - + MOTD preview: - + Clear Accounts Cache - + Set data + + + IP/Nick + + + + + Expiration + + + + + Reason + + + + + Refresh + + + + + Add + + + + + Remove + + PageConnecting @@ -541,12 +869,52 @@ PageEditTeam + Select an action to choose a custom key bind for this team + + + + + Use my default + + + + + Reset all binds + + + + General - - Advanced + + Custom Controls + + + + + Hat + + + + + Name + + + + + This hedgehog's name + + + + + Randomize this hedgehog's name + + + + + Random Team @@ -568,47 +936,47 @@ - + The best shot award was won by <b>%1</b> with <b>%2</b> pts. - + The best killer is <b>%1</b> with <b>%2</b> kills in a turn. - + A total of <b>%1</b> hedgehog(s) were killed during this round. - + (%1 kill) - + <b>%1</b> thought it's good to shoot his own hedgehogs with <b>%2</b> pts. - + <b>%1</b> killed <b>%2</b> of his own hedgehogs. - + <b>%1</b> was scared and skipped turn <b>%2</b> times. @@ -635,358 +1003,69 @@ PageMain - Local Game - - - - Play a game on a single computer - Network Game - - - - Play a game across a network - + + Play a game across a local area network + + + + + Play a game on an official server + + + + Read about who is behind the Hedgewars Project - + Leave a feedback here reporting issues, suggesting features or just saying how you like Hedgewars - + Downloadable Content - + Access the user created content downloadable from our website - + Exit game - + Manage videos recorded from game - + Edit game preferences - - - Simply pick the same color as a friend to play together as a team. Each of you will still control his or her own hedgehogs but they'll win or lose together. - Tips - - - - - Some weapons might do only low damage but they can be a lot more devastating in the right situation. Try to use the Desert Eagle to knock multiple hedgehogs into the water. - Tips - - - - - If you're unsure what to do and don't want to waste ammo, skip one round. But don't let too much time pass as there will be Sudden Death! - Tips - - - - - Want to save ropes? Release the rope in mid air and then shoot again. As long as you don't touch the ground you'll reuse your rope without wasting ammo! - Tips - - - - - If you'd like to keep others from using your preferred nickname on the official server, register an account at http://www.hedgewars.org/. - Tips - - - - - You're bored of default gameplay? Try one of the missions - they'll offer different gameplay depending on the one you picked. - Tips - - - - - By default the game will always record the last game played as a demo. Select 'Local Game' and pick the 'Demos' button on the lower right corner to play or manage them. - Tips - - - - - Hedgewars is Open Source and Freeware we create in our spare time. If you've got problems, ask on our forums but please don't expect 24/7 support! - Tips - - - - - Hedgewars is Open Source and Freeware we create in our spare time. If you like it, help us with a small donation or contribute your own work! - Tips - - - - - Hedgewars is Open Source and Freeware we create in our spare time. Share it with your family and friends as you like! - Tips - - - - - Hedgewars is Open Source and Freeware we create in our spare time. If someone sold you the game, you should try get a refund! - Tips - - - - - From time to time there will be official tournaments. Upcoming events will be announced at http://www.hedgewars.org/ some days in advance. - Tips - - - - - Hedgewars is available in many languages. If the translation in your language seems to be missing or outdated, feel free to contact us! - Tips - - - - - Hedgewars can be run on lots of different operating systems including Microsoft Windows, Mac OS X and Linux. - Tips - - - - - Always remember you're able to set up your own games in local and network/online play. You're not restricted to the 'Simple Game' option. - Tips - - - - - Connect one or more gamepads before starting the game to be able to assign their controls to your teams. - Tips - - - - - Create an account on %1 to keep others from using your most favourite nickname while playing on the official server. - Tips - - - - - While playing you should give yourself a short break at least once an hour. - Tips - - - - - If your graphics card isn't able to provide hardware accelerated OpenGL, try to enable the low quality mode to improve performance. - Tips - - - - - If your graphics card isn't able to provide hardware accelerated OpenGL, try to update the associated drivers. - Tips - - - - - We're open to suggestions and constructive feedback. If you don't like something or got a great idea, let us know! - Tips - - - - - Especially while playing online be polite and always remember there might be some minors playing with or against you as well! - Tips - - - - - Special game modes such as 'Vampirism' or 'Karma' allow you to develop completely new tactics. Try them in a custom game! - Tips - - - - - The Windows version of Hedgewars supports Xfire. Make sure to add Hedgewars to its game list so your friends can see you playing. - Tips - - - - - You should never install Hedgewars on computers you don't own (school, university, work, etc.). Please ask the responsible person instead! - Tips - - - - - Hedgewars can be perfect for short games during breaks. Just ensure you don't add too many hedgehogs or use an huge map. Reducing time and health might help as well. - Tips - - - - - No hedgehogs were harmed in making this game. - Tips - - - - - There are three different jumps available. Tap [high jump] twice to do a very high/backwards jump. - Tips - - - - - Afraid of falling off a cliff? Hold down [precise] to turn [left] or [right] without actually moving. - Tips - - - - - Some weapons require special strategies or just lots of training, so don't give up on a particular tool if you miss an enemy once. - Tips - - - - - Most weapons won't work once they touch the water. The Homing Bee as well as the Cake are exceptions to this. - Tips - - - - - The Old Limbuger only causes a small explosion. However the wind affected smelly cloud can poison lots of hogs at once. - Tips - - - - - The Piano Strike is the most damaging air strike. You'll lose the hedgehog performing it, so there's a huge downside as well. - Tips - - - - - The Homing Bee can be tricky to use. Its turn radius depends on its velocity, so try to not use full power. - Tips - - - - - Sticky Mines are a perfect tool to create small chain reactions knocking enemy hedgehogs into dire situations ... or water. - Tips - - - - - The Hammer is most effective when used on bridges or girders. Hit hogs will just break through the ground. - Tips - - - - - If you're stuck behind an enemy hedgehog, use the Hammer to free yourself without getting damaged by an explosion. - Tips - - - - - The Cake's maximum walking distance depends on the ground it has to pass. Use [attack] to detonate it early. - Tips - - - - - The Flame Thrower is a weapon but it can be used for tunnel digging as well. - Tips - - - - - Use the Molotov or Flame Thrower to temporary keep hedgehogs from passing terrain such as tunnels or platforms. - Tips - - - - - Want to know who's behind the game? Click on the Hedgewars logo in the main menu to see the credits. - Tips - - - - - Like Hedgewars? Become a fan on %1 or follow us on %2! - Tips - - - - - Feel free to draw your own graves, hats, flags or even maps and themes! But note that you'll have to share them somewhere to use them online. - Tips - - - - - Really want to wear a specific hat? Donate to us and receive an exclusive hat of your choice! - Tips - - - - - Keep your video card drivers up to date to avoid issues playing the game. - Tips - - - - - You're able to associate Hedgewars related files (savegames and demo recordings) with the game to launch them right from your favorite file or internet browser. - Tips - - - - - You can find your Hedgewars configuration files under "My Documents\Hedgewars". Create backups or take the files with you, but don't edit them by hand. - Tips - - - - - You can find your Hedgewars configuration files under "Library/Application Support/Hedgewars" in your home directory. Create backups or take the files with you, but don't edit them by hand. - Tips - - - - - You can find your Hedgewars configuration files under ".hedgewars" in your home directory. Create backups or take the files with you, but don't edit them by hand. - Tips - - PageMultiplayer - + + Edit game preferences + + + + Start @@ -994,141 +1073,234 @@ PageNetGame - + + Edit game preferences + + + + Control - - - PageNetType - - - LAN game - - - - - Join or host your own game server in a Local Area Network. - - - - - Official server - - - - - Join hundreds of players online! + + + Start PageOptions - - General - - - - + + Select an action to change what key controls it + + + + + Reset to default + + + + + Reset all binds + + + + + + Game + + + + + Graphics + + + + + Audio + + + + + Controls + + + + + Video Recording + + + + + Network + + + + Advanced - + + Teams + + + + New team - + Edit team - + Delete team - - You can't edit teams from team selection. Go back to main menu to add, edit or delete teams. - - - - - New scheme - - - - - Edit scheme - - - - - Delete scheme - - - - - New weapon set - - - - Edit weapon set + You can't edit teams from team selection. Go back to main menu to add, edit or delete teams. + Schemes + + + + + New scheme + + + + + Edit scheme + + + + + Delete scheme + + + + + Weapons + + + + + New weapon set + + + + + Edit weapon set + + + + Delete weapon set - + + Frontend + + + + + Custom colors + + + + Reset to default colors - + + Game audio + + + + + Frontend audio + + + + + Account + + + + + Proxy settings + + + + Proxy host - + Proxy port - + Proxy login - + Proxy password - + No proxy - + System proxy settings - + Socks5 proxy - + HTTP proxy + + + Miscellaneous + + + + + Updates + + + + + Check for updates + + + + + Video recording options + + PagePlayDemo @@ -1186,7 +1358,7 @@ - + %1 players online @@ -1196,152 +1368,152 @@ PageScheme - + Defend your fort and destroy the opponents, two team colours max! - + Teams will start on opposite sides of the terrain, two team colours max! - + Land can not be destroyed! + + Add an indestructible border around the terrain + + + - Add an indestructible border around the terrain - - - - Lower gravity - + Assisted aiming with laser sight - + All hogs have a personal forcefield + + All (living) hedgehogs are fully restored at the end of turn + + + + + Gain 80% of the damage you do back in health + + + - All (living) hedgehogs are fully restored at the end of turn - - - - - Gain 80% of the damage you do back in health - - - - Share your opponents pain, share their damage - + Your hogs are unable to move, put your artillery skills to the test + + Order of play is random instead of in room order. + + + + + Play with a King. If he dies, your side dies. + + + + + Take turns placing your hedgehogs before the start of play. + + + - Order of play is random instead of in room order. - - - - - Play with a King. If he dies, your side dies. - - - - - Take turns placing your hedgehogs before the start of play. - - - - Ammo is shared between all teams that share a colour. + + Disable girders when generating random maps. + + + + + Disable land objects when generating random maps. + + + + + AI respawns on death. + + + + + Attacking does not end your turn. + + + - Disable girders when generating random maps. - - - - - Disable land objects when generating random maps. - - - - - AI respawns on death. - - - - - Attacking does not end your turn. + Weapons are reset to starting values each turn. + + + + + Each hedgehog has its own ammo. It does not share with the team. + + + + + You will not have to worry about wind anymore. + + + + + Wind will affect almost everything. + + + + + Teams in each clan take successive turns sharing their turn time. - Weapons are reset to starting values each turn. - - - - - Each hedgehog has its own ammo. It does not share with the team. - - - - - You will not have to worry about wind anymore. - - - - - Wind will affect almost everything. - - - - - Teams in each clan take successive turns sharing their turn time. - - - - Add an indestructible border along the bottom - + Random - + Seconds - + Copy - + New - + Delete @@ -1373,57 +1545,31 @@ PageSinglePlayer - Simple Game - - - - Play a quick game against the computer with random settings - - Multiplayer - - - - + Play a hotseat game against your friends, or AI teams - - + Campaign Mode - - Training Mode - - - - + Practice your skills in a range of training missions - - Demos - - - - + Watch recorded demos - - Load - - - - + Load a previously saved game @@ -1441,12 +1587,12 @@ - + No description available - + Select a mission! @@ -1454,44 +1600,46 @@ PageVideos - + Name - + Size - + %1 bytes - + (in progress...) - - Date: - - - - - Size: - - - - + + Date: %1 + + + + + + Size: %1 + + + + + encoding - + uploading @@ -1499,64 +1647,59 @@ QAction - + Update - - Start - - - - + Restrict Joins - + Restrict Team Additions - + Info - + Kick - + Ban - + Follow - - + + Ignore - - + + Add friend - + Unignore - + Remove friend @@ -1564,8 +1707,8 @@ QCheckBox - - + + Save password @@ -1580,72 +1723,79 @@ - + Check for updates at startup - - Frontend fullscreen - - - - - Frontend effects - - - - - Enable frontend sounds - - - - - Enable frontend music - - - - + Fullscreen - - Enable sound - - - - - Enable music - - - - + Alternative damage show - + Show FPS - + Show ammo menu tooltips - + + Visual effects + + + + + + Sound + + + + + In-game sound effects + + + + + + Music + + + + + In-game music + + + + + Frontend sound effects + + + + + Frontend music + + + + Append date and time to record file name - + Record audio - + Use game resolution @@ -1653,129 +1803,104 @@ QComboBox - - generated map... - - - - - generated maze... - - - - - hand drawn map... - - - - - Mission - - - - + Human - + Level - + Community - + (System default) + + Disabled + + + - Disabled + Red/Cyan - Red/Cyan + Cyan/Red - Cyan/Red + Red/Blue - Red/Blue + Blue/Red - Blue/Red + Red/Green - Red/Green + Green/Red + + + + + Side-by-side + + + + + Top-Bottom - Green/Red + Red/Cyan grayscale - Side-by-side + Cyan/Red grayscale - Top-Bottom + Red/Blue grayscale - Wiggle + Blue/Red grayscale - Red/Cyan grayscale + Red/Green grayscale - Cyan/Red grayscale - - - - - Red/Blue grayscale - - - - - Blue/Red grayscale - - - - - Red/Green grayscale - - - - Green/Red grayscale - + Any @@ -1793,66 +1918,26 @@ QGroupBox - + Team Members - + Team Settings - + Fort - - Key binds - - - Net game - - Teams - - - - - Schemes and Weapons - - - - - Misc - - - - - Audio/Graphic options - - - - - Custom colors - - - - - Miscellaneous - - - - - Proxy settings - - - Game Modifiers @@ -1863,22 +1948,17 @@ - - Video recording options - - - - + Videos - + Description - + Playing teams @@ -1933,48 +2013,63 @@ - + Name - + Type - + Grave - + Flag - + Voice - - Summary - - - - + + Your Email + + + + + Summary + + + + + Send system information + + + + Description - + + Type the security code: + + + + Tip: - - This development build is 'work in progress' and may not be compatible with other versions of the game. Some features might be broken or incomplete. Use at your own risk! + + This development build is 'work in progress' and may not be compatible with other versions of the game, while some features might be broken or incomplete! @@ -1988,199 +2083,182 @@ - - Game scheme - - - - - + Weapons - + Locale - + Nickname - - + Resolution - + Quality - + + Fullscreen + + + + + Fullscreen Resolution + + + + + Windowed Resolution + + + + Stereo rendering - + Initial sound volume - + FPS limit - + Damage Modifier - + Turn Time - + Initial Health - + Sudden Death Timeout - + Sudden Death Water Rise - + Sudden Death Health Decrease - + % Rope Length - + Crate Drops - + % Health Crates - + Health in Crates - + Mines Time - + Mines - + % Dud Mines - + Explosives - + % Get Away Time - + Scheme Name: - + Format - + Audio codec - + Video codec - + Framerate - + Bitrate (Kbps) - + Version - + This program is distributed under the GNU General Public License v2 - - Developers: - - - - - Art: - - - - - Sounds: - - - - - Translations: - - - - - Special thanks: - - - - + Style - + Scheme @@ -2188,18 +2266,18 @@ QLineEdit - + unnamed - - + + hedgehog %1 - + anonymous @@ -2207,7 +2285,7 @@ QMainWindow - + Hedgewars %1 @@ -2215,93 +2293,96 @@ QMessageBox - - + Teams - Are you sure? - - + Do you really want to delete the team '%1'? - - + + Cannot delete default scheme '%1'! - + Please select a record from the list - + + Hedgewars - Nick not registered + + + + Unable to start server - + Connection to server is lost - + Hedgewars - Error - - + + System Information Preview + + + + + + Failed to generate captcha + + + + + Failed to download captcha + + + + + Please fill out all fields. Email is optional. + + + + + Hedgewars - Success - + All file associations have been set - + File association failed. - - Please fill out all fields - - - - - Successfully posted the issue on hedgewars.googlecode.com - - - - - - Error during authentication at google.com - - - - - Error reporting the issue, please try again later (or visit hedgewars.googlecode.com directly) - - - - - + + Main - Error - + Cannot create directory %1 - + Failed to open data directory: %1 @@ -2309,23 +2390,23 @@ - - + + TCP - Error - + Unable to start the server: %1. - + Unable to run engine at - + Error code: %1 @@ -2354,7 +2435,7 @@ - + Netgame - Error @@ -2364,8 +2445,8 @@ - - + + Please enter room name @@ -2394,69 +2475,70 @@ - - + + Room Name - Error - + Please select room from the list - + Room Name - Are you sure? - + The game you are trying to join has started. Do you still want to join the room? - + Schemes - Warning - + Schemes - Are you sure? - + Do you really want to delete the game scheme '%1'? - - - + + + Videos - Are you sure? - + Do you really want to delete the video '%1'? - + Do you really want to remove %1 file(s)? - + Do you really want to cancel uploading %1? + File error @@ -2467,16 +2549,17 @@ + Cannot open '%1' for reading - + Error - + Cannot use the ammo '%1'! @@ -2506,17 +2589,19 @@ Do you really want to delete the weapon set '%1'? - - - QObject - - - Nickname - - - - - Please enter your nickname + + + Hedgewars - Warning + + + + + Hedgewars - Information + + + + + Hedgewars @@ -2540,7 +2625,7 @@ - + Cancel @@ -2551,17 +2636,6 @@ - - Random Team - - - - - - Setup - - - Connect @@ -2582,17 +2656,12 @@ - - Ready - - - Start - + Associate file extensions @@ -2609,8 +2678,8 @@ - - + + Delete @@ -2620,61 +2689,57 @@ - + Set default options - + Restore default coding parameters - + Open videos directory - + Open the video directory in your system - + Play - + Play this video - + Delete this video - - + + + Upload to YouTube - + Upload this video to your Youtube account - + Cancel uploading - - - more - - RoomsListModel @@ -2719,22 +2784,45 @@ - + Random Map - - Random Maze - - - + Random Maze + + + + Hand-drawn + SeedPrompt + + + The map seed is the basis for all random values generated by the game. + + + + + Cancel + + + + + Set seed + + + + + Close + + + + SelWeaponWidget @@ -2770,130 +2858,23 @@ - ToggleButtonWidget - - - Fort Mode - - - - - Divide Teams - - - - - Solid Land - - - - - Add Border - - - - - Low Gravity - - - - - Laser Sight - - - - - Invulnerable - - - - - Reset Health - - - - - Vampirism - - - - - Karma - - - - - Artillery - - - - - Random Order - - - - - King - - - - - Place Hedgehogs - - - - - Clan Shares Ammo - - - - - Disable Girders - - - - - Disable Land Objects - - - - - AI Survival Mode - - - - - Unlimited Attacks - - - - - Reset Weapons - - - - - Per Hedgehog Ammo - - - - - Disable Wind - - - - - More Wind - - - - - Tag Team - - - - - Add Bottom Border + TeamShowWidget + + + %1's team + + + + + ThemePrompt + + + Select a theme for this map + + + + + Cancel @@ -2939,97 +2920,97 @@ + + attack + + + + + put + + + - attack + switch - put + ammo menu - switch + slot 1 - ammo menu + slot 2 - slot 1 + slot 3 - slot 2 + slot 4 - slot 3 + slot 5 - slot 4 + slot 6 - slot 5 + slot 7 - slot 6 + slot 8 - slot 7 + slot 9 - slot 8 + slot 10 - slot 9 + timer 1 sec - slot 10 + timer 2 sec - timer 1 sec + timer 3 sec - timer 2 sec + timer 4 sec - timer 3 sec - - - - - timer 4 sec - - - - timer 5 sec @@ -3105,12 +3086,11 @@ - hedgehogs -info - - - - + hedgehog info + + + + record @@ -3119,59 +3099,59 @@ binds (categories) - Basic controls - - - - - Weapon controls + Movement + + + + + Weapons - Camera and cursor controls + Camera - Other + Miscellaneous binds (descriptions) - - Move your hogs and aim: - - - Traverse gaps and obstacles by jumping: + + Fire your selected weapon or trigger an utility item: + + + + + Pick a weapon or a target location under the cursor: + + + - Fire your selected weapon or trigger an utility item: + Switch your currently active hog (if possible): + + + + + Hedgehog movement - Pick a weapon or a target location under the cursor: - - - - - Switch your currently active hog (if possible): - - - - Pick a weapon or utility item: - + Set the timer on bombs and timed weapons: @@ -3221,7 +3201,7 @@ - + Record video: @@ -3584,44 +3564,44 @@ - + Keyboard - - Axis - - - - - (Up) + Axis + (Up) + + + + + (Down) - + Hat - - (Left) - - - + (Left) + + + + (Right) - + Button diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Locale/hedgewars_nl.ts --- a/share/hedgewars/Data/Locale/hedgewars_nl.ts Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Locale/hedgewars_nl.ts Fri Feb 22 05:05:32 2013 +0100 @@ -20,6 +20,79 @@ + BanDialog + + IP + + + + Nick + + + + IP/Nick + + + + Reason + + + + Duration + + + + Ok + + + + Cancel + + + + you know why + + + + Warning + + + + Please, specify %1 + + + + nickname + + + + permanent + + + + + DataManager + + Use Default + + + + + FeedbackDialog + + View + + + + Cancel + + + + Send Feedback + + + + FreqSpinBox Never @@ -44,13 +117,36 @@ - When this option is enabled selecting a game scheme will auto-select a weapon - - - Game Options + + Game scheme will auto-select a weapon + + + + + HWApplication + + %1 minutes + + + + %1 hour + + + + %1 hours + + + + %1 day + + + + %1 days + + HWAskQuitDialog @@ -101,10 +197,6 @@ Failed to save StyleSheet to %1 - - %1 is not a valid command! - - HWForm @@ -139,17 +231,6 @@ - Your nickname %1 is -registered on Hedgewars.org -Please provide your password below -or pick another nickname in game config: - - - - No password supplied. - - - Nickname @@ -162,6 +243,59 @@ Please pick another nickname: + + %1's Team + + + + Hedgewars - Nick registered + + + + This nick is registered, and you haven't specified a password. + +If this nick isn't yours, please register your own nick at www.hedgewars.org + +Password: + + + + Your nickname is not registered. +To prevent someone else from using it, +please register it at www.hedgewars.org + + + + + +Your password wasn't saved either. + + + + Hedgewars - Empty nickname + + + + Hedgewars - Wrong password + + + + You entered a wrong password. + + + + Try Again + + + + Hedgewars - Connection error + + + + You reconnected too fast. +Please wait a few seconds and try again. + + HWGame @@ -177,18 +311,6 @@ HWMapContainer - Map - - - - Themes - - - - Filter - - - All @@ -213,10 +335,6 @@ - Type - - - Small tunnels @@ -225,27 +343,95 @@ - Large tunnels - - - - Small floating islands - - - - Medium floating islands - - - - Large floating islands - - - Seed - Set + Map type: + + + + Image map + + + + Mission map + + + + Hand-drawn + + + + Randomly generated + + + + Random maze + + + + Random + + + + Map preview: + + + + Load map drawing + + + + Edit map drawing + + + + Largetunnels + + + + Small islands + + + + Medium islands + + + + Large islands + + + + Map size: + + + + Maze style: + + + + Mission: + + + + Map: + + + + Theme: + + + + Load drawn map + + + + Drawn Maps + + + + All files @@ -318,7 +504,7 @@ HWPasswordDialog - Password + Login @@ -334,6 +520,32 @@ + HatButton + + Change hat (%1) + + + + + HatPrompt + + Select a hat + + + + Filter: + + + + Cancel + + + + Use selected hat + + + + KB SDL_ttf returned error while rendering text, most propably it is related to the bug in freetype2. It's recommended to update your freetype lib. @@ -341,6 +553,13 @@ + KeyBinder + + Category + + + + LibavInteraction Duration: %1m %2s @@ -359,6 +578,17 @@ Audio: + + unknown + + + + + MapModel + + No description available. + + PageAdmin @@ -390,6 +620,38 @@ Set data + + General + + + + Bans + + + + IP/Nick + + + + Expiration + + + + Reason + + + + Refresh + + + + Add + + + + Remove + + PageConnecting @@ -444,7 +706,39 @@ - Advanced + Select an action to choose a custom key bind for this team + + + + Use my default + + + + Reset all binds + + + + Custom Controls + + + + Hat + + + + Name + + + + This hedgehog's name + + + + Randomize this hedgehog's name + + + + Random Team @@ -526,267 +820,14 @@ PageMain - Simply pick the same color as a friend to play together as a team. Each of you will still control his or her own hedgehogs but they'll win or lose together. - Tips - - - - Some weapons might do only low damage but they can be a lot more devastating in the right situation. Try to use the Desert Eagle to knock multiple hedgehogs into the water. - Tips - - - - If you're unsure what to do and don't want to waste ammo, skip one round. But don't let too much time pass as there will be Sudden Death! - Tips - - - - If you'd like to keep others from using your preferred nickname on the official server, register an account at http://www.hedgewars.org/. - Tips - - - - You're bored of default gameplay? Try one of the missions - they'll offer different gameplay depending on the one you picked. - Tips - - - - By default the game will always record the last game played as a demo. Select 'Local Game' and pick the 'Demos' button on the lower right corner to play or manage them. - Tips - - - - Hedgewars is Open Source and Freeware we create in our spare time. If you've got problems, ask on our forums but please don't expect 24/7 support! - Tips - - - - Hedgewars is Open Source and Freeware we create in our spare time. If you like it, help us with a small donation or contribute your own work! - Tips - - - - Hedgewars is Open Source and Freeware we create in our spare time. Share it with your family and friends as you like! - Tips - - - - From time to time there will be official tournaments. Upcoming events will be announced at http://www.hedgewars.org/ some days in advance. - Tips - - - - Hedgewars is available in many languages. If the translation in your language seems to be missing or outdated, feel free to contact us! - Tips - - - - Hedgewars can be run on lots of different operating systems including Microsoft Windows, Mac OS X and Linux. - Tips - - - - Always remember you're able to set up your own games in local and network/online play. You're not restricted to the 'Simple Game' option. - Tips - - - - While playing you should give yourself a short break at least once an hour. - Tips - - - - If your graphics card isn't able to provide hardware accelerated OpenGL, try to enable the low quality mode to improve performance. - Tips - - - - We're open to suggestions and constructive feedback. If you don't like something or got a great idea, let us know! - Tips - - - - Especially while playing online be polite and always remember there might be some minors playing with or against you as well! - Tips - - - - Special game modes such as 'Vampirism' or 'Karma' allow you to develop completely new tactics. Try them in a custom game! - Tips - - - - You should never install Hedgewars on computers you don't own (school, university, work, etc.). Please ask the responsible person instead! - Tips - - - - Hedgewars can be perfect for short games during breaks. Just ensure you don't add too many hedgehogs or use an huge map. Reducing time and health might help as well. - Tips - - - - No hedgehogs were harmed in making this game. - Tips - - - - Hedgewars is Open Source and Freeware we create in our spare time. If someone sold you the game, you should try get a refund! - Tips - - - - Connect one or more gamepads before starting the game to be able to assign their controls to your teams. - Tips - - - - Create an account on %1 to keep others from using your most favourite nickname while playing on the official server. - Tips - - - - If your graphics card isn't able to provide hardware accelerated OpenGL, try to update the associated drivers. - Tips - - - - There are three different jumps available. Tap [high jump] twice to do a very high/backwards jump. - Tips - - - - Afraid of falling off a cliff? Hold down [precise] to turn [left] or [right] without actually moving. - Tips - - - - Some weapons require special strategies or just lots of training, so don't give up on a particular tool if you miss an enemy once. - Tips - - - - Most weapons won't work once they touch the water. The Homing Bee as well as the Cake are exceptions to this. - Tips - - - - The Old Limbuger only causes a small explosion. However the wind affected smelly cloud can poison lots of hogs at once. - Tips - - - - The Piano Strike is the most damaging air strike. You'll lose the hedgehog performing it, so there's a huge downside as well. - Tips - - - - Sticky Mines are a perfect tool to create small chain reactions knocking enemy hedgehogs into dire situations ... or water. - Tips - - - - The Hammer is most effective when used on bridges or girders. Hit hogs will just break through the ground. - Tips - - - - If you're stuck behind an enemy hedgehog, use the Hammer to free yourself without getting damaged by an explosion. - Tips - - - - The Cake's maximum walking distance depends on the ground it has to pass. Use [attack] to detonate it early. - Tips - - - - The Flame Thrower is a weapon but it can be used for tunnel digging as well. - Tips - - - - Want to know who's behind the game? Click on the Hedgewars logo in the main menu to see the credits. - Tips - - - - Like Hedgewars? Become a fan on %1 or follow us on %2! - Tips - - - - Feel free to draw your own graves, hats, flags or even maps and themes! But note that you'll have to share them somewhere to use them online. - Tips - - - - Really want to wear a specific hat? Donate to us and receive an exclusive hat of your choice! - Tips - - - - Keep your video card drivers up to date to avoid issues playing the game. - Tips - - - - You can find your Hedgewars configuration files under "My Documents\Hedgewars". Create backups or take the files with you, but don't edit them by hand. - Tips - - - - You're able to associate Hedgewars related files (savegames and demo recordings) with the game to launch them right from your favorite file or internet browser. - Tips - - - - Want to save ropes? Release the rope in mid air and then shoot again. As long as you don't touch the ground you'll reuse your rope without wasting ammo! - Tips - - - - You can find your Hedgewars configuration files under "Library/Application Support/Hedgewars" in your home directory. Create backups or take the files with you, but don't edit them by hand. - Tips - - - - You can find your Hedgewars configuration files under ".hedgewars" in your home directory. Create backups or take the files with you, but don't edit them by hand. - Tips - - - - The Windows version of Hedgewars supports Xfire. Make sure to add Hedgewars to its game list so your friends can see you playing. - Tips - - - - Use the Molotov or Flame Thrower to temporary keep hedgehogs from passing terrain such as tunnels or platforms. - Tips - - - - The Homing Bee can be tricky to use. Its turn radius depends on its velocity, so try to not use full power. - Tips - - - Downloadable Content - Local Game - - - Play a game on a single computer - Network Game - - - Play a game across a network @@ -814,6 +855,14 @@ Edit game preferences + + Play a game across a local area network + + + + Play a game on an official server + + PageMultiplayer @@ -821,6 +870,10 @@ Start + + Edit game preferences + + PageNetGame @@ -828,23 +881,12 @@ Control - - - PageNetType - - LAN game - - - - Official server - - - - Join hundreds of players online! - - - - Join or host your own game server in a Local Area Network. + + Edit game preferences + + + + Start @@ -891,10 +933,6 @@ - General - - - Advanced @@ -934,6 +972,94 @@ System proxy settings + + Select an action to change what key controls it + + + + Reset to default + + + + Reset all binds + + + + Game + + + + Graphics + + + + Audio + + + + Controls + + + + Video Recording + + + + Network + + + + Teams + + + + Schemes + + + + Weapons + + + + Frontend + + + + Custom colors + + + + Game audio + + + + Frontend audio + + + + Account + + + + Proxy settings + + + + Miscellaneous + + + + Updates + + + + Check for updates + + + + Video recording options + + PagePlayDemo @@ -1133,18 +1259,10 @@ PageSinglePlayer - Simple Game - - - Play a quick game against the computer with random settings - Multiplayer - - - Play a hotseat game against your friends, or AI teams @@ -1153,26 +1271,14 @@ - Training Mode - - - Practice your skills in a range of training missions - Demos - - - Watch recorded demos - Load - - - Load a previously saved game @@ -1218,14 +1324,6 @@ - Date: - - - - Size: - - - encoding @@ -1233,6 +1331,16 @@ uploading + + Date: %1 + + + + + Size: %1 + + + QAction @@ -1245,10 +1353,6 @@ - Start - - - Restrict Joins @@ -1296,18 +1400,6 @@ - Frontend fullscreen - - - - Enable sound - - - - Enable music - - - Show FPS @@ -1324,18 +1416,6 @@ - Enable frontend sounds - - - - Enable frontend music - - - - Frontend effects - - - Save password @@ -1355,14 +1435,38 @@ Use game resolution + + Visual effects + + + + Sound + + + + In-game sound effects + + + + Music + + + + In-game music + + + + Frontend sound effects + + + + Frontend music + + QComboBox - generated map... - - - Human @@ -1375,14 +1479,6 @@ - Mission - - - - generated maze... - - - Community @@ -1399,10 +1495,6 @@ - hand drawn map... - - - Disabled @@ -1439,10 +1531,6 @@ - Wiggle - - - Red/Cyan grayscale @@ -1478,18 +1566,6 @@ - Key binds - - - - Teams - - - - Audio/Graphic options - - - Net game @@ -1510,26 +1586,6 @@ - Misc - - - - Schemes and Weapons - - - - Custom colors - - - - Miscellaneous - - - - Video recording options - - - Videos @@ -1537,10 +1593,6 @@ Description - - Proxy settings - - QLabel @@ -1557,26 +1609,6 @@ - Developers: - - - - Art: - - - - Sounds: - - - - Translations: - - - - Special thanks: - - - Weapons @@ -1633,10 +1665,6 @@ - Game scheme - - - % Dud Mines @@ -1673,10 +1701,6 @@ - This development build is 'work in progress' and may not be compatible with other versions of the game. Some features might be broken or incomplete. Use at your own risk! - - - Quality @@ -1751,10 +1775,6 @@ - Summary - - - Description @@ -1782,6 +1802,38 @@ Bitrate (Kbps) + + This development build is 'work in progress' and may not be compatible with other versions of the game, while some features might be broken or incomplete! + + + + Fullscreen + + + + Fullscreen Resolution + + + + Windowed Resolution + + + + Your Email + + + + Summary + + + + Send system information + + + + Type the security code: + + QLineEdit @@ -1820,10 +1872,6 @@ - Please fill out all fields - - - Error while authenticating at google.com: @@ -1870,18 +1918,6 @@ - Successfully posted the issue on hedgewars.googlecode.com - - - - Error during authentication at google.com - - - - Error reporting the issue, please try again later (or visit hedgewars.googlecode.com directly) - - - Main - Error @@ -2028,15 +2064,36 @@ Do you really want to delete the weapon set '%1'? - - - QObject - - Nickname - - - - Please enter your nickname + + Hedgewars - Nick not registered + + + + System Information Preview + + + + Failed to generate captcha + + + + Failed to download captcha + + + + Please fill out all fields. Email is optional. + + + + Hedgewars - Warning + + + + Hedgewars - Information + + + + Hedgewars @@ -2095,26 +2152,10 @@ - Setup - - - - Ready - - - - Random Team - - - Associate file extensions - more - - - More info @@ -2207,6 +2248,25 @@ + SeedPrompt + + The map seed is the basis for all random values generated by the game. + + + + Cancel + + + + Set seed + + + + Close + + + + SelWeaponWidget Weapon set @@ -2234,105 +2294,20 @@ - ToggleButtonWidget - - Vampirism - - - - Karma - - - - Artillery - - - - Fort Mode - - - - Divide Teams - - - - Solid Land - - - - Add Border - - - - Low Gravity - - - - Laser Sight - - - - Invulnerable - - - - Random Order - - - - King - - - - Place Hedgehogs - - - - Clan Shares Ammo - - - - Disable Girders - - - - Disable Land Objects - - - - AI Survival Mode - - - - Reset Health - - - - Unlimited Attacks - - - - Reset Weapons - - - - Per Hedgehog Ammo - - - - Disable Wind - - - - More Wind - - - - Tag Team - - - - Add Bottom Border + TeamShowWidget + + %1's team + + + + + ThemePrompt + + Select a theme for this map + + + + Cancel @@ -2467,11 +2442,6 @@ - hedgehogs -info - - - quit @@ -2507,33 +2477,33 @@ record + + hedgehog info + + binds (categories) - Basic controls - - - - Weapon controls - - - - Camera and cursor controls - - - - Other + Movement + + + + Weapons + + + + Camera + + + + Miscellaneous binds (descriptions) - Move your hogs and aim: - - - Traverse gaps and obstacles by jumping: @@ -2597,6 +2567,10 @@ Record video: + + Hedgehog movement + + binds (keys) diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Locale/hedgewars_pl.ts --- a/share/hedgewars/Data/Locale/hedgewars_pl.ts Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Locale/hedgewars_pl.ts Fri Feb 22 05:05:32 2013 +0100 @@ -20,6 +20,79 @@ + BanDialog + + IP + IP + + + Nick + + + + IP/Nick + + + + Reason + + + + Duration + + + + Ok + + + + Cancel + Anuluj + + + you know why + + + + Warning + + + + Please, specify %1 + + + + nickname + + + + permanent + + + + + DataManager + + Use Default + + + + + FeedbackDialog + + View + + + + Cancel + Anuluj + + + Send Feedback + + + + FreqSpinBox Never @@ -45,13 +118,36 @@ Edytuj uzbrojenie - When this option is enabled selecting a game scheme will auto-select a weapon - Kiedy ta opcja jest włączona, wybór ustawień gry zmienia uzbrojenie na odpowiednie - - Game Options Opcje + + Game scheme will auto-select a weapon + + + + + HWApplication + + %1 minutes + + + + %1 hour + + + + %1 hours + + + + %1 day + + + + %1 days + + HWAskQuitDialog @@ -102,10 +198,6 @@ Failed to save StyleSheet to %1 Nie można było zapisać arkusza stylów jako %1 - - %1 is not a valid command! - %1 nie jest poprawnym poleceniem! - HWForm @@ -140,20 +232,6 @@ Gra przerwana - Your nickname %1 is -registered on Hedgewars.org -Please provide your password below -or pick another nickname in game config: - Twój nick %1 jest zarejestrowany -na Hedgewars.org -Proszę podać hasło bądź zmienić nick -w ustawieniach gry: - - - No password supplied. - Nie podano hasła. - - Nickname Nick @@ -167,6 +245,59 @@ Ktoś używa tego nicku %1 na serwerze. Wybierz inny nick: + + %1's Team + + + + Hedgewars - Nick registered + + + + This nick is registered, and you haven't specified a password. + +If this nick isn't yours, please register your own nick at www.hedgewars.org + +Password: + + + + Your nickname is not registered. +To prevent someone else from using it, +please register it at www.hedgewars.org + + + + + +Your password wasn't saved either. + + + + Hedgewars - Empty nickname + + + + Hedgewars - Wrong password + + + + You entered a wrong password. + + + + Try Again + + + + Hedgewars - Connection error + + + + You reconnected too fast. +Please wait a few seconds and try again. + + HWGame @@ -182,18 +313,6 @@ HWMapContainer - Map - Mapa - - - Themes - Motywy - - - Filter - Filtr - - All Wszystkie @@ -218,10 +337,6 @@ Odjechane - Type - Typ - - Small tunnels Małe tunele @@ -230,28 +345,96 @@ Średnie tunele - Large tunnels - Duże tunele - - - Small floating islands - Małe wyspy - - - Medium floating islands - Średnie wyspy - - - Large floating islands - Duże wyspy - - Seed Ziarno - Set - Ustaw + Map type: + + + + Image map + + + + Mission map + + + + Hand-drawn + Rys. ręcznie + + + Randomly generated + + + + Random maze + + + + Random + Losowo + + + Map preview: + + + + Load map drawing + + + + Edit map drawing + + + + Largetunnels + + + + Small islands + + + + Medium islands + + + + Large islands + + + + Map size: + + + + Maze style: + + + + Mission: + + + + Map: + + + + Theme: + + + + Load drawn map + Załaduj mapę + + + Drawn Maps + Narysowane mapy + + + All files + Wszystkie pliki @@ -323,8 +506,8 @@ HWPasswordDialog - Password - Hasło + Login + @@ -339,6 +522,32 @@ + HatButton + + Change hat (%1) + + + + + HatPrompt + + Select a hat + + + + Filter: + + + + Cancel + Anuluj + + + Use selected hat + + + + KB SDL_ttf returned error while rendering text, most propably it is related to the bug in freetype2. It's recommended to update your freetype lib. @@ -346,6 +555,13 @@ + KeyBinder + + Category + + + + LibavInteraction Duration: %1m %2s @@ -364,25 +580,16 @@ Audio: Audio: + + unknown + + - LibavIteraction - - Duration: %1m %2s - - Długość: %1m %2s - - - Video: %1x%2, - Wideo: %1x%2, - - - %1 fps, - %1 kl/s, - - - Audio: - Audio: + MapModel + + No description available. + @@ -415,6 +622,38 @@ Set data Zapisz + + General + Ogólne + + + Bans + + + + IP/Nick + + + + Expiration + + + + Reason + + + + Refresh + + + + Add + + + + Remove + + PageConnecting @@ -469,8 +708,40 @@ Ogólne - Advanced - Zaawansowane + Select an action to choose a custom key bind for this team + + + + Use my default + + + + Reset all binds + + + + Custom Controls + + + + Hat + Grzybek + + + Name + Nazwa + + + This hedgehog's name + + + + Randomize this hedgehog's name + + + + Random Team + Losowa Drużyna @@ -557,267 +828,14 @@ PageMain - Simply pick the same color as a friend to play together as a team. Each of you will still control his or her own hedgehogs but they'll win or lose together. - Tips - By grać ze swoim przyjacielem w tej samej drużynie po prostu wybierzcie taki sam kolor obydwu zespołów. Każdy z was będzie sterować swoimi własnymi jeżami ale wygracie bądź przegracie jako jedna drużyna. - - - Some weapons might do only low damage but they can be a lot more devastating in the right situation. Try to use the Desert Eagle to knock multiple hedgehogs into the water. - Tips - Niektóre z broni zadają mało punktów obrażeń jednak użyte w odpowiednim momencie mogą pokazać pazur. Na przykład spróbuj użyć pistoletu by strącić swoich przeciwników do wody. - - - If you're unsure what to do and don't want to waste ammo, skip one round. But don't let too much time pass as there will be Sudden Death! - Tips - Jeśli nie jesteś pewien co zrobić w danej turze i nie chcesz tracić amunicji możesz pominąć turę. Nie rób tak jednak zbyt często gdyż nagła śmierć jest nieuchronna! - - - If you'd like to keep others from using your preferred nickname on the official server, register an account at http://www.hedgewars.org/. - Tips - Jeśli chciałbyś zapobiec używania własnego nicka przez kogoś innego, zarejestruj go na http://www.hedgewars.org . - - - You're bored of default gameplay? Try one of the missions - they'll offer different gameplay depending on the one you picked. - Tips - Znudzony domyślnymi ustawieniami gry? Spróbuj zagrać w którąś z misji. - oferują one zmienione zasady gry w zależności od tej którą wybrałeś. - - - By default the game will always record the last game played as a demo. Select 'Local Game' and pick the 'Demos' button on the lower right corner to play or manage them. - Tips - Gra zawsze będzie zapisywała ostatnią rozgrywkę jako Demo. Wybierz "Grę Lokalną" i kliknij w przycisk "Dema" który znajduje się w prawym dolnym rogu ekranu by je odtworzyć i zarządzać nimi. - - - Hedgewars is Open Source and Freeware we create in our spare time. If you've got problems, ask on our forums but please don't expect 24/7 support! - Tips - Hedgewars jest darmową grą o otwartym kodzie, którą tworzymy w naszym wolnym czasie. Jeśli masz jakiś problem, zapytaj na forum ale nie spodziewaj się wsparcia 24 godziny na dobę! - - - Hedgewars is Open Source and Freeware we create in our spare time. If you like it, help us with a small donation or contribute your own work! - Tips - Hedgewars jest darmową grą o otwartym kodzie, którą tworzymy w naszym wolnym czasie. Jeśli ją lubisz, wspomóż nas małą wpłatą lub stwórz własną czapkę bądź mapę! - - - Hedgewars is Open Source and Freeware we create in our spare time. Share it with your family and friends as you like! - Tips - Hedgewars jest darmową grą o otwartym kodzie, którą tworzymy w naszym wolnym czasie. Jeśli tylko chcesz, rozdaj ją swojej rodzinie i kolegom! - - - From time to time there will be official tournaments. Upcoming events will be announced at http://www.hedgewars.org/ some days in advance. - Tips - Od czasu do czasu będą organizowane mistrzostwa. Będą one ogłaszane z wyprzedzeniem na http://www.hedgewars.org/ . - - - Hedgewars is available in many languages. If the translation in your language seems to be missing or outdated, feel free to contact us! - Tips - Hedgewars jest dostępne w wielu językach. Jeśli brakuje tłumaczenia w twoim języku bądź jest ono niekompletne, nie bój się z nami skontaktować! - - - Hedgewars can be run on lots of different operating systems including Microsoft Windows, Mac OS X and Linux. - Tips - Hedgewars może być uruchomione na różnych systemach operacyjnych takich jak Microsoft Windows, MacOS X, FreeBSD oraz Linux. - - - Always remember you're able to set up your own games in local and network/online play. You're not restricted to the 'Simple Game' option. - Tips - Zawsze możesz zmieniać ustawienia gry w opcjach gry lokalnej lub sieciowej. Nie musisz ciągle używać tzw. "Szybkiej gry". - - - While playing you should give yourself a short break at least once an hour. - Tips - Zawsze pamiętaj o robieniu krótkich przerw co godzinę kiedy grasz na komputerze. - - - If your graphics card isn't able to provide hardware accelerated OpenGL, try to enable the low quality mode to improve performance. - Tips - Jeśli twoja karta graficzna nie ma sprzętowego przyspieszania OpenGL, spróbuj włączyć tryb obniżonej jakości by zwiększyć płynność gry. - - - We're open to suggestions and constructive feedback. If you don't like something or got a great idea, let us know! - Tips - Jesteśmy otwarci na sugestie oraz konstruktywną krytykę. Jeśli coś Ci się nie podoba bądź masz jakiś pomysł, daj nam znać! - - - Especially while playing online be polite and always remember there might be some minors playing with or against you as well! - Tips - Bądź kulturalny grając przez internet. Pamiętaj o tym, że w Hedgewars mogą grać także młodsze osoby! - - - Special game modes such as 'Vampirism' or 'Karma' allow you to develop completely new tactics. Try them in a custom game! - Tips - Specjalne tryby gry takie jak "Karma" bądź "Wampiryzm" pozwalają na stworzenie nowej taktyki! - - - You should never install Hedgewars on computers you don't own (school, university, work, etc.). Please ask the responsible person instead! - Tips - Nie powinieneś instalować Hedgewars na komputerach których nie posiadasz (w szkole, na studiach, w pracy itp.). Zapytaj osoby odpowiedzialnej za te komputery! - - - Hedgewars can be perfect for short games during breaks. Just ensure you don't add too many hedgehogs or use an huge map. Reducing time and health might help as well. - Tips - Hedgewars jest idealny do gry w czasie przerw.Upewnij się, że nie dałeś zbyt dużej ilości jeży, bądź zbyt dużej mapy. Pomóc może także zmniejszenie długości tury lub obniżenie ilości życia. - - - No hedgehogs were harmed in making this game. - Tips - Żaden jeż nie został ranny w czasie tworzenia tej gry. - - - Hedgewars is Open Source and Freeware we create in our spare time. If someone sold you the game, you should try get a refund! - Tips - Hedgewars jest darmową grą o otwartym kodzie źródłowym którą tworzymy w naszym wolnym czasie. Jeśli ktokolwiek sprzedał Tobie tę grę powinieneś upomnieć się o swoje pieniądze! - - - Connect one or more gamepads before starting the game to be able to assign their controls to your teams. - Tips - Jeśli podłączysz jeden lub więcej gamepadów przed włączeniem gry będziesz miał możliwość przypisania klawiszy by sterować swoimi jeżami. - - - Create an account on %1 to keep others from using your most favourite nickname while playing on the official server. - Tips - Stwórz konto na %1 by zapobiec używania twojego ulubionego nicku przez innych na oficjalnym serwerze. - - - If your graphics card isn't able to provide hardware accelerated OpenGL, try to update the associated drivers. - Tips - Jeśli twoja karta nie wspiera sprzętowego przyspieszania OpenGL spróbuj uaktualnić swoje sterowniki. - - - There are three different jumps available. Tap [high jump] twice to do a very high/backwards jump. - Tips - Są trzy różne rodzaje skoku możliwe do wykonania. Naciśnij [wysoki skok] dwa razy by zrobić bardzo wysoki skok w tył. - - - Afraid of falling off a cliff? Hold down [precise] to turn [left] or [right] without actually moving. - Tips - Boisz się upadku z krawędzi terenu? Przytrzymaj klawisz [precyzyjnego celowania] by obrócić się w [lewo] lub [prawo] bez ruszenia się z miejsca. - - - Some weapons require special strategies or just lots of training, so don't give up on a particular tool if you miss an enemy once. - Tips - Niektóre z broni wymagają specjalnej strategii lub dużo treningu by je popranie używać. Nie poddawaj się gdy nie wychodzi ci za pierwszym razem. - - - Most weapons won't work once they touch the water. The Homing Bee as well as the Cake are exceptions to this. - Tips - Większość uzbrojenia nie działa pod wodą. Pszczoła i Ciasto są wyjątkami od tej reguły. - - - The Old Limbuger only causes a small explosion. However the wind affected smelly cloud can poison lots of hogs at once. - Tips - Cuchnący ser nie powoduje wielkiego wybuchu. Jednakże pod wpływem wiatru chmura śmierdzącego gazu może bardzo daleko zawędrować i otruć wiele jeży naraz. - - - The Piano Strike is the most damaging air strike. You'll lose the hedgehog performing it, so there's a huge downside as well. - Tips - Zrzut pianina jest najbardziej morderczym atakiem powietrznym. Pamiętaj, że tracisz jeża którym wykonujesz ten atak więc dobrze zaplanuj swój ruch. - - - Sticky Mines are a perfect tool to create small chain reactions knocking enemy hedgehogs into dire situations ... or water. - Tips - Miny samoprzylepne są idealnym narzędziem by tworzyć małe reakcje łańcuchowe bądź do zmuszenia przeciwnika by popadł w tarapaty lub wpadł do wody. - - - The Hammer is most effective when used on bridges or girders. Hit hogs will just break through the ground. - Tips - Młotek jest najbardziej skuteczny na mostach bądź kładkach. Uderzone jeże przelecą przez nie na sam dół. - - - If you're stuck behind an enemy hedgehog, use the Hammer to free yourself without getting damaged by an explosion. - Tips - Jeśli utknąłeś za jeżem przeciwnika, użyj młotka by wbić go w ziemię. Unikniesz wtedy eksplozji która z pewnością zabrałaby Tobie punkty życia. - - - The Cake's maximum walking distance depends on the ground it has to pass. Use [attack] to detonate it early. - Tips - Dystans który Ciasto może przebyć zależy od terenu który ma do przebycia. Użyj [ataku] by zdetonować je wcześniej. - - - The Flame Thrower is a weapon but it can be used for tunnel digging as well. - Tips - Miotacz ognia jest śmiercionośną bronią ale może być użyty również jako narzędzie do kopania tuneli. - - - Want to know who's behind the game? Click on the Hedgewars logo in the main menu to see the credits. - Tips - Chcesz wiedzieć kto tworzy tę grę? Kliknij logo w głównym menu by zobaczyć autorów. - - - Like Hedgewars? Become a fan on %1 or follow us on %2! - Tips - Lubisz Hedgewars? Zostań fanem na %1 lub dołącz do grupy na %2! - - - Feel free to draw your own graves, hats, flags or even maps and themes! But note that you'll have to share them somewhere to use them online. - Tips - Możesz rysować własne nagrobki, czapki, flagi lub nawet mapy albo tematy! Miej na uwadze to by udostępnić je każdemu który będzie grał z Tobą przez sieć. - - - Really want to wear a specific hat? Donate to us and receive an exclusive hat of your choice! - Tips - Chcesz nosić wymarzoną czapkę? Wspomóż nas pieniężnie a my zrobimy specjalną czapkę tylko dla Ciebie! - - - Keep your video card drivers up to date to avoid issues playing the game. - Tips - Pamiętaj o aktualizowaniu sterowników by zapobiec problemom z grami. - - - You can find your Hedgewars configuration files under "My Documents\Hedgewars". Create backups or take the files with you, but don't edit them by hand. - Tips - Swoje zespoły i konfigurację gry znajdziesz w folderze "Moje Dokumenty\Hedgewars". Twórz regularnie kopie zapasowe, ale nie edytuj tych plików własnoręcznie. - - - You're able to associate Hedgewars related files (savegames and demo recordings) with the game to launch them right from your favorite file or internet browser. - Tips - Możesz powiązać typy plików związane z Hedgewars (zapisy gier i dema) by móc je uruchamiać bezpośrednio z ulubionego menedżera plików bądź przeglądarki internetowej. - - - Want to save ropes? Release the rope in mid air and then shoot again. As long as you don't touch the ground you'll reuse your rope without wasting ammo! - Tips - Chcesz zaoszczędzić liny? Odłącz ją będąc w powietrzu, a potem wypuść ją ponownie. Dopóki nie dotkniesz ziemi, będziesz używał pojedynczego naboju! - - - You can find your Hedgewars configuration files under "Library/Application Support/Hedgewars" in your home directory. Create backups or take the files with you, but don't edit them by hand. - Tips - Swoje zespoły i konfigurację gry znajdziesz w folderze "Library/Application Support/Hedgewars" w twoim katalogu domowym. Twórz regularnie kopie zapasowe, ale nie edytuj tych plików własnoręcznie. - - - You can find your Hedgewars configuration files under ".hedgewars" in your home directory. Create backups or take the files with you, but don't edit them by hand. - Tips - Swoje zespoły i konfigurację gry znajdziesz w folderze ".hedgewars" w twoim katalogu domowym. Twórz regularnie kopie zapasowe, ale nie edytuj tych plików własnoręcznie. - - - The Windows version of Hedgewars supports Xfire. Make sure to add Hedgewars to its game list so your friends can see you playing. - Tips - Wersja Hedgewars dla systemu Windows wspiera XFire. Upewnij się, że dodałeś Hedgewars do listy gier by Twoi znajomi mogli zobaczyć Ciebie w czasie gry. - - - Use the Molotov or Flame Thrower to temporary keep hedgehogs from passing terrain such as tunnels or platforms. - Tips - Użyj koktajlu Mołotowa lub Miotacza ognia by powstrzymać przeciwnika przed przedostaniem się przez tunele lub platformy. - - - The Homing Bee can be tricky to use. Its turn radius depends on its velocity, so try to not use full power. - Tips - Pszczoła potrafi być ciężka w użyciu. Jej promień skrętu zależy od prędkości lotu, więc nie staraj się nie używać pełnej mocy podczas strzału. - - Downloadable Content Dodatki - Local Game - Gra lokalna - - Play a game on a single computer Graj na swoim komputerze - Network Game - Gra sieciowa - - Play a game across a network Graj poprzez sieć @@ -845,6 +863,14 @@ Edit game preferences Zmień ustawienia gry + + Play a game across a local area network + + + + Play a game on an official server + + PageMultiplayer @@ -852,6 +878,10 @@ Start Start + + Edit game preferences + Zmień ustawienia gry + PageNetGame @@ -860,31 +890,12 @@ Kontrola - DLC - DLC - - - Downloadable Content - Dodatki - - - - PageNetType - - LAN game - Sieć lokalna - - - Official server - Oficjalny serwer - - - Join hundreds of players online! - Dołącz do setek graczy w sieci! - - - Join or host your own game server in a Local Area Network. - Dołącz lub stwórz nową grę w sieci lokalnej. + Edit game preferences + Zmień ustawienia gry + + + Start + Start @@ -930,10 +941,6 @@ Usuń zestaw uzbrojenia - General - Ogólne - - Advanced Zaawansowane @@ -973,6 +980,94 @@ System proxy settings Systemowe ustawienia proxy + + Select an action to change what key controls it + + + + Reset to default + + + + Reset all binds + + + + Game + + + + Graphics + + + + Audio + + + + Controls + + + + Video Recording + + + + Network + + + + Teams + Drużyny + + + Schemes + + + + Weapons + Uzbrojenie + + + Frontend + + + + Custom colors + Własne kolory + + + Game audio + + + + Frontend audio + + + + Account + + + + Proxy settings + Ustawienia proxy + + + Miscellaneous + Różne + + + Updates + + + + Check for updates + + + + Video recording options + Ustawienia nagrywania + PagePlayDemo @@ -1173,18 +1268,10 @@ PageSinglePlayer - Simple Game - Szybka gra - - Play a quick game against the computer with random settings Zagraj szybką grę z losowymi ustawieniami przeciwko komputerowi - Multiplayer - Gra wieloosobowa - - Play a hotseat game against your friends, or AI teams Graj na zmianę ze swoimi przyjaciółmi lub przeciwko komputerowi @@ -1193,26 +1280,14 @@ Kampania - Training Mode - Trening - - Practice your skills in a range of training missions Sprawdź swoje umiejętności przwechodząc kilka misji - Demos - Dema - - Watch recorded demos Obejrzyj nagrane dema - Load - Wczytaj - - Load a previously saved game Wczytaj zapisaną grę @@ -1259,14 +1334,6 @@ (w trakcie...) - Date: - Data: - - - Size: - Rozmiar: - - encoding enkodowanie @@ -1274,6 +1341,16 @@ uploading wysyłanie + + Date: %1 + + + + + Size: %1 + + + QAction @@ -1282,10 +1359,6 @@ Wyrzuć - Start - Start - - Restrict Joins Zabroń dołączania @@ -1337,10 +1410,6 @@ Pełny ekran - Enable sound - Włącz dźwięk - - Show FPS Pokazuj FPS @@ -1349,14 +1418,6 @@ Inny sposób wyświetlania obrażeń - Enable music - Włącz muzykę - - - Frontend fullscreen - Pełnoekranowe menu - - Append date and time to record file name Dodaj czas i datę do nazwy pliku @@ -1365,18 +1426,6 @@ Pokaż opisy broni - Enable frontend sounds - Włącz dźwięki w menu - - - Enable frontend music - Włącz muzykę w menu - - - Frontend effects - Efekty w menu - - Save password Zapisz hasło @@ -1396,14 +1445,38 @@ Use game resolution Użyj rozdzielczości z gry + + Visual effects + + + + Sound + + + + In-game sound effects + + + + Music + + + + In-game music + + + + Frontend sound effects + + + + Frontend music + + QComboBox - generated map... - wygenerowana mapa... - - Human Człowiek @@ -1416,14 +1489,6 @@ (Domyślny) - generated maze... - wygenerowany labirynt... - - - Mission - Misja - - Community Społeczność @@ -1440,10 +1505,6 @@ W toku - hand drawn map... - Mapa rysowana ręcznie... - - Disabled Wyłączone @@ -1480,10 +1541,6 @@ Góra-dół - Wiggle - Trzęsący się obraz - - Red/Cyan grayscale Czer/Błęk w odc. szar @@ -1515,22 +1572,10 @@ Członkowie drużyny - Key binds - Ustawienia klawiszy - - Fort Fort - Teams - Drużyny - - - Audio/Graphic options - Ustawienia dźwięku/grafiki - - Net game Gra sieciowa @@ -1551,26 +1596,6 @@ Ustawienia drużyn - Misc - Różne - - - Schemes and Weapons - Schematy i uzbrojenie - - - Custom colors - Własne kolory - - - Miscellaneous - Różne - - - Video recording options - Ustawienia nagrywania - - Videos Filmy @@ -1578,30 +1603,10 @@ Description Opis - - Proxy settings - Ustawienia proxy - QLabel - Developers: - Twórcy: - - - Art: - Grafika: - - - Translations: - Tłumaczenia: - - - Special thanks: - Szczególne podziękowania: - - Weapons Uzbrojenie @@ -1634,10 +1639,6 @@ Wersja - Sounds: - Dźwięki: - - Initial sound volume Początkowa głośność @@ -1666,10 +1667,6 @@ Zrzuty skrzyń - Game scheme - Ustawienia gry - - Mines Time Czas detonacji min @@ -1714,11 +1711,6 @@ Rada: - This development build is 'work in progress' and may not be compatible with other versions of the game. Some features might be broken or incomplete. Use at your own risk! - Ta wersja testowa jest w fazie produkcji i może nie być kompatybilna z innymi wersjami gry. -Niektóre funkcje mogą nie działać lub być niekompletne. Używaj na własne ryzyko! - - Quality Jakość @@ -1795,10 +1787,6 @@ Tagi (oddzielone przecinkami): - Summary - Podsumowanie - - Description Opis @@ -1826,6 +1814,38 @@ Bitrate (Kbps) Bitrate (Kbps) + + This development build is 'work in progress' and may not be compatible with other versions of the game, while some features might be broken or incomplete! + + + + Fullscreen + Pełny ekran + + + Fullscreen Resolution + + + + Windowed Resolution + + + + Your Email + + + + Summary + + + + Send system information + + + + Type the security code: + + QLineEdit @@ -1864,10 +1884,6 @@ Powiązanie plików nie powiodło się. - Please fill out all fields - Wypełnij wszystkie pola - - Error while authenticating at google.com: Błąd logowania na google.com: @@ -1914,18 +1930,6 @@ Wszystkie powiązania plików zostały ustawione - Successfully posted the issue on hedgewars.googlecode.com - Pomyślnie utworzono wpis na hedgewars.googlecode.com - - - Error during authentication at google.com - Błąd podczas logowania do google.com - - - Error reporting the issue, please try again later (or visit hedgewars.googlecode.com directly) - Bład podczas wysyłania informacji. Spróbuj ponownie później lub odwiedź hedgewars.googlecode.com) - - Main - Error Błąd @@ -2077,16 +2081,37 @@ Do you really want to delete the weapon set '%1'? Na pewno chcesz usunąc zestaw broni '%1'? - - - QObject - - Nickname - Nick - - - Please enter your nickname - Podaj swój nick + + Hedgewars - Nick not registered + + + + System Information Preview + + + + Failed to generate captcha + + + + Failed to download captcha + + + + Please fill out all fields. Email is optional. + + + + Hedgewars - Warning + + + + Hedgewars - Information + + + + Hedgewars + @@ -2144,26 +2169,10 @@ Wczytaj - Setup - Ustawienia - - - Ready - Gotowe - - - Random Team - Losowa Drużyna - - Associate file extensions Powiąż typy plików z Hedgewars - more - Więcej - - More info Więcej informacji @@ -2256,6 +2265,25 @@ + SeedPrompt + + The map seed is the basis for all random values generated by the game. + + + + Cancel + Anuluj + + + Set seed + + + + Close + + + + SelWeaponWidget Weapon set @@ -2283,106 +2311,21 @@ - ToggleButtonWidget - - Vampirism - Wampiryzm - - - Karma - Karma - - - Artillery - Artyleria - - - Fort Mode - Tryb fortów - - - Divide Teams - Rozdziel drużyny - - - Solid Land - Niezniszczalny teren - - - Add Border - Dodaj ramkę - - - Low Gravity - Niska grawitacja - - - Laser Sight - Celownik laserowy - - - Invulnerable - Nieśmiertelność - - - Random Order - Losowa kolejność - - - King - Król - - - Place Hedgehogs - Rozmieść jeże - - - Clan Shares Ammo - Wspólna amunicja - - - Disable Girders - Wyłącz mosty - - - Disable Land Objects - Wyłącz dodatki terenu - - - AI Survival Mode - Tryb przetrwania - - - Unlimited Attacks - Niekończący się atak - - - Reset Weapons - Resetuj Uzbrojenie - - - Per Hedgehog Ammo - Oddzielna amunicja - - - Reset Health - Odnów życie - - - Disable Wind - Wyłącz wiatr - - - More Wind - Więcej wiatru - - - Tag Team - Zespół - - - Add Bottom Border - Dodaj ramkę na dole + TeamShowWidget + + %1's team + + + + + ThemePrompt + + Select a theme for this map + + + + Cancel + Anuluj @@ -2500,11 +2443,6 @@ zrzut ekranu - hedgehogs -info - opisy jeży - - quit wyjście @@ -2556,33 +2494,33 @@ record nagrywaj + + hedgehog info + + binds (categories) - Basic controls - Podstawowe sterowanie - - - Weapon controls - Broń - - - Camera and cursor controls - Kamera i kursor - - - Other - Inne + Movement + + + + Weapons + Uzbrojenie + + + Camera + + + + Miscellaneous + Różne binds (descriptions) - Move your hogs and aim: - Poruszanie się jeżem i strzelanie: - - Traverse gaps and obstacles by jumping: Omiń dziury i przeszkody, skacząc: @@ -2646,6 +2584,10 @@ Record video: Nagraj wideo: + + Hedgehog movement + + binds (keys) diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Locale/hedgewars_pt_BR.ts --- a/share/hedgewars/Data/Locale/hedgewars_pt_BR.ts Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Locale/hedgewars_pt_BR.ts Fri Feb 22 05:05:32 2013 +0100 @@ -20,6 +20,79 @@ + BanDialog + + IP + Endereço IP + + + Nick + + + + IP/Nick + + + + Reason + + + + Duration + + + + Ok + + + + Cancel + Cancelar + + + you know why + + + + Warning + + + + Please, specify %1 + + + + nickname + + + + permanent + + + + + DataManager + + Use Default + + + + + FeedbackDialog + + View + + + + Cancel + Cancelar + + + Send Feedback + + + + FreqSpinBox Never @@ -44,13 +117,36 @@ Editar esquemas - When this option is enabled selecting a game scheme will auto-select a weapon - Quando esta opção está habilitada a seleção de um esquema de jogo implicará em auto seleção do esquema de armas - - Game Options + + Game scheme will auto-select a weapon + + + + + HWApplication + + %1 minutes + + + + %1 hour + + + + %1 hours + + + + %1 day + + + + %1 days + + HWAskQuitDialog @@ -101,10 +197,6 @@ Failed to save StyleSheet to %1 - - %1 is not a valid command! - - HWForm @@ -139,20 +231,6 @@ - Your nickname %1 is -registered on Hedgewars.org -Please provide your password below -or pick another nickname in game config: - Seu apelido %1 é -registrado no Hedgewars.org -Por favor, forneça sua senha -ou escolha outro apelido: - - - No password supplied. - - - Nickname Apelido @@ -165,6 +243,59 @@ Please pick another nickname: + + %1's Team + + + + Hedgewars - Nick registered + + + + This nick is registered, and you haven't specified a password. + +If this nick isn't yours, please register your own nick at www.hedgewars.org + +Password: + + + + Your nickname is not registered. +To prevent someone else from using it, +please register it at www.hedgewars.org + + + + + +Your password wasn't saved either. + + + + Hedgewars - Empty nickname + + + + Hedgewars - Wrong password + + + + You entered a wrong password. + + + + Try Again + + + + Hedgewars - Connection error + + + + You reconnected too fast. +Please wait a few seconds and try again. + + HWGame @@ -180,18 +311,6 @@ HWMapContainer - Map - Mapa - - - Themes - Temas - - - Filter - Filtro - - All Todos @@ -216,10 +335,6 @@ Excêntrico - Type - Tipo - - Small tunnels Túneis estreitos @@ -228,29 +343,97 @@ Túneis médios - Large tunnels - Túneis grandes - - - Small floating islands - Ilhas pequenas - - - Medium floating islands - Ilhas médias - - - Large floating islands - Ilhas grandes - - Seed checar Semeie - Set - Esquema + Map type: + + + + Image map + + + + Mission map + + + + Hand-drawn + + + + Randomly generated + + + + Random maze + + + + Random + Aleatório + + + Map preview: + + + + Load map drawing + + + + Edit map drawing + + + + Largetunnels + + + + Small islands + + + + Medium islands + + + + Large islands + + + + Map size: + + + + Maze style: + + + + Mission: + + + + Map: + + + + Theme: + + + + Load drawn map + Carregar mapa + + + Drawn Maps + + + + All files + @@ -322,8 +505,8 @@ HWPasswordDialog - Password - Senha + Login + @@ -338,6 +521,32 @@ + HatButton + + Change hat (%1) + + + + + HatPrompt + + Select a hat + + + + Filter: + + + + Cancel + Cancelar + + + Use selected hat + + + + KB SDL_ttf returned error while rendering text, most propably it is related to the bug in freetype2. It's recommended to update your freetype lib. @@ -345,6 +554,13 @@ + KeyBinder + + Category + + + + LibavInteraction Duration: %1m %2s @@ -363,6 +579,17 @@ Audio: + + unknown + + + + + MapModel + + No description available. + + PageAdmin @@ -394,6 +621,38 @@ Set data Atribuir Dados + + General + Geral + + + Bans + + + + IP/Nick + + + + Expiration + + + + Reason + + + + Refresh + + + + Add + + + + Remove + + PageConnecting @@ -448,8 +707,40 @@ Geral - Advanced - Avançado + Select an action to choose a custom key bind for this team + + + + Use my default + + + + Reset all binds + + + + Custom Controls + + + + Hat + Chapéu + + + Name + Nome + + + This hedgehog's name + + + + Randomize this hedgehog's name + + + + Random Team + Equipe Aleatória @@ -530,268 +821,14 @@ PageMain - Simply pick the same color as a friend to play together as a team. Each of you will still control his or her own hedgehogs but they'll win or lose together. - Tips - Use a mesma cor que um amigo para jogar como uma equipe única. Cada um controlará seus próprios ouriços, mas vencerão em equipe (ou perderão). - - - Some weapons might do only low damage but they can be a lot more devastating in the right situation. Try to use the Desert Eagle to knock multiple hedgehogs into the water. - Tips - Algumas armas que fazem pouco dano podem ser mais que devastadoras na situação certa. Tente usar a Desert Eagle para derrubar vários ouriços na água. - - - If you're unsure what to do and don't want to waste ammo, skip one round. But don't let too much time pass as there will be Sudden Death! - Tips - Se você não tem certeza se quer desperdiçar munição ou ítens, passe a vez. Mas não deixe muitos turnos passarem ou chegará a Morte Súbita! - - - If you'd like to keep others from using your preferred nickname on the official server, register an account at http://www.hedgewars.org/. - Tips - Se você quiser evitar que outros usem seu apelido no servidor oficial, registre-o em http://www.hedgewars.org/. - - - You're bored of default gameplay? Try one of the missions - they'll offer different gameplay depending on the one you picked. - Tips - Cansado do jogo padrão? Tente uma das missões - elas oferecem diferentes modos de jogo dependendo da sua escolha. - - - By default the game will always record the last game played as a demo. Select 'Local Game' and pick the 'Demos' button on the lower right corner to play or manage them. - Tips - O jogo irá, por padrão, sempre gravar o último jogo como demo. Selecione "Jogo Local" e use o botão "Demos" no canto inferior direito para assitir ou gerenciá-los. - - - Hedgewars is Open Source and Freeware we create in our spare time. If you've got problems, ask on our forums but please don't expect 24/7 support! - Tips - Hedgewars possui código aberto e é grátis, nós o desenvolvemos em nosso tempo livre. Se você encontrou problemas peça ajuda em nossos fóruns, mas não espere ser atendido 24 horas por dia! - - - Hedgewars is Open Source and Freeware we create in our spare time. If you like it, help us with a small donation or contribute your own work! - Tips - Hedgewars possui código aberto e é grátis, nós o desenvolvemos em nosso tempo livre. Se você deseja ajudar, pode doar ou contribuir com seu trabalho! - - - Hedgewars is Open Source and Freeware we create in our spare time. Share it with your family and friends as you like! - Tips - Hedgewars possui código aberto e é grátis, nós o desenvolvemos em nosso tempo livre. Compartilhe com sua família e amigos! - - - From time to time there will be official tournaments. Upcoming events will be announced at http://www.hedgewars.org/ some days in advance. - Tips - De tempos em tempos ocorrem torneios. Esses eventos podem ser acompanhados através do endereço http://www.hedgewars.org/. - - - Hedgewars is available in many languages. If the translation in your language seems to be missing or outdated, feel free to contact us! - Tips - Hedgewars está disponível em diversas linguages! Se você acha que a tradução não te satisfaz ou não é compatível, contacte-nos! - - - Hedgewars can be run on lots of different operating systems including Microsoft Windows, Mac OS X and Linux. - Tips - Hedgewars pode ser jogado em muitos sistemas operacionais, incluindo Windows, Mac OS X e Linux. - - - Always remember you're able to set up your own games in local and network/online play. You're not restricted to the 'Simple Game' option. - Tips - Lembre-se que você pode selecionar suas próprias regras em jogos locais ou em rede. Você não está limitado ao "Jogo Simples". - - - While playing you should give yourself a short break at least once an hour. - Tips - Não jogue por diversas horas sem descansar! De uma pausa a cada hora. - - - If your graphics card isn't able to provide hardware accelerated OpenGL, try to enable the low quality mode to improve performance. - Tips - Se sua placa de vídeo não é capaz de suportar aceleração OpenGL, tente ativar a opção de "Qualidade Reduzida" para melhorar a performance. - - - We're open to suggestions and constructive feedback. If you don't like something or got a great idea, let us know! - Tips - Somos abertos para sugestões e críticas construtivas. Se você não gosta de alguma coisa ou teve uma grande idéia, nos avise! - - - Especially while playing online be polite and always remember there might be some minors playing with or against you as well! - Tips - Seja sempre educado, especialmente quando jogar on line, pois pode haver menores jogando com ou contra você! - - - Special game modes such as 'Vampirism' or 'Karma' allow you to develop completely new tactics. Try them in a custom game! - Tips - Modos especiais de jogo, como Vampirismo ou Karma permitem desenvolver novas táticas. Tente-os em um jogo personalisado! - - - You should never install Hedgewars on computers you don't own (school, university, work, etc.). Please ask the responsible person instead! - Tips - Não instale este jogo em computadores que não seja permitido (escola, trabalho, universidade). Solicite isso ao responsável! - - - Hedgewars can be perfect for short games during breaks. Just ensure you don't add too many hedgehogs or use an huge map. Reducing time and health might help as well. - Tips - Hedgewars pode ser um jogo perfeito nos intervalos! Apenas certifique-se de não adicionar muitos ouriços ou usar um mapa muito grande! Reduzir o tempo de turno e a vida também pode ajudar. - - - No hedgehogs were harmed in making this game. - Tips - Nenhum ouriço foi ferido para fazer este jogo. - - - Hedgewars is Open Source and Freeware we create in our spare time. If someone sold you the game, you should try get a refund! - Tips - Hedgewars é um jogo de Código Aberto e grátis que criamos em nosso tempo livre. Se alguém te vendeu este jogo, você deveria pedir reembolso! - - - Connect one or more gamepads before starting the game to be able to assign their controls to your teams. - Tips - Conecte um ou mais joysticks antes de começar o jogo para poder usá-los para controlar a sua equipe. - - - Create an account on %1 to keep others from using your most favourite nickname while playing on the official server. - Tips - Crie uma conta em %1 para evitar que outros usem seu apelido quando jogar no servidor oficial. - - - If your graphics card isn't able to provide hardware accelerated OpenGL, try to update the associated drivers. - Tips - Se sua placa gráfica não tem aceleração gráfica OpenGl, tente atualizar os drivers relacionados. - - - There are three different jumps available. Tap [high jump] twice to do a very high/backwards jump. - Tips - Há 3 diferentes pulos. Aperte [pulo alto] 2 vezes para fazer um pulo alto para trás. - - - Afraid of falling off a cliff? Hold down [precise] to turn [left] or [right] without actually moving. - Tips - O que é o colchetes? - Medo de cair de um desfiladeiro? Mantenha pressionado [mira precisa] para virar à [esquerda] or [direita] sem se mover. - - - Some weapons require special strategies or just lots of training, so don't give up on a particular tool if you miss an enemy once. - Tips - Algumas armas necessitam estratégias especiais ou muito treino, então não desista de uma arma ou utilidade se você errou em seu uso. - - - Most weapons won't work once they touch the water. The Homing Bee as well as the Cake are exceptions to this. - Tips - Muitas armas não funcionarão após tocar na água. A Abelha e o bolo são excessões a regra. - - - The Old Limbuger only causes a small explosion. However the wind affected smelly cloud can poison lots of hogs at once. - Tips - O Velho Limburger causa uma pequena explosão. Porém, o vento carregará uma nuvem fedorenta que poderá envenenar muitos ouriços. - - - The Piano Strike is the most damaging air strike. You'll lose the hedgehog performing it, so there's a huge downside as well. - Tips - O Ataque com Piano é o mais violento ataque aéreo. Você perderá seu ouriço ao executá-lo, logo, há uma grande contra-partida. - - - Sticky Mines are a perfect tool to create small chain reactions knocking enemy hedgehogs into dire situations ... or water. - Tips - Minas Adesivas são a arma perfeita para criar pequenas reações em cadeias, colocando ouriços inimigos em situações complicadas.... ou na água - - - The Hammer is most effective when used on bridges or girders. Hit hogs will just break through the ground. - Tips - O Martelo é mais efetivo quando usado em pontes ou vigas. Ouriços atingidos atravessarão o chão. - - - If you're stuck behind an enemy hedgehog, use the Hammer to free yourself without getting damaged by an explosion. - Tips - Se você está preso atrás de um ouriço inimigo, use o Martelo para se libertar sem sofrer danos. - - - The Cake's maximum walking distance depends on the ground it has to pass. Use [attack] to detonate it early. - Tips - A distância máxima que o Bolo anda depende do terreno por onde ele passa. Use [ataque] para detoná-lo antes. - - - The Flame Thrower is a weapon but it can be used for tunnel digging as well. - Tips - O Lança-Chamas é uma arma porém pode ser usado para cavar túneis também. - - - Want to know who's behind the game? Click on the Hedgewars logo in the main menu to see the credits. - Tips - Quer saber quem está por trás desse jogo? Clique no logo do Hedgewars no menu principal para ver os créditos. - - - Like Hedgewars? Become a fan on %1 or follow us on %2! - Tips - Gostou de Hedgewars? Se torne um fã no %1 ou nos siga pelo %2! - - - Feel free to draw your own graves, hats, flags or even maps and themes! But note that you'll have to share them somewhere to use them online. - Tips - Desenhe suas próprias tumbas, chapéus, bandeiras ou até mapas e temas! Mas observe que você terá que compartilhá-los para jogar online. - - - Really want to wear a specific hat? Donate to us and receive an exclusive hat of your choice! - Tips - Realmente quer usar um chapéu específico? Doe para o Hedgewars e receba um chapéu exclusivo! - - - Keep your video card drivers up to date to avoid issues playing the game. - Tips - Mantenha a sua placa de vídeo atualizada para evitar problemas ao jogar este jogo. - - - You can find your Hedgewars configuration files under "My Documents\Hedgewars". Create backups or take the files with you, but don't edit them by hand. - Tips - Você pode encontrar os arquivos de configuração em "Meus Documentos\Hedgewars". Crie cópias ou leve os arquivos com você, mas não edite eles manualmente. - - - You're able to associate Hedgewars related files (savegames and demo recordings) with the game to launch them right from your favorite file or internet browser. - Tips - Você pode associar os arquivos relacionados ao Hedgewars (jogos salvos e gravações demo), podendo abrí-los diretamente do gerenciador de arquivos ou do navegador - - - Want to save ropes? Release the rope in mid air and then shoot again. As long as you don't touch the ground you'll reuse your rope without wasting ammo! - Tips - Quer economizar corda? Solte-a quando estiver no meio do ar e então atire de novo. Se você não tocar o solo, você reutilizará a corda e não desperdiçará-la do seu arsenal! - - - You can find your Hedgewars configuration files under "Library/Application Support/Hedgewars" in your home directory. Create backups or take the files with you, but don't edit them by hand. - Tips - Você pode encontrar os arquivos de configuração do Hedgewars em "Library/Application Support/Hedgewars" no seu diretório base. Crie backups ou leve os arquivos com você, mas não os edite manualmente. - - - You can find your Hedgewars configuration files under ".hedgewars" in your home directory. Create backups or take the files with you, but don't edit them by hand. - Tips - Você pode encontrar os arquivos de configuração do Hedgewars em ".hedgewars/" no seu diretório base. Crie backups ou leve os arquivos com você, mas não os edite manualmente. - - - The Windows version of Hedgewars supports Xfire. Make sure to add Hedgewars to its game list so your friends can see you playing. - Tips - - - - Use the Molotov or Flame Thrower to temporary keep hedgehogs from passing terrain such as tunnels or platforms. - Tips - - - - The Homing Bee can be tricky to use. Its turn radius depends on its velocity, so try to not use full power. - Tips - - - Downloadable Content - Local Game - - - Play a game on a single computer - Network Game - - - Play a game across a network @@ -819,6 +856,14 @@ Edit game preferences + + Play a game across a local area network + + + + Play a game on an official server + + PageMultiplayer @@ -826,6 +871,10 @@ Start Começar + + Edit game preferences + + PageNetGame @@ -833,23 +882,12 @@ Control Controle - - - PageNetType - - LAN game - Jogo na rede local - - - Official server - Servidor Oficial - - - Join hundreds of players online! + + Edit game preferences - Join or host your own game server in a Local Area Network. + Start @@ -896,10 +934,6 @@ Apagar esquema de armas - General - Geral - - Advanced Avançado @@ -939,6 +973,94 @@ System proxy settings + + Select an action to change what key controls it + + + + Reset to default + + + + Reset all binds + + + + Game + + + + Graphics + + + + Audio + + + + Controls + + + + Video Recording + + + + Network + + + + Teams + Equipes + + + Schemes + + + + Weapons + Armas + + + Frontend + + + + Custom colors + + + + Game audio + + + + Frontend audio + + + + Account + + + + Proxy settings + + + + Miscellaneous + + + + Updates + + + + Check for updates + + + + Video recording options + + PagePlayDemo @@ -1138,18 +1260,10 @@ PageSinglePlayer - Simple Game - - - Play a quick game against the computer with random settings - Multiplayer - - - Play a hotseat game against your friends, or AI teams @@ -1158,26 +1272,14 @@ - Training Mode - - - Practice your skills in a range of training missions - Demos - - - Watch recorded demos - Load - Carregar - - Load a previously saved game @@ -1223,14 +1325,6 @@ - Date: - - - - Size: - - - encoding @@ -1238,6 +1332,16 @@ uploading + + Date: %1 + + + + + Size: %1 + + + QAction @@ -1246,10 +1350,6 @@ Chutar - Start - Iniciar - - Restrict Joins Restringir Participação @@ -1297,10 +1397,6 @@ Tela cheia - Enable sound - Habilitar sons - - Show FPS Mostrar FPS (Performance) @@ -1309,14 +1405,6 @@ Mostrar dano de maneira alternativa - Enable music - Habilitar música - - - Frontend fullscreen - Interface em tela cheia - - Append date and time to record file name Adicionar data e hora no nome do arquivo @@ -1329,18 +1417,6 @@ Mostrar instruções no menu de armas - Enable frontend sounds - Habilitar sons da interface - - - Enable frontend music - Habilitar música da interface - - - Frontend effects - Efeitos da interface - - Save password @@ -1360,14 +1436,38 @@ Use game resolution + + Visual effects + + + + Sound + + + + In-game sound effects + + + + Music + + + + In-game music + + + + Frontend sound effects + + + + Frontend music + + QComboBox - generated map... - mapa gerado... - - Human Humano @@ -1380,14 +1480,6 @@ (Padrão do sistema) - generated maze... - labirinto gerado... - - - Mission - Missão - - Community Comunidade @@ -1404,10 +1496,6 @@ Em progresso - hand drawn map... - mapa desenhado a mão... - - Disabled @@ -1444,10 +1532,6 @@ - Wiggle - - - Red/Cyan grayscale @@ -1479,22 +1563,10 @@ Membros da equipe - Key binds - Associação de teclas - - Fort Forte - Teams - Equipes - - - Audio/Graphic options - Opções de áudio e gráficos - - Net game Jogo em rede @@ -1515,26 +1587,6 @@ Opções de Equipe - Misc - Misc - - - Schemes and Weapons - Esquemas e Armas - - - Custom colors - - - - Miscellaneous - - - - Video recording options - - - Videos @@ -1542,30 +1594,10 @@ Description - - Proxy settings - - QLabel - Developers: - Desenvolvedores: - - - Art: - Arte: - - - Translations: - Traduções: - - - Special thanks: - Agradecimentos especiais: - - Weapons Armas @@ -1598,10 +1630,6 @@ Versão - Sounds: - Sons: - - Initial sound volume Volume inicial @@ -1638,10 +1666,6 @@ Caixas caem - Game scheme - Esquema de jogo - - % Dud Mines % Minas falhas @@ -1678,10 +1702,6 @@ Dica: - This development build is 'work in progress' and may not be compatible with other versions of the game. Some features might be broken or incomplete. Use at your own risk! - Esta versão do Hedgewars é um trabalho em progresso e pode não ser compatível com outras versões do jogo. Algumas coisas podem não funcionar ou podem estar incompletas. Use a sua conta e risco! - - Quality Qualidade @@ -1756,10 +1776,6 @@ - Summary - - - Description @@ -1787,6 +1803,38 @@ Bitrate (Kbps) + + This development build is 'work in progress' and may not be compatible with other versions of the game, while some features might be broken or incomplete! + + + + Fullscreen + Tela cheia + + + Fullscreen Resolution + + + + Windowed Resolution + + + + Your Email + + + + Summary + + + + Send system information + + + + Type the security code: + + QLineEdit @@ -1825,10 +1873,6 @@ Associação de arquivos falhou. - Please fill out all fields - - - Error while authenticating at google.com: @@ -1875,18 +1919,6 @@ - Successfully posted the issue on hedgewars.googlecode.com - - - - Error during authentication at google.com - - - - Error reporting the issue, please try again later (or visit hedgewars.googlecode.com directly) - - - Main - Error @@ -2034,16 +2066,37 @@ Do you really want to delete the weapon set '%1'? - - - QObject - - Nickname - Apelido - - - Please enter your nickname - Entre com seu apelido + + Hedgewars - Nick not registered + + + + System Information Preview + + + + Failed to generate captcha + + + + Failed to download captcha + + + + Please fill out all fields. Email is optional. + + + + Hedgewars - Warning + + + + Hedgewars - Information + + + + Hedgewars + @@ -2101,26 +2154,10 @@ Carregar - Setup - Configuração - - - Ready - Pronto - - - Random Team - Equipe Aleatória - - Associate file extensions Associar extensão de arquivos. - more - - - More info @@ -2213,6 +2250,25 @@ + SeedPrompt + + The map seed is the basis for all random values generated by the game. + + + + Cancel + Cancelar + + + Set seed + + + + Close + + + + SelWeaponWidget Weapon set @@ -2241,107 +2297,22 @@ - ToggleButtonWidget - - Vampirism - Vampirismo - - - Karma - Karma - - - Artillery - Artilharia - - - Fort Mode - Modo de Forte - - - Divide Teams - Dividir Equipes - - - Solid Land - Terreno Sólido - - - Add Border - Adicionar Bordas - - - Low Gravity - Baixa Gravidade - - - Laser Sight - Mira Laser - - - Invulnerable - Invulnerabilidade - - - Random Order - Ordem Aleatória - - - King - Rei - - - Place Hedgehogs - Posicionar Ouriços - - - Clan Shares Ammo - Clan Compartilha Armas - - - Disable Girders - Desabilitar Vigas - - - Disable Land Objects - Desabilitar objetos do terreno - - - AI Survival Mode - AI Modo de Sobrevivência - - - Unlimited Attacks - Ataques Ilimitados - - - Reset Weapons - Reiniciar Armas - - - Per Hedgehog Ammo - Munição por Ouriço - - - Reset Health - Restaurar Vida - - - Disable Wind - Desativar Vento - - - More Wind - Mais Vento - - - Tag Team + TeamShowWidget + + %1's team - - Add Bottom Border + + + ThemePrompt + + Select a theme for this map + + Cancel + Cancelar + binds @@ -2458,12 +2429,6 @@ capturar - hedgehogs -info - informação dos -ouriços - - quit sair @@ -2515,33 +2480,33 @@ record + + hedgehog info + + binds (categories) - Basic controls - Controles Básicos - - - Weapon controls - Controles das armas - - - Camera and cursor controls - Controle de câmera e cursor - - - Other - Outros + Movement + + + + Weapons + Armas + + + Camera + + + + Miscellaneous + binds (descriptions) - Move your hogs and aim: - Mova seu ouriço e mire: - - Traverse gaps and obstacles by jumping: Atravesse buracos e obstáculos pulando: @@ -2605,6 +2570,10 @@ Record video: + + Hedgehog movement + + binds (keys) diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Locale/hedgewars_pt_PT.ts --- a/share/hedgewars/Data/Locale/hedgewars_pt_PT.ts Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Locale/hedgewars_pt_PT.ts Fri Feb 22 05:05:32 2013 +0100 @@ -20,6 +20,79 @@ + BanDialog + + IP + IP + + + Nick + + + + IP/Nick + + + + Reason + + + + Duration + + + + Ok + + + + Cancel + Cancelar + + + you know why + + + + Warning + + + + Please, specify %1 + + + + nickname + + + + permanent + + + + + DataManager + + Use Default + + + + + FeedbackDialog + + View + + + + Cancel + Cancelar + + + Send Feedback + + + + FreqSpinBox Never @@ -44,13 +117,36 @@ Editar esquemas - When this option is enabled selecting a game scheme will auto-select a weapon - Com esta opção activada o esquema de jogo irá automaticamente seleccionar uma arma - - Game Options Opções de Jogo + + Game scheme will auto-select a weapon + + + + + HWApplication + + %1 minutes + + + + %1 hour + + + + %1 hours + + + + %1 day + + + + %1 days + + HWAskQuitDialog @@ -101,10 +197,6 @@ Failed to save StyleSheet to %1 Não foi possível gravar o StyleSheet em %1 - - %1 is not a valid command! - %1 não é um comando valido! - HWForm @@ -139,20 +231,6 @@ Jogo abortado - Your nickname %1 is -registered on Hedgewars.org -Please provide your password below -or pick another nickname in game config: - O nome de utilizador %1 está -registado em Hedgewars.org -Por favor digita a tua palavra passe ou escolhe -outro nome de utilizador no menu de configuração: - - - No password supplied. - Não foi fornecida uma palavra passe. - - Nickname Nome de utilizador @@ -166,6 +244,59 @@ Alguem já está a utilizar o teu nome de utilizador %1 no servidor. Por favor escolhe outro nome de utilizador: + + %1's Team + + + + Hedgewars - Nick registered + + + + This nick is registered, and you haven't specified a password. + +If this nick isn't yours, please register your own nick at www.hedgewars.org + +Password: + + + + Your nickname is not registered. +To prevent someone else from using it, +please register it at www.hedgewars.org + + + + + +Your password wasn't saved either. + + + + Hedgewars - Empty nickname + + + + Hedgewars - Wrong password + + + + You entered a wrong password. + + + + Try Again + + + + Hedgewars - Connection error + + + + You reconnected too fast. +Please wait a few seconds and try again. + + HWGame @@ -181,18 +312,6 @@ HWMapContainer - Map - Mapa - - - Themes - Temas - - - Filter - Filtro - - All Todos @@ -217,10 +336,6 @@ Invulgar - Type - Tipo - - Small tunnels Túneis pequenos @@ -229,28 +344,96 @@ Túneis medios - Large tunnels - Túneis grandes - - - Small floating islands - Ilhas flutuantes pequenas - - - Medium floating islands - Ilhas flutuantes médias - - - Large floating islands - Ilhas flutuantes grandes - - Seed Semente - Set - Definir + Map type: + + + + Image map + + + + Mission map + + + + Hand-drawn + Desenhado à mão + + + Randomly generated + + + + Random maze + + + + Random + Aleatório + + + Map preview: + + + + Load map drawing + + + + Edit map drawing + + + + Largetunnels + + + + Small islands + + + + Medium islands + + + + Large islands + + + + Map size: + + + + Maze style: + + + + Mission: + + + + Map: + + + + Theme: + + + + Load drawn map + Carregar mapa desenhado + + + Drawn Maps + Mapas Desenhados + + + All files + Todos os ficheiros @@ -276,7 +459,7 @@ Connection refused - Conexão rejeitada + Ligação rejeitada Room destroyed @@ -284,7 +467,7 @@ Quit reason: - Motivo de saída: + Motivo: You got kicked @@ -322,8 +505,8 @@ HWPasswordDialog - Password - Palavra-passe + Login + @@ -338,6 +521,32 @@ + HatButton + + Change hat (%1) + + + + + HatPrompt + + Select a hat + + + + Filter: + + + + Cancel + Cancelar + + + Use selected hat + + + + KB SDL_ttf returned error while rendering text, most propably it is related to the bug in freetype2. It's recommended to update your freetype lib. @@ -345,42 +554,42 @@ + KeyBinder + + Category + + + + LibavInteraction Duration: %1m %2s - + Duração: %1m %2s + Video: %1x%2, - Vídeo: %1x%2, + Vídeo: %1x%2, %1 fps, - %1 fps, + %1 fps, Audio: - Audio: + Audio: + + + unknown + - LibavIteraction - - Duration: %1m %2s - Duração: %1m %2s - - - Video: %1x%2, - Vídeo: %1x%2, - - - %1 fps, - %1 fps, - - - Audio: - Audio: + MapModel + + No description available. + @@ -413,6 +622,38 @@ Set data Gravar modificações + + General + Geral + + + Bans + + + + IP/Nick + + + + Expiration + + + + Reason + + + + Refresh + + + + Add + + + + Remove + + PageConnecting @@ -467,8 +708,40 @@ Geral - Advanced - Avançado + Select an action to choose a custom key bind for this team + + + + Use my default + + + + Reset all binds + + + + Custom Controls + + + + Hat + Chapéu + + + Name + Nome + + + This hedgehog's name + + + + Randomize this hedgehog's name + + + + Random Team + Equipa aleatória @@ -492,8 +765,8 @@ The best killer is <b>%1</b> with <b>%2</b> kills in a turn. - O extreminador da ronda foi <b>%1</b> com <b>%2</b> morto num unico turno. - O extreminador da ronda foi <b>%1</b> com <b>%2</b> mortes num unico turno. + O exterminador da ronda foi <b>%1</b> com <b>%2</b> morto num unico turno. + O exterminador da ronda foi <b>%1</b> com <b>%2</b> mortes num unico turno. @@ -543,273 +816,20 @@ PageInfo Open the snapshot folder - Abrir a pasta com as capturas de ecrã + Abrir a pasta de capturas de ecrã PageMain - Simply pick the same color as a friend to play together as a team. Each of you will still control his or her own hedgehogs but they'll win or lose together. - Tips - Simplesmente selecciona a mesma cor de outro jogador para jogarem em equipa. Continuas a ter total controlo dos teus ouriços, mas ganham ou perdem juntos. - - - Some weapons might do only low damage but they can be a lot more devastating in the right situation. Try to use the Desert Eagle to knock multiple hedgehogs into the water. - Tips - Algumas armas podem não fazer muito dano, mas em ocasiões especificas podem-se demonstrar bastante mais letais. Experimenta usar a Desert Eagle para empurrar varios ouriços para a água. - - - If you're unsure what to do and don't want to waste ammo, skip one round. But don't let too much time pass as there will be Sudden Death! - Tips - Se não tens a certeza do que fazer a seguir não desperdiçes munições, passa o turno. Mas não desperdices muito tempo, a Morte Súbita aproxima-se. - - - If you'd like to keep others from using your preferred nickname on the official server, register an account at http://www.hedgewars.org/. - Tips - Se não queres que outros usem o teu nome de utilizador preferido no servidor oficial, regista-o em http://www.hedgewars.org/. - - - You're bored of default gameplay? Try one of the missions - they'll offer different gameplay depending on the one you picked. - Tips - Estás cansado do modo de jogo habitual? Experimenta uma das missões - existem várias por onde escolher, e todas com objectivos um pouco diferentes. - - - By default the game will always record the last game played as a demo. Select 'Local Game' and pick the 'Demos' button on the lower right corner to play or manage them. - Tips - Por defeito, o ultimo jogo em que participaste é sempre gravado como 'demo'. Selecciona 'Jogo Local' e aí a opção 'Demos' no canto inferior direito para os gerir ou reproduzir. - - - Hedgewars is Open Source and Freeware we create in our spare time. If you've got problems, ask on our forums but please don't expect 24/7 support! - Tips - O Hedgewars é Open Source e Freeware, desenvolvido nos tempos livres. Se tiveres algum problema pergunta nos fóruns, mas por favor não esperes suporte 24/7! - - - Hedgewars is Open Source and Freeware we create in our spare time. If you like it, help us with a small donation or contribute your own work! - Tips - O Hedgewars é Open Source e Freeware, desenvolvido nos tempos livres. Se gostares do jogo podes contribuir com uma pequena doação ou o teu próprio trabalho! - - - Hedgewars is Open Source and Freeware we create in our spare time. Share it with your family and friends as you like! - Tips - O Hedgewars é Open Source e Freeware, desenvolvido nos tempos livres. Partilha-o com a família e amigos como quiseres! - - - From time to time there will be official tournaments. Upcoming events will be announced at http://www.hedgewars.org/ some days in advance. - Tips - De tempos a tempos realizam-se torneios oficiais. Todos estes eventos são anunciados em http://www.hedgewars.org/ com alguns dias de antecedência. - - - Hedgewars is available in many languages. If the translation in your language seems to be missing or outdated, feel free to contact us! - Tips - O Hedgewars está disponível em vários idiomas. Se a tradução do teu idioma está desactualizada ou em falta, não hesites em contactar-nos! - - - Hedgewars can be run on lots of different operating systems including Microsoft Windows, Mac OS X and Linux. - Tips - O Hedgewars está disponível para vários sistemas operativos incluindo Microsoft Windows, Mac OS X e Linux. - - - Always remember you're able to set up your own games in local and network/online play. You're not restricted to the 'Simple Game' option. - Tips - Lembra-te que tens sempre a opção de poder jogar na tua rede local ou online. Não estás restrito ao modo de Jogo Local. - - - While playing you should give yourself a short break at least once an hour. - Tips - Lembra-te de fazer pequenos intervalos durante sessões de jogo prolongadas. - - - If your graphics card isn't able to provide hardware accelerated OpenGL, try to enable the low quality mode to improve performance. - Tips - Se a tua placa gráfica não é capaz de fornecer aceleração por hardware para OpenGL experimenta activar o modo de baixa qualidade para melhorar a performance. - - - We're open to suggestions and constructive feedback. If you don't like something or got a great idea, let us know! - Tips - Estamos abertos a sugestões e críticas construtivas. Se há algo que não gostas em particular ou tiveste uma boa ideia, deixa-nos saber! - - - Especially while playing online be polite and always remember there might be some minors playing with or against you as well! - Tips - Especialmente durante partidas online é importante ser educado. Lembra-te que podem haver menores a jogar com ou contra ti! - - - Special game modes such as 'Vampirism' or 'Karma' allow you to develop completely new tactics. Try them in a custom game! - Tips - Modos de jogo especiais como 'Vampirismo' ou 'Karma' permitem-te desenvolver tácticas completamente novas! Experimenta-os num jogo personalizado! - - - You should never install Hedgewars on computers you don't own (school, university, work, etc.). Please ask the responsible person instead! - Tips - Não deves instalar o Hedgewars em computadores que não te pertençam (escola, universidade, trabalho, etc.). Por favor contacta o responsável caso o pretendas fazer. - - - Hedgewars can be perfect for short games during breaks. Just ensure you don't add too many hedgehogs or use an huge map. Reducing time and health might help as well. - Tips - O Hedgewars é perfeito para pequenos jogos durante intervalos. Tem apenas a certeza que não adicionas muitos ouriços ou usas um mapa muito grande. Reduzir o tempo e pontos de vida pode ajudar também. - - - No hedgehogs were harmed in making this game. - Tips - Nenhum ouriço foi mal tratado durante a produção deste jogo. - - - Hedgewars is Open Source and Freeware we create in our spare time. If someone sold you the game, you should try get a refund! - Tips - O Hedgewars é Open Source e Freeware desenvolvido durante o tempo livre. Se alguem te vendeu o jogo, tente obter o reembolso! - - - Connect one or more gamepads before starting the game to be able to assign their controls to your teams. - Tips - Conecta um ou mais comandos antes de lançar o jogo para que seja possível configura-los com as tuas equipas. - - - Create an account on %1 to keep others from using your most favourite nickname while playing on the official server. - Tips - Cria uma conta em http://www.hedgewars.org/ para prevenir que outros usem o teu nome de utilizador favorito no servidor oficial. - - - If your graphics card isn't able to provide hardware accelerated OpenGL, try to update the associated drivers. - Tips - Se a tua placa gráfica se está a demonstrar incapaz de fornecer aceleração gráfica em OpenGL, experimenta actualizar os drivers da mesma. - - - There are three different jumps available. Tap [high jump] twice to do a very high/backwards jump. - Tips - Existem três diferentes tipos de salto. Pressiona [salto alto] duas vezes para fazer um salto muito alto para trás. - - - Afraid of falling off a cliff? Hold down [precise] to turn [left] or [right] without actually moving. - Tips - Com medo de cair de um penhasco? Deixa o [botão de precisão] pressionado e vira-te para a [direita] ou [esquerda] sem sair do sitio. - - - Some weapons require special strategies or just lots of training, so don't give up on a particular tool if you miss an enemy once. - Tips - Algumas armas requerem estratégias especiais ou imensa prática, por isso não desistas imediatamente dessa ferramenta em particular se falhares o alvo. - - - Most weapons won't work once they touch the water. The Homing Bee as well as the Cake are exceptions to this. - Tips - A maiora das armas deixa de funcionar se tocarem na água. A Abelha Teleguiada e o Bolo são excepções a esta regra. - - - The Old Limbuger only causes a small explosion. However the wind affected smelly cloud can poison lots of hogs at once. - Tips - O Limburger Venho causa apenas uma pequena explosão. No entanto a pequena nuvem malcheirosa, afectada pelo vento, pode envenenar vários ouriços de uma vez. - - - The Piano Strike is the most damaging air strike. You'll lose the hedgehog performing it, so there's a huge downside as well. - Tips - O Piano é o ataque aéreo que mais potencial dano causa. No entanto uma enorme desvantagem, é necessario sacrificar um ouriço para o utilizar. - - - Sticky Mines are a perfect tool to create small chain reactions knocking enemy hedgehogs into dire situations ... or water. - Tips - As Minas Pegajosas são a arma ideal para com pequenas explosões em cadeia empurrar ouriços para situações terríveis... ou para a água. - - - The Hammer is most effective when used on bridges or girders. Hit hogs will just break through the ground. - Tips - O melhor local para usar o Martelo é em pontes ou vigas. Os ouriços atingidos nestes locais vão simplesmente furar pelo chão. - - - If you're stuck behind an enemy hedgehog, use the Hammer to free yourself without getting damaged by an explosion. - Tips - Se ficares preso atrás de um ouriço inimigo utiliza o Martelo para te libertares sem ser necessário levar dano de uma explosão. - - - The Cake's maximum walking distance depends on the ground it has to pass. Use [attack] to detonate it early. - Tips - A distancia máxima que o Bolo é capaz de alcançar depende do terreno que tenha de ultrapassar. Podes também utilizar [ataque] para o detonar a qualquer altura. - - - The Flame Thrower is a weapon but it can be used for tunnel digging as well. - Tips - Embora o Lança-chamas seja uma arma, pode também ser usado para escavar túneis. - - - Want to know who's behind the game? Click on the Hedgewars logo in the main menu to see the credits. - Tips - Gostavas de saber quem está por traz deste jogo? Clica no logótipo do Hedgewars no menu inicial para aceder aos créditos. - - - Like Hedgewars? Become a fan on %1 or follow us on %2! - Tips - Gostas do Hedgewars? Torna-te fã no %1 ou segue-nos pelo %2! - - - Feel free to draw your own graves, hats, flags or even maps and themes! But note that you'll have to share them somewhere to use them online. - Tips - Está à vontade para desenhar as tuas próprias sepulturas, chapéus, bandeiras ou mesmo mapas e temas! Tem em nota que vai ser necessário partilha-los algures para que os consigas usar online. - - - Really want to wear a specific hat? Donate to us and receive an exclusive hat of your choice! - Tips - Gostavas poder usar um chapéu em particular que ainda não existe? Faz uma pequena doação para este projecto e recebe um chapéu exclusivo à tua escolha! - - - Keep your video card drivers up to date to avoid issues playing the game. - Tips - Mantém os drivers da placa gráfica actualizados de forma a evitar problemas com o jogo. - - - You can find your Hedgewars configuration files under "My Documents\Hedgewars". Create backups or take the files with you, but don't edit them by hand. - Tips - Podes encontrar os ficheiros de configuração do Hedgewars em "Documentos\Hedgewars". Cria cópias de segurança ou leva os ficheiros contigo, apenas não os edites. - - - You're able to associate Hedgewars related files (savegames and demo recordings) with the game to launch them right from your favorite file or internet browser. - Tips - É possivel associar os ficheiros relacionados com o Hedgewars (partidas e demonstrações) directamente com o jogo para que seja possivel lançalos directamente do teu explorador de ficheiros ou internet favorito. - - - Want to save ropes? Release the rope in mid air and then shoot again. As long as you don't touch the ground you'll reuse your rope without wasting ammo! - Tips - Gostavas de poupar algumas cordas? Solta a corda enquanto no ar e dispara-a novamente. Desde que não toques no solo podes reutilizar a usar a mesma corda quantas vezes quiseres! - - - You can find your Hedgewars configuration files under "Library/Application Support/Hedgewars" in your home directory. Create backups or take the files with you, but don't edit them by hand. - Tips - Podes encontrar os ficheiros de configuração do Hedgewars em "Library/Application Support/Hedgewars" dentro da tua "Pasta Pessoal". Cria cópias de segurança ou leva os ficheiros contigo, mas não os edites manualmente. - - - You can find your Hedgewars configuration files under ".hedgewars" in your home directory. Create backups or take the files with you, but don't edit them by hand. - Tips - Podes encontrar os ficheiros de configuração do Hedgewars em ".hedgewars" dentro da tua "Pasta Pessoal". Cria cópias de segurança ou leva os ficheiros contigo, mas não os edites manualmente. - - - The Windows version of Hedgewars supports Xfire. Make sure to add Hedgewars to its game list so your friends can see you playing. - Tips - A versão do Hedgewars para Windows suporta Xfire. Não te esqueças de adicionar o Hedgewars à tua lista de jogos para que os teus amigos te possam ver a jogar. - - - Use the Molotov or Flame Thrower to temporary keep hedgehogs from passing terrain such as tunnels or platforms. - Tips - Utiliza um Molotov ou o Lança-chamas para temporariamente impedir outros ouriços de passar por áreas no terreno como túneis ou plataformas. - - - The Homing Bee can be tricky to use. Its turn radius depends on its velocity, so try to not use full power. - Tips - A Abelha Teleguiada pode-se demonstrar complicada de utilizar. O grau a que consegue virar depende da sua velocidade, por isso experimenta lança-la com diferentes níveis de força. - - Downloadable Content Conteúdo Transferível (DLC) - Local Game - Jogo Local - - Play a game on a single computer Joga num único computador - Network Game - Jogo em Rede - - Play a game across a network Joga Hedgewars através da rede @@ -837,6 +857,14 @@ Edit game preferences Editar as preferencias de jogo + + Play a game across a local area network + + + + Play a game on an official server + + PageMultiplayer @@ -844,6 +872,10 @@ Start Iniciar + + Edit game preferences + Editar as preferencias de jogo + PageNetGame @@ -852,31 +884,12 @@ Controlo - DLC - DLC - - - Downloadable Content - Conteúdo Transferível - - - - PageNetType - - LAN game - Jogo em LAN - - - Official server - Servidor oficial - - - Join hundreds of players online! - Junta-te a centenas de jogadores online! - - - Join or host your own game server in a Local Area Network. - Cria ou junta-te a jogo numa Rede Local + Edit game preferences + Editar as preferencias de jogo + + + Start + Iniciar @@ -922,10 +935,6 @@ Apagar esquema de armas - General - Geral - - Advanced Avançado @@ -965,6 +974,94 @@ System proxy settings Configuração proxy do sistema + + Select an action to change what key controls it + + + + Reset to default + + + + Reset all binds + + + + Game + + + + Graphics + + + + Audio + + + + Controls + + + + Video Recording + + + + Network + + + + Teams + Equipas + + + Schemes + + + + Weapons + + + + Frontend + + + + Custom colors + Cores personalizadas + + + Game audio + + + + Frontend audio + + + + Account + + + + Proxy settings + Definições do Proxy + + + Miscellaneous + Outras opções + + + Updates + + + + Check for updates + + + + Video recording options + Opções de criação de vídeo + PagePlayDemo @@ -997,11 +1094,11 @@ Rules: - Regras + Regras: Weapons: - Armas: + Armamento: Search: @@ -1164,18 +1261,10 @@ PageSinglePlayer - Simple Game - Jogo Simples - - Play a quick game against the computer with random settings Joga um jogo rápido contra o computador com configurações aleatórias - Multiplayer - Multi-jogador - - Play a hotseat game against your friends, or AI teams Joga alternadamente contra os teus amigos, ou o computador @@ -1184,26 +1273,14 @@ Modo Campanha - Training Mode - Modo Treino - - Practice your skills in a range of training missions Pratica as tuas habilidades numa variedade de missões de treino - Demos - Demos - - Watch recorded demos Assistir aos demos guardados - Load - Carregar - - Load a previously saved game Carrega um jogo gravado anteriormente @@ -1249,14 +1326,6 @@ (em progresso...) - Date: - Data: - - - Size: - Tamanho: - - encoding a converter @@ -1264,6 +1333,16 @@ uploading a enviar + + Date: %1 + + + + + Size: %1 + + + QAction @@ -1276,10 +1355,6 @@ Informação - Start - Iniciar - - Restrict Joins Restringir entradas @@ -1327,18 +1402,6 @@ Ecrã completo - Frontend fullscreen - Menu em ecrã completo - - - Enable sound - Activar som - - - Enable music - Activar música - - Show FPS Mostrar FPS @@ -1355,18 +1418,6 @@ Mostrar a ajuda no menu das armas - Enable frontend sounds - Activar os sons no frontend - - - Enable frontend music - Activar a musica no frontend - - - Frontend effects - Efeitos no frontend - - Save password Guardar Palavra-passe @@ -1386,14 +1437,38 @@ Use game resolution Utilizar a resolução do jogo + + Visual effects + + + + Sound + + + + In-game sound effects + + + + Music + + + + In-game music + + + + Frontend sound effects + + + + Frontend music + + QComboBox - generated map... - mapa gerado... - - Human Humano @@ -1406,14 +1481,6 @@ (Definições por omissão) - Mission - Missão - - - generated maze... - labirinto gerado... - - Community Comunidade @@ -1430,10 +1497,6 @@ Em progresso - hand drawn map... - mapa desenhado à mão... - - Disabled Desactivado @@ -1470,10 +1533,6 @@ Cima-baixo - Wiggle - "Wiggle" - - Red/Cyan grayscale Vermelho/Ciano (tons de cinza) @@ -1509,18 +1568,6 @@ Forte - Key binds - Associação de teclas - - - Teams - Equipas - - - Audio/Graphic options - Opções de Áudio/Gráficos - - Net game Jogo em rede @@ -1541,26 +1588,6 @@ Configurações de Equipa - Misc - Diversos - - - Schemes and Weapons - Esquemas e Armamento - - - Custom colors - Cores personalizadas - - - Miscellaneous - Outras opções - - - Video recording options - Opções de criação de vídeo - - Videos Vídeos @@ -1568,10 +1595,6 @@ Description Descrição - - Proxy settings - Definições do Proxy - QLabel @@ -1588,26 +1611,6 @@ Versão - Developers: - Programadores: - - - Art: - Arte: - - - Sounds: - Som: - - - Translations: - Tradutores: - - - Special thanks: - Agradecimentos especiais: - - Weapons Armas @@ -1664,10 +1667,6 @@ Queda de Caixas - Game scheme - Esquema de jogo - - % Dud Mines % Minas Falsas @@ -1704,10 +1703,6 @@ Dica: - This development build is 'work in progress' and may not be compatible with other versions of the game. Some features might be broken or incomplete. Use at your own risk! - This development build is 'work in progress' and may not be compatible with other versions of the game. Some features might be broken or incomplete. Use at your own risk! - - Quality Qualidade @@ -1777,15 +1772,11 @@ Video description: - Descrição do vídeo + Descrição do vídeo: Tags (comma separated): - Tags\Etiquetas (separados por virgula) - - - Summary - Sumário + Tags\Etiquetas (separados por virgula): Description @@ -1815,6 +1806,38 @@ Bitrate (Kbps) Bitrate (Kbps) + + This development build is 'work in progress' and may not be compatible with other versions of the game, while some features might be broken or incomplete! + + + + Fullscreen + Ecrã completo + + + Fullscreen Resolution + + + + Windowed Resolution + + + + Your Email + + + + Summary + + + + Send system information + + + + Type the security code: + + QLineEdit @@ -1842,7 +1865,7 @@ QMessageBox Connection to server is lost - Conexão com o servidor perdida + Ligação com o servidor perdida Error @@ -1853,10 +1876,6 @@ Não foi possivel associar os ficheiros. - Please fill out all fields - Por favor preencha todos os campos - - Error while authenticating at google.com: Erro ao autenticar em google.com: @@ -1905,24 +1924,12 @@ Todos os ficheiros foram corretamente associados - Successfully posted the issue on hedgewars.googlecode.com - Problema publicado com sucesso em hedgewars.googlecode.com - - - Error during authentication at google.com - Ocorreu um erro durante a autenticação em google.com - - - Error reporting the issue, please try again later (or visit hedgewars.googlecode.com directly) - Erro ao reportar o problema, por favor tenta novamente mais tarde (ou visita hedgewars.googlecode.com diretamente) - - Main - Error Main - Erro Cannot create directory %1 - Não foi possível criar o directório %1 + Não foi possível criar o diretório %1 Failed to open data directory: @@ -2067,16 +2074,37 @@ Do you really want to delete the weapon set '%1'? Desejas mesmo apagar o esquema de armas '%1'? - - - QObject - - Nickname - Nome de utilizador - - - Please enter your nickname - Por favor insira o seu nome de utilizador + + Hedgewars - Nick not registered + + + + System Information Preview + + + + Failed to generate captcha + + + + Failed to download captcha + + + + Please fill out all fields. Email is optional. + + + + Hedgewars - Warning + + + + Hedgewars - Information + + + + Hedgewars + @@ -2134,26 +2162,10 @@ Carregar - Setup - Configurar - - - Ready - Preparado - - - Random Team - Equipa aleatória - - Associate file extensions Associar com as extensões dos ficheiros - more - mais - - More info Mais informação @@ -2163,7 +2175,7 @@ Open videos directory - Abrir o directório dos vídeos + Abrir o diretório de vídeos Play @@ -2179,23 +2191,23 @@ Restore default coding parameters - + Restaurar os parametros de conversão por omisão Open the video directory in your system - + Abrir o diretório de vídeos do teu sistema Play this video - + Reproduzir este vídeo Delete this video - + Apagar este vídeo Upload this video to your Youtube account - + Enviar este vídeo para a tua conta do Youtube @@ -2246,6 +2258,25 @@ + SeedPrompt + + The map seed is the basis for all random values generated by the game. + + + + Cancel + Cancelar + + + Set seed + + + + Close + + + + SelWeaponWidget Weapon set @@ -2273,106 +2304,21 @@ - ToggleButtonWidget - - Vampirism - Vampirismo - - - Karma - Karma - - - Artillery - Artilharia - - - Fort Mode - Modo Forte - - - Divide Teams - Separar Equipas - - - Solid Land - Terreno Sólido - - - Add Border - Adicionar Limites - - - Low Gravity - Baixa Gravidade - - - Laser Sight - Mira Laser - - - Invulnerable - Invulnerabilidade - - - Random Order - Ordem Aleatória - - - King - Rei - - - Place Hedgehogs - Posicionar Ouriços - - - Clan Shares Ammo - Clãs Partilham Armamento - - - Disable Girders - Desactivar Vigas - - - Disable Land Objects - Desactivar Objectos no Terreno - - - AI Survival Mode - Modo de Sobrevivência - - - Reset Health - Restaurar Vida - - - Unlimited Attacks - Ataques Ilimitados - - - Reset Weapons - Restaurar o Armamento - - - Per Hedgehog Ammo - Armamento Por Ouriço - - - Disable Wind - Desactivar Vento - - - More Wind - Mais Vento - - - Tag Team - Tag Team - - - Add Bottom Border - Adicionar limite inferior + TeamShowWidget + + %1's team + + + + + ThemePrompt + + Select a theme for this map + + + + Cancel + Cancelar @@ -2506,12 +2452,6 @@ capturar - hedgehogs -info - informação dos -ouriços - - quit sair @@ -2547,33 +2487,33 @@ record gravar + + hedgehog info + + binds (categories) - Basic controls - Controlos basicos - - - Weapon controls - Controlos de armas - - - Camera and cursor controls - Controlos de camara e cursor - - - Other - Outros + Movement + + + + Weapons + + + + Camera + + + + Miscellaneous + Outras opções binds (descriptions) - Move your hogs and aim: - Movimentar os teus ouriços e apontar: - - Traverse gaps and obstacles by jumping: Ultrapassar fendas e obstaculos saltando: @@ -2637,6 +2577,10 @@ Record video: Gravar vídeo: + + Hedgehog movement + + binds (keys) diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Locale/hedgewars_ro.ts --- a/share/hedgewars/Data/Locale/hedgewars_ro.ts Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Locale/hedgewars_ro.ts Fri Feb 22 05:05:32 2013 +0100 @@ -20,6 +20,79 @@ + BanDialog + + IP + IP + + + Nick + + + + IP/Nick + + + + Reason + + + + Duration + + + + Ok + + + + Cancel + Cancel + + + you know why + + + + Warning + + + + Please, specify %1 + + + + nickname + + + + permanent + + + + + DataManager + + Use Default + + + + + FeedbackDialog + + View + + + + Cancel + Cancel + + + Send Feedback + + + + FreqSpinBox Never @@ -41,25 +114,40 @@ Edit weapons - Error - Error - - - Illegal ammo scheme - Illegal ammo scheme - - Edit schemes Edit schemes - When this option is enabled selecting a game scheme will auto-select a weapon - - - Game Options + + Game scheme will auto-select a weapon + + + + + HWApplication + + %1 minutes + + + + %1 hour + + + + %1 hours + + + + %1 day + + + + %1 days + + HWAskQuitDialog @@ -71,22 +159,6 @@ HWChatWidget - %1 *** %2 has been removed from your ignore list - %1 *** %2 has been removed from your ignore list - - - %1 *** %2 has been added to your ignore list - %1 *** %2 has been added to your ignore list - - - %1 *** %2 has been removed from your friends list - %1 *** %2 has been removed from your friends list - - - %1 *** %2 has been added to your friends list - %1 *** %2 has been added to your friends list - - %1 has been removed from your ignore list @@ -126,38 +198,14 @@ Failed to save StyleSheet to %1 - - %1 is not a valid command! - - HWForm - new - new - - - Error - Error - - - OK - OK - - - Unable to start the server - Unable to start the server - - Cannot save record to file %1 Cannot save record to file %1 - Please select record from the list above - Please select record from the list above - - DefaultTeam Default Team @@ -184,24 +232,6 @@ - Password - Password - - - Your nickname %1 is -registered on Hedgewars.org -Please provide your password below -or pick another nickname in game config: - Your nickname %1 is -registered on Hedgewars.org -Please provide your password below -or pick another nickname in game config: - - - No password supplied. - - - Nickname Nickname @@ -214,6 +244,59 @@ Please pick another nickname: + + %1's Team + + + + Hedgewars - Nick registered + + + + This nick is registered, and you haven't specified a password. + +If this nick isn't yours, please register your own nick at www.hedgewars.org + +Password: + + + + Your nickname is not registered. +To prevent someone else from using it, +please register it at www.hedgewars.org + + + + + +Your password wasn't saved either. + + + + Hedgewars - Empty nickname + + + + Hedgewars - Wrong password + + + + You entered a wrong password. + + + + Try Again + + + + Hedgewars - Connection error + + + + You reconnected too fast. +Please wait a few seconds and try again. + + HWGame @@ -229,18 +312,6 @@ HWMapContainer - Map - Map - - - Themes - Themes - - - Filter - Filter - - All All @@ -265,10 +336,6 @@ Wacky - Type - Type - - Small tunnels @@ -277,27 +344,95 @@ - Large tunnels - - - - Small floating islands - - - - Medium floating islands - - - - Large floating islands - - - Seed - Set + Map type: + + + + Image map + + + + Mission map + + + + Hand-drawn + + + + Randomly generated + + + + Random maze + + + + Random + Random + + + Map preview: + + + + Load map drawing + + + + Edit map drawing + + + + Largetunnels + + + + Small islands + + + + Medium islands + + + + Large islands + + + + Map size: + + + + Maze style: + + + + Mission: + + + + Map: + + + + Theme: + + + + Load drawn map + + + + Drawn Maps + + + + All files @@ -339,20 +474,6 @@ You got kicked - Password - Password - - - Your nickname %1 is -registered on Hedgewars.org -Please provide your password -or pick another nickname: - Your nickname %1 is -registered on Hedgewars.org -Please provide your password -or pick another nickname: - - %1 *** %2 has joined the room %1 *** %2 has joined the room @@ -369,20 +490,6 @@ %1 *** %2 has left - Your nickname %1 is -registered on Hedgewars.org -Please provide your password below -or pick another nickname in game config: - Your nickname %1 is -registered on Hedgewars.org -Please provide your password below -or pick another nickname in game config: - - - Nickname - Nickname - - User quit @@ -398,8 +505,8 @@ HWPasswordDialog - Password - Password + Login + @@ -414,6 +521,32 @@ + HatButton + + Change hat (%1) + + + + + HatPrompt + + Select a hat + + + + Filter: + + + + Cancel + Cancel + + + Use selected hat + + + + KB SDL_ttf returned error while rendering text, most propably it is related to the bug in freetype2. It's recommended to update your freetype lib. @@ -421,6 +554,13 @@ + KeyBinder + + Category + + + + LibavInteraction Duration: %1m %2s @@ -439,18 +579,21 @@ Audio: + + unknown + + + + + MapModel + + No description available. + + PageAdmin - Server message: - Server message: - - - Set message - Set message - - Clear Accounts Cache Clear Accounts Cache @@ -478,6 +621,38 @@ Set data + + General + General + + + Bans + + + + IP/Nick + + + + Expiration + + + + Reason + + + + Refresh + Refresh + + + Add + + + + Remove + + PageConnecting @@ -485,10 +660,6 @@ Connecting... Connecting... - - Cancel - Cancel - PageDrawMap @@ -536,33 +707,45 @@ General - Advanced - Advanced + Select an action to choose a custom key bind for this team + + + + Use my default + + + + Reset all binds + + + + Custom Controls + + + + Hat + + + + Name + Name + + + This hedgehog's name + + + + Randomize this hedgehog's name + + + + Random Team + Random Team PageGameStats - <p>The best shot award was won by <b>%1</b> with <b>%2</b> pts.</p> - <p>The best shot award was won by <b>%1</b> with <b>%2</b> pts.</p> - - - <p>The best killer is <b>%1</b> with <b>%2</b> kills in a turn.</p> - - <p>The best killer is <b>%1</b> with <b>%2</b> kill in a turn.</p> - <p>The best killer is <b>%1</b> with <b>%2</b> kills in a turn.</p> - - - - - <p>A total of <b>%1</b> hedgehog(s) were killed during this round.</p> - - <p>A total of <b>%1</b> hedgehog was killed during this round.</p> - <p>A total of <b>%1</b> hedgehogs were killed during this round.</p> - - - - Details Details @@ -644,275 +827,14 @@ PageMain - Local Game (Play a game on a single computer) - Local Game (Play a game on a single computer) - - - Network Game (Play a game across a network) - Network Game (Play a game across a network) - - - Simply pick the same color as a friend to play together as a team. Each of you will still control his or her own hedgehogs but they'll win or lose together. - Tips - - - - Some weapons might do only low damage but they can be a lot more devastating in the right situation. Try to use the Desert Eagle to knock multiple hedgehogs into the water. - Tips - - - - If you're unsure what to do and don't want to waste ammo, skip one round. But don't let too much time pass as there will be Sudden Death! - Tips - - - - If you'd like to keep others from using your preferred nickname on the official server, register an account at http://www.hedgewars.org/. - Tips - - - - You're bored of default gameplay? Try one of the missions - they'll offer different gameplay depending on the one you picked. - Tips - - - - By default the game will always record the last game played as a demo. Select 'Local Game' and pick the 'Demos' button on the lower right corner to play or manage them. - Tips - - - - Hedgewars is Open Source and Freeware we create in our spare time. If you've got problems, ask on our forums but please don't expect 24/7 support! - Tips - - - - Hedgewars is Open Source and Freeware we create in our spare time. If you like it, help us with a small donation or contribute your own work! - Tips - - - - Hedgewars is Open Source and Freeware we create in our spare time. Share it with your family and friends as you like! - Tips - - - - From time to time there will be official tournaments. Upcoming events will be announced at http://www.hedgewars.org/ some days in advance. - Tips - - - - Hedgewars is available in many languages. If the translation in your language seems to be missing or outdated, feel free to contact us! - Tips - - - - Hedgewars can be run on lots of different operating systems including Microsoft Windows, Mac OS X and Linux. - Tips - - - - Always remember you're able to set up your own games in local and network/online play. You're not restricted to the 'Simple Game' option. - Tips - - - - While playing you should give yourself a short break at least once an hour. - Tips - - - - If your graphics card isn't able to provide hardware accelerated OpenGL, try to enable the low quality mode to improve performance. - Tips - - - - We're open to suggestions and constructive feedback. If you don't like something or got a great idea, let us know! - Tips - - - - Especially while playing online be polite and always remember there might be some minors playing with or against you as well! - Tips - - - - Special game modes such as 'Vampirism' or 'Karma' allow you to develop completely new tactics. Try them in a custom game! - Tips - - - - You should never install Hedgewars on computers you don't own (school, university, work, etc.). Please ask the responsible person instead! - Tips - - - - Hedgewars can be perfect for short games during breaks. Just ensure you don't add too many hedgehogs or use an huge map. Reducing time and health might help as well. - Tips - - - - No hedgehogs were harmed in making this game. - Tips - - - - Hedgewars is Open Source and Freeware we create in our spare time. If someone sold you the game, you should try get a refund! - Tips - - - - Connect one or more gamepads before starting the game to be able to assign their controls to your teams. - Tips - - - - Create an account on %1 to keep others from using your most favourite nickname while playing on the official server. - Tips - - - - If your graphics card isn't able to provide hardware accelerated OpenGL, try to update the associated drivers. - Tips - - - - There are three different jumps available. Tap [high jump] twice to do a very high/backwards jump. - Tips - - - - Afraid of falling off a cliff? Hold down [precise] to turn [left] or [right] without actually moving. - Tips - - - - Some weapons require special strategies or just lots of training, so don't give up on a particular tool if you miss an enemy once. - Tips - - - - Most weapons won't work once they touch the water. The Homing Bee as well as the Cake are exceptions to this. - Tips - - - - The Old Limbuger only causes a small explosion. However the wind affected smelly cloud can poison lots of hogs at once. - Tips - - - - The Piano Strike is the most damaging air strike. You'll lose the hedgehog performing it, so there's a huge downside as well. - Tips - - - - Sticky Mines are a perfect tool to create small chain reactions knocking enemy hedgehogs into dire situations ... or water. - Tips - - - - The Hammer is most effective when used on bridges or girders. Hit hogs will just break through the ground. - Tips - - - - If you're stuck behind an enemy hedgehog, use the Hammer to free yourself without getting damaged by an explosion. - Tips - - - - The Cake's maximum walking distance depends on the ground it has to pass. Use [attack] to detonate it early. - Tips - - - - The Flame Thrower is a weapon but it can be used for tunnel digging as well. - Tips - - - - Want to know who's behind the game? Click on the Hedgewars logo in the main menu to see the credits. - Tips - - - - Like Hedgewars? Become a fan on %1 or follow us on %2! - Tips - - - - Feel free to draw your own graves, hats, flags or even maps and themes! But note that you'll have to share them somewhere to use them online. - Tips - - - - Really want to wear a specific hat? Donate to us and receive an exclusive hat of your choice! - Tips - - - - Keep your video card drivers up to date to avoid issues playing the game. - Tips - - - - You can find your Hedgewars configuration files under "My Documents\Hedgewars". Create backups or take the files with you, but don't edit them by hand. - Tips - - - - You're able to associate Hedgewars related files (savegames and demo recordings) with the game to launch them right from your favorite file or internet browser. - Tips - - - - Want to save ropes? Release the rope in mid air and then shoot again. As long as you don't touch the ground you'll reuse your rope without wasting ammo! - Tips - - - - You can find your Hedgewars configuration files under "Library/Application Support/Hedgewars" in your home directory. Create backups or take the files with you, but don't edit them by hand. - Tips - - - - You can find your Hedgewars configuration files under ".hedgewars" in your home directory. Create backups or take the files with you, but don't edit them by hand. - Tips - - - - The Windows version of Hedgewars supports Xfire. Make sure to add Hedgewars to its game list so your friends can see you playing. - Tips - - - - Use the Molotov or Flame Thrower to temporary keep hedgehogs from passing terrain such as tunnels or platforms. - Tips - - - - The Homing Bee can be tricky to use. Its turn radius depends on its velocity, so try to not use full power. - Tips - - - Downloadable Content - Local Game - - - Play a game on a single computer - Network Game - - - Play a game across a network @@ -940,6 +862,14 @@ Edit game preferences + + Play a game across a local area network + + + + Play a game on an official server + + PageMultiplayer @@ -947,16 +877,9 @@ Start Start - - - PageNet - - Error - Error - - - Please select server from the list above - Please select server from the list above + + Edit game preferences + @@ -966,35 +889,12 @@ Control - Error - Error - - - Please enter room name - Please enter room name - - - OK - OK - - - - PageNetType - - LAN game - LAN game - - - Official server - Official server - - - Join or host your own game server in a Local Area Network. - - - - Join hundreds of players online! - + Edit game preferences + + + + Start + Start @@ -1012,18 +912,6 @@ Delete team - New weapon scheme - New weapon scheme - - - Edit weapon scheme - Edit weapon scheme - - - Delete weapon scheme - Delete weapon scheme - - You can't edit teams from team selection. Go back to main menu to add, edit or delete teams. You can't edit teams from team selection. Go back to main menu to add, edit or delete teams. @@ -1052,10 +940,6 @@ - General - General - - Advanced Advanced @@ -1095,18 +979,98 @@ HTTP proxy + + Select an action to change what key controls it + + + + Reset to default + + + + Reset all binds + + + + Game + + + + Graphics + + + + Audio + + + + Controls + + + + Video Recording + + + + Network + Network + + + Teams + Teams + + + Schemes + + + + Weapons + Weapons + + + Frontend + + + + Custom colors + + + + Game audio + + + + Frontend audio + + + + Account + + + + Proxy settings + + + + Miscellaneous + + + + Updates + + + + Check for updates + + + + Video recording options + + PagePlayDemo - Error - Error - - - OK - OK - - Rename dialog Rename dialog @@ -1114,18 +1078,6 @@ Enter new file name: Enter new file name: - - Cannot rename to - Cannot rename to - - - Cannot delete file - Cannot delete file - - - Please select record from the list - Please select record from the list - PageRoomsList @@ -1138,18 +1090,6 @@ Join - Refresh - Refresh - - - Error - Error - - - OK - OK - - Admin features Administration @@ -1158,62 +1098,6 @@ Room Name: - This game is in lobby. -You may join and start playing once the game starts. - This game is in lobby. -You may join and start playing once the game starts. - - - This game is in progress. -You may join and spectate now but you'll have to wait for the game to end to start playing. - This game is in progress. -You may join and spectate now but you'll have to wait for the game to end to start playing. - - - %1 is the host. He may adjust settings and start the game. - %1 is the host. He may adjust settings and start the game. - - - Random Map - Random Map - - - Games may be played on precreated or randomized maps. - Games may be played on precreated or randomized maps. - - - The Game Scheme defines general options and preferences like Round Time, Sudden Death or Vampirism. - The Game Scheme defines general options and preferences like Round Time, Sudden Death or Vampirism. - - - The Weapon Scheme defines available weapons and their ammunition count. - The Weapon Scheme defines available weapons and their ammunition count. - - - There are %1 clients connected to this room. - - There is %1 client connected to this room. - There are %1 clients connected to this room. - - - - - There are %1 teams participating in this room. - - There is %1 team participating in this room. - There are %1 teams participating in this room. - - - - - Please enter room name - Please enter room name - - - Please select room from the list - Please select room from the list - - Rules: @@ -1229,12 +1113,6 @@ Clear - - The game you are trying to join has started. -Do you still want to join the room? - The game you are trying to join has started. -Do you still want to join the room? - %1 players online @@ -1259,10 +1137,6 @@ Land can not be destroyed! - Add an indestructable border around the terrain - Add an indestructable border around the terrain - - Lower gravity Lower gravity @@ -1275,10 +1149,6 @@ All hogs have a personal forcefield - Enable random mines - Enable random mines - - Gain 80% of the damage you do back in health Gain 80% of the damage you do back in health @@ -1397,38 +1267,10 @@ PageSinglePlayer - Simple Game (a quick game against the computer, settings are chosen for you) - Simple Game (a quick game against the computer, settings are chosen for you) - - - Multiplayer (play a hotseat game against your friends, or AI teams) - Multiplayer (play a hotseat game against your friends, or AI teams) - - - Training Mode (Practice your skills in a range of training missions) - Training Mode (Practice your skills in a range of training missions) - - - Demos (Watch recorded demos) - Demos (Watch recorded demos) - - - Load (Load a previously saved game) - Load (Load a previously saved game) - - - Simple Game - - - Play a quick game against the computer with random settings - Multiplayer - - - Play a hotseat game against your friends, or AI teams @@ -1437,26 +1279,14 @@ - Training Mode - - - Practice your skills in a range of training missions - Demos - - - Watch recorded demos - Load - Load - - Load a previously saved game @@ -1503,14 +1333,6 @@ - Date: - - - - Size: - - - encoding @@ -1518,6 +1340,16 @@ uploading + + Date: %1 + + + + + Size: %1 + + + QAction @@ -1530,10 +1362,6 @@ Info - Start - Start - - Restrict Joins Restrict Joins @@ -1581,18 +1409,6 @@ Fullscreen - Frontend fullscreen - Frontend fullscreen - - - Enable sound - Enable sound - - - Enable music - Enable music - - Show FPS Show FPS @@ -1605,26 +1421,10 @@ Append date and time to record file name - Reduced quality - Reduced quality - - Show ammo menu tooltips Show ammo menu tooltips - Enable frontend sounds - Enable frontend sounds - - - Enable frontend music - Enable frontend music - - - Frontend effects - Frontend effects - - Save password @@ -1644,14 +1444,38 @@ Use game resolution + + Visual effects + + + + Sound + + + + In-game sound effects + + + + Music + + + + In-game music + + + + Frontend sound effects + + + + Frontend music + + QComboBox - generated map... - generated map... - - Human Human @@ -1664,14 +1488,6 @@ (System default) - Mission - Mission - - - generated maze... - - - Community @@ -1688,14 +1504,6 @@ - Default - Default - - - hand drawn map... - - - Disabled @@ -1732,10 +1540,6 @@ - Wiggle - - - Red/Cyan grayscale @@ -1771,22 +1575,6 @@ Fort - Key binds - Key binds - - - Teams - Teams - - - Weapons - Weapons - - - Audio/Graphic options - Audio/Graphic options - - Net game Net game @@ -1807,30 +1595,6 @@ Team Settings - Misc - Misc - - - Schemes and Weapons - - - - Custom colors - - - - Miscellaneous - - - - Proxy settings - - - - Video recording options - - - Videos @@ -1854,30 +1618,6 @@ Version - This program is distributed under the GNU General Public License - This program is distributed under the GNU General Public License - - - Developers: - Developers: - - - Art: - Art: - - - Sounds: - Sounds: - - - Translations: - Translations: - - - Special thanks: - Special thanks: - - Weapons Weapons @@ -1890,10 +1630,6 @@ Port: - Net nick - Net nick - - Resolution Resolution @@ -1938,10 +1674,6 @@ Crate Drops - Game scheme - Game scheme - - % Dud Mines % Dud Mines @@ -1970,10 +1702,6 @@ Locale - Restart game to apply - Restart game to apply - - Explosives Explosives @@ -1982,10 +1710,6 @@ - This development build is 'work in progress' and may not be compatible with other versions of the game. Some features might be broken or incomplete. Use at your own risk! - - - Quality @@ -2022,10 +1746,6 @@ - Password - Password - - % Get Away Time @@ -2064,10 +1784,6 @@ - Summary - - - Description @@ -2095,6 +1811,38 @@ Bitrate (Kbps) + + This development build is 'work in progress' and may not be compatible with other versions of the game, while some features might be broken or incomplete! + + + + Fullscreen + Fullscreen + + + Fullscreen Resolution + + + + Windowed Resolution + + + + Your Email + + + + Summary + + + + Send system information + + + + Type the security code: + + QLineEdit @@ -2121,10 +1869,6 @@ QMessageBox - Network - Network - - Connection to server is lost Connection to server is lost @@ -2133,38 +1877,10 @@ Error - Failed to open data directory: -%1 -Please check your installation - Failed to open data directory: - %1 -Please check your installation - - - Weapons - Weapons - - - Can not edit default weapon set - Can not edit default weapon set - - - Can not delete default weapon set - Can not delete default weapon set - - - Really delete this weapon set? - Really delete this weapon set? - - File association failed. - Teams - Teams - - Teams - Are you sure? @@ -2197,22 +1913,6 @@ - Please fill out all fields - - - - Successfully posted the issue on hedgewars.googlecode.com - - - - Error during authentication at google.com - - - - Error reporting the issue, please try again later (or visit hedgewars.googlecode.com directly) - - - Main - Error @@ -2375,28 +2075,37 @@ Do you really want to delete the weapon set '%1'? - - - QObject - - Error - Error - - - Cannot create directory %1 - Cannot create directory %1 - - - OK - OK - - - Nickname - Nickname - - - Please enter your nickname - Please enter your nickname + + Hedgewars - Nick not registered + + + + System Information Preview + + + + Failed to generate captcha + + + + Failed to download captcha + + + + Please fill out all fields. Email is optional. + + + + Hedgewars - Warning + + + + Hedgewars - Information + + + + Hedgewars + @@ -2454,26 +2163,10 @@ Load - Setup - Setup - - - Ready - Ready - - - Random Team - Random Team - - Associate file extensions Associate file extensions - more - - - More info @@ -2519,37 +2212,6 @@ - QTableWidget - - Room Name - Room Name - - - C - C - - - T - T - - - Owner - Owner - - - Map - Map - - - Rules - Rules - - - Weapons - Weapons - - - RoomsListModel In progress @@ -2597,6 +2259,25 @@ + SeedPrompt + + The map seed is the basis for all random values generated by the game. + + + + Cancel + Cancel + + + Set seed + + + + Close + + + + SelWeaponWidget Weapon set @@ -2624,125 +2305,21 @@ - TCPBase - - Error - Error - - - Unable to start the server: %1. - Unable to start the server: %1. - - - Unable to run engine: %1 ( - Unable to run engine: %1 ( + TeamShowWidget + + %1's team + - ToggleButtonWidget - - Vampirism - Vampirism - - - Karma - Karma - - - Artillery - Artillery - - - Fort Mode - Fort Mode - - - Divide Teams - Divide Teams - - - Solid Land - Solid Land - - - Add Border - Add Border - - - Low Gravity - Low Gravity - - - Laser Sight - Laser Sight - - - Invulnerable - Invulnerable - - - Add Mines - Add Mines - - - Random Order - Random Order - - - King - King - - - Place Hedgehogs - Place Hedgehogs - - - Clan Shares Ammo - Clan Shares Ammo - - - Disable Girders - Disable Girders - - - Disable Land Objects - - - - AI Survival Mode - - - - Reset Health - - - - Unlimited Attacks - - - - Reset Weapons - - - - Per Hedgehog Ammo - - - - Disable Wind - - - - More Wind - - - - Tag Team - - - - Add Bottom Border - + ThemePrompt + + Select a theme for this map + + + + Cancel + Cancel @@ -2876,12 +2453,6 @@ capture - hedgehogs -info - hedgehogs -info - - quit quit @@ -2917,33 +2488,33 @@ record + + hedgehog info + + binds (categories) - Basic controls - Basic controls - - - Weapon controls - Weapon controls - - - Camera and cursor controls - Camera and cursor controls - - - Other - Other + Movement + + + + Weapons + Weapons + + + Camera + + + + Miscellaneous + binds (descriptions) - Move your hogs and aim: - Move your hogs and aim: - - Traverse gaps and obstacles by jumping: Traverse gaps and obstacles by jumping: @@ -3007,6 +2578,10 @@ Record video: + + Hedgehog movement + + binds (keys) diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Locale/hedgewars_ru.ts --- a/share/hedgewars/Data/Locale/hedgewars_ru.ts Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Locale/hedgewars_ru.ts Fri Feb 22 05:05:32 2013 +0100 @@ -20,6 +20,79 @@ + BanDialog + + IP + IP + + + Nick + + + + IP/Nick + + + + Reason + + + + Duration + + + + Ok + + + + Cancel + Отмена + + + you know why + + + + Warning + + + + Please, specify %1 + + + + nickname + + + + permanent + + + + + DataManager + + Use Default + + + + + FeedbackDialog + + View + + + + Cancel + Отмена + + + Send Feedback + + + + FreqSpinBox Never @@ -45,13 +118,36 @@ Редактировать схемы - When this option is enabled selecting a game scheme will auto-select a weapon - При включении этой опции выбор настроек игры автоматически выберет схему оружия - - Game Options Настройки игры + + Game scheme will auto-select a weapon + + + + + HWApplication + + %1 minutes + + + + %1 hour + + + + %1 hours + + + + %1 day + + + + %1 days + + HWAskQuitDialog @@ -102,10 +198,6 @@ Failed to save StyleSheet to %1 Ошибка при сохранении стиля в %1 - - %1 is not a valid command! - %1 не является корректной командой - HWForm @@ -140,20 +232,6 @@ Игра прекращена - Your nickname %1 is -registered on Hedgewars.org -Please provide your password below -or pick another nickname in game config: - Ваше имя пользователя %1 -зарегистрировано на сайте hedgewars.org -Пожалуйста, укажите ваш пароль в поле ввода внизу -или выберите иное имя пользователя в настройках игры: - - - No password supplied. - Пароль не указан. - - Nickname Псевдоним @@ -167,6 +245,59 @@ Кто-то уже использует ваш псевдоним %1 на сервере. Пожалуйста, выберите другой псевдоним: + + %1's Team + + + + Hedgewars - Nick registered + + + + This nick is registered, and you haven't specified a password. + +If this nick isn't yours, please register your own nick at www.hedgewars.org + +Password: + + + + Your nickname is not registered. +To prevent someone else from using it, +please register it at www.hedgewars.org + + + + + +Your password wasn't saved either. + + + + Hedgewars - Empty nickname + + + + Hedgewars - Wrong password + + + + You entered a wrong password. + + + + Try Again + + + + Hedgewars - Connection error + + + + You reconnected too fast. +Please wait a few seconds and try again. + + HWGame @@ -182,18 +313,6 @@ HWMapContainer - Map - Карта - - - Themes - Темы - - - Filter - Фильтр - - All Все @@ -218,10 +337,6 @@ Необычные - Type - Тип - - Small tunnels Маленькие туннели @@ -230,28 +345,96 @@ Средние туннели - Large tunnels - Большие туннели - - - Small floating islands - Маленькие островки - - - Medium floating islands - Средние островки - - - Large floating islands - Большие островки - - Seed Зерно - Set - Установить + Map type: + + + + Image map + + + + Mission map + + + + Hand-drawn + Рисованная карта + + + Randomly generated + + + + Random maze + + + + Random + Случайно + + + Map preview: + + + + Load map drawing + + + + Edit map drawing + + + + Largetunnels + + + + Small islands + + + + Medium islands + + + + Large islands + + + + Map size: + + + + Maze style: + + + + Mission: + + + + Map: + + + + Theme: + + + + Load drawn map + Загрузить рисованную карту + + + Drawn Maps + Рисованные карты + + + All files + Все файлы @@ -323,8 +506,8 @@ HWPasswordDialog - Password - Пароль + Login + @@ -339,6 +522,32 @@ + HatButton + + Change hat (%1) + + + + + HatPrompt + + Select a hat + + + + Filter: + + + + Cancel + Отмена + + + Use selected hat + + + + KB SDL_ttf returned error while rendering text, most propably it is related to the bug in freetype2. It's recommended to update your freetype lib. @@ -346,6 +555,13 @@ + KeyBinder + + Category + + + + LibavInteraction Duration: %1m %2s @@ -364,25 +580,16 @@ Audio: Аудио: + + unknown + + - LibavIteraction - - Duration: %1m %2s - - Длительность: %1мин %2сек - - - Video: %1x%2, - Видео: %1x%2, - - - %1 fps, - %1 кадров/сек, - - - Audio: - Аудио: + MapModel + + No description available. + @@ -415,6 +622,38 @@ Set data Установить данные + + General + Основные настройки + + + Bans + + + + IP/Nick + + + + Expiration + + + + Reason + + + + Refresh + + + + Add + + + + Remove + + PageConnecting @@ -469,8 +708,40 @@ Основные настройки - Advanced - Дополнительно + Select an action to choose a custom key bind for this team + + + + Use my default + + + + Reset all binds + + + + Custom Controls + + + + Hat + Шляпа + + + Name + Название + + + This hedgehog's name + + + + Randomize this hedgehog's name + + + + Random Team + Случайная команда @@ -557,267 +828,14 @@ PageMain - Simply pick the same color as a friend to play together as a team. Each of you will still control his or her own hedgehogs but they'll win or lose together. - Tips - Выберите тот же цвет команда, что у друга, чтобы играть в союзе. Вы будете управлять своими ежами, но выиграете или проиграете вместе. - - - Some weapons might do only low damage but they can be a lot more devastating in the right situation. Try to use the Desert Eagle to knock multiple hedgehogs into the water. - Tips - Некоторые виды оружия наносят небольшой урон, но могут наносить больший урон в правильной ситуации. Попробуйте использовать пистолет Дезерт Игл, чтобы столкнуть несколько ежей в воду. - - - If you're unsure what to do and don't want to waste ammo, skip one round. But don't let too much time pass as there will be Sudden Death! - Tips - Если вы не уверены в том, что хотите сделать и не хотите тратить снаряды, пропустите ход. Но не теряйте много времени, так как смерть неизбежна! - - - If you'd like to keep others from using your preferred nickname on the official server, register an account at http://www.hedgewars.org/. - Tips - Если вы хотите предотвратить использование вашего псевдонима другими игроками на официальном игровом сервере, зарегистрируйтесь на http://www.hedgewars.org/. - - - You're bored of default gameplay? Try one of the missions - they'll offer different gameplay depending on the one you picked. - Tips - Наскучила обычная игра? Попробуйте миссии, имеющие различные виды сценариев. - - - By default the game will always record the last game played as a demo. Select 'Local Game' and pick the 'Demos' button on the lower right corner to play or manage them. - Tips - По умолчанию игры всегда записывает последнюю игру в виде демки. Выберите "Локальную игру" и нажмите кнопку "Демки" в правом нижнем углу, чтобы проиграть запись. - - - Hedgewars is Open Source and Freeware we create in our spare time. If you've got problems, ask on our forums but please don't expect 24/7 support! - Tips - Hedgewars - это открытое и свободное программное обеспечение, которое мы создаём в наше свободное время. Если у вас возникают вопросы, задавайте их на нашем форуме, но пожалуйста, не ожидайте круглосуточной поддержки! - - - Hedgewars is Open Source and Freeware we create in our spare time. If you like it, help us with a small donation or contribute your own work! - Tips - Hedgewars - это открытое и свободное программное обеспечение, которое мы создаём в наше свободное время. Если вам понравилась игра, помогите нам денежным вознаграждением или вкладом в виде вашей работы! - - - Hedgewars is Open Source and Freeware we create in our spare time. Share it with your family and friends as you like! - Tips - Hedgewars - это открытое и свободное программное обеспечение, которое мы создаём в наше свободное время. Распространяйте его среди друзей и членов семьи! - - - From time to time there will be official tournaments. Upcoming events will be announced at http://www.hedgewars.org/ some days in advance. - Tips - Время от времени проводятся официальные турниры. Предстоящие события анонсируются на http://www.hedgewars.org/ за несколько дней. - - - Hedgewars is available in many languages. If the translation in your language seems to be missing or outdated, feel free to contact us! - Tips - Hedgewars доступен на многих языках. Если перевод на ваш язык отсутствует или устарел, сообщите нам! - - - Hedgewars can be run on lots of different operating systems including Microsoft Windows, Mac OS X and Linux. - Tips - Hedgewars запускается на множестве различных операционных систем, включая Microsoft Windows, Mac OS X и Linux. - - - Always remember you're able to set up your own games in local and network/online play. You're not restricted to the 'Simple Game' option. - Tips - Помните, что у вас есть возможность создать собственную игру локально или по сети. Вы не ограничены кнопкой "Простая игра". - - - While playing you should give yourself a short break at least once an hour. - Tips - Играя, не забывайте делать небольшой перерыв хотя бы раз в час. - - - If your graphics card isn't able to provide hardware accelerated OpenGL, try to enable the low quality mode to improve performance. - Tips - Если ваша видеокарта не поддерживает ускорение OpenGL, попробуйте включить опцию "низкое качество", чтобы улучшить производительность. - - - We're open to suggestions and constructive feedback. If you don't like something or got a great idea, let us know! - Tips - Мы открыты для предложений и конструктивной критики. Если вам что-то не понравилось или у вас появилась отличная идея, сообщите нам! - - - Especially while playing online be polite and always remember there might be some minors playing with or against you as well! - Tips - Играя по сети, будьте особенно вежливы и всегда помните, что с вами или против вас могут играть дети! - - - Special game modes such as 'Vampirism' or 'Karma' allow you to develop completely new tactics. Try them in a custom game! - Tips - Особые настройки игры "Вампиризм" и "Карма" дают возможность выработать совершенно новую тактику. Попробуйте их! - - - You should never install Hedgewars on computers you don't own (school, university, work, etc.). Please ask the responsible person instead! - Tips - Не следует устанавливать Hedgewars на компьютеры, не принадлежащие вам (в школе, на работе, в университете и т.п.). Не забудь спросить разрешения у ответственного лица! - - - Hedgewars can be perfect for short games during breaks. Just ensure you don't add too many hedgehogs or use an huge map. Reducing time and health might help as well. - Tips - Hedgewars может отлично подойти для коротких матчей на перерывах. Просто не добавляйте слишком много ежей и не играйти на больших картах. Также можно уменьшить время или количество начального здоровья. - - - No hedgehogs were harmed in making this game. - Tips - При подготовке игры не пострадал ни один ёж. - - - Hedgewars is Open Source and Freeware we create in our spare time. If someone sold you the game, you should try get a refund! - Tips - Hedgewars - это открытое и свободное программное обеспечение, которое мы создаём в наше свободное время. Если кто-то продал вам игру, потребуйте возврат денег! - - - Connect one or more gamepads before starting the game to be able to assign their controls to your teams. - Tips - Подсоедините один или несколько геймпадов перед запуском игры, и вы сможете настроить их для управления командами. - - - Create an account on %1 to keep others from using your most favourite nickname while playing on the official server. - Tips - Если вы хотите предотвратить использование вашего псевдонима другими игроками на официальном игровом сервере, зарегистрируйтесь на http://www.hedgewars.org/. - - - If your graphics card isn't able to provide hardware accelerated OpenGL, try to update the associated drivers. - Tips - Если ваша видеокарта не поддерживает ускорение OpenGL, попробуйте обновить видеодрайвер. - - - There are three different jumps available. Tap [high jump] twice to do a very high/backwards jump. - Tips - Есть три вида прыжков. Нажмите [прыжок вверх] дважды, чтобы сделать очень высокий прыжок назад. - - - Afraid of falling off a cliff? Hold down [precise] to turn [left] or [right] without actually moving. - Tips - Боитесь упасть с обрыва? Нажмите левый shift, чтобы повернуться влево или вправо, не передвигаясь. - - - Some weapons require special strategies or just lots of training, so don't give up on a particular tool if you miss an enemy once. - Tips - Некоторые виды оружия требуют особых стратегий или просто много тренировок, поэтому не разочаровывайтесь в инструменте, если разок промахнётесь. - - - Most weapons won't work once they touch the water. The Homing Bee as well as the Cake are exceptions to this. - Tips - Большинство видов оружия не сработают при попадании в воду. Пчела и Торт - это исключения. - - - The Old Limbuger only causes a small explosion. However the wind affected smelly cloud can poison lots of hogs at once. - Tips - Старый Лимбургер взрывается несильно. Однако ветер, несущий зловонное облако, может отравить несколько ежей за раз. - - - The Piano Strike is the most damaging air strike. You'll lose the hedgehog performing it, so there's a huge downside as well. - Tips - Фортепьяновый удар - это наиболее мощный из ударов с воздуха. При использовании вы потеряете ежа, в этом его недостаток. - - - Sticky Mines are a perfect tool to create small chain reactions knocking enemy hedgehogs into dire situations ... or water. - Tips - Мины-липучки - отличный инструмент для создания небольших цепных реакций, от которых ёж попадет в неприятную ситуацию... или в воду. - - - The Hammer is most effective when used on bridges or girders. Hit hogs will just break through the ground. - Tips - Молот наиболее эффективен, когда используется на мосту или балке. Ударенный ёж пролетит сквозь землю. - - - If you're stuck behind an enemy hedgehog, use the Hammer to free yourself without getting damaged by an explosion. - Tips - Если вы застряли позади ежа противника, используйте Молот. чтобы освободить себя без риска потери здоровья от взрыва. - - - The Cake's maximum walking distance depends on the ground it has to pass. Use [attack] to detonate it early. - Tips - Дистанция, которую проходит Торт, зависит от поверхности. Используйте клавишу атаки, чтобы сдетонировать его раньше. - - - The Flame Thrower is a weapon but it can be used for tunnel digging as well. - Tips - Огнемёт - это оружие, но он также может быть использован как инструмент для рытья туннелей. - - - Want to know who's behind the game? Click on the Hedgewars logo in the main menu to see the credits. - Tips - Хотите узнать, кто стоит за разработкой игры? Нажмите на логотип Hedgewars в главном меню, чтобы увидеть состав разработчиков. - - - Like Hedgewars? Become a fan on %1 or follow us on %2! - Tips - Нравится Hedgewars? Станьте фанатом на %1 или следите за нами на %2! - - - Feel free to draw your own graves, hats, flags or even maps and themes! But note that you'll have to share them somewhere to use them online. - Tips - Рисуйте свои варианты надгробий, шляп, флагов или даже карт и тем! Но не забудьте передать их соперникам каким-либо образом для игры по сети. - - - Really want to wear a specific hat? Donate to us and receive an exclusive hat of your choice! - Tips - Очень хочется особенную шляпу? Сделайте пожертвование и получите эксклюзивную шляпу на выбор! - - - Keep your video card drivers up to date to avoid issues playing the game. - Tips - Обновляйте видеодрайвера, чтобы не было проблем во время игры. - - - You can find your Hedgewars configuration files under "My Documents\Hedgewars". Create backups or take the files with you, but don't edit them by hand. - Tips - Файлы конфигурации Hedgewars находятся в папке "Мои документы\Hedgewars". Создавайте бэкапы или переносите файлы, но не редактируйте их вручную. - - - You're able to associate Hedgewars related files (savegames and demo recordings) with the game to launch them right from your favorite file or internet browser. - Tips - Можно ассоциировать файлы Hedgewars (сохранения и демки игр) с игрой, чтобы запускать их прямо из вашего любимого файлового менеджера или браузера. - - - Want to save ropes? Release the rope in mid air and then shoot again. As long as you don't touch the ground you'll reuse your rope without wasting ammo! - Tips - Хотите сэкономить верёвки? Отпустите верёвку в воздухе и стреляйте снова. Пока вы не затронете землю, вы можете использовать верёвку сколько угодно, не тратя дополнительных! - - - You can find your Hedgewars configuration files under "Library/Application Support/Hedgewars" in your home directory. Create backups or take the files with you, but don't edit them by hand. - Tips - Файлы конфигурации Hedgewars находятся в папке ""Library/Application Support/Hedgewars". Создавайте бэкапы или переносите файлы, но не редактируйте их вручную. - - - You can find your Hedgewars configuration files under ".hedgewars" in your home directory. Create backups or take the files with you, but don't edit them by hand. - Tips - Файлы конфигурации Hedgewars находятся в папке ".hedgewars". Создавайте бэкапы или переносите файлы, но не редактируйте их вручную. - - - The Windows version of Hedgewars supports Xfire. Make sure to add Hedgewars to its game list so your friends can see you playing. - Tips - Версия Hedgewars под операционную систему Windows поддерживает Xfire. Не забудьте добавить Hedgewars в список игр, чтобы ваши друзья видели, когда вы в игре. - - - Use the Molotov or Flame Thrower to temporary keep hedgehogs from passing terrain such as tunnels or platforms. - Tips - Используйте Коктейль Молотова или Огнемёт, чтобы временно не дать ежам пройти через туннель или по платформе. - - - The Homing Bee can be tricky to use. Its turn radius depends on its velocity, so try to not use full power. - Tips - Пчёлку можеть быть сложно использовать. Её радиус поворота зависит от скорости, поэтому попробуйте не использовать полную силу броска. - - Downloadable Content - Local Game - Локальная игра - - Play a game on a single computer Играть на одном компьютере - Network Game - Сетевая игра - - Play a game across a network Играть по сети @@ -845,6 +863,14 @@ Edit game preferences Редактировать настройки игры + + Play a game across a local area network + + + + Play a game on an official server + + PageMultiplayer @@ -852,6 +878,10 @@ Start Старт + + Edit game preferences + Редактировать настройки игры + PageNetGame @@ -859,24 +889,13 @@ Control Управление - - - PageNetType - - LAN game - Игра в локальной сети - - - Official server - Официальный сервер - - - Join hundreds of players online! - Присоединиться к сотням игроков! - - - Join or host your own game server in a Local Area Network. - Присоединиться или создать собственный сервер в локальной сети. + + Edit game preferences + Редактировать настройки игры + + + Start + Старт @@ -922,10 +941,6 @@ Удалить набор оружия - General - Основные настройки - - Advanced Дополнительно @@ -965,6 +980,94 @@ System proxy settings Системные настройки + + Select an action to change what key controls it + + + + Reset to default + + + + Reset all binds + + + + Game + + + + Graphics + + + + Audio + + + + Controls + + + + Video Recording + + + + Network + + + + Teams + Команды + + + Schemes + + + + Weapons + Оружие + + + Frontend + + + + Custom colors + Свои цвета + + + Game audio + + + + Frontend audio + + + + Account + + + + Proxy settings + Настройки прокси + + + Miscellaneous + Разное + + + Updates + + + + Check for updates + + + + Video recording options + Настройки видео + PagePlayDemo @@ -1165,18 +1268,10 @@ PageSinglePlayer - Simple Game - Простая игра - - Play a quick game against the computer with random settings Играть против компьютера - Multiplayer - Схватка - - Play a hotseat game against your friends, or AI teams Играть с друзьями за одним компьютером или против ботов @@ -1185,26 +1280,14 @@ Кампания - Training Mode - Тренировка - - Practice your skills in a range of training missions Тренировка мастерства в тренировочных миссиях - Demos - Демки - - Watch recorded demos Смотреть записанные демки - Load - Загрузить - - Load a previously saved game Загрузить сохранённую игру @@ -1251,14 +1334,6 @@ (в игре...) - Date: - Дата: - - - Size: - Размер: - - encoding кодирование @@ -1266,6 +1341,16 @@ uploading отправка + + Date: %1 + + + + + Size: %1 + + + QAction @@ -1274,10 +1359,6 @@ Выпнуть - Start - Старт - - Restrict Joins Запретить вход @@ -1325,10 +1406,6 @@ Проверять обновления при запуске - Enable sound - Включить звук - - Fullscreen Полный экран @@ -1341,14 +1418,6 @@ Альтернативный показ урона - Enable music - Включить музыку - - - Frontend fullscreen - Полноэкранный фронтенд - - Append date and time to record file name Указывать дату и время в названиях демок и сейвов @@ -1357,18 +1426,6 @@ Показывать подсказки к оружию - Enable frontend sounds - Включить звуки в меню - - - Enable frontend music - Включить музыку в меню - - - Frontend effects - Эффекты в меню - - Save password Сохранить пароль @@ -1388,14 +1445,38 @@ Use game resolution Использовать разрешение игры + + Visual effects + + + + Sound + + + + In-game sound effects + + + + Music + + + + In-game music + + + + Frontend sound effects + + + + Frontend music + + QComboBox - generated map... - случайная карта... - - Human Человек @@ -1408,14 +1489,6 @@ (Системный по умолчанию) - generated maze... - случайный лабиринт... - - - Mission - Миссия - - Community Сообщество @@ -1432,10 +1505,6 @@ В игре - hand drawn map... - рисованная карта... - - Disabled Отключен @@ -1472,10 +1541,6 @@ - Wiggle - - - Red/Cyan grayscale @@ -1511,18 +1576,6 @@ Форт - Key binds - Привязки клавиш - - - Teams - Команды - - - Audio/Graphic options - Настройки звука и графики - - Playing teams Команды в игре @@ -1543,26 +1596,6 @@ Настройки команды - Misc - Разное - - - Schemes and Weapons - Схемы игры и наборы оружия - - - Custom colors - Свои цвета - - - Miscellaneous - Разное - - - Video recording options - Настройки видео - - Videos Видео @@ -1570,10 +1603,6 @@ Description Описание - - Proxy settings - Настройки прокси - QLabel @@ -1594,22 +1623,6 @@ Ограничение FPS - Developers: - Разработчики: - - - Art: - Графика: - - - Translations: - Переводы: - - - Special thanks: - Особая благодарность: - - Server name: Название сервера: @@ -1634,10 +1647,6 @@ Версия - Sounds: - Звуки: - - Initial sound volume Начальная громкость @@ -1666,10 +1675,6 @@ Бонус выпадает - Game scheme - Настройки игры - - % Dud Mines % невзрывающихся мин @@ -1706,10 +1711,6 @@ Подсказка: - This development build is 'work in progress' and may not be compatible with other versions of the game. Some features might be broken or incomplete. Use at your own risk! - Эта сборка является промежуточным этапом работы, и может быть несовместима с другими версиями игры. Некоторые возможности могут быть сломаны или недоработаны. Используйте на свой риск! - - Quality Качество @@ -1786,10 +1787,6 @@ - Summary - Краткое описание - - Description Описание @@ -1817,6 +1814,38 @@ Bitrate (Kbps) + + This development build is 'work in progress' and may not be compatible with other versions of the game, while some features might be broken or incomplete! + + + + Fullscreen + Полный экран + + + Fullscreen Resolution + + + + Windowed Resolution + + + + Your Email + + + + Summary + + + + Send system information + + + + Type the security code: + + QLineEdit @@ -1855,10 +1884,6 @@ Сопоставление не удалось. - Please fill out all fields - Заполните все поля - - Error while authenticating at google.com: @@ -1905,18 +1930,6 @@ - Successfully posted the issue on hedgewars.googlecode.com - - - - Error during authentication at google.com - - - - Error reporting the issue, please try again later (or visit hedgewars.googlecode.com directly) - - - Main - Error @@ -2065,25 +2078,42 @@ Do you really want to delete the weapon set '%1'? - - - QObject - - Nickname - Псевдоним - - - Please enter your nickname - Пожалуйста введите ваш псевдоним + + Hedgewars - Nick not registered + + + + System Information Preview + + + + Failed to generate captcha + + + + Failed to download captcha + + + + Please fill out all fields. Email is optional. + + + + Hedgewars - Warning + + + + Hedgewars - Information + + + + Hedgewars + QPushButton - Setup - Настройка - - Play demo Играть демку @@ -2136,22 +2166,10 @@ Удалить - Ready - Готов - - - Random Team - Случайная команда - - Associate file extensions Сопоставить расширения файлов - more - ещё - - More info Дополнительная информация @@ -2244,6 +2262,25 @@ + SeedPrompt + + The map seed is the basis for all random values generated by the game. + + + + Cancel + Отмена + + + Set seed + + + + Close + + + + SelWeaponWidget Weapon set @@ -2271,106 +2308,21 @@ - ToggleButtonWidget - - Vampirism - Вампиризм - - - Karma - Карма - - - Artillery - Артиллерия - - - Fort Mode - Режим фортов - - - Divide Teams - Разделить команды - - - Solid Land - Неразрушаемая земля - - - Add Border - Добавить границу - - - Low Gravity - Низкая гравитация - - - Laser Sight - Лазерный прицел - - - Invulnerable - Неуязвимость - - - Random Order - Случайный порядок - - - King - Король - - - Place Hedgehogs - Расставить ежей - - - Clan Shares Ammo - Общее оружие в клане - - - Disable Girders - Убрать балки - - - Disable Land Objects - Отключить дополнительные объекты - - - AI Survival Mode - Режим бессмертия ботов - - - Reset Health - Сброс уровня здоровья - - - Unlimited Attacks - Бесконечные атаки - - - Reset Weapons - Сброс оружия - - - Per Hedgehog Ammo - Индивидуальный набор оружия - - - Disable Wind - Отключить ветер - - - More Wind - Больше ветра - - - Tag Team - Эстафета команд - - - Add Bottom Border - Добавить нижнюю границу + TeamShowWidget + + %1's team + + + + + ThemePrompt + + Select a theme for this map + + + + Cancel + Отмена @@ -2492,12 +2444,6 @@ слот 9 - hedgehogs -info - информация -о ежах - - chat чат @@ -2545,33 +2491,33 @@ record записать + + hedgehog info + + binds (categories) - Basic controls - Основное управление - - - Weapon controls - Управление оружием - - - Camera and cursor controls - Управление камерой и курсором - - - Other - Разное + Movement + + + + Weapons + Оружие + + + Camera + + + + Miscellaneous + Разное binds (descriptions) - Move your hogs and aim: - Передвижение ежа и прицеливание: - - Traverse gaps and obstacles by jumping: Прохождение оврагов и препятствий прыжками: @@ -2635,6 +2581,10 @@ Record video: Запись видео: + + Hedgehog movement + + binds (keys) diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Locale/hedgewars_sk.ts --- a/share/hedgewars/Data/Locale/hedgewars_sk.ts Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Locale/hedgewars_sk.ts Fri Feb 22 05:05:32 2013 +0100 @@ -5,7 +5,7 @@ AbstractPage Go back - + Krok späť @@ -20,6 +20,79 @@ + BanDialog + + IP + IP + + + Nick + + + + IP/Nick + + + + Reason + + + + Duration + + + + Ok + + + + Cancel + Zrušiť + + + you know why + + + + Warning + + + + Please, specify %1 + + + + nickname + + + + permanent + + + + + DataManager + + Use Default + + + + + FeedbackDialog + + View + + + + Cancel + Zrušiť + + + Send Feedback + + + + FreqSpinBox Never @@ -45,19 +118,42 @@ Upraviť schémy - When this option is enabled selecting a game scheme will auto-select a weapon - Keď je vybraná táto voľba výberom hernej schémy vyberiete automaticky aj zbraň - - Game Options Voľby hry + + Game scheme will auto-select a weapon + + + + + HWApplication + + %1 minutes + + + + %1 hour + + + + %1 hours + + + + %1 day + + + + %1 days + + HWAskQuitDialog Do you really want to quit? - + Naozaj chcete odísť? @@ -102,10 +198,6 @@ Failed to save StyleSheet to %1 Nepodarilo sa uložiť súbor so štýlom do %1 - - %1 is not a valid command! - %1 nie je platným príkazom! - HWForm @@ -140,22 +232,6 @@ Hra zrušená - Your nickname %1 is -registered on Hedgewars.org -Please provide your password below -or pick another nickname in game config: - Prezývka %1, ktorú ste -si vybrali je registrovaná na -Hedgewars.org. -Prosím, napíšte heslo do poľa -nižšie alebo si zvoľte inú prezývku -v nastaveniach hry: - - - No password supplied. - Nebolo zadané žiadne heslo. - - Nickname Prezývka @@ -166,6 +242,59 @@ Someone already uses your nickname %1 on the server. Please pick another nickname: + Prezývku %1 už niekto na serveri používa. Prosím, zvoľte si inú prezývku: + + + %1's Team + + + + Hedgewars - Nick registered + + + + This nick is registered, and you haven't specified a password. + +If this nick isn't yours, please register your own nick at www.hedgewars.org + +Password: + + + + Your nickname is not registered. +To prevent someone else from using it, +please register it at www.hedgewars.org + + + + + +Your password wasn't saved either. + + + + Hedgewars - Empty nickname + + + + Hedgewars - Wrong password + + + + You entered a wrong password. + + + + Try Again + + + + Hedgewars - Connection error + + + + You reconnected too fast. +Please wait a few seconds and try again. @@ -183,18 +312,6 @@ HWMapContainer - Map - Mapa - - - Themes - Témy - - - Filter - Filter - - All Všetky @@ -219,10 +336,6 @@ Pojašená - Type - Typ - - Small tunnels Malé tunely @@ -231,28 +344,96 @@ Stredné tunely - Large tunnels - Veľké tunely - - - Small floating islands - Malé plávajúce ostrovčeky - - - Medium floating islands - Stredné plávajúce ostrovčeky - - - Large floating islands - Veľké plávajúce ostrovčeky - - Seed Zrno - Set - Nastaviť + Map type: + + + + Image map + + + + Mission map + + + + Hand-drawn + Ručne kreslená + + + Randomly generated + + + + Random maze + + + + Random + Náhodné + + + Map preview: + + + + Load map drawing + + + + Edit map drawing + + + + Largetunnels + + + + Small islands + + + + Medium islands + + + + Large islands + + + + Map size: + + + + Maze style: + + + + Mission: + + + + Map: + + + + Theme: + + + + Load drawn map + Načítať nakreslenú mapu + + + Drawn Maps + Kreslené mapy + + + All files + Všetky súbory @@ -314,28 +495,54 @@ Remote host has closed connection - + Vzdialený hostiteľ ukončiť spojenie The server is too old. Disconnecting now. - + Server je príliš zastaraný. Odpojím sa. HWPasswordDialog - Password - Heslo + Login + HWUploadVideoDialog Upload video - + Upload videa Upload + Upload + + + + HatButton + + Change hat (%1) + + + + + HatPrompt + + Select a hat + + + + Filter: + + + + Cancel + Zrušiť + + + Use selected hat @@ -347,22 +554,40 @@ + KeyBinder + + Category + + + + LibavInteraction Duration: %1m %2s - + Trvanie: %1m %2s Video: %1x%2, - + Video: %1x%2, %1 fps, - + %1 fps, Audio: + Zvuk: + + + unknown + + + + + MapModel + + No description available. @@ -396,6 +621,38 @@ Set data Nastaviť dáta + + General + Všeobecné + + + Bans + + + + IP/Nick + + + + Expiration + + + + Reason + + + + Refresh + + + + Add + + + + Remove + + PageConnecting @@ -440,7 +697,7 @@ Eraser - + Guma @@ -450,8 +707,40 @@ Všeobecné - Advanced - Pokročilé + Select an action to choose a custom key bind for this team + + + + Use my default + + + + Reset all binds + + + + Custom Controls + + + + Hat + Klobúk + + + Name + Meno + + + This hedgehog's name + + + + Randomize this hedgehog's name + + + + Random Team + Náhodný tím @@ -532,298 +821,53 @@ PageInfo Open the snapshot folder - + Otvoriť priečinok so snímkami PageMain - Simply pick the same color as a friend to play together as a team. Each of you will still control his or her own hedgehogs but they'll win or lose together. - Tips - Ak chcete hrať s priateľom ako tím, jednoducho si zvoľte tú istú farbu. I naďalej budete ovládať svojich vlastných ježkov, ale víťazstvá či prehry budú spoločné. - - - Some weapons might do only low damage but they can be a lot more devastating in the right situation. Try to use the Desert Eagle to knock multiple hedgehogs into the water. - Tips - Niektoré zbrane môžu spôsobovať málo škody, ale dokážu byť oveľa účinnejšie v tej správnej situácii. Skúste použiť Desert Eagle na zostrelenie viacerých ježkov do vody. - - - If you're unsure what to do and don't want to waste ammo, skip one round. But don't let too much time pass as there will be Sudden Death! - Tips - Ak neviete, čo robiť a nechcete mrhať muníciou, preskočte ťah. Ale nerobte tak príliš často, pretože príde Náhla smrť! - - - If you'd like to keep others from using your preferred nickname on the official server, register an account at http://www.hedgewars.org/. - Tips - Ak nechcete, aby niekto iný používal vašu prezývku na oficiálnom serveri, registrujte si účet na http://www.hedgewars.org/. - - - You're bored of default gameplay? Try one of the missions - they'll offer different gameplay depending on the one you picked. - Tips - Nudí vás štandardná hra? Vyskúšajte si jednu z misii - ponúkajú iný herný zážitok v závislosti na tom, akú si vyberiete. - - - By default the game will always record the last game played as a demo. Select 'Local Game' and pick the 'Demos' button on the lower right corner to play or manage them. - Tips - Vo východzom nastavení sa posledná hra automaticky ukladá ako demo. Vyberte 'Miestna hra' a kliknite na tlačidlo 'Demá' v pravom dolnom rohu, ak si chcete demo uložiť alebo prehrať. - - - Hedgewars is Open Source and Freeware we create in our spare time. If you've got problems, ask on our forums but please don't expect 24/7 support! - Tips - Hedgewars je Open Source a Freeware, ktorý vytvárame vo voľnom čase. Ak máte problém, spýtajte sa na fóre, ale nečakajte podporu 24 hodín v týždni! - - - Hedgewars is Open Source and Freeware we create in our spare time. If you like it, help us with a small donation or contribute your own work! - Tips - Hedgewars je Open Source a Freeware, ktorý vytvárame vo voľnom čase. Ak chcete pomôcť, môžete nám zaslať malú finančnú výpomoc alebo prispieť vlastnou prácou! - - - Hedgewars is Open Source and Freeware we create in our spare time. Share it with your family and friends as you like! - Tips - Hedgewars je Open Source a Freeware, ktorý vytvárame vo voľnom čase. Podeľte sa oň so svojou rodinou a priateľmi! - - - From time to time there will be official tournaments. Upcoming events will be announced at http://www.hedgewars.org/ some days in advance. - Tips - Z času na čas bývajú usporiadavané oficiálne turnaje. Najbližšie akcie sú vždy uverejnené na http://www.hedgewars.org/ pár dní dopredu. - - - Hedgewars is available in many languages. If the translation in your language seems to be missing or outdated, feel free to contact us! - Tips - Hedgewars je dostupný v mnohých jazykoch. Ak preklad do vašej reči chýba alebo nie je aktuálny, prosím, kontaktujte nás! - - - Hedgewars can be run on lots of different operating systems including Microsoft Windows, Mac OS X and Linux. - Tips - Hedgewars beží na množstve rozličných operačných systémov vrátane Microsoft Windows, Mac OS X a Linuxu. - - - Always remember you're able to set up your own games in local and network/online play. You're not restricted to the 'Simple Game' option. - Tips - Nezabudnite, že si vždy môžete vytvoriť vlastnú lokálnu alebo sieťovú/online hru. Nie ste obmedzený len na voľbu 'Jednoduchá hra'. - - - While playing you should give yourself a short break at least once an hour. - Tips - Mali by ste si dopriať krátky odpočinok po každej hodine hry. - - - If your graphics card isn't able to provide hardware accelerated OpenGL, try to enable the low quality mode to improve performance. - Tips - Ak vaša grafická karta nie je schopná poskytnúť hardvérovo akcelerované OpenGL, skúste povoliť režim nízkej kvality, aby ste dosiahli požadovaný výkon. - - - We're open to suggestions and constructive feedback. If you don't like something or got a great idea, let us know! - Tips - Sme otvorení novým nápadom a konštruktívnej kritike. Ak sa vám niečo nepáči alebo máte skvelý nápad, dajte nám vedieť! - - - Especially while playing online be polite and always remember there might be some minors playing with or against you as well! - Tips - Obzvlášť pri hre online buďte slušný a pamätajte, že s vami alebo proti vám môžu hrať tiež neplnoletí! - - - Special game modes such as 'Vampirism' or 'Karma' allow you to develop completely new tactics. Try them in a custom game! - Tips - Špeciálne herné režimy ako 'Vampírizmus' alebo 'Karma' vám umožnia vyvinúť úplne novú taktiku. Vyskúšajte ich vo vlastnej hre! - - - You should never install Hedgewars on computers you don't own (school, university, work, etc.). Please ask the responsible person instead! - Tips - Nikdy by ste nemali inštalovať Hedgewars na cudzí počítač (v škole, na univerzite, v práci, atď). Prosím, radšej požiadajte zodpovednú osobu! - - - Hedgewars can be perfect for short games during breaks. Just ensure you don't add too many hedgehogs or use an huge map. Reducing time and health might help as well. - Tips - Hedgewars môže byť výborná hra, ak máte krátku chvíľku počas prestávky. Iba sa uistite, že nepoužijete príliš veľa ježkov alebo príliš veľkú mapu. Rovnako môže pomocť zníženie času a zdravia. - - - No hedgehogs were harmed in making this game. - Tips - Počas tvorby tejto hry nebolo ublížené žiadnemu ježkovi. - - - Hedgewars is Open Source and Freeware we create in our spare time. If someone sold you the game, you should try get a refund! - Tips - Hedgewars je Open Source a Freeware, ktorý vytvárame vo voľnom čase. Ak vám niekto túto hru predal, skúste žiadať o refundáciu! - - - Connect one or more gamepads before starting the game to be able to assign their controls to your teams. - Tips - Ak chcete pre hru použiť jeden alebo viacero gamepadov, pripojte ich pred spustením hry. - - - Create an account on %1 to keep others from using your most favourite nickname while playing on the official server. - Tips - Vytvorte si účet na %1, aby ste tak zabránili ostatným používať vašu obľúbenú prezývku počas hrania na oficiálnom serveri. - - - If your graphics card isn't able to provide hardware accelerated OpenGL, try to update the associated drivers. - Tips - Ak vaša grafická karta nie je schopná poskytnúť hardvérovo akcelerované OpenGL, skúste aktualizovať príslušné ovládače. - - - There are three different jumps available. Tap [high jump] twice to do a very high/backwards jump. - Tips - Dostupné sú tri rôzne výskoky. Dvakrát stlačte [vysoký skok] pre veľmi vysoký skok vzad. - - - Afraid of falling off a cliff? Hold down [precise] to turn [left] or [right] without actually moving. - Tips - Bojíte sa pádu z útesu? Podržte [presné mierenie] a stlačte [doľava] alebo [doprava] pre otočenie na mieste. - - - Some weapons require special strategies or just lots of training, so don't give up on a particular tool if you miss an enemy once. - Tips - Niektoré zbrane vyžaduju osobitnú stratégiu alebo len veľa tréningu, takže to s vybranou zbraňou nevzdávajte, ak sa vám nepodarí trafiť nepriateľa. - - - Most weapons won't work once they touch the water. The Homing Bee as well as the Cake are exceptions to this. - Tips - Väčšina zbraní prestane fungovať pri kontakte s vodou. Navádzané včela a Torta sú výnimkami z tohto pravidla. - - - The Old Limbuger only causes a small explosion. However the wind affected smelly cloud can poison lots of hogs at once. - Tips - Starý cheeseburger spôsobí len malú explóziu. Obláčik smradu, ktorý je ovplyvňovaný vetrom, však dokáže otráviť množstvo ježkov. - - - The Piano Strike is the most damaging air strike. You'll lose the hedgehog performing it, so there's a huge downside as well. - Tips - Klavírový útok je najničivejší vzdušný útok. Pri jeho použití prídete o ježka, čo je jeho veľké mínus. - - - Sticky Mines are a perfect tool to create small chain reactions knocking enemy hedgehogs into dire situations ... or water. - Tips - Lepkavé míny sú perfektným nástrojom na vytvorenie malých reťazových reakcii, vďaka ktorým postavíte ježkov do krajných situácii ... alebo vody. - - - The Hammer is most effective when used on bridges or girders. Hit hogs will just break through the ground. - Tips - Kladivo je najefektívnejšie pri použití na mostoch alebo trámoch. Zasiahnutí ježkovia prerazia zem. - - - If you're stuck behind an enemy hedgehog, use the Hammer to free yourself without getting damaged by an explosion. - Tips - Ak ste zaseknutý za nepriateľským ježkom, použite kladivo, aby ste sa oslobodili bez toho, aby vám ublížila explózia. - - - The Cake's maximum walking distance depends on the ground it has to pass. Use [attack] to detonate it early. - Tips - Maximálna prejdená vzdialenosť torty zavisí na zemi, ktorou musí prejsť. Použitie [útok], ak chcete spustiť detonáciu skôr. - - - The Flame Thrower is a weapon but it can be used for tunnel digging as well. - Tips - Plameňomet je zbraň, no rovnako môže byť použitý na kopanie tunelov. - - - Want to know who's behind the game? Click on the Hedgewars logo in the main menu to see the credits. - Tips - Chcete vedieť, kto stojí za hrou? Kliknite na logo Hedgewars v hlavnom menu pre zobrazenie zásluh. - - - Feel free to draw your own graves, hats, flags or even maps and themes! But note that you'll have to share them somewhere to use them online. - Tips - Ak máte chuť, môžte si nakresliť vlastné hrobčeky, klobúky, vlajky alebo dokonca mapy a témy! Pamätajte však, že ak ich budete chcieť použiť v hre online, budete ich musieť zdieľať s ostatnými. - - - Really want to wear a specific hat? Donate to us and receive an exclusive hat of your choice! - Tips - Chcete nosiť špecifický klobúk? Prispejte nám a ako odmenu získate exkluzívny klobúk podľa vášho výberu! - - - Keep your video card drivers up to date to avoid issues playing the game. - Tips - Aby ste sa vyhli problémom pri hre, udržujte ovládače vašej grafickej karty vždy aktuálne. - - - You can find your Hedgewars configuration files under "My Documents\Hedgewars". Create backups or take the files with you, but don't edit them by hand. - Tips - Konfiguračné súbory Hedgewars nájdete v "Moje Dokumenty\Hedgewars". Vytvárajte si zálohy alebo prenášajte si tieto súbory medzi počítačmi, ale needitujte ich ručne. - - - Want to save ropes? Release the rope in mid air and then shoot again. As long as you don't touch the ground you'll reuse your rope without wasting ammo! - Tips - Chcete ušetriť lano? Kým ste vo vzduchu, uvoľnite ho a opäť vystreľte. Kým sa nedotknete zeme, môžete to isté lano znovu použiť bez toho, aby sa vám míňali jeho zásoby! - - - Like Hedgewars? Become a fan on %1 or follow us on %2! - Tips - Páčia sa vám Hedgewars? Staňte sa fanúšikom na %1 alebo sa pripojte k našej skupine na %2. Môžte nás tiež nasledovať na %3! - - - You're able to associate Hedgewars related files (savegames and demo recordings) with the game to launch them right from your favorite file or internet browser. - Tips - Môžte priradiť súbory patriace Hedgewars (uložené hry a nahrávky záznamov) ku hre, čím sa vám budú otvárať priamo z vášho obľubeného prehliadača súborov alebo internetu. - - - You can find your Hedgewars configuration files under "Library/Application Support/Hedgewars" in your home directory. Create backups or take the files with you, but don't edit them by hand. - Tips - Konfiguračné súbory Hedgewars nájdete v "Library/Application Support/Hedgewars" vo vašom domovskom adresári. Vytvárajte si zálohy alebo prenášajte si tieto súbory medzi počítačmi, ale needitujte ich ručne. - - - You can find your Hedgewars configuration files under ".hedgewars" in your home directory. Create backups or take the files with you, but don't edit them by hand. - Tips - Konfiguračné súbory Hedgewars nájdete v ".hedgewars" vo vašom domovskom adresári. Vytvárajte si zálohy alebo prenášajte si tieto súbory medzi počítačmi, ale needitujte ich ručne. - - - The Windows version of Hedgewars supports Xfire. Make sure to add Hedgewars to its game list so your friends can see you playing. - Tips - Hedgewars vo verzii pre Windows podporujú Xfire. Pridajte si Hedgewars do vášho zoznamu hier tak, aby vás vaši priatelia videli hrať. - - - Use the Molotov or Flame Thrower to temporary keep hedgehogs from passing terrain such as tunnels or platforms. - Tips - Použite Molotovov koktejl alebo plameňomet na dočasné zabránenie ježkom prejsť terénom ako sú tunely alebo plošiny. - - - The Homing Bee can be tricky to use. Its turn radius depends on its velocity, so try to not use full power. - Tips - Navádzaná včela je trošku zložitejšia na použitie. Jej polomer otočenia závisí na jej rýchlosti, takže ju radšej nepoužívajte pri plnej sile. - - Downloadable Content Stiahnuteľný obsah - Local Game - - - Play a game on a single computer - - - - Network Game - + Hrať hru na tomto počítači Play a game across a network - + Hra cez sieť Read about who is behind the Hedgewars Project - + Prečítajte si, kto stojí za projektom Hedgewars Leave a feedback here reporting issues, suggesting features or just saying how you like Hedgewars - + Dajte nám späťnú väzbu formou hlásenia chýb, navrhovania nových vlastností alebo nám len napíšte, čo sa vám na Hedgewars páči Access the user created content downloadable from our website - + Stiahnuť obsah vytvorený inými užívateľmi z našej stránky Exit game - + Ukončiť hru Manage videos recorded from game - + Spravovať videá nahrané počas hrania Edit game preferences + Upraviť nastavenia hry + + + Play a game across a local area network + + + + Play a game on an official server @@ -833,6 +877,10 @@ Start Štart + + Edit game preferences + Upraviť nastavenia hry + PageNetGame @@ -841,26 +889,11 @@ Ovládanie - Downloadable Content - Stiahnuteľný obsah - - - - PageNetType - - LAN game - LAN hra - - - Official server - Oficiálny server - - - Join hundreds of players online! - - - - Join or host your own game server in a Local Area Network. + Edit game preferences + Upraviť nastavenia hry + + + Start @@ -907,49 +940,133 @@ Vymazať sadu zbraní - General - Všeobecné - - Advanced - Pokročilé + Pokročilé Reset to default colors - + Nastaviť východzie farby Proxy host - + Hostiteľ proxy Proxy port - + Port proxy Proxy login - + Login pre proxy Proxy password - + Heslo pre proxy No proxy - + Bez proxy Socks5 proxy - + Socks5 proxy HTTP proxy - + HTTP proxy System proxy settings + Systémové nastavenia proxy + + + Select an action to change what key controls it + + Reset to default + + + + Reset all binds + + + + Game + + + + Graphics + + + + Audio + + + + Controls + + + + Video Recording + + + + Network + + + + Teams + Tímy + + + Schemes + + + + Weapons + Výzbroj + + + Frontend + + + + Custom colors + Vlastné farby + + + Game audio + + + + Frontend audio + + + + Account + + + + Proxy settings + Nastavenia proxy + + + Miscellaneous + Rozličné + + + Updates + + + + Check for updates + + + + Video recording options + Voľby nahrávania videa + PagePlayDemo @@ -1150,48 +1267,28 @@ PageSinglePlayer - Simple Game - - - Play a quick game against the computer with random settings - - - - Multiplayer - + Zahrajte si rýchlu hru proti počítaču s náhodnými nastaveniami Play a hotseat game against your friends, or AI teams - + Zahrajte si hru za týmto počítačom proti kamarátom alebo počítačovým protivníkom Campaign Mode - - - - Training Mode - + Režim kampane Practice your skills in a range of training missions - - - - Demos - + Cibrite si svoje schopnosti v rade tréningových misií Watch recorded demos - - - - Load - Načítať + Prezerať nahrané demá Load a previously saved game - + Načítať uloženú hru @@ -1206,49 +1303,51 @@ Pick the mission or training to play - + Vyberte si misiu alebo tréning Start fighting - + Začať boj PageVideos Name - Meno + Meno Size - + Veľkosť %1 bytes - - + + %1 bajtov (in progress...) - - - - Date: - - - - Size: - + (prebieha...) encoding - + kódovanie uploading + uploadujem + + + Date: %1 + + + + + Size: %1 + @@ -1259,10 +1358,6 @@ Vykopnúť - Start - Spustiť - - Restrict Joins Obmedziť pripojenia @@ -1314,10 +1409,6 @@ Celá obrazovka - Enable sound - Povoliť zvuky - - Show FPS Zobrazovať FPS @@ -1326,14 +1417,6 @@ Iný spôsob zobrazovania škody - Frontend fullscreen - Frontend na celú obrazovku - - - Enable music - Povoliť hudbu - - Append date and time to record file name Pripojiť dátum a čas k súboru so záznamom @@ -1342,45 +1425,57 @@ Zobrazovať nápovedu pre zbrane - Enable frontend sounds - Povoliť zvuky vo frontende - - - Enable frontend music - Povoliť hudbu vo frontende - - - Frontend effects - Efekty vo frontende - - Save password - + Uložiť heslo Save account name and password - + Uložiť meno účtu a heslo Video is private - + Video je súkromné Record audio - + Nahrať audio Use game resolution + Použiť rozlíšenie hry + + + Visual effects + + + + Sound + + + + In-game sound effects + + + + Music + + + + In-game music + + + + Frontend sound effects + + + + Frontend music QComboBox - generated map... - vygenerovaná mapa... - - Human Človek @@ -1393,14 +1488,6 @@ (Východzie nastavenie) - generated maze... - vygenerované bludisko.. - - - Mission - Misia - - Community Komunita @@ -1417,10 +1504,6 @@ Prebieha - hand drawn map... - ručne kreslená mapa... - - Disabled Vypnuté @@ -1457,10 +1540,6 @@ Nad sebou - Wiggle - Triasť - - Red/Cyan grayscale Červené/Azúrové (odtiene šedej) @@ -1492,22 +1571,10 @@ Členovia tímu - Key binds - Nastavenia kláves - - Fort Pevnosť - Teams - Tímy - - - Audio/Graphic options - Nastavenia zvuku/grafiky - - Net game Sieťová hra @@ -1528,36 +1595,12 @@ Nastavenia tímu - Misc - Rozličné - - - Schemes and Weapons - Schémy a zbrane - - - Custom colors - - - - Miscellaneous - - - - Video recording options - - - Videos - + Videá Description - - - - Proxy settings - + Popis @@ -1571,22 +1614,6 @@ Míny - Developers: - Vývojári: - - - Art: - Grafika: - - - Translations: - Preklady: - - - Special thanks: - Osobitné poďakovanie: - - Weapons Výzbroj @@ -1619,18 +1646,10 @@ Verzia - Sounds: - Zvuky: - - Initial sound volume Úvodná hlasitosť zvuku - Game scheme - Schéma hry - - Damage Modifier Modifikátor poškodenia @@ -1691,11 +1710,6 @@ Tip: - This development build is 'work in progress' and may not be compatible with other versions of the game. Some features might be broken or incomplete. Use at your own risk! - Toto zostavenie je 'stále-vo-vývoji' a nemusí byť kompatibilné s inými verziami hry. -Niektoré vlastnosti nemusia fungovať alebo nemusia byť dokončené. Používajte na vlastné riziko! - - Quality Kvalita @@ -1743,62 +1757,90 @@ There are videos that are currently being processed. Exiting now will abort them. Do you really want to quit? - + Momentálne sa niektoré videá spracovávajú. Ukončením zrušíte spracovávanie. Naozaj chcete ukončiť program? Please provide either the YouTube account name or the email address associated with the Google Account. - + Prosím zadajte buď názov YouTube účtu alebo e-mailovú adresu prepojenú s Google účtom. Account name (or email): - + Názov účtu (alebo e-mail): Password: - + Heslo: Video title: - + Názov videa: Video description: - + Popis videa: Tags (comma separated): - - - - Summary - + Značky (oddelené čiarkou): Description - + Popis Nickname - Prezývka + Prezývka Format - + Formát Audio codec - + Audio kodek Video codec - + Video kodek Framerate - + Snímkovanie Bitrate (Kbps) + Bitový tok (Kbps) + + + This development build is 'work in progress' and may not be compatible with other versions of the game, while some features might be broken or incomplete! + + + + Fullscreen + Celá obrazovka + + + Fullscreen Resolution + + + + Windowed Resolution + + + + Your Email + + + + Summary + + + + Send system information + + + + Type the security code: @@ -1814,7 +1856,7 @@ anonymous - + anonymný @@ -1839,226 +1881,234 @@ Nastavenie súborových asociácii zlyhalo. - Please fill out all fields - - - Error while authenticating at google.com: - + Chyba pri autentizácii voči google.com: Login or password is incorrect - + Prihlasovacie meno alebo heslo je nesprávne Error while sending metadata to youtube.com: - + Chyba pri posielaní metadát na youtube.com: Teams - Are you sure? - + Tímy - Ste si istý? Do you really want to delete the team '%1'? - + Naozaj chcete vymazať tím '%1'? Cannot delete default scheme '%1'! - + Nemôžem vymazať východziu schému '%1'! Please select a record from the list - + Prosím, vyberte nahrávku zo zoznamu Unable to start server - + Nepodarilo sa spustiť server Hedgewars - Error - + Hedgewars - Chyba Hedgewars - Success - + Hedgewars - Úspech All file associations have been set - - - - Successfully posted the issue on hedgewars.googlecode.com - - - - Error during authentication at google.com - - - - Error reporting the issue, please try again later (or visit hedgewars.googlecode.com directly) - + Všeky súborové asociácie boli nastavené Main - Error - + Hlavné okno - Chyba Cannot create directory %1 - Nepodarilo sa vytvoriť adresár %1 + Nepodarilo sa vytvoriť adresár %1 Failed to open data directory: %1 Please check your installation! - + Chyba pri otváraní adresára s dátami: +%1 + +Skontrolujte, prosím, inštaláciu! TCP - Error - + TCP - Chyba Unable to start the server: %1. - Nie je možné spustiť server: %1. + Nepodarilo sa spustiť server: %1. Unable to run engine at - + Nepodarilo sa spustiť enginu na Error code: %1 - + Kód chyby: %1 Video upload - Error - + Upload videa - Chyba Netgame - Error - + Sieťová hra - Chyba Please select a server from the list - + Prosím, vyberte server zo zoznamu Please enter room name - Prosím zadajte názov miestnosti + Prosím, zadajte názov miestnosti Record Play - Error - + Prehrávanie záznamu - Chyba Please select record from the list - Prosím vyberte záznam zo zoznamu + Prosím, vyberte záznam zo zoznamu Cannot rename to - + Nepodarilo sa premenovať na Cannot delete file - + Nepodarilo sa vymazať súbor Room Name - Error - + Názov miestnosti - Chyba Please select room from the list - Prosím vyberte miestnosť zo zoznamu + Prosím, vyberte miestnosť zo zoznamu Room Name - Are you sure? - + Názov miestnosti - Ste si istý? The game you are trying to join has started. Do you still want to join the room? - Hra, ku ktorej sa snažíte pripojiť, už začala. + Hra, ku ktorej sa snažíte pripojiť, už začala. Aj napriek tomu chcete vojsť do miestnosti? Schemes - Warning - + Schémy - Varovanie Schemes - Are you sure? - + Schémy - Ste si istý? Do you really want to delete the game scheme '%1'? - + Naozaj chcete vymazať hernú schému '%1'? Videos - Are you sure? - + Videa - Ste si istý? Do you really want to delete the video '%1'? - + Naozaj chcete vymazať video '%1'? Do you really want to remove %1 file(s)? - - + + Naozaj chcete vymazať %1 súbor(y)? Do you really want to cancel uploading %1? - + Naozaj chcete zrušiť uploadovanie %1? File error - Chyba v súbore + Chyba v súbore Cannot open '%1' for writing - + Nepodarilo sa otvoriť '%1' pre zápis Cannot open '%1' for reading - + Nepodarilo sa otvoriť '%1' pre čítanie Cannot use the ammo '%1'! - + Nemôžem použiť muníciu '%1'! Weapons - Warning - + Zbrane - Varovanie Cannot overwrite default weapon set '%1'! - + Nemôžete prepísať východziu sadu zbraní '%1'! Cannot delete default weapon set '%1'! - + Nemôžete vymazať východziu sadu zbraní '%1'! Weapons - Are you sure? - + Zbrane - Ste si istý? Do you really want to delete the weapon set '%1'? + Naozaj chcete vymazať sadu zbraní '%1'? + + + Hedgewars - Nick not registered - - - QObject - - Nickname - Prezývka - - - Please enter your nickname - Prosím, zadajte vašu prezývku + + System Information Preview + + + + Failed to generate captcha + + + + Failed to download captcha + + + + Please fill out all fields. Email is optional. + + + + Hedgewars - Warning + + + + Hedgewars - Information + + + + Hedgewars + @@ -2116,114 +2166,117 @@ Načítať - Setup - Nastavenie - - - Ready - Pripravený - - - Random Team - Náhodný tím - - Associate file extensions Asociovať prípony súborov. - more - viac - - More info - + Viac informácii Set default options - + Nastaviť východzie Open videos directory - + Otvoriť adresár s videami Play - + Prehrať Upload to YouTube - + Uploadovať na YouTube Cancel uploading - + Zrušiť upload Restore default coding parameters - + Obnoviť pôvodné parametre pre kódovanie Open the video directory in your system - + Otvoriť adresár s videami vo vašom systéme Play this video - + Prehrať toto videa Delete this video - + Vymazať toto video Upload this video to your Youtube account - + Uploadovať video na váš účet YouTube RoomsListModel In progress - Prebieha + Prebieha Room Name - Názov miestnosti + Názov miestnosti C - C + C T - T + T Owner - Majiteľ + Majiteľ Map - Mapa + Mapa Rules - Pravidlá + Pravidlá Weapons - Výzbroj + Výzbroj Random Map - Náhodná mapa + Náhodná mapa Random Maze - Náhodné bludisko + Náhodné bludisko Hand-drawn + Ručne kreslená + + + + SeedPrompt + + The map seed is the basis for all random values generated by the game. + + + + Cancel + Zrušiť + + + Set seed + + + + Close @@ -2255,106 +2308,21 @@ - ToggleButtonWidget - - Vampirism - Režím vampíra - - - Karma - Karma - - - Artillery - Delostrelectvo - - - Fort Mode - Režim pevností - - - Divide Teams - Rozdeliť tímy - - - Solid Land - Nezničiteľná zem - - - Add Border - Pridať okraj - - - Low Gravity - Nízka gravitácia - - - Laser Sight - Laserové zameriavanie - - - Invulnerable - Nesmrteľnosť - - - Random Order - Náhodné poradie - - - King - Kráľ - - - Place Hedgehogs - Umiestňovať ježkov - - - Clan Shares Ammo - Klan zdieľa výzbroj - - - Disable Girders - Vypnúť trámy - - - Disable Land Objects - Vypnúť objekty v krajine - - - AI Survival Mode - Režim prežitia umelej inteligencie - - - Reset Health - Resetovať zdravie - - - Unlimited Attacks - Neobmedzené útoky - - - Reset Weapons - Resetovať zbrane - - - Per Hedgehog Ammo - Individuálne zbrane - - - Disable Wind - Vypnúť vietor - - - More Wind - Viac vetra - - - Tag Team - Tag Team - - - Add Bottom Border - Pridať spodný okraj + TeamShowWidget + + %1's team + + + + + ThemePrompt + + Select a theme for this map + + + + Cancel + Zrušiť @@ -2472,12 +2440,6 @@ snímať - hedgehogs -info - štatistiky -ježkov - - quit ukončiť @@ -2523,39 +2485,39 @@ mute audio - + stlmiť zvuk record + nahrať + + + hedgehog info binds (categories) - Basic controls - Základné ovládanie - - - Weapon controls - Ovládanie zbraní - - - Camera and cursor controls - Ovládanie kurzora a kamery - - - Other - Iné + Movement + + + + Weapons + Výzbroj + + + Camera + + + + Miscellaneous + Rozličné binds (descriptions) - Move your hogs and aim: - Presun ježka a mierenie: - - Traverse gaps and obstacles by jumping: Prekoná priepasti a prekážky skokom: @@ -2617,6 +2579,10 @@ Record video: + Nahrať video: + + + Hedgehog movement diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Locale/hedgewars_sv.ts --- a/share/hedgewars/Data/Locale/hedgewars_sv.ts Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Locale/hedgewars_sv.ts Fri Feb 22 05:05:32 2013 +0100 @@ -20,6 +20,79 @@ + BanDialog + + IP + IP + + + Nick + + + + IP/Nick + + + + Reason + + + + Duration + + + + Ok + + + + Cancel + Avbryt + + + you know why + + + + Warning + + + + Please, specify %1 + + + + nickname + + + + permanent + + + + + DataManager + + Use Default + + + + + FeedbackDialog + + View + + + + Cancel + Avbryt + + + Send Feedback + + + + FreqSpinBox Never @@ -44,13 +117,36 @@ Redigera spelscheman - When this option is enabled selecting a game scheme will auto-select a weapon - När det här valet är aktivt kommer vapnen att ändras när du ändrar spelschema - - Game Options Spelinställningar + + Game scheme will auto-select a weapon + + + + + HWApplication + + %1 minutes + + + + %1 hour + + + + %1 hours + + + + %1 day + + + + %1 days + + HWAskQuitDialog @@ -101,10 +197,6 @@ Failed to save StyleSheet to %1 - - %1 is not a valid command! - - HWForm @@ -139,20 +231,6 @@ - Your nickname %1 is -registered on Hedgewars.org -Please provide your password below -or pick another nickname in game config: - Ditt smeknamn (%1) är -registrerat på Hedgewars.org -Var god ange ditt lösenord eller välj -ett annat smeknamn i spelinställningarna: - - - No password supplied. - - - Nickname Smeknamn @@ -165,6 +243,59 @@ Please pick another nickname: + + %1's Team + + + + Hedgewars - Nick registered + + + + This nick is registered, and you haven't specified a password. + +If this nick isn't yours, please register your own nick at www.hedgewars.org + +Password: + + + + Your nickname is not registered. +To prevent someone else from using it, +please register it at www.hedgewars.org + + + + + +Your password wasn't saved either. + + + + Hedgewars - Empty nickname + + + + Hedgewars - Wrong password + + + + You entered a wrong password. + + + + Try Again + + + + Hedgewars - Connection error + + + + You reconnected too fast. +Please wait a few seconds and try again. + + HWGame @@ -180,18 +311,6 @@ HWMapContainer - Map - Karta - - - Themes - Teman - - - Filter - Filter - - All Alla @@ -216,10 +335,6 @@ Galen - Type - Typ - - Small tunnels Små tunnlar @@ -228,28 +343,96 @@ Medelstora tunnlar - Large tunnels - Stora tunnlar - - - Small floating islands - Små flytande öar - - - Medium floating islands - Medelstora flytande öar - - - Large floating islands - Stora flytande öar - - Seed Frö - Set - Ange + Map type: + + + + Image map + + + + Mission map + + + + Hand-drawn + + + + Randomly generated + + + + Random maze + + + + Random + Slumpad + + + Map preview: + + + + Load map drawing + + + + Edit map drawing + + + + Largetunnels + + + + Small islands + + + + Medium islands + + + + Large islands + + + + Map size: + + + + Maze style: + + + + Mission: + + + + Map: + + + + Theme: + + + + Load drawn map + Läs in ritad karta + + + Drawn Maps + Ritade kartor + + + All files + Alla filer @@ -321,8 +504,8 @@ HWPasswordDialog - Password - Lösenord + Login + @@ -337,6 +520,32 @@ + HatButton + + Change hat (%1) + + + + + HatPrompt + + Select a hat + + + + Filter: + + + + Cancel + Avbryt + + + Use selected hat + + + + KB SDL_ttf returned error while rendering text, most propably it is related to the bug in freetype2. It's recommended to update your freetype lib. @@ -344,6 +553,13 @@ + KeyBinder + + Category + + + + LibavInteraction Duration: %1m %2s @@ -362,6 +578,17 @@ Audio: + + unknown + + + + + MapModel + + No description available. + + PageAdmin @@ -393,6 +620,38 @@ Set data Ange data + + General + Allmänt + + + Bans + + + + IP/Nick + + + + Expiration + + + + Reason + + + + Refresh + + + + Add + + + + Remove + + PageConnecting @@ -447,8 +706,40 @@ Allmänt - Advanced - Avancerat + Select an action to choose a custom key bind for this team + + + + Use my default + + + + Reset all binds + + + + Custom Controls + + + + Hat + Hatt + + + Name + Namn + + + This hedgehog's name + + + + Randomize this hedgehog's name + + + + Random Team + Slumpat lag @@ -529,267 +820,14 @@ PageMain - Simply pick the same color as a friend to play together as a team. Each of you will still control his or her own hedgehogs but they'll win or lose together. - Tips - Välj bara samma färg som en vän för att spela i som ett lag. Varje spelare kontrollerar fortfarande själva sina igelkottar men de vinner eller förlorar tillsammans. - - - Some weapons might do only low damage but they can be a lot more devastating in the right situation. Try to use the Desert Eagle to knock multiple hedgehogs into the water. - Tips - Några vapen kanske bara gör liten skada men de kan vara mycket mer förödande i rätt situation. Försök att använda Desert Eagle för att putta ner flera igelkottar ner i vattnet. - - - If you're unsure what to do and don't want to waste ammo, skip one round. But don't let too much time pass as there will be Sudden Death! - Tips - Om du inte är säker på vad du ska göra och inte vill slösa på ammunition, hoppa över en tur. Men låt inte för lång tid passera eftersom sudden death kommer! - - - If you'd like to keep others from using your preferred nickname on the official server, register an account at http://www.hedgewars.org/. - Tips - Om du vill förhindra andra från att använda ditt favoritnamn på den officiella servern kan du registrera ett konto på http://www.hedgewars.org/. - - - You're bored of default gameplay? Try one of the missions - they'll offer different gameplay depending on the one you picked. - Tips - Är du trött på att spela vanligt? Pröva ett av uppdragen - de erbjuder annorlunda spel beroende på vilken du väljer. - - - By default the game will always record the last game played as a demo. Select 'Local Game' and pick the 'Demos' button on the lower right corner to play or manage them. - Tips - Som standard spelar spelet alltid in den senaste matchen som en demo. Välj 'Lokalt Spel' och tryck på 'Demo'-knappen nere till höger för att spela eller hantera dem. - - - Hedgewars is Open Source and Freeware we create in our spare time. If you've got problems, ask on our forums but please don't expect 24/7 support! - Tips - Hedgewars är ett öppet källkods- och gratisprogram som vi skapar på vår fritid. Om du har problem, fråga på vårat forum men snälla förvänta dig inte dygnet runt-support! - - - Hedgewars is Open Source and Freeware we create in our spare time. If you like it, help us with a small donation or contribute your own work! - Tips - Hedgewars är ett öppet källkods- och gratisprogram som vi skapar på vår fritid. Om du gillar det, hjälp oss med en liten donation eller bidra med något eget! - - - Hedgewars is Open Source and Freeware we create in our spare time. Share it with your family and friends as you like! - Tips - Hedgewars är ett öppet källkods- och gratisprogram som vi skapar på vår fritid. Dela med dig av det till familj och vänner som du vill! - - - From time to time there will be official tournaments. Upcoming events will be announced at http://www.hedgewars.org/ some days in advance. - Tips - Då och då kommer det hållas officiella turneringer. Kommande händelser kommer att annonseras på http://www.hedgewars.org/ några dagar i förväg. - - - Hedgewars is available in many languages. If the translation in your language seems to be missing or outdated, feel free to contact us! - Tips - Hedgewars finns på många språk. Om översättningen på ditt språk verkar saknas eller är gammal får du gärna kontakta oss! - - - Hedgewars can be run on lots of different operating systems including Microsoft Windows, Mac OS X and Linux. - Tips - Hedgewars kan köras på många operativsystem som Microsoft Windows, Mac OS X och Linux. - - - Always remember you're able to set up your own games in local and network/online play. You're not restricted to the 'Simple Game' option. - Tips - Kom alltid ihåg att du kan starta en egen match i lokalt och netverk/online-spel. Du är inte begränsad till 'Enkelt spel'-valet. - - - While playing you should give yourself a short break at least once an hour. - Tips - När du spelar borde du ta en pause åt minståne en gång i timman. - - - If your graphics card isn't able to provide hardware accelerated OpenGL, try to enable the low quality mode to improve performance. - Tips - Om ditt grafikkort inte klarar av att ge hårdvaruaccellererad OpenGL, pröva att sänka kvaliteten för att öka prestandan. - - - We're open to suggestions and constructive feedback. If you don't like something or got a great idea, let us know! - Tips - Vi är öppna för förslag och konstruktiv kritik. Om du inte gillar något eller har en bra idé, hör av dig! - - - Especially while playing online be polite and always remember there might be some minors playing with or against you as well! - Tips - Speciellt när du spelar över netet, var artig och kom alltid ihåg att det kan vara minderåriga som du spelar mot också! - - - Special game modes such as 'Vampirism' or 'Karma' allow you to develop completely new tactics. Try them in a custom game! - Tips - Speciella spellägen som 'Vampyrism' eller 'Karma' låter dig utveckla helt nya taktiker. Pröva dem i ett eget spel! - - - You should never install Hedgewars on computers you don't own (school, university, work, etc.). Please ask the responsible person instead! - Tips - Du ska aldrig installera Hedgewars på en dator som du inte äger (skola, universitet, arbete, etc.). Fråga den ansvarige personen istället! - - - Hedgewars can be perfect for short games during breaks. Just ensure you don't add too many hedgehogs or use an huge map. Reducing time and health might help as well. - Tips - Hedgewars kan vara perfekt för korta matcher under raster. Se bara till att du inte lägger till för många igelkottar eller använder en stor bana. Att minska tiden och hälsa kan också hjälpa. - - - No hedgehogs were harmed in making this game. - Tips - Inga igelkottar skadades under produktionen av spelet. - - - Hedgewars is Open Source and Freeware we create in our spare time. If someone sold you the game, you should try get a refund! - Tips - Hedgewars är ett öppet källkods- och gratisprogram som vi skapar på vår fritid. Om någon sålde spelet till dig ska du försöka att få pengarna tillbaka! - - - Connect one or more gamepads before starting the game to be able to assign their controls to your teams. - Tips - Koppla ihop en eller flera spelplattor innan du startar spelet för att kunna välja att kontrollera era lag med dem. - - - Create an account on %1 to keep others from using your most favourite nickname while playing on the official server. - Tips - Skapa ett konto på %1 för att förhindra andra från att använda ditt favoritnamn när du spelar på den officiella servern. - - - If your graphics card isn't able to provide hardware accelerated OpenGL, try to update the associated drivers. - Tips - Om ditt grafikkort inte klarar av att ge hårdvaruaccellererad OpenGL, pröva att uppdatera dina drivrutiner. - - - There are three different jumps available. Tap [high jump] twice to do a very high/backwards jump. - Tips - Det finns tre olika hopp tillgängliga. Tryck på [högt hopp] två gånger för att göra ett ett högt bakåt-hopp. - - - Afraid of falling off a cliff? Hold down [precise] to turn [left] or [right] without actually moving. - Tips - Är du rädd att falla ner för an kant? Håll ner [exakt] för att vrida [vänster] eller [höger] utan att egentligen röra dig. - - - Some weapons require special strategies or just lots of training, so don't give up on a particular tool if you miss an enemy once. - Tips - Några vapen kräver speciella strategier eller bara mycket träning, så ge inte upp ett vapen bara för att du missade en fiende någon gång. - - - Most weapons won't work once they touch the water. The Homing Bee as well as the Cake are exceptions to this. - Tips - De flesta vapen fungerar inte när de har rört vattenet. Målsökande bi och även Tårta är två undantag. - - - The Old Limbuger only causes a small explosion. However the wind affected smelly cloud can poison lots of hogs at once. - Tips - Den gamla Limburgaren skapar bara en liten explosition. Men det vindpåverkade stinkmålnet kan förgifta många igelkottar samtidigt. - - - The Piano Strike is the most damaging air strike. You'll lose the hedgehog performing it, so there's a huge downside as well. - Tips - Pianoanfall är det farligaste luftanfallet. Du blir av med en igelkott när du använder det, så det finns en stor nackdel också. - - - Sticky Mines are a perfect tool to create small chain reactions knocking enemy hedgehogs into dire situations ... or water. - Tips - Fästande minor är ett perfekt verktyg för att skapa små kedjereaktioner som slår ner fiender i farliga situationer ... eller vatten. - - - The Hammer is most effective when used on bridges or girders. Hit hogs will just break through the ground. - Tips - Hammaren är mest effektiv när den används på broar eller balkar. När du slår till igelkottarna kommer de att falla nergenom hålet. - - - If you're stuck behind an enemy hedgehog, use the Hammer to free yourself without getting damaged by an explosion. - Tips - Om du är fast bakom en fiende, använd hammaren för att göra dig fri utan att skadas av en explosition. - - - The Cake's maximum walking distance depends on the ground it has to pass. Use [attack] to detonate it early. - Tips - Tårtans längsta gångsträcka beror på vägen den måste ta. Använd [attack] för att spränga den tidigt. - - - The Flame Thrower is a weapon but it can be used for tunnel digging as well. - Tips - Eldkastaren är ett vapen, men den kan användas för att gräva tunnlar också. - - - Want to know who's behind the game? Click on the Hedgewars logo in the main menu to see the credits. - Tips - Vill du veta vilka som ligger bakom spelet? Tryck på Hedgewars-loggan i huvudmenyn för att se medverkande. - - - Like Hedgewars? Become a fan on %1 or follow us on %2! - Tips - Gillar du Hedgewars? Bli ett fan på %1 eller följ oss på %2! - - - Feel free to draw your own graves, hats, flags or even maps and themes! But note that you'll have to share them somewhere to use them online. - Tips - Du är välkommen att rita dina egna gravar, hattar, flaggor eller till och med banor eller teman! Men notera att du måste lägga ut dem någonstans för att använda dem online. - - - Really want to wear a specific hat? Donate to us and receive an exclusive hat of your choice! - Tips - Vill du verkligen ha en specifik hatt? Ge os en donation och få en exklusiv hatt som du väljer! - - - Keep your video card drivers up to date to avoid issues playing the game. - Tips - Se till att hålla dina grafikdrivrutiner uppdaterade för att undvika problem när du spalar. - - - You can find your Hedgewars configuration files under "My Documents\Hedgewars". Create backups or take the files with you, but don't edit them by hand. - Tips - Du kan hitta dina konfigurationsfiler under "Mina Dokument\Hedgewars". Gör en säkerhetskopia eller ta med dig filerna, men redigera dem inte för hand. - - - You're able to associate Hedgewars related files (savegames and demo recordings) with the game to launch them right from your favorite file or internet browser. - Tips - Du kan associera Hedgewars-relaterade filer (sparfiler och demo-inspelningar) med spelet för att köra dem direkt från den filhanterare eller webbläsare du tycker bäst om. - - - Want to save ropes? Release the rope in mid air and then shoot again. As long as you don't touch the ground you'll reuse your rope without wasting ammo! - Tips - Vill du spara rep? Släpp repet i luften och sedan sjut igen. Så länge du inte nuddar marken använder du samma rep utan att slösa på ammunition! - - - You can find your Hedgewars configuration files under "Library/Application Support/Hedgewars" in your home directory. Create backups or take the files with you, but don't edit them by hand. - Tips - Du kan hitta dina konfigurationsfiler under "Library/Application Support/Hedgewars" i din hem-mapp. Gör en säkerhetskopia eller ta med dig filerna, men redigera dem inte för hand. - - - You can find your Hedgewars configuration files under ".hedgewars" in your home directory. Create backups or take the files with you, but don't edit them by hand. - Tips - Du kan hitta dina konfigurationsfiler under ".hedgewars" i din hem-mapp. Gör en säkerhetskopia eller ta med dig filerna, men redigera dem inte för hand. - - - The Windows version of Hedgewars supports Xfire. Make sure to add Hedgewars to its game list so your friends can see you playing. - Tips - Windows-versionen av Hedgewars har stöd för Xfire. Se till att lägga till Hedgewars till spellistan så att dina vänner kan se dig spela. - - - Use the Molotov or Flame Thrower to temporary keep hedgehogs from passing terrain such as tunnels or platforms. - Tips - Använd molotov eller eldkastaren för att temporärt förhindra att igelkottar passerar terräng så som tunnlar eller platformar. - - - The Homing Bee can be tricky to use. Its turn radius depends on its velocity, so try to not use full power. - Tips - Målsökande bin kan vara kluriga att använda. Svängradien beror på hastigheten, så försök att inte använda full kraft. - - Downloadable Content Nedladdningsbart innehåll - Local Game - - - Play a game on a single computer - Network Game - - - Play a game across a network @@ -817,6 +855,14 @@ Edit game preferences + + Play a game across a local area network + + + + Play a game on an official server + + PageMultiplayer @@ -824,6 +870,10 @@ Start Starta + + Edit game preferences + + PageNetGame @@ -832,27 +882,12 @@ Kontroll - Downloadable Content - Nedladdningsbart innehåll - - - - PageNetType - - LAN game - LAN-spel - - - Official server - Officiell server - - - Join hundreds of players online! + Edit game preferences - Join or host your own game server in a Local Area Network. - + Start + Starta @@ -898,10 +933,6 @@ Ta bort vapenset - General - Allmänt - - Advanced Avancerat @@ -941,6 +972,94 @@ System proxy settings + + Select an action to change what key controls it + + + + Reset to default + + + + Reset all binds + + + + Game + + + + Graphics + + + + Audio + + + + Controls + + + + Video Recording + + + + Network + + + + Teams + Lag + + + Schemes + + + + Weapons + Vapen + + + Frontend + + + + Custom colors + + + + Game audio + + + + Frontend audio + + + + Account + + + + Proxy settings + + + + Miscellaneous + + + + Updates + + + + Check for updates + + + + Video recording options + + PagePlayDemo @@ -1140,18 +1259,10 @@ PageSinglePlayer - Simple Game - - - Play a quick game against the computer with random settings - Multiplayer - - - Play a hotseat game against your friends, or AI teams @@ -1160,26 +1271,14 @@ - Training Mode - - - Practice your skills in a range of training missions - Demos - - - Watch recorded demos - Load - Läs in - - Load a previously saved game @@ -1225,14 +1324,6 @@ - Date: - - - - Size: - - - encoding @@ -1240,6 +1331,16 @@ uploading + + Date: %1 + + + + + Size: %1 + + + QAction @@ -1248,10 +1349,6 @@ Släng ut - Start - Starta - - Restrict Joins Begränsa tillkommande @@ -1299,10 +1396,6 @@ Helskärm - Enable sound - Aktivera ljud - - Show FPS Visa FPS (rutor per sekund) @@ -1311,14 +1404,6 @@ Visa alternativ skada - Enable music - Aktivera musik - - - Frontend fullscreen - Spelmenyn i helskärm - - Append date and time to record file name Bifoga datum och tid till namnet på inspelningsfiler @@ -1331,18 +1416,6 @@ Visa hjälp i ammunitionsmenyn - Enable frontend sounds - Aktivera ljud i spelmenyn - - - Enable frontend music - Aktivera musik i spelmenyn - - - Frontend effects - Effekter i spelmenyn - - Save password @@ -1362,14 +1435,38 @@ Use game resolution + + Visual effects + + + + Sound + + + + In-game sound effects + + + + Music + + + + In-game music + + + + Frontend sound effects + + + + Frontend music + + QComboBox - generated map... - genererad karta... - - Human Människa @@ -1382,14 +1479,6 @@ (Systemstandard) - generated maze... - genererad labyrint... - - - Mission - Uppdrag - - Community Gemenskap @@ -1406,10 +1495,6 @@ Pågår - hand drawn map... - handritad karta... - - Disabled Avaktiverad @@ -1446,10 +1531,6 @@ Uppe och nere - Wiggle - Vicka - - Red/Cyan grayscale Röd/Cyan gråskala @@ -1481,22 +1562,10 @@ Lagmedlemmar - Key binds - Tangentbindningar - - Fort Fort - Teams - Lag - - - Audio/Graphic options - Ljud/grafikinställningar - - Net game Internetspel @@ -1517,26 +1586,6 @@ Laginställningar - Misc - Diverse - - - Schemes and Weapons - Scheman och vapen - - - Custom colors - - - - Miscellaneous - - - - Video recording options - - - Videos @@ -1544,30 +1593,10 @@ Description - - Proxy settings - - QLabel - Developers: - Utvecklare: - - - Art: - Grafik: - - - Translations: - Översättningar: - - - Special thanks: - Särskilt tack till: - - Weapons Vapen @@ -1600,10 +1629,6 @@ Version - Sounds: - Ljud: - - Initial sound volume Ursprunglig ljudvolym @@ -1640,10 +1665,6 @@ Lådor - Game scheme - Spelschema - - % Dud Mines % falska minor @@ -1680,10 +1701,6 @@ Tips: - This development build is 'work in progress' and may not be compatible with other versions of the game. Some features might be broken or incomplete. Use at your own risk! - Denna utvecklingsversion är inte färdig och kanske inte är kompatibel med andra versioner av spelet. Några delar kan vara trasiga eller ofullständiga. Använd på egen risk! - - Quality Kvalitet @@ -1758,10 +1775,6 @@ - Summary - - - Description @@ -1789,6 +1802,38 @@ Bitrate (Kbps) + + This development build is 'work in progress' and may not be compatible with other versions of the game, while some features might be broken or incomplete! + + + + Fullscreen + Helskärm + + + Fullscreen Resolution + + + + Windowed Resolution + + + + Your Email + + + + Summary + + + + Send system information + + + + Type the security code: + + QLineEdit @@ -1827,10 +1872,6 @@ Filassociationer har misslyckats. - Please fill out all fields - - - Error while authenticating at google.com: @@ -1877,18 +1918,6 @@ - Successfully posted the issue on hedgewars.googlecode.com - - - - Error during authentication at google.com - - - - Error reporting the issue, please try again later (or visit hedgewars.googlecode.com directly) - - - Main - Error @@ -2036,16 +2065,37 @@ Do you really want to delete the weapon set '%1'? - - - QObject - - Nickname - Smeknamn - - - Please enter your nickname - Var god ange ditt smeknamn + + Hedgewars - Nick not registered + + + + System Information Preview + + + + Failed to generate captcha + + + + Failed to download captcha + + + + Please fill out all fields. Email is optional. + + + + Hedgewars - Warning + + + + Hedgewars - Information + + + + Hedgewars + @@ -2103,26 +2153,10 @@ Läs in - Setup - Inställningar - - - Ready - Redo - - - Random Team - Slumpat lag - - Associate file extensions Associera filextentioner - more - mer - - More info @@ -2215,6 +2249,25 @@ + SeedPrompt + + The map seed is the basis for all random values generated by the game. + + + + Cancel + Avbryt + + + Set seed + + + + Close + + + + SelWeaponWidget Weapon set @@ -2242,106 +2295,21 @@ - ToggleButtonWidget - - Vampirism - Vampyrism - - - Karma - Karma - - - Artillery - Artilleri - - - Fort Mode - Fortläge - - - Divide Teams - Dela upp lag - - - Solid Land - Solitt land - - - Add Border - Lägg till kant - - - Low Gravity - Låg gravitation - - - Laser Sight - Lasersikte - - - Invulnerable - Osårbar - - - Random Order - Slumpad ordning - - - King - Kung - - - Place Hedgehogs - Placera igelkottar - - - Clan Shares Ammo - Klan delar ammunition - - - Disable Girders - Avaktivera balkar - - - Disable Land Objects - Avaktivera landföremål - - - AI Survival Mode - AI-överlevnad - - - Reset Health - Återställ hälsa - - - Unlimited Attacks - Obegränsade attacker - - - Reset Weapons - Återställ vapen - - - Per Hedgehog Ammo - Ammunition per igelkott - - - Disable Wind - Avaktivera vind - - - More Wind - Mer vind - - - Tag Team - Maraton - - - Add Bottom Border - Lägg till undre barriär + TeamShowWidget + + %1's team + + + + + ThemePrompt + + Select a theme for this map + + + + Cancel + Avbryt @@ -2459,11 +2427,6 @@ ta bild - hedgehogs -info - information om igelkottar - - quit avsluta @@ -2515,33 +2478,33 @@ record + + hedgehog info + + binds (categories) - Basic controls - Allmäna kontroller - - - Weapon controls - Vanenkontroller - - - Camera and cursor controls - Kamera och pilkontroller - - - Other - Annat + Movement + + + + Weapons + Vapen + + + Camera + + + + Miscellaneous + binds (descriptions) - Move your hogs and aim: - Flytta dina igelkottar och sikta: - - Traverse gaps and obstacles by jumping: Undvik hål och hinder genom att hoppa: @@ -2605,6 +2568,10 @@ Record video: + + Hedgehog movement + + binds (keys) diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Locale/hedgewars_tr_TR.ts --- a/share/hedgewars/Data/Locale/hedgewars_tr_TR.ts Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Locale/hedgewars_tr_TR.ts Fri Feb 22 05:05:32 2013 +0100 @@ -20,6 +20,79 @@ + BanDialog + + IP + IP + + + Nick + + + + IP/Nick + + + + Reason + + + + Duration + + + + Ok + + + + Cancel + İptal + + + you know why + + + + Warning + + + + Please, specify %1 + + + + nickname + + + + permanent + + + + + DataManager + + Use Default + + + + + FeedbackDialog + + View + + + + Cancel + İptal + + + Send Feedback + + + + FreqSpinBox Never @@ -43,13 +116,36 @@ Düzeni değiştir - When this option is enabled selecting a game scheme will auto-select a weapon - - - Game Options + + Game scheme will auto-select a weapon + + + + + HWApplication + + %1 minutes + + + + %1 hour + + + + %1 hours + + + + %1 day + + + + %1 days + + HWAskQuitDialog @@ -100,10 +196,6 @@ Failed to save StyleSheet to %1 - - %1 is not a valid command! - - HWForm @@ -138,17 +230,6 @@ - Your nickname %1 is -registered on Hedgewars.org -Please provide your password below -or pick another nickname in game config: - - - - No password supplied. - - - Nickname @@ -161,6 +242,59 @@ Please pick another nickname: + + %1's Team + + + + Hedgewars - Nick registered + + + + This nick is registered, and you haven't specified a password. + +If this nick isn't yours, please register your own nick at www.hedgewars.org + +Password: + + + + Your nickname is not registered. +To prevent someone else from using it, +please register it at www.hedgewars.org + + + + + +Your password wasn't saved either. + + + + Hedgewars - Empty nickname + + + + Hedgewars - Wrong password + + + + You entered a wrong password. + + + + Try Again + + + + Hedgewars - Connection error + + + + You reconnected too fast. +Please wait a few seconds and try again. + + HWGame @@ -176,18 +310,6 @@ HWMapContainer - Map - Harita - - - Themes - Temalar - - - Filter - Filtre - - All Tümü @@ -212,10 +334,6 @@ Uçuk Kaçık - Type - - - Small tunnels @@ -224,27 +342,95 @@ - Large tunnels - - - - Small floating islands - - - - Medium floating islands - - - - Large floating islands - - - Seed - Set + Map type: + + + + Image map + + + + Mission map + + + + Hand-drawn + + + + Randomly generated + + + + Random maze + + + + Random + Rastgele + + + Map preview: + + + + Load map drawing + + + + Edit map drawing + + + + Largetunnels + + + + Small islands + + + + Medium islands + + + + Large islands + + + + Map size: + + + + Maze style: + + + + Mission: + + + + Map: + + + + Theme: + + + + Load drawn map + + + + Drawn Maps + + + + All files @@ -317,8 +503,8 @@ HWPasswordDialog - Password - Parola + Login + @@ -333,6 +519,32 @@ + HatButton + + Change hat (%1) + + + + + HatPrompt + + Select a hat + + + + Filter: + + + + Cancel + İptal + + + Use selected hat + + + + KB SDL_ttf returned error while rendering text, most propably it is related to the bug in freetype2. It's recommended to update your freetype lib. @@ -340,6 +552,13 @@ + KeyBinder + + Category + + + + LibavInteraction Duration: %1m %2s @@ -358,6 +577,17 @@ Audio: + + unknown + + + + + MapModel + + No description available. + + PageAdmin @@ -389,6 +619,38 @@ Set data + + General + Genel + + + Bans + + + + IP/Nick + + + + Expiration + + + + Reason + + + + Refresh + + + + Add + + + + Remove + + PageConnecting @@ -443,8 +705,40 @@ Genel - Advanced - Gelişmiş + Select an action to choose a custom key bind for this team + + + + Use my default + + + + Reset all binds + + + + Custom Controls + + + + Hat + + + + Name + + + + This hedgehog's name + + + + Randomize this hedgehog's name + + + + Random Team + @@ -519,267 +813,14 @@ PageMain - Simply pick the same color as a friend to play together as a team. Each of you will still control his or her own hedgehogs but they'll win or lose together. - Tips - - - - Some weapons might do only low damage but they can be a lot more devastating in the right situation. Try to use the Desert Eagle to knock multiple hedgehogs into the water. - Tips - - - - If you're unsure what to do and don't want to waste ammo, skip one round. But don't let too much time pass as there will be Sudden Death! - Tips - - - - If you'd like to keep others from using your preferred nickname on the official server, register an account at http://www.hedgewars.org/. - Tips - - - - You're bored of default gameplay? Try one of the missions - they'll offer different gameplay depending on the one you picked. - Tips - - - - By default the game will always record the last game played as a demo. Select 'Local Game' and pick the 'Demos' button on the lower right corner to play or manage them. - Tips - - - - Hedgewars is Open Source and Freeware we create in our spare time. If you've got problems, ask on our forums but please don't expect 24/7 support! - Tips - - - - Hedgewars is Open Source and Freeware we create in our spare time. If you like it, help us with a small donation or contribute your own work! - Tips - - - - Hedgewars is Open Source and Freeware we create in our spare time. Share it with your family and friends as you like! - Tips - - - - From time to time there will be official tournaments. Upcoming events will be announced at http://www.hedgewars.org/ some days in advance. - Tips - - - - Hedgewars is available in many languages. If the translation in your language seems to be missing or outdated, feel free to contact us! - Tips - - - - Hedgewars can be run on lots of different operating systems including Microsoft Windows, Mac OS X and Linux. - Tips - - - - Always remember you're able to set up your own games in local and network/online play. You're not restricted to the 'Simple Game' option. - Tips - - - - While playing you should give yourself a short break at least once an hour. - Tips - - - - If your graphics card isn't able to provide hardware accelerated OpenGL, try to enable the low quality mode to improve performance. - Tips - - - - We're open to suggestions and constructive feedback. If you don't like something or got a great idea, let us know! - Tips - - - - Especially while playing online be polite and always remember there might be some minors playing with or against you as well! - Tips - - - - Special game modes such as 'Vampirism' or 'Karma' allow you to develop completely new tactics. Try them in a custom game! - Tips - - - - You should never install Hedgewars on computers you don't own (school, university, work, etc.). Please ask the responsible person instead! - Tips - - - - Hedgewars can be perfect for short games during breaks. Just ensure you don't add too many hedgehogs or use an huge map. Reducing time and health might help as well. - Tips - - - - No hedgehogs were harmed in making this game. - Tips - - - - Hedgewars is Open Source and Freeware we create in our spare time. If someone sold you the game, you should try get a refund! - Tips - - - - Connect one or more gamepads before starting the game to be able to assign their controls to your teams. - Tips - - - - Create an account on %1 to keep others from using your most favourite nickname while playing on the official server. - Tips - - - - If your graphics card isn't able to provide hardware accelerated OpenGL, try to update the associated drivers. - Tips - - - - There are three different jumps available. Tap [high jump] twice to do a very high/backwards jump. - Tips - - - - Afraid of falling off a cliff? Hold down [precise] to turn [left] or [right] without actually moving. - Tips - - - - Some weapons require special strategies or just lots of training, so don't give up on a particular tool if you miss an enemy once. - Tips - - - - Most weapons won't work once they touch the water. The Homing Bee as well as the Cake are exceptions to this. - Tips - - - - The Old Limbuger only causes a small explosion. However the wind affected smelly cloud can poison lots of hogs at once. - Tips - - - - The Piano Strike is the most damaging air strike. You'll lose the hedgehog performing it, so there's a huge downside as well. - Tips - - - - Sticky Mines are a perfect tool to create small chain reactions knocking enemy hedgehogs into dire situations ... or water. - Tips - - - - The Hammer is most effective when used on bridges or girders. Hit hogs will just break through the ground. - Tips - - - - If you're stuck behind an enemy hedgehog, use the Hammer to free yourself without getting damaged by an explosion. - Tips - - - - The Cake's maximum walking distance depends on the ground it has to pass. Use [attack] to detonate it early. - Tips - - - - The Flame Thrower is a weapon but it can be used for tunnel digging as well. - Tips - - - - Want to know who's behind the game? Click on the Hedgewars logo in the main menu to see the credits. - Tips - - - - Like Hedgewars? Become a fan on %1 or follow us on %2! - Tips - - - - Feel free to draw your own graves, hats, flags or even maps and themes! But note that you'll have to share them somewhere to use them online. - Tips - - - - Really want to wear a specific hat? Donate to us and receive an exclusive hat of your choice! - Tips - - - - Keep your video card drivers up to date to avoid issues playing the game. - Tips - - - - You can find your Hedgewars configuration files under "My Documents\Hedgewars". Create backups or take the files with you, but don't edit them by hand. - Tips - - - - You're able to associate Hedgewars related files (savegames and demo recordings) with the game to launch them right from your favorite file or internet browser. - Tips - - - - Want to save ropes? Release the rope in mid air and then shoot again. As long as you don't touch the ground you'll reuse your rope without wasting ammo! - Tips - - - - You can find your Hedgewars configuration files under "Library/Application Support/Hedgewars" in your home directory. Create backups or take the files with you, but don't edit them by hand. - Tips - - - - You can find your Hedgewars configuration files under ".hedgewars" in your home directory. Create backups or take the files with you, but don't edit them by hand. - Tips - - - - The Windows version of Hedgewars supports Xfire. Make sure to add Hedgewars to its game list so your friends can see you playing. - Tips - - - - Use the Molotov or Flame Thrower to temporary keep hedgehogs from passing terrain such as tunnels or platforms. - Tips - - - - The Homing Bee can be tricky to use. Its turn radius depends on its velocity, so try to not use full power. - Tips - - - Downloadable Content - Local Game - - - Play a game on a single computer - Network Game - - - Play a game across a network @@ -807,6 +848,14 @@ Edit game preferences + + Play a game across a local area network + + + + Play a game on an official server + + PageMultiplayer @@ -814,6 +863,10 @@ Start Başla + + Edit game preferences + + PageNetGame @@ -821,24 +874,13 @@ Control Kontrol - - - PageNetType - - LAN game - LAN oyunu - - - Official server - Resmi sunucu - - - Join hundreds of players online! - - - - Join or host your own game server in a Local Area Network. - + + Edit game preferences + + + + Start + Başla @@ -884,10 +926,6 @@ - General - Genel - - Advanced Gelişmiş @@ -927,6 +965,94 @@ System proxy settings + + Select an action to change what key controls it + + + + Reset to default + + + + Reset all binds + + + + Game + + + + Graphics + + + + Audio + + + + Controls + + + + Video Recording + + + + Network + + + + Teams + Takımlar + + + Schemes + + + + Weapons + Silahlar + + + Frontend + + + + Custom colors + + + + Game audio + + + + Frontend audio + + + + Account + + + + Proxy settings + + + + Miscellaneous + + + + Updates + + + + Check for updates + + + + Video recording options + + PagePlayDemo @@ -1125,18 +1251,10 @@ PageSinglePlayer - Simple Game - - - Play a quick game against the computer with random settings - Multiplayer - - - Play a hotseat game against your friends, or AI teams @@ -1145,26 +1263,14 @@ - Training Mode - - - Practice your skills in a range of training missions - Demos - - - Watch recorded demos - Load - Yükle - - Load a previously saved game @@ -1209,14 +1315,6 @@ - Date: - - - - Size: - - - encoding @@ -1224,6 +1322,16 @@ uploading + + Date: %1 + + + + + Size: %1 + + + QAction @@ -1236,10 +1344,6 @@ Bilgi - Start - Başla - - Restrict Joins Katılmaları Kısıtla @@ -1283,18 +1387,6 @@ Tam ekran - Frontend fullscreen - Oyun girişi tam ekran - - - Enable sound - Sesleri etkinleştir - - - Enable music - Müziği etkinleştir - - Show FPS FPS'yi göster @@ -1315,18 +1407,6 @@ - Enable frontend sounds - - - - Enable frontend music - - - - Frontend effects - - - Save password @@ -1346,14 +1426,38 @@ Use game resolution + + Visual effects + + + + Sound + + + + In-game sound effects + + + + Music + + + + In-game music + + + + Frontend sound effects + + + + Frontend music + + QComboBox - generated map... - rastgele harita... - - Human İnsan @@ -1366,14 +1470,6 @@ - generated maze... - - - - Mission - - - Community @@ -1390,10 +1486,6 @@ - hand drawn map... - - - Disabled @@ -1430,10 +1522,6 @@ - Wiggle - - - Red/Cyan grayscale @@ -1469,18 +1557,6 @@ Kale - Key binds - Tuşlar - - - Teams - Takımlar - - - Audio/Graphic options - Ses/Görüntü seçenekleri - - Net game Ağ oyunu @@ -1501,26 +1577,6 @@ - Misc - - - - Schemes and Weapons - - - - Custom colors - - - - Miscellaneous - - - - Video recording options - - - Videos @@ -1528,10 +1584,6 @@ Description - - Proxy settings - - QLabel @@ -1548,26 +1600,6 @@ Sürüm - Developers: - Geliştiriciler: - - - Art: - Sanat: - - - Sounds: - Sesler: - - - Translations: - Çeviriler: - - - Special thanks: - Özel teşekkür: - - Weapons Silahlar @@ -1600,10 +1632,6 @@ Başlangıçtaki ses seviyesi - Game scheme - Oyun teması - - Damage Modifier Hasar Çarpanı @@ -1664,10 +1692,6 @@ - This development build is 'work in progress' and may not be compatible with other versions of the game. Some features might be broken or incomplete. Use at your own risk! - - - Quality @@ -1742,10 +1766,6 @@ - Summary - - - Description @@ -1773,6 +1793,38 @@ Bitrate (Kbps) + + This development build is 'work in progress' and may not be compatible with other versions of the game, while some features might be broken or incomplete! + + + + Fullscreen + Tam ekran + + + Fullscreen Resolution + + + + Windowed Resolution + + + + Your Email + + + + Summary + + + + Send system information + + + + Type the security code: + + QLineEdit @@ -1811,10 +1863,6 @@ - Please fill out all fields - - - Error while authenticating at google.com: @@ -1861,18 +1909,6 @@ - Successfully posted the issue on hedgewars.googlecode.com - - - - Error during authentication at google.com - - - - Error reporting the issue, please try again later (or visit hedgewars.googlecode.com directly) - - - Main - Error @@ -2018,15 +2054,36 @@ Do you really want to delete the weapon set '%1'? - - - QObject - - Nickname - - - - Please enter your nickname + + Hedgewars - Nick not registered + + + + System Information Preview + + + + Failed to generate captcha + + + + Failed to download captcha + + + + Please fill out all fields. Email is optional. + + + + Hedgewars - Warning + + + + Hedgewars - Information + + + + Hedgewars @@ -2085,26 +2142,10 @@ Yükle - Setup - Ayarla - - - Ready - Hazır - - - Random Team - - - Associate file extensions - more - - - More info @@ -2197,6 +2238,25 @@ + SeedPrompt + + The map seed is the basis for all random values generated by the game. + + + + Cancel + İptal + + + Set seed + + + + Close + + + + SelWeaponWidget Weapon set @@ -2224,106 +2284,21 @@ - ToggleButtonWidget - - Vampirism - Vampircilik - - - Karma - Karma - - - Artillery - Topçuluk - - - Fort Mode - Kale Modu - - - Divide Teams - Takımları Böl - - - Solid Land - Parçalanmaz Yüzey - - - Add Border - Sınır Ekle - - - Low Gravity - Azaltılmış Yerçekimi - - - Laser Sight - Lazer Görüşü - - - Invulnerable - Ölümsüzlük - - - Random Order - - - - King - - - - Place Hedgehogs - - - - Clan Shares Ammo - - - - Disable Girders - - - - Disable Land Objects - - - - AI Survival Mode - - - - Reset Health - - - - Unlimited Attacks - - - - Reset Weapons - - - - Per Hedgehog Ammo - - - - Disable Wind - - - - More Wind - - - - Tag Team - - - - Add Bottom Border - + TeamShowWidget + + %1's team + + + + + ThemePrompt + + Select a theme for this map + + + + Cancel + İptal @@ -2457,12 +2432,6 @@ yakala - hedgehogs -info - kirpi -bilgileri - - quit çıkış @@ -2498,33 +2467,33 @@ record + + hedgehog info + + binds (categories) - Basic controls - - - - Weapon controls - - - - Camera and cursor controls - - - - Other - Diğer + Movement + + + + Weapons + Silahlar + + + Camera + + + + Miscellaneous + binds (descriptions) - Move your hogs and aim: - - - Traverse gaps and obstacles by jumping: @@ -2588,6 +2557,10 @@ Record video: + + Hedgehog movement + + binds (keys) diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Locale/hedgewars_uk.ts --- a/share/hedgewars/Data/Locale/hedgewars_uk.ts Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Locale/hedgewars_uk.ts Fri Feb 22 05:05:32 2013 +0100 @@ -20,6 +20,79 @@ + BanDialog + + IP + IP + + + Nick + + + + IP/Nick + + + + Reason + + + + Duration + + + + Ok + + + + Cancel + Скасувати + + + you know why + + + + Warning + + + + Please, specify %1 + + + + nickname + + + + permanent + + + + + DataManager + + Use Default + + + + + FeedbackDialog + + View + + + + Cancel + Скасувати + + + Send Feedback + + + + FreqSpinBox Never @@ -45,13 +118,36 @@ Редагувати схеми - When this option is enabled selecting a game scheme will auto-select a weapon - Коли ввімкнена ця опція при виборі схеми гри зброя буде вибрана автоматично - - Game Options Параметри гри + + Game scheme will auto-select a weapon + + + + + HWApplication + + %1 minutes + + + + %1 hour + + + + %1 hours + + + + %1 day + + + + %1 days + + HWAskQuitDialog @@ -102,10 +198,6 @@ Failed to save StyleSheet to %1 - - %1 is not a valid command! - - HWForm @@ -140,20 +232,6 @@ - Your nickname %1 is -registered on Hedgewars.org -Please provide your password below -or pick another nickname in game config: - Ваш нік %1 вже -зареєстрований на Hedgewars.org -Введіть ваш пароль нижче або -виберіть інший нік в налаштуваннях гри: - - - No password supplied. - - - Nickname Ім'я @@ -166,6 +244,59 @@ Please pick another nickname: + + %1's Team + + + + Hedgewars - Nick registered + + + + This nick is registered, and you haven't specified a password. + +If this nick isn't yours, please register your own nick at www.hedgewars.org + +Password: + + + + Your nickname is not registered. +To prevent someone else from using it, +please register it at www.hedgewars.org + + + + + +Your password wasn't saved either. + + + + Hedgewars - Empty nickname + + + + Hedgewars - Wrong password + + + + You entered a wrong password. + + + + Try Again + + + + Hedgewars - Connection error + + + + You reconnected too fast. +Please wait a few seconds and try again. + + HWGame @@ -181,18 +312,6 @@ HWMapContainer - Map - Мапа - - - Themes - Теми - - - Filter - Фільтр - - All Всі @@ -217,10 +336,6 @@ Безглузді - Type - Тип - - Small tunnels Малі тунелі @@ -229,28 +344,96 @@ Середні тунелі - Large tunnels - Великі тунелі - - - Small floating islands - Малі плавучі острова - - - Medium floating islands - Середні плавучі острова - - - Large floating islands - Великі плавучі острова - - Seed Перемішати - Set - Задати + Map type: + + + + Image map + + + + Mission map + + + + Hand-drawn + + + + Randomly generated + + + + Random maze + + + + Random + Випадково + + + Map preview: + + + + Load map drawing + + + + Edit map drawing + + + + Largetunnels + + + + Small islands + + + + Medium islands + + + + Large islands + + + + Map size: + + + + Maze style: + + + + Mission: + + + + Map: + + + + Theme: + + + + Load drawn map + Завантажити намальовану мапу + + + Drawn Maps + + + + All files + @@ -322,8 +505,8 @@ HWPasswordDialog - Password - Пароль + Login + @@ -338,6 +521,32 @@ + HatButton + + Change hat (%1) + + + + + HatPrompt + + Select a hat + + + + Filter: + + + + Cancel + Скасувати + + + Use selected hat + + + + KB SDL_ttf returned error while rendering text, most propably it is related to the bug in freetype2. It's recommended to update your freetype lib. @@ -345,6 +554,13 @@ + KeyBinder + + Category + + + + LibavInteraction Duration: %1m %2s @@ -363,6 +579,17 @@ Audio: + + unknown + + + + + MapModel + + No description available. + + PageAdmin @@ -394,6 +621,38 @@ Set data Встановити дані + + General + Основні + + + Bans + + + + IP/Nick + + + + Expiration + + + + Reason + + + + Refresh + + + + Add + + + + Remove + + PageConnecting @@ -448,8 +707,40 @@ Основні - Advanced - Розширені + Select an action to choose a custom key bind for this team + + + + Use my default + + + + Reset all binds + + + + Custom Controls + + + + Hat + Капелюх + + + Name + Назва + + + This hedgehog's name + + + + Randomize this hedgehog's name + + + + Random Team + Випадкова Команда @@ -536,267 +827,14 @@ PageMain - Simply pick the same color as a friend to play together as a team. Each of you will still control his or her own hedgehogs but they'll win or lose together. - Tips - Виберіть той же колір що і в друга щоб грати в одній команді. Кожен з вас буде керувати власними їжаками але вони виграють чи програють разом. - - - Some weapons might do only low damage but they can be a lot more devastating in the right situation. Try to use the Desert Eagle to knock multiple hedgehogs into the water. - Tips - Деяка зброя наносить мало шкоди, але вона може бути більш руйнівною в правильній ситуації. Спробуйте використати Пустельного Орла для скидання кількох їжаків у воду. - - - If you're unsure what to do and don't want to waste ammo, skip one round. But don't let too much time pass as there will be Sudden Death! - Tips - Якщо ви не знаєте що робити і не хочете витрачати боєприпаси, пропустіть один раунд. Але не марнуйте занадто багато часу, тому-що прийде Раптова Смерть! - - - If you'd like to keep others from using your preferred nickname on the official server, register an account at http://www.hedgewars.org/. - Tips - Якщо ви хочете закріпити за собою нік на офіційному сервері, зареєструйте аккаунт на http://www.hedgewars.org/. - - - You're bored of default gameplay? Try one of the missions - they'll offer different gameplay depending on the one you picked. - Tips - Ви втомилися від гри за замовчуванням? Спробуйте одну з місій - вони пропонують різні види гри залежно від вашого вибору. - - - By default the game will always record the last game played as a demo. Select 'Local Game' and pick the 'Demos' button on the lower right corner to play or manage them. - Tips - За замовчуванням остання гра завжди буде записуватись в якості демо. Виберіть 'Локальну Гру' і натисніть кнопку 'Демонстрації' у нижньому правому куті щоб грати або керувати ними. - - - Hedgewars is Open Source and Freeware we create in our spare time. If you've got problems, ask on our forums but please don't expect 24/7 support! - Tips - Hedgewars є відкритою та безплатною, ми створюємо її у вільний час. Якщо у вас є проблеми, запитайте на нашому форумі, але будь-ласка, не чекайте підтримки 24/7! - - - Hedgewars is Open Source and Freeware we create in our spare time. If you like it, help us with a small donation or contribute your own work! - Tips - Hedgewars є відкритою та безплатною, ми створюємо її у вільний час. Якщо вона вам подобається, допоможіть нам невеликим внеском або вкладіть свою роботу! - - - Hedgewars is Open Source and Freeware we create in our spare time. Share it with your family and friends as you like! - Tips - Hedgewars є відкритою та безплатною, ми створюємо її у вільний час. Поділіться грою з родиною та друзями! - - - From time to time there will be official tournaments. Upcoming events will be announced at http://www.hedgewars.org/ some days in advance. - Tips - Час від часу проводяться офіційні турніри. Майбутні події будуть оголошені на http://www.hedgewars.org/ за кілька днів перед проведенням. - - - Hedgewars is available in many languages. If the translation in your language seems to be missing or outdated, feel free to contact us! - Tips - Hedgewars доступна на багатьох мовах. Якщо переклад на вашу мову застарів чи відсутній, не соромтеся звертатися до нас! - - - Hedgewars can be run on lots of different operating systems including Microsoft Windows, Mac OS X and Linux. - Tips - Hedgewars може бути запущений на багатьох операційних системах, включаючи Microsoft Windows, Mac OS X і Linux. - - - Always remember you're able to set up your own games in local and network/online play. You're not restricted to the 'Simple Game' option. - Tips - Завжди пам'ятайте, ви можете створити свою власну гру в локальному та мережному/онлайн-режимах. Ви не обмежені опцією 'Проста Гра'. - - - While playing you should give yourself a short break at least once an hour. - Tips - Поки граєте гру зробіть коротку перерву хоча б раз на годину. - - - If your graphics card isn't able to provide hardware accelerated OpenGL, try to enable the low quality mode to improve performance. - Tips - Якщо ваша відеокарта не може забезпечити апаратне прискорення OpenGL, спробуйте включити режим низької якості для підвищення продуктивності. - - - We're open to suggestions and constructive feedback. If you don't like something or got a great idea, let us know! - Tips - Ми відкриті для пропозицій і конструктивного зворотнього зв'язку. Якщо вам не подобається щось або є відмінна ідея, дайте нам знати! - - - Especially while playing online be polite and always remember there might be some minors playing with or against you as well! - Tips - Особливо під час гри онлайн будьте ввічливі і завжди пам'ятайте, з вами чи проти вас можуть грати неповнолітні! - - - Special game modes such as 'Vampirism' or 'Karma' allow you to develop completely new tactics. Try them in a custom game! - Tips - Спеціальні режими гри, такі як 'Вампіризм' чи 'Карма' дозволяють розробляти цілком нову тактику. Спробуйте їх в налаштованій грі! - - - You should never install Hedgewars on computers you don't own (school, university, work, etc.). Please ask the responsible person instead! - Tips - Ви не повинні встановлювати Hedgewars на комп'ютерах, які вам не належать (школа, університет, робота тощо). Будь ласка, звертайтесь до відповідальної особи! - - - Hedgewars can be perfect for short games during breaks. Just ensure you don't add too many hedgehogs or use an huge map. Reducing time and health might help as well. - Tips - Hedgewars чудово підходить для короткої гри під час перерв. Переконайтеся, що ви не додали занадто багато їжаків і не взяли велику карту. Скорочення часу і здоров'я також підійде. - - - No hedgehogs were harmed in making this game. - Tips - Під час розробки гри не постраждав жодний їжак. - - - Hedgewars is Open Source and Freeware we create in our spare time. If someone sold you the game, you should try get a refund! - Tips - Hedgewars є відкритою та безплатною, ми створюємо її у вільний час. Якщо хтось продав вам гру, ви повинні спробувати отримати відшкодування! - - - Connect one or more gamepads before starting the game to be able to assign their controls to your teams. - Tips - Підключіть один або кілька геймпадів перед початком гри, щоб ваші команди могли ними користуватись. - - - Create an account on %1 to keep others from using your most favourite nickname while playing on the official server. - Tips - Створіть акаунт на %1 щоб запобігти використанню іншими особами вашого улюбленого ніку під час гри на офіційному сервері. - - - If your graphics card isn't able to provide hardware accelerated OpenGL, try to update the associated drivers. - Tips - Якщо ваша відеокарта не може забезпечити апаратне прискорення OpenGL, спробуйте оновити відповідні драйвери. - - - There are three different jumps available. Tap [high jump] twice to do a very high/backwards jump. - Tips - В грі існують три різних види стрибків. Натисніть [високий стрибок] двічі щоб зробити дуже високий стрибок назад. - - - Afraid of falling off a cliff? Hold down [precise] to turn [left] or [right] without actually moving. - Tips - Боїтесь падіння зі скелі? Утримуйте [точно] щоб повернутись [вліво] чи [вправо] без фактичного переміщення. - - - Some weapons require special strategies or just lots of training, so don't give up on a particular tool if you miss an enemy once. - Tips - Деяка зброя вимагає спеціальних стратегій або просто багато тренувань, тому не відмовляйтесь від конкретного інструменту, якщо ви раз не знешкодили ворога. - - - Most weapons won't work once they touch the water. The Homing Bee as well as the Cake are exceptions to this. - Tips - Більшість зброї не буде працювати після торкання води. Бджола та Торт є виключеннями з цього правила. - - - The Old Limbuger only causes a small explosion. However the wind affected smelly cloud can poison lots of hogs at once. - Tips - Старий лімбургський сир викликає лише невеликий вибух. Однак смердюча хмара, яку відносить вітер, може отруїти багато їжаків за раз. - - - The Piano Strike is the most damaging air strike. You'll lose the hedgehog performing it, so there's a huge downside as well. - Tips - Напад піаніно є найбільш руйнівним повітряним ударом. Але ви втратите їжака, тому він має і негативну сторону. - - - Sticky Mines are a perfect tool to create small chain reactions knocking enemy hedgehogs into dire situations ... or water. - Tips - Липкі Міни чудовий інструмент створення малих ланцюгових реакцій для закидання ворогів у складні ситуації ... або у воду. - - - The Hammer is most effective when used on bridges or girders. Hit hogs will just break through the ground. - Tips - Молоток найбільш ефективний при використанні на мостах чи балках. Удар їжака просто провалить його крізь землю. - - - If you're stuck behind an enemy hedgehog, use the Hammer to free yourself without getting damaged by an explosion. - Tips - Якщо ви застрягли за ворожим їжаком, використайте Молоток, щоб звільнити себе без пошкоджень від вибуху. - - - The Cake's maximum walking distance depends on the ground it has to pass. Use [attack] to detonate it early. - Tips - Найбільший шлях ходьби Торта залежить від землі, по якій він повинен пройти. Використовуйте [атака] щоб підірвати його раніше. - - - The Flame Thrower is a weapon but it can be used for tunnel digging as well. - Tips - Вогнемет це зброя, але його можна також використати для риття тунелю. - - - Want to know who's behind the game? Click on the Hedgewars logo in the main menu to see the credits. - Tips - Хочете знати хто робить гру? Натисніть на логотип Hedgewars в головному меню, щоб побачити список. - - - Like Hedgewars? Become a fan on %1 or follow us on %2! - Tips - Подобається Hedgewars? Станьте фанатом на %1 або слідуйте за нами на %2! - - - Feel free to draw your own graves, hats, flags or even maps and themes! But note that you'll have to share them somewhere to use them online. - Tips - Ви можете самі намалювати надгробки, шапки, прапори та навіть мапи і теми! Але врахуйте, вам доведеться поділитися ними з кимось щоб використати їх в інтернет-грі. - - - Really want to wear a specific hat? Donate to us and receive an exclusive hat of your choice! - Tips - Хочете носити особливий капелюх? Внесіть пожертву і отримайте ексклюзивний капелюх на ваш вибір! - - - Keep your video card drivers up to date to avoid issues playing the game. - Tips - Використовуйте останні відео драйвери щоб уникнути проблем під час гри. - - - You can find your Hedgewars configuration files under "My Documents\Hedgewars". Create backups or take the files with you, but don't edit them by hand. - Tips - Ви можете знайти файли конфігурації Hedgewars в "My Documents\Hedgewars". Ви можете створити резервні копії або взяти файли з собою, але не редагуйте їх. - - - You're able to associate Hedgewars related files (savegames and demo recordings) with the game to launch them right from your favorite file or internet browser. - Tips - Ви можете зв'язати відповідні файли Hedgewars (файли збереження та демо-записи) з грою щоб запускати їх з вашої улюбленої теки чи інтернет-браузеру. - - - Want to save ropes? Release the rope in mid air and then shoot again. As long as you don't touch the ground you'll reuse your rope without wasting ammo! - Tips - Хочете заощадити мотузки? Випустіть мотузку в повітря а потім знову стріляйте. Поки ви не торкнулись грунту ви можете знову використовувати мотузку, не витрачаючи боєприпаси! - - - You can find your Hedgewars configuration files under "Library/Application Support/Hedgewars" in your home directory. Create backups or take the files with you, but don't edit them by hand. - Tips - Ви можете знайти файли конфігурації Hedgewars в "Library/Application Support/Hedgewars" в домашній теці. Ви можете створити резервні копії або взяти файли з собою, але не редагуйте їх. - - - You can find your Hedgewars configuration files under ".hedgewars" in your home directory. Create backups or take the files with you, but don't edit them by hand. - Tips - Ви можете знайти файли конфігурації Hedgewars в ".hedgewars" в домашній теці. Ви можете створити резервні копії або взяти файли з собою, але не редагуйте їх. - - - The Windows version of Hedgewars supports Xfire. Make sure to add Hedgewars to its game list so your friends can see you playing. - Tips - Windows-версія Hedgewars підтримує Xfire. Переконайтеся в тому, що ви додали Hedgewars до списку ігор, щоб ваші друзі могли бачити вас в грі. - - - Use the Molotov or Flame Thrower to temporary keep hedgehogs from passing terrain such as tunnels or platforms. - Tips - Використайте Коктейль Молотова або Вогнемет щоб тимчасово утримати їжаків від проходження такої місцевості як тунелі або платформи. - - - The Homing Bee can be tricky to use. Its turn radius depends on its velocity, so try to not use full power. - Tips - Навідна Бджілка може бути складною у керуванні. Радіус повороту залежить від її швидкості, тому постарайтеся не стріляти на повну силу. - - Downloadable Content - Local Game - - - Play a game on a single computer - Network Game - - - Play a game across a network @@ -824,6 +862,14 @@ Edit game preferences + + Play a game across a local area network + + + + Play a game on an official server + + PageMultiplayer @@ -831,6 +877,10 @@ Start Старт + + Edit game preferences + + PageNetGame @@ -838,24 +888,13 @@ Control Керування - - - PageNetType - - LAN game - Локальна гра - - - Official server - Офіційний сервер - - - Join hundreds of players online! + + Edit game preferences - Join or host your own game server in a Local Area Network. - + Start + Старт @@ -901,10 +940,6 @@ Видалити набір зброї - General - Основні - - Advanced Розширені @@ -944,6 +979,94 @@ System proxy settings + + Select an action to change what key controls it + + + + Reset to default + + + + Reset all binds + + + + Game + + + + Graphics + + + + Audio + + + + Controls + + + + Video Recording + + + + Network + + + + Teams + Команди + + + Schemes + + + + Weapons + Зброя + + + Frontend + + + + Custom colors + + + + Game audio + + + + Frontend audio + + + + Account + + + + Proxy settings + + + + Miscellaneous + + + + Updates + + + + Check for updates + + + + Video recording options + + PagePlayDemo @@ -1144,18 +1267,10 @@ PageSinglePlayer - Simple Game - - - Play a quick game against the computer with random settings - Multiplayer - - - Play a hotseat game against your friends, or AI teams @@ -1164,26 +1279,14 @@ - Training Mode - - - Practice your skills in a range of training missions - Demos - - - Watch recorded demos - Load - Завантажити - - Load a previously saved game @@ -1230,14 +1333,6 @@ - Date: - - - - Size: - - - encoding @@ -1245,6 +1340,16 @@ uploading + + Date: %1 + + + + + Size: %1 + + + QAction @@ -1257,10 +1362,6 @@ Інфо - Start - Старт - - Restrict Joins Обмежити Приєднання @@ -1308,18 +1409,6 @@ Повний екран - Frontend fullscreen - Меню на повний екран - - - Enable sound - Включити звук - - - Enable music - Включити музику - - Show FPS Показувати значення FPS @@ -1336,18 +1425,6 @@ Показувати підказки в меню зброї - Enable frontend sounds - Включити звуки в меню - - - Enable frontend music - Включити музику в меню - - - Frontend effects - Ефекти меню - - Save password @@ -1367,14 +1444,38 @@ Use game resolution + + Visual effects + + + + Sound + + + + In-game sound effects + + + + Music + + + + In-game music + + + + Frontend sound effects + + + + Frontend music + + QComboBox - generated map... - згенерована мапа... - - Human Людина @@ -1387,14 +1488,6 @@ (Системні замовчування) - Mission - Місія - - - generated maze... - згенерований лабіринт... - - Community Спільнота @@ -1411,10 +1504,6 @@ В процесі - hand drawn map... - вручну намальована мапа... - - Disabled Вимкнено @@ -1451,10 +1540,6 @@ Верх-низ - Wiggle - Погойдування - - Red/Cyan grayscale Черв./Блак. відтінки сірого @@ -1490,18 +1575,6 @@ Форт - Key binds - Прив'язки клавіш - - - Teams - Команди - - - Audio/Graphic options - Налаштування Звуку та Графіки - - Net game Мережна гра @@ -1522,26 +1595,6 @@ Налаштування Команди - Misc - Різне - - - Schemes and Weapons - Схеми та Зброя - - - Custom colors - - - - Miscellaneous - - - - Video recording options - - - Videos @@ -1549,10 +1602,6 @@ Description - - Proxy settings - - QLabel @@ -1569,26 +1618,6 @@ Версія - Developers: - Розробники: - - - Art: - Графіка: - - - Sounds: - Звуки: - - - Translations: - Переклади: - - - Special thanks: - Особлива вдячність: - - Weapons Зброя @@ -1645,10 +1674,6 @@ Кількість Подарунків - Game scheme - Схема гри - - % Dud Mines % Бракованих Мін @@ -1685,10 +1710,6 @@ Порада: - This development build is 'work in progress' and may not be compatible with other versions of the game. Some features might be broken or incomplete. Use at your own risk! - Ця розробницька збірка є проміжною і може бути несумісною з іншими версіями гри. Деякі функції можуть бути зламані чи неповні. Використовуйте її на свій страх і ризик! - - Quality Якість @@ -1763,10 +1784,6 @@ - Summary - - - Description @@ -1794,6 +1811,38 @@ Bitrate (Kbps) + + This development build is 'work in progress' and may not be compatible with other versions of the game, while some features might be broken or incomplete! + + + + Fullscreen + Повний екран + + + Fullscreen Resolution + + + + Windowed Resolution + + + + Your Email + + + + Summary + + + + Send system information + + + + Type the security code: + + QLineEdit @@ -1832,10 +1881,6 @@ Файлове асоціювання не вдалось - Please fill out all fields - - - Error while authenticating at google.com: @@ -1882,18 +1927,6 @@ - Successfully posted the issue on hedgewars.googlecode.com - - - - Error during authentication at google.com - - - - Error reporting the issue, please try again later (or visit hedgewars.googlecode.com directly) - - - Main - Error @@ -2042,16 +2075,37 @@ Do you really want to delete the weapon set '%1'? - - - QObject - - Nickname - Ім'я - - - Please enter your nickname - Будь ласка введіть ваше ім'я + + Hedgewars - Nick not registered + + + + System Information Preview + + + + Failed to generate captcha + + + + Failed to download captcha + + + + Please fill out all fields. Email is optional. + + + + Hedgewars - Warning + + + + Hedgewars - Information + + + + Hedgewars + @@ -2109,26 +2163,10 @@ Завантажити - Setup - Налаштування - - - Ready - Готовий - - - Random Team - Випадкова Команда - - Associate file extensions Асоціювати файлові розширення - more - більше - - More info @@ -2221,6 +2259,25 @@ + SeedPrompt + + The map seed is the basis for all random values generated by the game. + + + + Cancel + Скасувати + + + Set seed + + + + Close + + + + SelWeaponWidget Weapon set @@ -2248,109 +2305,24 @@ - ToggleButtonWidget - - Vampirism - Вампіризм - - - Karma - Карма - - - Artillery - Артилерія - - - Fort Mode - Режим Форту - - - Divide Teams - Розділення Команд - - - Solid Land - Щільний Грунт - - - Add Border - Додати Кордон - - - Low Gravity - Слабка Гравітація - - - Laser Sight - Лазерний Приціл - - - Invulnerable - Невразливість - - - Random Order - Випадковий Порядок - - - King - Король - - - Place Hedgehogs - Розмістити Їжаків - - - Clan Shares Ammo - Клан Ділиться Боєприпасами - - - Disable Girders - Вимкнути Балки - - - Disable Land Objects - Вимкнути Декорації - - - AI Survival Mode - Режим AI Виживання - - - Reset Health - Скинути Здоров'я - - - Unlimited Attacks - Необмежені Атаки - - - Reset Weapons - Скинути Зброю - - - Per Hedgehog Ammo - Боєприпаси на Їжака - - - Disable Wind - Вимкнути Вітер - - - More Wind - Більше Вітру - - - Tag Team - Збірна Команда - - - Add Bottom Border + TeamShowWidget + + %1's team + ThemePrompt + + Select a theme for this map + + + + Cancel + Скасувати + + + binds up @@ -2481,12 +2453,6 @@ знімок - hedgehogs -info - інформація -про їжачків - - quit вихід @@ -2522,33 +2488,33 @@ record + + hedgehog info + + binds (categories) - Basic controls - Основні елементи керування - - - Weapon controls - Керування зброєю - - - Camera and cursor controls - Керування камерою і курсором - - - Other - Інше + Movement + + + + Weapons + Зброя + + + Camera + + + + Miscellaneous + binds (descriptions) - Move your hogs and aim: - Переміщення ваших їжаків та цілі: - - Traverse gaps and obstacles by jumping: Подолання прогалин і перешкод стрибками: @@ -2612,6 +2578,10 @@ Record video: + + Hedgehog movement + + binds (keys) diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Locale/hedgewars_zh_CN.ts --- a/share/hedgewars/Data/Locale/hedgewars_zh_CN.ts Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Locale/hedgewars_zh_CN.ts Fri Feb 22 05:05:32 2013 +0100 @@ -4,7 +4,7 @@ AbstractPage - + Go back @@ -23,6 +23,96 @@ + BanDialog + + + permanent + + + + + + IP + IP + + + + Nick + + + + + IP/Nick + + + + + Reason + + + + + Duration + + + + + Ok + + + + + Cancel + 取消 + + + + you know why + + + + + Warning + + + + + Please, specify %1 + + + + + nickname + + + + + DataManager + + + Use Default + + + + + FeedbackDialog + + + View + + + + + Cancel + 取消 + + + + Send Feedback + + + + FreqSpinBox @@ -40,27 +130,60 @@ GameCFGWidget - + Game Options - + Edit weapons - - When this option is enabled selecting a game scheme will auto-select a weapon - - - - + + Game scheme will auto-select a weapon + + + + Edit schemes 修改游戏设置 + HWApplication + + + + %1 minutes + + + + + %1 hour + + + + + + + %1 hours + + + + + %1 day + + + + + + + %1 days + + + + HWAskQuitDialog @@ -71,128 +194,175 @@ HWChatWidget - + %1 has been removed from your ignore list - + %1 has been added to your ignore list - + %1 has been removed from your friends list - + %1 has been added to your friends list - + Stylesheet imported from %1 - + Enter %1 if you want to use the current StyleSheet in future, enter %2 to reset! - + Couldn't read %1 - + StyleSheet discarded + + StyleSheet saved to %1 + + + - StyleSheet saved to %1 - - - - Failed to save StyleSheet to %1 - - - %1 is not a valid command! - - HWForm - - + DefaultTeam - + + %1's Team + + + + Game aborted - - Your nickname %1 is -registered on Hedgewars.org -Please provide your password below -or pick another nickname in game config: - - - - - No password supplied. - - - - + + Hedgewars - Nick registered + + + + + This nick is registered, and you haven't specified a password. + +If this nick isn't yours, please register your own nick at www.hedgewars.org + +Password: + + + + + Your nickname is not registered. +To prevent someone else from using it, +please register it at www.hedgewars.org + + + + + + +Your password wasn't saved either. + + + + Nickname - + Someone already uses your nickname %1 on the server. Please pick another nickname: - + + No nickname supplied. - + + + Hedgewars - Empty nickname + + + + + Hedgewars - Wrong password + + + + + You entered a wrong password. + + + + + Try Again + + + + + Hedgewars - Connection error + + + + + You reconnected too fast. +Please wait a few seconds and try again. + + + + Hedgewars Demo File File Types - + Hedgewars Save File File Types - + Demo name - + Demo name: - - + + Cannot save record to file %1 无法录入文件 %1 @@ -200,13 +370,13 @@ HWGame - - + + en.txt zh_CN.txt - + Cannot open demofile %1 DEMO %1 打不开 @@ -214,95 +384,161 @@ HWMapContainer - - Map - 地图 + + Small tunnels + + + + + Medium tunnels + + + + + Seed + + + + + Map type: + + + + + Image map + + + + + Mission map + + + + + Hand-drawn + - Type - - - - - Small tunnels - - - - - Medium tunnels - - - - - Large tunnels - - - - - Small floating islands - - - - - Medium floating islands - - - - - Large floating islands - - - - - Themes - 主题 - - - - Seed - - - - - Set - - - - - Filter - 过滤 - - - + Randomly generated + + + + + Random maze + + + + + Random + + + + + Map preview: + + + + + Load map drawing + + + + + Edit map drawing + + + + All 全部 - + Small 小型 - + Medium 中型 - + Large 大型 - + Cavern 洞穴 - + Wacky 曲折 + + + Largetunnels + + + + + Small islands + + + + + Medium islands + + + + + Large islands + + + + + Map size: + + + + + Maze style: + + + + + Mission: + + + + + Map: + + + + + + Theme: + + + + + Load drawn map + + + + + Drawn Maps + + + + + All files + + HWNetServersModel @@ -325,65 +561,65 @@ HWNewNet - + User quit - + Remote host has closed connection - + The host was not found. Please check the host name and port settings. 错误没找到这个主机。请检查主机名和端口设置。 - + Connection refused 连接被拒绝 - + The server is too old. Disconnecting now. - + %1 *** %2 has joined - - + + %1 *** %2 has left - - + + %1 *** %2 has left (%3) - - + + %1 *** %2 has joined the room - + Quit reason: 退出原因: - + Room destroyed 房间损坏 - + You got kicked 被踢出 @@ -392,8 +628,8 @@ HWPasswordDialog - Password - 密码 + Login + @@ -410,6 +646,37 @@ + HatButton + + + Change hat (%1) + + + + + HatPrompt + + + Select a hat + + + + + Filter: + + + + + Cancel + 取消 + + + + Use selected hat + + + + KB @@ -418,6 +685,14 @@ + KeyBinder + + + Category + + + + LibavInteraction @@ -440,44 +715,97 @@ Audio: + + + unknown + + + + + MapModel + + + No description available. + + PageAdmin - + + General + 常规 + + + + Bans + + + + Fetch data - + Server message for latest version: - + Server message for previous versions: - + Latest version protocol number: - + MOTD preview: - + Clear Accounts Cache - + Set data + + + IP/Nick + + + + + Expiration + + + + + Reason + + + + + Refresh + + + + + Add + + + + + Remove + + PageConnecting @@ -541,13 +869,53 @@ PageEditTeam + Select an action to choose a custom key bind for this team + + + + + Use my default + + + + + Reset all binds + + + + General 常规 - - Advanced - 进阶 + + Custom Controls + + + + + Hat + + + + + Name + + + + + This hedgehog's name + + + + + Randomize this hedgehog's name + + + + + Random Team + @@ -568,47 +936,47 @@ - + The best shot award was won by <b>%1</b> with <b>%2</b> pts. - + The best killer is <b>%1</b> with <b>%2</b> kills in a turn. - + A total of <b>%1</b> hedgehog(s) were killed during this round. - + (%1 kill) - + <b>%1</b> thought it's good to shoot his own hedgehogs with <b>%2</b> pts. - + <b>%1</b> killed <b>%2</b> of his own hedgehogs. - + <b>%1</b> was scared and skipped turn <b>%2</b> times. @@ -635,358 +1003,69 @@ PageMain - Local Game - - - - Play a game on a single computer - Network Game - - - - Play a game across a network - + + Play a game across a local area network + + + + + Play a game on an official server + + + + Read about who is behind the Hedgewars Project - + Leave a feedback here reporting issues, suggesting features or just saying how you like Hedgewars - + Downloadable Content - + Access the user created content downloadable from our website - + Exit game - + Manage videos recorded from game - + Edit game preferences - - - Simply pick the same color as a friend to play together as a team. Each of you will still control his or her own hedgehogs but they'll win or lose together. - Tips - - - - - Some weapons might do only low damage but they can be a lot more devastating in the right situation. Try to use the Desert Eagle to knock multiple hedgehogs into the water. - Tips - - - - - If you're unsure what to do and don't want to waste ammo, skip one round. But don't let too much time pass as there will be Sudden Death! - Tips - - - - - Want to save ropes? Release the rope in mid air and then shoot again. As long as you don't touch the ground you'll reuse your rope without wasting ammo! - Tips - - - - - If you'd like to keep others from using your preferred nickname on the official server, register an account at http://www.hedgewars.org/. - Tips - - - - - You're bored of default gameplay? Try one of the missions - they'll offer different gameplay depending on the one you picked. - Tips - - - - - By default the game will always record the last game played as a demo. Select 'Local Game' and pick the 'Demos' button on the lower right corner to play or manage them. - Tips - - - - - Hedgewars is Open Source and Freeware we create in our spare time. If you've got problems, ask on our forums but please don't expect 24/7 support! - Tips - - - - - Hedgewars is Open Source and Freeware we create in our spare time. If you like it, help us with a small donation or contribute your own work! - Tips - - - - - Hedgewars is Open Source and Freeware we create in our spare time. Share it with your family and friends as you like! - Tips - - - - - Hedgewars is Open Source and Freeware we create in our spare time. If someone sold you the game, you should try get a refund! - Tips - - - - - From time to time there will be official tournaments. Upcoming events will be announced at http://www.hedgewars.org/ some days in advance. - Tips - - - - - Hedgewars is available in many languages. If the translation in your language seems to be missing or outdated, feel free to contact us! - Tips - - - - - Hedgewars can be run on lots of different operating systems including Microsoft Windows, Mac OS X and Linux. - Tips - - - - - Always remember you're able to set up your own games in local and network/online play. You're not restricted to the 'Simple Game' option. - Tips - - - - - Connect one or more gamepads before starting the game to be able to assign their controls to your teams. - Tips - - - - - Create an account on %1 to keep others from using your most favourite nickname while playing on the official server. - Tips - - - - - While playing you should give yourself a short break at least once an hour. - Tips - - - - - If your graphics card isn't able to provide hardware accelerated OpenGL, try to enable the low quality mode to improve performance. - Tips - - - - - If your graphics card isn't able to provide hardware accelerated OpenGL, try to update the associated drivers. - Tips - - - - - We're open to suggestions and constructive feedback. If you don't like something or got a great idea, let us know! - Tips - - - - - Especially while playing online be polite and always remember there might be some minors playing with or against you as well! - Tips - - - - - Special game modes such as 'Vampirism' or 'Karma' allow you to develop completely new tactics. Try them in a custom game! - Tips - - - - - The Windows version of Hedgewars supports Xfire. Make sure to add Hedgewars to its game list so your friends can see you playing. - Tips - - - - - You should never install Hedgewars on computers you don't own (school, university, work, etc.). Please ask the responsible person instead! - Tips - - - - - Hedgewars can be perfect for short games during breaks. Just ensure you don't add too many hedgehogs or use an huge map. Reducing time and health might help as well. - Tips - - - - - No hedgehogs were harmed in making this game. - Tips - - - - - There are three different jumps available. Tap [high jump] twice to do a very high/backwards jump. - Tips - - - - - Afraid of falling off a cliff? Hold down [precise] to turn [left] or [right] without actually moving. - Tips - - - - - Some weapons require special strategies or just lots of training, so don't give up on a particular tool if you miss an enemy once. - Tips - - - - - Most weapons won't work once they touch the water. The Homing Bee as well as the Cake are exceptions to this. - Tips - - - - - The Old Limbuger only causes a small explosion. However the wind affected smelly cloud can poison lots of hogs at once. - Tips - - - - - The Piano Strike is the most damaging air strike. You'll lose the hedgehog performing it, so there's a huge downside as well. - Tips - - - - - The Homing Bee can be tricky to use. Its turn radius depends on its velocity, so try to not use full power. - Tips - - - - - Sticky Mines are a perfect tool to create small chain reactions knocking enemy hedgehogs into dire situations ... or water. - Tips - - - - - The Hammer is most effective when used on bridges or girders. Hit hogs will just break through the ground. - Tips - - - - - If you're stuck behind an enemy hedgehog, use the Hammer to free yourself without getting damaged by an explosion. - Tips - - - - - The Cake's maximum walking distance depends on the ground it has to pass. Use [attack] to detonate it early. - Tips - - - - - The Flame Thrower is a weapon but it can be used for tunnel digging as well. - Tips - - - - - Use the Molotov or Flame Thrower to temporary keep hedgehogs from passing terrain such as tunnels or platforms. - Tips - - - - - Want to know who's behind the game? Click on the Hedgewars logo in the main menu to see the credits. - Tips - - - - - Like Hedgewars? Become a fan on %1 or follow us on %2! - Tips - - - - - Feel free to draw your own graves, hats, flags or even maps and themes! But note that you'll have to share them somewhere to use them online. - Tips - - - - - Really want to wear a specific hat? Donate to us and receive an exclusive hat of your choice! - Tips - - - - - Keep your video card drivers up to date to avoid issues playing the game. - Tips - - - - - You're able to associate Hedgewars related files (savegames and demo recordings) with the game to launch them right from your favorite file or internet browser. - Tips - - - - - You can find your Hedgewars configuration files under "My Documents\Hedgewars". Create backups or take the files with you, but don't edit them by hand. - Tips - - - - - You can find your Hedgewars configuration files under "Library/Application Support/Hedgewars" in your home directory. Create backups or take the files with you, but don't edit them by hand. - Tips - - - - - You can find your Hedgewars configuration files under ".hedgewars" in your home directory. Create backups or take the files with you, but don't edit them by hand. - Tips - - PageMultiplayer - + + Edit game preferences + + + + Start 开始 @@ -994,141 +1073,234 @@ PageNetGame - + + Edit game preferences + + + + Control Ctrl - - - PageNetType - - - LAN game - 局域网游戏 - - - - Join or host your own game server in a Local Area Network. - - - - - Official server - 官方服务器 - - - - Join hundreds of players online! - + + + Start + 开始 PageOptions - - General - 常规 - - - + + Select an action to change what key controls it + + + + + Reset to default + + + + + Reset all binds + + + + + + Game + + + + + Graphics + + + + + Audio + + + + + Controls + + + + + Video Recording + + + + + Network + + + + Advanced 进阶 - + + Teams + 队伍 + + + New team 新队伍 - + Edit team 修改队伍设定 - + Delete team - - You can't edit teams from team selection. Go back to main menu to add, edit or delete teams. - - - - - New scheme - - - - - Edit scheme - - - - - Delete scheme - - - - - New weapon set - - - - Edit weapon set + You can't edit teams from team selection. Go back to main menu to add, edit or delete teams. + Schemes + + + + + New scheme + + + + + Edit scheme + + + + + Delete scheme + + + + + Weapons + 武器 + + + + New weapon set + + + + + Edit weapon set + + + + Delete weapon set - + + Frontend + + + + + Custom colors + + + + Reset to default colors - + + Game audio + + + + + Frontend audio + + + + + Account + + + + + Proxy settings + + + + Proxy host - + Proxy port - + Proxy login - + Proxy password - + No proxy - + System proxy settings - + Socks5 proxy - + HTTP proxy + + + Miscellaneous + + + + + Updates + + + + + Check for updates + + + + + Video recording options + + PagePlayDemo @@ -1181,7 +1353,7 @@ - + %1 players online @@ -1196,152 +1368,152 @@ PageScheme - + Defend your fort and destroy the opponents, two team colours max! - + Teams will start on opposite sides of the terrain, two team colours max! - + Land can not be destroyed! + + Add an indestructible border around the terrain + + + - Add an indestructible border around the terrain - - - - Lower gravity - + Assisted aiming with laser sight - + All hogs have a personal forcefield + + All (living) hedgehogs are fully restored at the end of turn + + + + + Gain 80% of the damage you do back in health + + + - All (living) hedgehogs are fully restored at the end of turn - - - - - Gain 80% of the damage you do back in health - - - - Share your opponents pain, share their damage - + Your hogs are unable to move, put your artillery skills to the test + + Order of play is random instead of in room order. + + + + + Play with a King. If he dies, your side dies. + + + + + Take turns placing your hedgehogs before the start of play. + + + - Order of play is random instead of in room order. - - - - - Play with a King. If he dies, your side dies. - - - - - Take turns placing your hedgehogs before the start of play. - - - - Ammo is shared between all teams that share a colour. + + Disable girders when generating random maps. + + + + + Disable land objects when generating random maps. + + + + + AI respawns on death. + + + + + Attacking does not end your turn. + + + - Disable girders when generating random maps. - - - - - Disable land objects when generating random maps. - - - - - AI respawns on death. - - - - - Attacking does not end your turn. + Weapons are reset to starting values each turn. + + + + + Each hedgehog has its own ammo. It does not share with the team. + + + + + You will not have to worry about wind anymore. + + + + + Wind will affect almost everything. + + + + + Teams in each clan take successive turns sharing their turn time. - Weapons are reset to starting values each turn. - - - - - Each hedgehog has its own ammo. It does not share with the team. - - - - - You will not have to worry about wind anymore. - - - - - Wind will affect almost everything. - - - - - Teams in each clan take successive turns sharing their turn time. - - - - Add an indestructible border along the bottom - + Random - + Seconds - + Copy - + New 新游戏 - + Delete 删除 @@ -1373,60 +1545,34 @@ PageSinglePlayer - Simple Game - 简单游戏 - - - Play a quick game against the computer with random settings - + Play a hotseat game against your friends, or AI teams - - + Campaign Mode - - Training Mode - - - - + Practice your skills in a range of training missions - + Watch recorded demos - - Load - 读取 - - - + Load a previously saved game - - - Multiplayer - 多人游戏 - - - - Demos - Demo - PageTraining @@ -1441,12 +1587,12 @@ - + No description available - + Select a mission! @@ -1454,44 +1600,46 @@ PageVideos - + Name - + Size - + %1 bytes - + (in progress...) - - Date: - - - - - Size: - - - - + + Date: %1 + + + + + + Size: %1 + + + + + encoding - + uploading @@ -1499,64 +1647,59 @@ QAction - + Kick - + Update 更新 - - Start - 开始 - - - + Restrict Joins 限制参与 - + Restrict Team Additions 限制团队插件 - + Info 信息 - + Ban 屏蔽 - + Follow - - + + Ignore - - + + Add friend - + Unignore - + Remove friend @@ -1564,68 +1707,75 @@ QCheckBox - - Enable sound - 开启音效 - - - + Fullscreen 游戏全屏幕 - + Show FPS 显示帧率 (FPS) - + Alternative damage show 另一种伤害显示方式 - + + Visual effects + + + + + + Sound + + + + + In-game sound effects + + + + + + Music + + + + + In-game music + + + + + Frontend sound effects + + + + + Frontend music + + + + Check for updates at startup - - Frontend effects - - - - - Enable frontend sounds - - - - - Enable frontend music - - - - - Enable music - 开启音乐 - - - + Show ammo menu tooltips - - Frontend fullscreen - 界面全屏幕 - - - + Append date and time to record file name 记录名称中包含具体时间日期 - - + + Save password @@ -1640,12 +1790,12 @@ - + Record audio - + Use game resolution @@ -1653,129 +1803,104 @@ QComboBox - - generated map... - 生成地图... - - - - generated maze... - - - - - hand drawn map... - - - - - Mission - - - - + Human 玩家 - + Community - + Level Lv 级别 - + (System default) + + Disabled + + + - Disabled + Red/Cyan - Red/Cyan + Cyan/Red - Cyan/Red + Red/Blue - Red/Blue + Blue/Red - Blue/Red + Red/Green - Red/Green + Green/Red + + + + + Side-by-side + + + + + Top-Bottom - Green/Red + Red/Cyan grayscale - Side-by-side + Cyan/Red grayscale - Top-Bottom + Red/Blue grayscale - Wiggle + Blue/Red grayscale - Red/Cyan grayscale + Red/Green grayscale - Cyan/Red grayscale - - - - - Red/Blue grayscale - - - - - Blue/Red grayscale - - - - - Red/Green grayscale - - - - Green/Red grayscale - + Any @@ -1793,62 +1918,22 @@ QGroupBox - + Team Members 成员 - + Team Settings - + Fort 城堡模式 - - Key binds - 键位绑定 - - - - Teams - 队伍 - - - - Schemes and Weapons - - - - - Misc - - - - - Audio/Graphic options - 音频/视频选项 - - - - Custom colors - - - - - Miscellaneous - - - - - Proxy settings - - - - + Playing teams 玩家队伍 @@ -1868,17 +1953,12 @@ 基本设置 - - Video recording options - - - - + Videos - + Description @@ -1886,62 +1966,56 @@ QLabel - + Locale - + Nickname - - + Resolution 分辨率 - + Quality - + + Fullscreen + 游戏全屏幕 + + + + Fullscreen Resolution + + + + + Windowed Resolution + + + + Stereo rendering - + FPS limit FPS 上限 - + This program is distributed under the GNU General Public License v2 - - Developers: - 开发者: - - - - Art: - 艺术: - - - - Translations: - 翻译: - - - - Special thanks: - 特别感谢: - - Server name: 服务器名: @@ -1962,112 +2036,101 @@ 端口: - - + Weapons 武器 - + Version 版本 - - Sounds: - 声音: - - - + Initial sound volume 初始音量 - + Damage Modifier 伤害修改 - + Turn Time 回合时间 - + Initial Health 初始生命值 - + Sudden Death Timeout 死亡模式倒计时 - + Sudden Death Water Rise - + Sudden Death Health Decrease - + % Rope Length - + % Health Crates - + Health in Crates - + Mines Time - + Mines - + % Dud Mines - + Explosives - + % Get Away Time - + Scheme Name: 设置名称: - + Crate Drops 箱子降落 - - Game scheme - 游戏设置 - - There are videos that are currently being processed. Exiting now will abort them. @@ -2105,82 +2168,97 @@ - + Name - + Type - + Grave - + Flag - + Voice - - Summary - - - - + + Your Email + + + + + Summary + + + + + Send system information + + + + Description - + + Type the security code: + + + + Tip: - - This development build is 'work in progress' and may not be compatible with other versions of the game. Some features might be broken or incomplete. Use at your own risk! - - - - + + This development build is 'work in progress' and may not be compatible with other versions of the game, while some features might be broken or incomplete! + + + + Format - + Audio codec - + Video codec - + Framerate - + Bitrate (Kbps) - + Style - + Scheme @@ -2188,18 +2266,18 @@ QLineEdit - + unnamed 无名 - - + + hedgehog %1 - + anonymous @@ -2207,7 +2285,7 @@ QMainWindow - + Hedgewars %1 刺猬大作战 %1 @@ -2215,91 +2293,94 @@ QMessageBox - + Error 错误 - + Cannot use the ammo '%1'! - - + Teams - Are you sure? - - + Do you really want to delete the team '%1'? - - + + Cannot delete default scheme '%1'! - + Please select a record from the list - + + Hedgewars - Nick not registered + + + + Unable to start server - + Connection to server is lost 服务器连接丢失 - + Hedgewars - Error - - + + System Information Preview + + + + + + Failed to generate captcha + + + + + Failed to download captcha + + + + + Please fill out all fields. Email is optional. + + + + + Hedgewars - Success - + All file associations have been set - - Successfully posted the issue on hedgewars.googlecode.com - - - - - - Error during authentication at google.com - - - - - Error reporting the issue, please try again later (or visit hedgewars.googlecode.com directly) - - - - + File association failed. - - Please fill out all fields - - - Error while authenticating at google.com: @@ -2323,18 +2404,18 @@ - - + + Main - Error - + Cannot create directory %1 - + Failed to open data directory: %1 @@ -2342,29 +2423,29 @@ - - + + TCP - Error - + Unable to start the server: %1. - + Unable to run engine at - + Error code: %1 - + Netgame - Error @@ -2374,8 +2455,8 @@ - - + + Please enter room name @@ -2404,69 +2485,70 @@ - - + + Room Name - Error - + Please select room from the list - + Room Name - Are you sure? - + The game you are trying to join has started. Do you still want to join the room? - + Schemes - Warning - + Schemes - Are you sure? - + Do you really want to delete the game scheme '%1'? - - - + + + Videos - Are you sure? - + Do you really want to delete the video '%1'? - + Do you really want to remove %1 file(s)? - + Do you really want to cancel uploading %1? + File error @@ -2477,6 +2559,7 @@ + Cannot open '%1' for reading @@ -2506,29 +2589,25 @@ Do you really want to delete the weapon set '%1'? - - - QObject - - - Nickname - - - - - Please enter your nickname + + + Hedgewars - Warning + + + + + Hedgewars - Information + + + + + Hedgewars QPushButton - - - Setup - 设置 - - Play demo @@ -2588,93 +2667,79 @@ - + Cancel 取消 - - + + Delete 删除 - - Ready - 准备好了 - - More info - - Random Team - - - - + Associate file extensions - + Set default options - + Restore default coding parameters - + Open videos directory - + Open the video directory in your system - + Play - + Play this video - + Delete this video - - + + + Upload to YouTube - + Upload this video to your Youtube account - + Cancel uploading - - - more - - RoomsListModel @@ -2719,22 +2784,45 @@ 武器 - + Random Map - - Random Maze - - - + Random Maze + + + + Hand-drawn + SeedPrompt + + + The map seed is the basis for all random values generated by the game. + + + + + Cancel + 取消 + + + + Set seed + + + + + Close + + + + SelWeaponWidget @@ -2770,131 +2858,24 @@ - ToggleButtonWidget - - - Fort Mode - 城堡模式 - - - - Divide Teams - 团体行动 - - - - Solid Land - 固实地面 - - - - Add Border - 添加边界 - - - - Low Gravity - 低重力 - - - - Laser Sight - 激光瞄准 - - - - Invulnerable - 刀枪不入 - - - - Reset Health - - - - - Vampirism - - - - - Karma - - - - - Artillery - - - - - Random Order - - - - - King - - - - - Place Hedgehogs - - - - - Clan Shares Ammo - - - - - Disable Girders - - - - - Disable Land Objects - - - - - AI Survival Mode - - - - - Unlimited Attacks - - - - - Reset Weapons - - - - - Per Hedgehog Ammo - - - - - Disable Wind - - - - - More Wind - - - - - Tag Team - - - - - Add Bottom Border - + TeamShowWidget + + + %1's team + + + + + ThemePrompt + + + Select a theme for this map + + + + + Cancel + 取消 @@ -2924,87 +2905,87 @@ - + attack 攻击 - + put + + switch + 切换 + + - switch - 切换 + slot 1 + slot 1 + + + + slot 2 + slot 2 - slot 1 - slot 1 + slot 3 + slot 3 - slot 2 - slot 2 + slot 4 + slot 4 - slot 3 - slot 3 + slot 5 + slot 5 - slot 4 - slot 4 + slot 6 + slot 6 - slot 5 - slot 5 + slot 7 + slot 7 - slot 6 - slot 6 - - - - slot 7 - slot 7 + slot 8 + slot 8 - slot 8 - slot 8 + slot 10 + slot 10 + + + + timer 1 sec + 定时1秒 - slot 10 - slot 10 + timer 2 sec + 定时2秒 - timer 1 sec - 定时1秒 + timer 3 sec + 定时3秒 - timer 2 sec - 定时2秒 + timer 4 sec + 定时4秒 - timer 3 sec - 定时3秒 - - - - timer 4 sec - 定时4秒 - - - timer 5 sec 定时5秒 @@ -3034,7 +3015,12 @@ 夺取 - + + hedgehog info + + + + record @@ -3049,7 +3035,7 @@ 找到 刺猬 - + ammo menu 弹药菜单 @@ -3084,18 +3070,11 @@ 暂停 - + slot 9 slot 9 - - hedgehogs -info - 刺猬大作战 -信息 - - chat 聊天 @@ -3120,59 +3099,59 @@ binds (categories) - Basic controls - - - - - Weapon controls - + Movement + + + + + Weapons + 武器 - Camera and cursor controls + Camera - Other - 其他 + Miscellaneous + binds (descriptions) - - Move your hogs and aim: - - - Traverse gaps and obstacles by jumping: + + Fire your selected weapon or trigger an utility item: + + + + + Pick a weapon or a target location under the cursor: + + + - Fire your selected weapon or trigger an utility item: + Switch your currently active hog (if possible): + + + + + Hedgehog movement - Pick a weapon or a target location under the cursor: - - - - - Switch your currently active hog (if possible): - - - - Pick a weapon or utility item: - + Set the timer on bombs and timed weapons: @@ -3222,7 +3201,7 @@ - + Record video: @@ -3585,44 +3564,44 @@ - + Keyboard - - Axis - - - - - (Up) + Axis + (Up) + + + + + (Down) - + Hat - - (Left) - - - + (Left) + + + + (Right) - + Button diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Locale/hedgewars_zh_TW.ts --- a/share/hedgewars/Data/Locale/hedgewars_zh_TW.ts Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Locale/hedgewars_zh_TW.ts Fri Feb 22 05:05:32 2013 +0100 @@ -20,6 +20,79 @@ + BanDialog + + IP + IP + + + Nick + + + + IP/Nick + + + + Reason + + + + Duration + + + + Ok + + + + Cancel + 取消 + + + you know why + + + + Warning + + + + Please, specify %1 + + + + nickname + + + + permanent + + + + + DataManager + + Use Default + + + + + FeedbackDialog + + View + + + + Cancel + 取消 + + + Send Feedback + + + + FreqSpinBox Never @@ -43,13 +116,36 @@ 修改遊戲設置 - When this option is enabled selecting a game scheme will auto-select a weapon - - - Game Options + + Game scheme will auto-select a weapon + + + + + HWApplication + + %1 minutes + + + + %1 hour + + + + %1 hours + + + + %1 day + + + + %1 days + + HWAskQuitDialog @@ -100,10 +196,6 @@ Failed to save StyleSheet to %1 - - %1 is not a valid command! - - HWForm @@ -138,17 +230,6 @@ - Your nickname %1 is -registered on Hedgewars.org -Please provide your password below -or pick another nickname in game config: - - - - No password supplied. - - - Nickname 匿稱 @@ -161,6 +242,59 @@ Please pick another nickname: + + %1's Team + + + + Hedgewars - Nick registered + + + + This nick is registered, and you haven't specified a password. + +If this nick isn't yours, please register your own nick at www.hedgewars.org + +Password: + + + + Your nickname is not registered. +To prevent someone else from using it, +please register it at www.hedgewars.org + + + + + +Your password wasn't saved either. + + + + Hedgewars - Empty nickname + + + + Hedgewars - Wrong password + + + + You entered a wrong password. + + + + Try Again + + + + Hedgewars - Connection error + + + + You reconnected too fast. +Please wait a few seconds and try again. + + HWGame @@ -176,14 +310,6 @@ HWMapContainer - Map - 地圖 - - - Filter - 過濾 - - All 全部 @@ -208,14 +334,6 @@ 曲折 - Themes - 主題 - - - Type - - - Small tunnels @@ -224,27 +342,95 @@ - Large tunnels - - - - Small floating islands - - - - Medium floating islands - - - - Large floating islands - - - Seed - Set + Map type: + + + + Image map + + + + Mission map + + + + Hand-drawn + + + + Randomly generated + + + + Random maze + + + + Random + 隨機 + + + Map preview: + + + + Load map drawing + + + + Edit map drawing + + + + Largetunnels + + + + Small islands + + + + Medium islands + + + + Large islands + + + + Map size: + + + + Maze style: + + + + Mission: + + + + Map: + + + + Theme: + + + + Load drawn map + + + + Drawn Maps + + + + All files @@ -317,8 +503,8 @@ HWPasswordDialog - Password - 密碼 + Login + @@ -333,6 +519,32 @@ + HatButton + + Change hat (%1) + + + + + HatPrompt + + Select a hat + + + + Filter: + + + + Cancel + 取消 + + + Use selected hat + + + + KB SDL_ttf returned error while rendering text, most propably it is related to the bug in freetype2. It's recommended to update your freetype lib. @@ -340,6 +552,13 @@ + KeyBinder + + Category + + + + LibavInteraction Duration: %1m %2s @@ -358,6 +577,17 @@ Audio: + + unknown + + + + + MapModel + + No description available. + + PageAdmin @@ -389,6 +619,38 @@ Set data + + General + 常規 + + + Bans + + + + IP/Nick + + + + Expiration + + + + Reason + + + + Refresh + + + + Add + + + + Remove + + PageConnecting @@ -443,8 +705,40 @@ 常規 - Advanced - 進階 + Select an action to choose a custom key bind for this team + + + + Use my default + + + + Reset all binds + + + + Custom Controls + + + + Hat + 帽子 + + + Name + + + + This hedgehog's name + + + + Randomize this hedgehog's name + + + + Random Team + 隨機隊伍分配 @@ -519,267 +813,14 @@ PageMain - Simply pick the same color as a friend to play together as a team. Each of you will still control his or her own hedgehogs but they'll win or lose together. - Tips - - - - Some weapons might do only low damage but they can be a lot more devastating in the right situation. Try to use the Desert Eagle to knock multiple hedgehogs into the water. - Tips - - - - If you're unsure what to do and don't want to waste ammo, skip one round. But don't let too much time pass as there will be Sudden Death! - Tips - - - - If you'd like to keep others from using your preferred nickname on the official server, register an account at http://www.hedgewars.org/. - Tips - - - - You're bored of default gameplay? Try one of the missions - they'll offer different gameplay depending on the one you picked. - Tips - - - - By default the game will always record the last game played as a demo. Select 'Local Game' and pick the 'Demos' button on the lower right corner to play or manage them. - Tips - - - - Hedgewars is Open Source and Freeware we create in our spare time. If you've got problems, ask on our forums but please don't expect 24/7 support! - Tips - - - - Hedgewars is Open Source and Freeware we create in our spare time. If you like it, help us with a small donation or contribute your own work! - Tips - - - - Hedgewars is Open Source and Freeware we create in our spare time. Share it with your family and friends as you like! - Tips - - - - From time to time there will be official tournaments. Upcoming events will be announced at http://www.hedgewars.org/ some days in advance. - Tips - - - - Hedgewars is available in many languages. If the translation in your language seems to be missing or outdated, feel free to contact us! - Tips - - - - Hedgewars can be run on lots of different operating systems including Microsoft Windows, Mac OS X and Linux. - Tips - - - - Always remember you're able to set up your own games in local and network/online play. You're not restricted to the 'Simple Game' option. - Tips - - - - While playing you should give yourself a short break at least once an hour. - Tips - - - - If your graphics card isn't able to provide hardware accelerated OpenGL, try to enable the low quality mode to improve performance. - Tips - - - - We're open to suggestions and constructive feedback. If you don't like something or got a great idea, let us know! - Tips - - - - Especially while playing online be polite and always remember there might be some minors playing with or against you as well! - Tips - - - - Special game modes such as 'Vampirism' or 'Karma' allow you to develop completely new tactics. Try them in a custom game! - Tips - - - - You should never install Hedgewars on computers you don't own (school, university, work, etc.). Please ask the responsible person instead! - Tips - - - - Hedgewars can be perfect for short games during breaks. Just ensure you don't add too many hedgehogs or use an huge map. Reducing time and health might help as well. - Tips - - - - No hedgehogs were harmed in making this game. - Tips - - - - Hedgewars is Open Source and Freeware we create in our spare time. If someone sold you the game, you should try get a refund! - Tips - - - - Connect one or more gamepads before starting the game to be able to assign their controls to your teams. - Tips - - - - Create an account on %1 to keep others from using your most favourite nickname while playing on the official server. - Tips - - - - If your graphics card isn't able to provide hardware accelerated OpenGL, try to update the associated drivers. - Tips - - - - There are three different jumps available. Tap [high jump] twice to do a very high/backwards jump. - Tips - - - - Afraid of falling off a cliff? Hold down [precise] to turn [left] or [right] without actually moving. - Tips - - - - Some weapons require special strategies or just lots of training, so don't give up on a particular tool if you miss an enemy once. - Tips - - - - Most weapons won't work once they touch the water. The Homing Bee as well as the Cake are exceptions to this. - Tips - - - - The Old Limbuger only causes a small explosion. However the wind affected smelly cloud can poison lots of hogs at once. - Tips - - - - The Piano Strike is the most damaging air strike. You'll lose the hedgehog performing it, so there's a huge downside as well. - Tips - - - - Sticky Mines are a perfect tool to create small chain reactions knocking enemy hedgehogs into dire situations ... or water. - Tips - - - - The Hammer is most effective when used on bridges or girders. Hit hogs will just break through the ground. - Tips - - - - If you're stuck behind an enemy hedgehog, use the Hammer to free yourself without getting damaged by an explosion. - Tips - - - - The Cake's maximum walking distance depends on the ground it has to pass. Use [attack] to detonate it early. - Tips - - - - The Flame Thrower is a weapon but it can be used for tunnel digging as well. - Tips - - - - Want to know who's behind the game? Click on the Hedgewars logo in the main menu to see the credits. - Tips - - - - Like Hedgewars? Become a fan on %1 or follow us on %2! - Tips - - - - Feel free to draw your own graves, hats, flags or even maps and themes! But note that you'll have to share them somewhere to use them online. - Tips - - - - Really want to wear a specific hat? Donate to us and receive an exclusive hat of your choice! - Tips - - - - Keep your video card drivers up to date to avoid issues playing the game. - Tips - - - - You can find your Hedgewars configuration files under "My Documents\Hedgewars". Create backups or take the files with you, but don't edit them by hand. - Tips - - - - You're able to associate Hedgewars related files (savegames and demo recordings) with the game to launch them right from your favorite file or internet browser. - Tips - - - - Want to save ropes? Release the rope in mid air and then shoot again. As long as you don't touch the ground you'll reuse your rope without wasting ammo! - Tips - - - - You can find your Hedgewars configuration files under "Library/Application Support/Hedgewars" in your home directory. Create backups or take the files with you, but don't edit them by hand. - Tips - - - - You can find your Hedgewars configuration files under ".hedgewars" in your home directory. Create backups or take the files with you, but don't edit them by hand. - Tips - - - - The Windows version of Hedgewars supports Xfire. Make sure to add Hedgewars to its game list so your friends can see you playing. - Tips - - - - Use the Molotov or Flame Thrower to temporary keep hedgehogs from passing terrain such as tunnels or platforms. - Tips - - - - The Homing Bee can be tricky to use. Its turn radius depends on its velocity, so try to not use full power. - Tips - - - Downloadable Content - Local Game - - - Play a game on a single computer - Network Game - - - Play a game across a network @@ -807,6 +848,14 @@ Edit game preferences + + Play a game across a local area network + + + + Play a game on an official server + + PageMultiplayer @@ -814,6 +863,10 @@ Start 開始 + + Edit game preferences + + PageNetGame @@ -821,24 +874,13 @@ Control 房間管理 - - - PageNetType - - LAN game - 局域網遊戲 - - - Official server - 官方伺服器 - - - Join hundreds of players online! - - - - Join or host your own game server in a Local Area Network. - + + Edit game preferences + + + + Start + 開始 @@ -884,10 +926,6 @@ - General - 常規 - - Advanced 進階 @@ -927,6 +965,94 @@ System proxy settings + + Select an action to change what key controls it + + + + Reset to default + + + + Reset all binds + + + + Game + + + + Graphics + + + + Audio + + + + Controls + + + + Video Recording + + + + Network + + + + Teams + 隊伍 + + + Schemes + + + + Weapons + 武器 + + + Frontend + + + + Custom colors + + + + Game audio + + + + Frontend audio + + + + Account + + + + Proxy settings + + + + Miscellaneous + + + + Updates + + + + Check for updates + + + + Video recording options + + PagePlayDemo @@ -1125,18 +1251,10 @@ PageSinglePlayer - Simple Game - - - Play a quick game against the computer with random settings - Multiplayer - - - Play a hotseat game against your friends, or AI teams @@ -1145,26 +1263,14 @@ - Training Mode - - - Practice your skills in a range of training missions - Demos - - - Watch recorded demos - Load - 讀取 - - Load a previously saved game @@ -1209,14 +1315,6 @@ - Date: - - - - Size: - - - encoding @@ -1224,6 +1322,16 @@ uploading + + Date: %1 + + + + + Size: %1 + + + QAction @@ -1236,10 +1344,6 @@ 信息 - Start - 開始 - - Restrict Joins 限制參與 @@ -1279,10 +1383,6 @@ QCheckBox - Enable sound - 開啟遊戲音效 - - Fullscreen 遊戲全螢幕 @@ -1295,14 +1395,6 @@ 另一種傷害顯示方式 - Frontend fullscreen - 介面全螢幕 - - - Enable music - 開啟遊戲音樂 - - Append date and time to record file name 記錄名稱中包含具體時間日期 @@ -1315,18 +1407,6 @@ 顯示武器提示訊息 - Enable frontend sounds - 啟用菜單音效 - - - Enable frontend music - 啟用菜單音樂 - - - Frontend effects - - - Save password @@ -1346,14 +1426,38 @@ Use game resolution + + Visual effects + + + + Sound + + + + In-game sound effects + + + + Music + + + + In-game music + + + + Frontend sound effects + + + + Frontend music + + QComboBox - generated map... - 生成地圖... - - Human 玩家 @@ -1366,14 +1470,6 @@ - generated maze... - - - - Mission - - - Community @@ -1390,10 +1486,6 @@ - hand drawn map... - - - Disabled @@ -1430,10 +1522,6 @@ - Wiggle - - - Red/Cyan grayscale @@ -1469,18 +1557,6 @@ 城堡模式 - Key binds - 鍵位綁定 - - - Teams - 隊伍 - - - Audio/Graphic options - 音訊/視頻選項 - - Playing teams 玩家隊伍 @@ -1501,26 +1577,6 @@ - Misc - - - - Schemes and Weapons - - - - Custom colors - - - - Miscellaneous - - - - Video recording options - - - Videos @@ -1528,10 +1584,6 @@ Description - - Proxy settings - - QLabel @@ -1544,22 +1596,6 @@ FPS 上限 - Developers: - 開發者: - - - Art: - 藝術: - - - Translations: - 翻譯: - - - Special thanks: - 特別感謝: - - Server name: 伺服器名: @@ -1584,10 +1620,6 @@ 版本 - Sounds: - 聲音: - - Initial sound volume 初始音量 @@ -1616,10 +1648,6 @@ 箱子降落 - Game scheme - 遊戲設置 - - Mines Time 佈雷時間 @@ -1664,10 +1692,6 @@ - This development build is 'work in progress' and may not be compatible with other versions of the game. Some features might be broken or incomplete. Use at your own risk! - - - Quality @@ -1742,10 +1766,6 @@ - Summary - - - Description @@ -1773,6 +1793,38 @@ Bitrate (Kbps) + + This development build is 'work in progress' and may not be compatible with other versions of the game, while some features might be broken or incomplete! + + + + Fullscreen + 遊戲全螢幕 + + + Fullscreen Resolution + + + + Windowed Resolution + + + + Your Email + + + + Summary + + + + Send system information + + + + Type the security code: + + QLineEdit @@ -1811,10 +1863,6 @@ - Please fill out all fields - - - Error while authenticating at google.com: @@ -1861,18 +1909,6 @@ - Successfully posted the issue on hedgewars.googlecode.com - - - - Error during authentication at google.com - - - - Error reporting the issue, please try again later (or visit hedgewars.googlecode.com directly) - - - Main - Error @@ -2018,25 +2054,42 @@ Do you really want to delete the weapon set '%1'? - - - QObject - - Nickname - 匿稱 - - - Please enter your nickname - 請輸入您的匿稱 + + Hedgewars - Nick not registered + + + + System Information Preview + + + + Failed to generate captcha + + + + Failed to download captcha + + + + Please fill out all fields. Email is optional. + + + + Hedgewars - Warning + + + + Hedgewars - Information + + + + Hedgewars + QPushButton - Setup - 設置 - - Play demo 播放 demo @@ -2089,22 +2142,10 @@ 刪除 - Ready - 準備好了 - - - Random Team - 隨機隊伍分配 - - Associate file extensions - more - - - More info @@ -2197,6 +2238,25 @@ + SeedPrompt + + The map seed is the basis for all random values generated by the game. + + + + Cancel + 取消 + + + Set seed + + + + Close + + + + SelWeaponWidget Weapon set @@ -2224,106 +2284,21 @@ - ToggleButtonWidget - - Vampirism - 吸血鬼 - - - Karma - 因果報應 - - - Artillery - 射術 - - - Fort Mode - 城堡模式 - - - Divide Teams - 團體行動 - - - Solid Land - 固實地面 - - - Add Border - 添加邊界 - - - Low Gravity - 低重力 - - - Laser Sight - 鐳射瞄準 - - - Invulnerable - 刀槍不入 - - - Random Order - 隨機順序 - - - King - 國王模式 - - - Place Hedgehogs - 手動放置 - - - Clan Shares Ammo - - - - Disable Girders - - - - Disable Land Objects - - - - AI Survival Mode - - - - Reset Health - - - - Unlimited Attacks - - - - Reset Weapons - - - - Per Hedgehog Ammo - - - - Disable Wind - - - - More Wind - - - - Tag Team - - - - Add Bottom Border - + TeamShowWidget + + %1's team + + + + + ThemePrompt + + Select a theme for this map + + + + Cancel + 取消 @@ -2461,12 +2436,6 @@ 確認 - hedgehogs -info - 刺蝟大作戰 -信息 - - zoom in 放大 @@ -2498,33 +2467,33 @@ record + + hedgehog info + + binds (categories) - Basic controls - 基本控制 - - - Weapon controls - 武器控制 - - - Camera and cursor controls - 鏡頭和遊標控制 - - - Other - 其他 + Movement + + + + Weapons + 武器 + + + Camera + + + + Miscellaneous + binds (descriptions) - Move your hogs and aim: - 移動、瞄準: - - Traverse gaps and obstacles by jumping: 越過障礙: @@ -2588,6 +2557,10 @@ Record video: + + Hedgehog movement + + binds (keys) diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Locale/hu.txt --- a/share/hedgewars/Data/Locale/hu.txt Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Locale/hu.txt Fri Feb 22 05:05:32 2013 +0100 @@ -108,7 +108,7 @@ 02:00=%1 lejárt a szavatossága 02:00=Nyugodj békében, %1 02:00=%1 nem bírta a kiképzést -02:00=%1 nem volt macska, hogy kilenc élete legyen +02:00=%1 nem volt macska, hogy kilenc élete legyen 02:00=Van itt orvos? ; Hog (%1) drowned diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Locale/it.lua --- a/share/hedgewars/Data/Locale/it.lua Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Locale/it.lua Fri Feb 22 05:05:32 2013 +0100 @@ -1,10 +1,10 @@ locale = { ["..."] = "...", [":("] = ":(", - ["!!!"] = "!!!", + ["!!!"] = "!!!", -- ["011101000"] = "", -- A_Classic_Fairytale:dragon -- ["011101001"] = "", -- A_Classic_Fairytale:backstab, A_Classic_Fairytale:dragon, A_Classic_Fairytale:enemy, A_Classic_Fairytale:family, A_Classic_Fairytale:journey, A_Classic_Fairytale:queen, A_Classic_Fairytale:shadow, A_Classic_Fairytale:united --- ["30 minutes later..."] = "", -- A_Classic_Fairytale:shadow + ["30 minutes later..."] = "30 minuti più tardi...", -- A_Classic_Fairytale:shadow -- ["About a month ago, a cyborg came and told us that you're the cannibals!"] = "", -- A_Classic_Fairytale:enemy ["Accuracy Bonus!"] = "Bonus Precisione!", -- ["Ace"] = "", -- User_Mission_-_RCPlane_Challenge, User_Mission_-_Rope_Knock_Challenge @@ -12,15 +12,15 @@ -- ["A Classic Fairytale"] = "", -- A_Classic_Fairytale:first_blood -- ["???"] = "", -- A_Classic_Fairytale:backstab -- ["Actually, you aren't worthy of life! Take this..."] = "", -- A_Classic_Fairytale:shadow --- ["A cy-what?"] = "", -- A_Classic_Fairytale:enemy + ["A cy-what?"] = "Un cy-cosa?", -- A_Classic_Fairytale:enemy -- ["Adventurous"] = "", -- A_Classic_Fairytale:journey --- ["Africa"] = "", -- Continental_supplies + ["Africa"] = "Africa", -- Continental_supplies -- ["After Leaks A Lot betrayed his tribe, he joined the cannibals..."] = "", -- A_Classic_Fairytale:first_blood -- ["After the shock caused by the enemy spy, Leaks A Lot and Dense Cloud went hunting to relax."] = "", -- A_Classic_Fairytale:shadow -- ["Again with the 'cannibals' thing!"] = "", -- A_Classic_Fairytale:enemy -- ["a Hedgewars challenge"] = "", -- User_Mission_-_RCPlane_Challenge, User_Mission_-_Rope_Knock_Challenge ["a Hedgewars mini-game"] = "un mini-gioco di Hedgewars", -- Space_Invasion, The_Specialists - ["Aiming Practice"] = "Pratica la tua mira", --Bazooka, Shotgun, SniperRifle + ["Aiming Practice"] = "Pratica la tua mira", --Bazooka, Shotgun, SniperRifle -- ["A leap in a leap"] = "", -- A_Classic_Fairytale:first_blood -- ["A little gift from the cyborgs"] = "", -- A_Classic_Fairytale:shadow -- ["All gone...everything!"] = "", -- A_Classic_Fairytale:enemy @@ -31,38 +31,38 @@ ["Ammo is reset at the end of your turn."] = "Le munizioni si azzeranno alla fine del tuo turno", ["Ammo Maniac!"] = "Maniaco delle munizioni!", ["Ammo"] = "Munizioni", --- ["And how am I alive?!"] = "", -- A_Classic_Fairytale:enemy + ["And how am I alive?!"] = "E com'è che sono vivo?!", -- A_Classic_Fairytale:enemy -- ["And so happenned that Leaks A Lot failed to complete the challenge! He landed, pressured by shame..."] = "", -- A_Classic_Fairytale:first_blood --- ["And so it began..."] = "", -- A_Classic_Fairytale:first_blood + ["And so it began..."] = "E così ebbe inizio...", -- A_Classic_Fairytale:first_blood -- ["...and so the cyborgs took over the world..."] = "", -- A_Classic_Fairytale:shadow -- ["And so they discovered that cyborgs weren't invulnerable..."] = "", -- A_Classic_Fairytale:journey -- ["And where's all the weed?"] = "", -- A_Classic_Fairytale:dragon -- ["And you believed me? Oh, god, that's cute!"] = "", -- A_Classic_Fairytale:journey -- ["Anno 1032: [The explosion will make a strong push ~ wide range, wont affect hogs close to the target]"] = "", -- Continental_supplies --- ["Antarctica"] = "", -- Continental_supplies --- ["Are we there yet?"] = "", -- A_Classic_Fairytale:shadow --- ["Are you accusing me of something?"] = "", -- A_Classic_Fairytale:backstab --- ["Are you saying that many of us have died for your entertainment?"] = "", -- A_Classic_Fairytale:enemy + ["Antarctica"] = "Antartico", -- Continental_supplies + ["Are we there yet?"] = "Siamo già lì?", -- A_Classic_Fairytale:shadow + ["Are you accusing me of something?"] = "Mi stai accusando di qualcosa?", -- A_Classic_Fairytale:backstab + ["Are you saying that many of us have died for your entertainment?"] = "Stai dicendo che molti di noi sono morti per il tuo divertimento?", -- A_Classic_Fairytale:enemy -- ["Artur Detour"] = "", -- A_Classic_Fairytale:queen -- ["As a reward for your performance, here's some new technology!"] = "", -- A_Classic_Fairytale:dragon -- ["a shoppa minigame"] = "", -- WxW --- ["Asia"] = "", -- Continental_supplies --- ["Assault Team"] = "", -- A_Classic_Fairytale:backstab + ["Asia"] = "Asia", -- Continental_supplies + ["Assault Team"] = "Squadra d'assalto", -- A_Classic_Fairytale:backstab -- ["As the ammo is sparse, you might want to reuse ropes while mid-air.|"] = "", -- A_Classic_Fairytale:dragon -- ["As the challenge was completed, Leaks A Lot set foot on the ground..."] = "", -- A_Classic_Fairytale:first_blood -- ["As you can see, there is no way to get on the other side!"] = "", -- A_Classic_Fairytale:dragon -- ["Attack From Rope"] = "", -- WxW --- ["Australia"] = "", -- Continental_supplies + ["Australia"] = "Australia", -- Continental_supplies ["Available points remaining: "] = "Punti disponibili rimasti: ", -- ["Back Breaker"] = "", -- A_Classic_Fairytale:backstab -- ["Back in the village, after telling the villagers about the threat..."] = "", -- A_Classic_Fairytale:united ["[Backspace]"] = "[Cancella]", -- ["Backstab"] = "", -- A_Classic_Fairytale:backstab -- ["Bad Team"] = "", -- User_Mission_-_The_Great_Escape - ["Bamboo Thicket"] = "Boschetto di Bambu'", + ["Bamboo Thicket"] = "Boschetto di Bambù", ["Barrel Eater!"] = "Mangiatore di Barili!", ["Barrel Launcher"] = "Lanciatore di Barili", --- ["Baseballbat"] = "", -- Continental_supplies + ["Baseballbat"] = "Mazza da baseball", -- Continental_supplies ["Bat balls at your enemies and|push them into the sea!"] = "Lancia delle palline ai tuoi nemici|e spingili in acqua!", ["Bat your opponents through the|baskets and out of the map!"] = "Manda (colpendoli) i tuoi nemici|in acqua attraverso i canestri laterali!", ["Bazooka Training"] = "Addestramento sull'utilizzo del Bazooka", @@ -90,20 +90,20 @@ -- ["Brutal Lily"] = "", -- A_Classic_Fairytale:enemy, A_Classic_Fairytale:epil -- ["Brutus"] = "", -- A_Classic_Fairytale:backstab ["Build a track and race."] = "Costruisci una pista e corri.", --- ["Bullseye"] = "", -- A_Classic_Fairytale:dragon --- ["But it proved to be no easy task!"] = "", -- A_Classic_Fairytale:dragon --- ["But that's impossible!"] = "", -- A_Classic_Fairytale:backstab --- ["But the ones alive are stronger in their heart!"] = "", -- A_Classic_Fairytale:enemy --- ["But...we died!"] = "", -- A_Classic_Fairytale:backstab --- ["But where can we go?"] = "", -- A_Classic_Fairytale:united + ["Bullseye"] = "Bersaglio", -- A_Classic_Fairytale:dragon + ["But it proved to be no easy task!"] = "Ma si è dimostrato essere un compito non facile!", -- A_Classic_Fairytale:dragon + ["But that's impossible!"] = "Ma è impossibile!", -- A_Classic_Fairytale:backstab + ["But the ones alive are stronger in their heart!"] = "Ma i vivi sono più forti nel loro cuore!", -- A_Classic_Fairytale:enemy + ["But...we died!"] = "Ma... siamo morti!", -- A_Classic_Fairytale:backstab + ["But where can we go?"] = "MA dove possiamo andare?", -- A_Classic_Fairytale:united -- ["But why would they help us?"] = "", -- A_Classic_Fairytale:backstab -- ["But you're cannibals. It's what you do."] = "", -- A_Classic_Fairytale:enemy -- ["But you said you'd let her go!"] = "", -- A_Classic_Fairytale:journey -- ["Call me Beep! Well, 'cause I'm such a nice...person!"] = "", -- A_Classic_Fairytale:family --- ["Cannibals"] = "", -- A_Classic_Fairytale:enemy, A_Classic_Fairytale:epil, A_Classic_Fairytale:first_blood + ["Cannibals"] = "Cannibali", -- A_Classic_Fairytale:enemy, A_Classic_Fairytale:epil, A_Classic_Fairytale:first_blood -- ["Cannibal Sentry"] = "", -- A_Classic_Fairytale:journey --- ["Cannibals?! You're the cannibals!"] = "", -- A_Classic_Fairytale:enemy - ["CAPTURE THE FLAG"] = "Cattura la Bandiera", + ["Cannibals?! You're the cannibals!"] = "Cannibali? Voi siete i cannibali!", -- A_Classic_Fairytale:enemy + ["CAPTURE THE FLAG"] = "Cattura la Bandiera", ["Careless"] = "Incauto", -- ["Carol"] = "", -- A_Classic_Fairytale:family -- ["CHALLENGE COMPLETE"] = "", -- User_Mission_-_RCPlane_Challenge @@ -112,7 +112,7 @@ ["Clumsy"] = "Goffo", -- ["Cluster Bomb MASTER!"] = "", -- Basic_Training_-_Cluster_Bomb -- ["Cluster Bomb Training"] = "", -- Basic_Training_-_Cluster_Bomb - ["Codename: Teamwork"] = "Nome in Codice: Lavoro di Squadra", + ["Codename: Teamwork"] = "Nome in Codice: Lavoro di Squadra", -- ["Collateral Damage"] = "", -- A_Classic_Fairytale:journey -- ["Collateral Damage II"] = "", -- A_Classic_Fairytale:journey -- ["Collect all the crates, but remember, our time in this life is limited!"] = "", -- A_Classic_Fairytale:first_blood @@ -125,22 +125,22 @@ -- ["COMPLETION TIME"] = "", -- User_Mission_-_Rope_Knock_Challenge -- ["Configuration accepted."] = "", -- WxW -- ["Congratulations"] = "", -- Basic_Training_-_Rope - ["Congratulations!"] = "Complimenti!", + ["Congratulations!"] = "Complimenti!", -- ["Congratulations! You needed only half of time|to eliminate all targets."] = "", -- Basic_Training_-_Cluster_Bomb -- ["Congratulations! You've completed the Rope tutorial! |- Tutorial ends in 10 seconds!"] = "", -- Basic_Training_-_Rope - ["Congratulations! You've eliminated all targets|within the allowed time frame."] = "Complimenti! Hai distrutto tutti gli obiettivi|entro il tempo previsto.", --Bazooka, Shotgun, SniperRifle + ["Congratulations! You've eliminated all targets|within the allowed time frame."] = "Complimenti! Hai distrutto tutti gli obiettivi|entro il tempo previsto.", --Bazooka, Shotgun, SniperRifle -- ["Continental supplies"] = "", -- Continental_supplies - ["Control pillars to score points."] = "Ottieni il controllo dei pilastri per guadagnare punti.", + ["Control pillars to score points."] = "Ottieni il controllo dei pilastri per guadagnare punti.", -- ["Corporationals"] = "", -- A_Classic_Fairytale:queen -- ["Corpsemonger"] = "", -- A_Classic_Fairytale:shadow -- ["Corpse Thrower"] = "", -- A_Classic_Fairytale:epil -- ["Crates Left:"] = "", -- User_Mission_-_RCPlane_Challenge - ["Cybernetic Empire"] = "Impero Cibernetico", + ["Cybernetic Empire"] = "Impero Cibernetico", -- ["Cyborg. It's what the aliens call themselves."] = "", -- A_Classic_Fairytale:enemy -- ["Dahmer"] = "", -- A_Classic_Fairytale:backstab - ["DAMMIT, ROOKIE!"] = "ACCIDENTI, RECLUTA!", - ["DAMMIT, ROOKIE! GET OFF MY HEAD!"] = "MALEDIZIONE, RECLUTA! VIA DALLA MIA TESTA!", - ["Dangerous Ducklings"] = "Anatroccoli Pericolosi", + ["DAMMIT, ROOKIE!"] = "ACCIDENTI, RECLUTA!", + ["DAMMIT, ROOKIE! GET OFF MY HEAD!"] = "MALEDIZIONE, RECLUTA! VIA DALLA MIA TESTA!", + ["Dangerous Ducklings"] = "Anatroccoli Pericolosi", ["Deadweight"] = "Peso morto", -- ["Defeat the cannibals"] = "", -- A_Classic_Fairytale:backstab -- ["Defeat the cannibals!|"] = "", -- A_Classic_Fairytale:united @@ -189,20 +189,20 @@ -- ["Ear Sniffer"] = "", -- A_Classic_Fairytale:backstab, A_Classic_Fairytale:epil -- ["Elderbot"] = "", -- A_Classic_Fairytale:family -- ["Elimate your captor."] = "", -- User_Mission_-_The_Great_Escape - ["Eliminate all enemies"] = "Elimina tutti i nemici", - ["Eliminate all targets before your time runs out.|You have unlimited ammo for this mission."] = "Distruggi tutti gli obiettivi entro il tempo previsto.|Hai armi illimitate per questa missione.", --Bazooka, Shotgun, SniperRifle + ["Eliminate all enemies"] = "Elimina tutti i nemici", + ["Eliminate all targets before your time runs out.|You have unlimited ammo for this mission."] = "Distruggi tutti gli obiettivi entro il tempo previsto.|Hai armi illimitate per questa missione.", --Bazooka, Shotgun, SniperRifle -- ["Eliminate enemy hogs and take their weapons."] = "", -- Highlander - ["Eliminate Poison before the time runs out"] = "Elimina Veleno prima che il tempo finisca", - ["Eliminate the Blue Team"] = "Elimina la Squadra Blu", + ["Eliminate Poison before the time runs out"] = "Elimina Veleno prima che il tempo finisca", + ["Eliminate the Blue Team"] = "Elimina la Squadra Blu", ["Eliminate the enemy before the time runs out"] = "Elimina il nemico prima che il tempo scada", -- User_Mission_-_Bamboo_Thicket, User_Mission_-_Newton_and_the_Hammock ["Eliminate the enemy hogs to win."] = "Elimina i ricci nemici per vincere.", ["Eliminate the enemy specialists."] = "Elimina tutti i nemici specialisti.", - ["- Eliminate Unit 3378 |- Feeble Resistance must survive"] = "- Elimina l'Unità 3378 |- La Resistenza Finale deve sopravvivere", + ["- Eliminate Unit 3378 |- Feeble Resistance must survive"] = "- Elimina l'Unità 3378 |- La Resistenza Finale deve sopravvivere", -- ["Elmo"] = "", -- A_Classic_Fairytale:dragon, A_Classic_Fairytale:family, A_Classic_Fairytale:queen ["Energetic Engineer"] = "Ingegnere Energetico", - ["Enjoy the swim..."] = "Spero che tu gradisca una nuotata...", + ["Enjoy the swim..."] = "Spero che tu gradisca una nuotata...", ["[Enter]"] = "[Enter]", --- ["Europe"] = "", -- Continental_supplies + ["Europe"] = "Europa", -- Continental_supplies -- [" ever done to you?!"] = "", -- A_Classic_Fairytale:backstab -- ["Everyone knows this."] = "", -- A_Classic_Fairytale:enemy -- ["Every single time!"] = "", -- A_Classic_Fairytale:dragon @@ -211,8 +211,8 @@ -- ["Eye Chewer"] = "", -- A_Classic_Fairytale:journey -- ["INSANITY"] = "", -- Mutant -- ["Family Reunion"] = "", -- A_Classic_Fairytale:family - ["Fastest lap: "] = "Giro migliore: ", - ["Feeble Resistance"] = "Resistenza Finale", + ["Fastest lap: "] = "Giro migliore: ", + ["Feeble Resistance"] = "Resistenza Finale", -- ["Fell From Grace"] = "", -- A_Classic_Fairytale:backstab, A_Classic_Fairytale:dragon, A_Classic_Fairytale:enemy, A_Classic_Fairytale:epil, A_Classic_Fairytale:family, A_Classic_Fairytale:queen -- ["Fell From Heaven"] = "", -- A_Classic_Fairytale:enemy, A_Classic_Fairytale:epil, A_Classic_Fairytale:family, A_Classic_Fairytale:first_blood, A_Classic_Fairytale:journey, A_Classic_Fairytale:queen -- ["Fell From Heaven is the best! Fell From Heaven is the greatest!"] = "", -- A_Classic_Fairytale:family @@ -222,14 +222,14 @@ -- ["Find your tribe!|Cross the lake!"] = "", -- A_Classic_Fairytale:dragon -- ["Finish your training|Hint: Animations can be skipped with the [Precise] key."] = "", -- A_Classic_Fairytale:first_blood -- ["Fire a mine: [Does what it says ~ Cant be dropped close to an enemy ~ 1 sec]"] = "", -- Continental_supplies - ["Fire"] = "Fuoco", --- ["First aid kits?!"] = "", -- A_Classic_Fairytale:united --- ["First Blood"] = "", -- A_Classic_Fairytale:first_blood + ["Fire"] = "Fuoco", + ["First aid kits?!"] = "Kit di pronto soccorso?!", -- A_Classic_Fairytale:united + ["First Blood"] = "Primo sangue", -- A_Classic_Fairytale:first_blood -- ["FIRST BLOOD MUTATES"] = "", -- Mutant -- ["First Steps"] = "", -- A_Classic_Fairytale:first_blood - ["Flag captured!"] = "Bandiera catturata!", - ["Flag respawned!"] = "Bandiera restituita!", - ["Flag returned!"] = "Bandiera recuperata!", + ["Flag captured!"] = "Bandiera catturata!", + ["Flag respawned!"] = "Bandiera restituita!", + ["Flag returned!"] = "Bandiera recuperata!", ["Flags, and their home base will be placed where each team ends their first turn."] = "Le bandiere saranno piazzate nel luogo in cui le squadre finiscono il loro primo turno.", ["Flamer"] = "Incendiario", -- ["Flaming Worm"] = "", -- A_Classic_Fairytale:backstab @@ -241,13 +241,13 @@ ["fuel extended!"] = "carburante aggiuntivo!", ["GAME BEGUN!!!"] = "IL GIOCO E' INIZIATO!!!", ["Game Modifiers: "] = "Modificatori di Gioco: ", - ["GAME OVER!"] = "GAME OVER!", - ["Game Started!"] = "Gioco Iniziato!", + ["GAME OVER!"] = "GAME OVER!", + ["Game Started!"] = "Gioco Iniziato!", -- ["Game? Was this a game to you?!"] = "", -- A_Classic_Fairytale:enemy -- ["GasBomb"] = "", -- Continental_supplies -- ["Gas Gargler"] = "", -- A_Classic_Fairytale:queen -- ["Get Dense Cloud out of the pit!"] = "", -- A_Classic_Fairytale:journey - ["Get on over there and take him out!"] = "Vai fuori da qui ed eliminalo!", + ["Get on over there and take him out!"] = "Vai fuori da qui ed eliminalo!", -- ["Get on the head of the mole"] = "", -- A_Classic_Fairytale:first_blood -- ["Get out of there!"] = "", -- User_Mission_-_The_Great_Escape -- ["Get that crate!"] = "", -- A_Classic_Fairytale:first_blood @@ -258,12 +258,12 @@ -- ["Gimme Bones"] = "", -- A_Classic_Fairytale:backstab -- ["Glark"] = "", -- A_Classic_Fairytale:shadow ["Goal"] = "Goal", - ["GO! GO! GO!"] = "VAI! VAI! VAI!", - ["Good birdy......"] = "Bell'uccellino......", + ["GO! GO! GO!"] = "VAI! VAI! VAI!", + ["Good birdy......"] = "Bell'uccellino......", -- ["Good Dude"] = "", -- User_Mission_-_The_Great_Escape -- ["Good idea, they'll never find us there!"] = "", -- A_Classic_Fairytale:united -- ["Good luck...or else!"] = "", -- A_Classic_Fairytale:journey - ["Good luck out there!"] = "Buona fortuna!", + ["Good luck out there!"] = "Buona fortuna!", ["Good so far!"] = "Molto bene finora!", ["Good to go!"] = "Vai!!", -- ["Go on top of the flower"] = "", -- A_Classic_Fairytale:first_blood @@ -298,8 +298,8 @@ ["Heavy"] = "Pesante", -- ["Hedge-cogs"] = "", -- A_Classic_Fairytale:enemy -- ["Hedgehog projectile: [fire your hog like a Sticky Bomb]"] = "", -- Continental_supplies - ["Hedgewars-Basketball"] = "Hedgewars-Pallacanestro", - ["Hedgewars-Knockball"] = "Hedgewars-Knockball", + ["Hedgewars-Basketball"] = "Hedgewars-Pallacanestro", + ["Hedgewars-Knockball"] = "Hedgewars-Knockball", -- ["Hedgibal Lecter"] = "", -- A_Classic_Fairytale:backstab ["Heh, it's not that bad."] = "Beh, alla fine non piove così forte.", -- ["Hello again, "] = "", -- A_Classic_Fairytale:family @@ -328,13 +328,13 @@ -- ["Hmmm...actually...I didn't either."] = "", -- A_Classic_Fairytale:enemy -- ["Hmmm, I'll have to find some way of moving him off this anti-portal surface..."] = "", -- portal -- ["Hmmm...it's a draw. How unfortunate!"] = "", -- A_Classic_Fairytale:enemy - ["Hmmm..."] = "Mmmmm...", + ["Hmmm..."] = "Mmmmm...", -- ["Hmmm...perhaps a little more time will help."] = "", -- A_Classic_Fairytale:first_blood -- ["Hogminator"] = "", -- A_Classic_Fairytale:family -- ["Hogs in sight!"] = "", -- Continental_supplies --- ["HOLY SHIT!"] = "", -- Mutant +-- ["HOLY SHYTE!"] = "", -- Mutant -- ["Honest Lee"] = "", -- A_Classic_Fairytale:enemy - ["Hooray!"] = "Hurrà!!!", + ["Hooray!"] = "Hurrà!!!", -- ["Hostage Situation"] = "", -- A_Classic_Fairytale:family -- ["How can I ever repay you for saving my life?"] = "", -- A_Classic_Fairytale:journey -- ["How come in a village full of warriors, it's up to me to save it?"] = "", -- A_Classic_Fairytale:dragon @@ -344,7 +344,7 @@ -- ["However, if you fail to do so, she dies a most violent death! Muahahaha!"] = "", -- A_Classic_Fairytale:journey -- ["However, my mates don't agree with me on letting you go..."] = "", -- A_Classic_Fairytale:dragon -- [" HP"] = "", -- Mutant - ["Hunter"] = "Cacciatore", --Bazooka, Shotgun, SniperRifle + ["Hunter"] = "Cacciatore", --Bazooka, Shotgun, SniperRifle -- ["I believe there's more of them."] = "", -- A_Classic_Fairytale:backstab -- ["I can see you have been training diligently."] = "", -- A_Classic_Fairytale:first_blood -- ["I can't believe it worked!"] = "", -- A_Classic_Fairytale:shadow @@ -397,7 +397,7 @@ -- ["I need to warn the others."] = "", -- A_Classic_Fairytale:backstab -- ["In fact, you are the only one that's been acting strangely."] = "", -- A_Classic_Fairytale:backstab -- ["In order to get to the other side, you need to collect the crates first.|"] = "", -- A_Classic_Fairytale:dragon - ["Instructor"] = "Istruttore", -- 01#Boot_Camp, User_Mission_-_Dangerous_Ducklings + ["Instructor"] = "Istruttore", -- 01#Boot_Camp, User_Mission_-_Dangerous_Ducklings -- ["Interesting idea, haha!"] = "", -- A_Classic_Fairytale:enemy -- ["Interesting! Last time you said you killed a cannibal!"] = "", -- A_Classic_Fairytale:backstab -- ["In the meantime, take these and return to your \"friend\"!"] = "", -- A_Classic_Fairytale:shadow @@ -473,7 +473,7 @@ -- ["Let them have a taste of my fury!"] = "", -- A_Classic_Fairytale:backstab -- ["Let us help, too!"] = "", -- A_Classic_Fairytale:backstab -- ["Light Cannfantry"] = "", -- A_Classic_Fairytale:united - ["Listen up, maggot!!"] = "Recluta, Attenzione!!", + ["Listen up, maggot!!"] = "Recluta, Attenzione!!", -- ["Little did they know that this hunt will mark them forever..."] = "", -- A_Classic_Fairytale:shadow ["Lively Lifeguard"] = "Bagnino Vivace", -- ["Lonely Cries: [Rise the water if no hog is in the circle and deal 1 damage to all hogs]"] = "", -- Continental_supplies @@ -488,12 +488,12 @@ -- ["MEGA KILL"] = "", -- Mutant -- ["Meiwes"] = "", -- A_Classic_Fairytale:backstab -- ["Mindy"] = "", -- A_Classic_Fairytale:united - ["Mine Deployer"] = "Spintore di Mine", + ["Mine Deployer"] = "Posatore di Mine", ["Mine Eater!"] = "Mangiatore di Mine!", ["|- Mines Time:"] = "|- Timer delle mine:", -- User_Mission_-_Diver, User_Mission_-_Spooky_Tree, User_Mission_-_Teamwork - ["MISSION FAILED"] = "MISSIONE FALLITA", -- User_Mission_-_Dangerous_Ducklings, User_Mission_-_Diver, User_Mission_-_Spooky_Tree, User_Mission_-_Teamwork - ["MISSION SUCCESSFUL"] = "MISSIONE COMPLETATA CON SUCCESSO", -- User_Mission_-_Spooky_Tree, User_Mission_-_Teamwork - ["MISSION SUCCESS"] = "MISSIONE COMPLETATA", -- User_Mission_-_Diver, User_Mission_-_Spooky_Tree, User_Mission_-_Teamwork + ["MISSION FAILED"] = "MISSIONE FALLITA", -- User_Mission_-_Dangerous_Ducklings, User_Mission_-_Diver, User_Mission_-_Spooky_Tree, User_Mission_-_Teamwork + ["MISSION SUCCESSFUL"] = "MISSIONE COMPLETATA CON SUCCESSO", -- User_Mission_-_Spooky_Tree, User_Mission_-_Teamwork + ["MISSION SUCCESS"] = "MISSIONE COMPLETATA", -- User_Mission_-_Diver, User_Mission_-_Spooky_Tree, User_Mission_-_Teamwork -- ["Molotov"] = "", -- Continental_supplies -- ["MONSTER KILL"] = "", -- Mutant -- ["More Natives"] = "", -- A_Classic_Fairytale:epil @@ -510,7 +510,7 @@ -- ["Natives"] = "", -- A_Classic_Fairytale:backstab, A_Classic_Fairytale:dragon, A_Classic_Fairytale:enemy, A_Classic_Fairytale:epil, A_Classic_Fairytale:family, A_Classic_Fairytale:first_blood, A_Classic_Fairytale:journey, A_Classic_Fairytale:queen, A_Classic_Fairytale:shadow, A_Classic_Fairytale:united ["New Barrels Per Turn"] = "Nuovi Barili ad Ogni Turno", ["NEW CLAN RECORD: "] = "NUOVO RECORD DEL CLAN: ", - ["NEW fastest lap: "] = "Nuovo giro migliore: ", + ["NEW fastest lap: "] = "Nuovo giro migliore: ", ["New Mines Per Turn"] = "Nuove Mine ad Ogni Turno", ["NEW RACE RECORD: "] = "NUOVO RACE RECORD: ", ["Newton's Hammock"] = "Newton e l'Amaca", @@ -529,7 +529,7 @@ -- ["Not all hogs are born equal."] = "", -- Highlander ["NOT ENOUGH WAYPOINTS"] = "NON CI SONO ABBASTANZA PUNTI!", -- ["Not now, Fiery Water!"] = "", -- A_Classic_Fairytale:backstab - ["Not So Friendly Match"] = "Partita (quasi) amichevole", -- Basketball, Knockball + ["Not So Friendly Match"] = "Partita (quasi) amichevole", -- Basketball, Knockball -- ["Not you again! My head still hurts from last time!"] = "", -- A_Classic_Fairytale:shadow -- ["No, we made sure of that!"] = "", -- A_Classic_Fairytale:united -- ["Now find the next target! |Tip: Normally you lose health by falling down, so be careful!"] = "", -- Basic_Training_-_Rope @@ -543,9 +543,9 @@ -- ["OH, COME ON!"] = "", -- A_Classic_Fairytale:journey -- ["Oh, my!"] = "", -- A_Classic_Fairytale:first_blood -- ["Oh, my! This is even more entertaining than I've expected!"] = "", -- A_Classic_Fairytale:backstab - ["Oh no! Just try again!"] = "Oh no! Prova ancora!", -- User_Mission_-_Diver, User_Mission_-_Spooky_Tree, User_Mission_-_Teamwork + ["Oh no! Just try again!"] = "Oh no! Prova ancora!", -- User_Mission_-_Diver, User_Mission_-_Spooky_Tree, User_Mission_-_Teamwork -- ["Oh no, not "] = "", -- A_Classic_Fairytale:backstab, A_Classic_Fairytale:united - ["Oh no! Time's up! Just try again."] = "Oh no! Tempo scaduto! Prova ancora!", --Bazooka, Shotgun, SniperRifle + ["Oh no! Time's up! Just try again."] = "Oh no! Tempo scaduto! Prova ancora!", --Bazooka, Shotgun, SniperRifle -- ["Oh no! You failed! Just try again."] = "", -- Basic_Training_-_Cluster_Bomb -- ["Oh, silly me! I forgot that I'm the shaman."] = "", -- A_Classic_Fairytale:backstab -- ["Olive"] = "", -- A_Classic_Fairytale:united @@ -555,20 +555,20 @@ -- ["One tribe was peaceful, spending their time hunting and training, enjoying the small pleasures of life..."] = "", -- A_Classic_Fairytale:first_blood -- ["Oops...I dropped them."] = "", -- A_Classic_Fairytale:united -- ["Open that crate and we will continue!"] = "", -- A_Classic_Fairytale:first_blood - ["Operation Diver"] = "Operazione Sub", - ["Opposing Team: "] = "Squadra Nemica: ", + ["Operation Diver"] = "Operazione Sub", + ["Opposing Team: "] = "Squadra Nemica: ", -- ["Orlando Boom!"] = "", -- A_Classic_Fairytale:queen -- ["Ouch!"] = "", -- User_Mission_-_Rope_Knock_Challenge -- ["Our tribe, our beautiful island!"] = "", -- A_Classic_Fairytale:enemy -- ["Parachute"] = "", -- Continental_supplies - ["Pathetic Hog #%d"] = "Riccio Patetico #%d", + ["Pathetic Hog #%d"] = "Riccio Patetico #%d", ["Pathetic Resistance"] = "Resistenza Patetica", -- User_Mission_-_Bamboo_Thicket, User_Mission_-_Newton_and_the_Hammock -- ["Perfect! Now try to get the next crate without hurting yourself!"] = "", -- A_Classic_Fairytale:first_blood ["Per-Hog Ammo"] = "Munizioni per Riccio", -- ["- Per team weapons|- 9 weaponschemes|- Unique new weapons| |Select continent first round with the Weapon Menu or by ([switch/tab]=Increase,[precise/left shift]=Decrease) on Skip|Some weapons have a second option. Find them with [switch/tab]"] = "", -- Continental_supplies -- ["Pfew! That was close!"] = "", -- A_Classic_Fairytale:shadow --- ["Piñata bullet: [Contains some sweet candy!]"] = "", -- Continental_supplies +-- ["Piñata bullet: [Contains some sweet candy!]"] = "Proiettile pentolaccia: [Contiene alcune caramelle deliziose!]", -- Continental_supplies -- ["Pings left:"] = "", -- Space_Invasion ["Place more waypoints using the 'Air Attack' weapon."] = "Piazza più punti usando l'Attacco Aereo", @@ -580,10 +580,10 @@ -- ["Please, stop releasing your \"smoke signals\"!"] = "", -- A_Classic_Fairytale:shadow -- ["Point Blank Combo!"] = "", -- Space_Invasion ["points"] = "punti", -- Control, Space_Invasion - ["Poison"] = "Veleno", + ["Poison"] = "Veleno", -- ["Portal hint: one goes to the destination, and one is the entrance.|"] = "", -- A_Classic_Fairytale:dragon -- ["Portal mission"] = "", -- portal - ["Power Remaining"] = "Potenza Rimasta", + ["Power Remaining"] = "Potenza Rimasta", ["Prepare yourself"] = "Preparati", -- ["Press [Enter] to accept this configuration."] = "", -- WxW -- ["Press [Left] or [Right] to move around, [Enter] to jump"] = "", -- A_Classic_Fairytale:first_blood @@ -602,7 +602,7 @@ -- ["Reinforcements"] = "", -- A_Classic_Fairytale:backstab -- ["Remember: The rope only bend around objects, |if it doesn't hit anything it's always stright!"] = "", -- Basic_Training_-_Rope -- ["Remember this, pathetic animal: when the day comes, you will regret your blind loyalty!"] = "", -- A_Classic_Fairytale:shadow - [" - 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"] = " - Riporta la bandiera nemica alla tua base per guadagnare un punto| - La prima squadra a catturarne 3 vince! | - Puoi guadagnare punti solo quando la tua bandiera si trova nella tua base! | - I ricci lasceranno cadere la bandiera se uccisi o caduti in acqua! | - Le bandiere cadute possono essere restituite o ricatturate! | - I ricci risorgono dalla morte!", + [" - 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"] = " - Riporta la bandiera nemica alla tua base per guadagnare un punto| - La prima squadra a catturarne 3 vince! | - Puoi guadagnare punti solo quando la tua bandiera si trova nella tua base! | - I ricci lasceranno cadere la bandiera se uccisi o caduti in acqua! | - Le bandiere cadute possono essere restituite o ricatturate! | - I ricci risorgono dalla morte!", -- ["Return to Leaks A Lot! If you get stuck, press [Precise] to try again!"] = "", -- A_Classic_Fairytale:shadow -- ["Righteous Beard"] = "", -- A_Classic_Fairytale:backstab, A_Classic_Fairytale:dragon, A_Classic_Fairytale:enemy, A_Classic_Fairytale:epil, A_Classic_Fairytale:family, A_Classic_Fairytale:first_blood, A_Classic_Fairytale:queen, A_Classic_Fairytale:united -- ["ROPE-KNOCKING"] = "", -- User_Mission_-_Rope_Knock_Challenge @@ -612,7 +612,7 @@ ["Round Limit"] = "Limite del Round", ["Rounds Complete: "] = "Round Completati: ", ["Rounds Complete"] = "Round Completati", - ["RULES OF THE GAME [Press ESC to view]"] = "REGOLE DEL GIOCO (Premi ESC per visualizzarle)", + ["RULES OF THE GAME [Press ESC to view]"] = "REGOLE DEL GIOCO (Premi ESC per visualizzarle)", -- ["Rusty Joe"] = "", -- A_Classic_Fairytale:queen -- ["Sabotage: [Sabotage all hogs in the circle and deal ~10 dmg]"] = "", -- Continental_supplies -- ["Salivaslurper"] = "", -- A_Classic_Fairytale:united @@ -631,7 +631,7 @@ -- ["Seduction"] = "", -- Continental_supplies -- ["Seems like every time you take a \"walk\", the enemy find us!"] = "", -- A_Classic_Fairytale:backstab -- ["See that crate farther on the right?"] = "", -- A_Classic_Fairytale:first_blood - ["See ya!"] = "Ci vediamo!", + ["See ya!"] = "Ci vediamo!", -- ["Segmentation Paul"] = "", -- A_Classic_Fairytale:dragon -- ["Select continent!"] = "", -- Continental_supplies -- ["Select difficulty: [Left] - easier or [Right] - harder"] = "", -- A_Classic_Fairytale:first_blood @@ -641,20 +641,20 @@ ["Shield boosted! +30 power"] = "Scudo ricaricato! Potenza +30", ["Shield Depleted"] = "Scudo Esaurito", ["Shield is fully recharged!"] = "Lo scudo è stato completamente ricaricato!", - ["Shield Master!"] = "Shield Master!", - ["Shield Miser!"] = "Scudo Piccolo", - ["Shield OFF:"] = "Scudo OFF", - ["Shield ON:"] = "Scudo ON", - ["Shield Seeker!"] = "Cercatore di Scudi", + ["Shield Master!"] = "Maestro di scudo!", + ["Shield Miser!"] = "Povero scudo!", + ["Shield OFF:"] = "Scudo OFF:", + ["Shield ON:"] = "Scudo ON:", + ["Shield Seeker!"] = "Cercatore di Scudi!", -- ["Shotgun"] = "", -- Continental_supplies - ["Shotgun Team"] = "Squadra Shotgun", - ["Shotgun Training"] = "Addestramento sull'utilizzo del Fucile a Pompa", + ["Shotgun Team"] = "Squadra Shotgun", + ["Shotgun Training"] = "Addestramento sull'utilizzo del Fucile a Pompa", ["shots remaining."] = "colpi rimasti.", ["Silly"] = "Stupido", ["Sinky"] = "Affondato", -- ["Sirius Lee"] = "", -- A_Classic_Fairytale:enemy - ["%s is out and Team %d|scored a penalty!| |Score:"] = "%s è fuori dal campo e la squadra %d|prende una penalità!| |Punteggio:", -- Basketball, Knockball - ["%s is out and Team %d|scored a point!| |Score:"] = "%s è fuori dal campo e la squadra %d|guadagna un punto!| |Puntuación:", -- Basketball, Knockball + ["%s is out and Team %d|scored a penalty!| |Score:"] = "%s è fuori dal campo e la squadra %d|prende una penalità!| |Punteggio:", -- Basketball, Knockball + ["%s is out and Team %d|scored a point!| |Score:"] = "%s è fuori dal campo e la squadra %d|guadagna un punto!| |Puntuación:", -- Basketball, Knockball -- ["Slippery"] = "", -- A_Classic_Fairytale:journey -- ["Smith 0.97"] = "", -- A_Classic_Fairytale:enemy -- ["Smith 0.98"] = "", -- A_Classic_Fairytale:enemy @@ -664,8 +664,8 @@ -- ["Smith 1.0"] = "", -- A_Classic_Fairytale:enemy -- ["Sniper Rifle"] = "", -- Continental_supplies -- ["Sniper!"] = "", -- Space_Invasion - ["Sniper Training"] = "Addestramento sull'utilizzo del Fucile di Precisione", - ["Sniperz"] = "Cecchini", + ["Sniper Training"] = "Addestramento sull'utilizzo del Fucile di Precisione", + ["Sniperz"] = "Cecchini", -- ["So humiliating..."] = "", -- A_Classic_Fairytale:first_blood -- ["South America"] = "", -- Continental_supplies -- ["So? What will it be?"] = "", -- A_Classic_Fairytale:shadow @@ -674,7 +674,7 @@ -- ["Spiky Cheese"] = "", -- A_Classic_Fairytale:enemy, A_Classic_Fairytale:epil, A_Classic_Fairytale:family, A_Classic_Fairytale:queen, A_Classic_Fairytale:shadow -- ["Spleenlover"] = "", -- A_Classic_Fairytale:united ["Sponge"] = "Spugna", - ["Spooky Tree"] = "Albero Stregato", + ["Spooky Tree"] = "Albero Stregato", ["s|"] = "s|", ["s"] = "s", -- GaudyRacer, Space_Invasion ["STATUS UPDATE"] = "STATUS AGGIORNATO", -- GaudyRacer, Space_Invasion @@ -693,7 +693,7 @@ ["Switched to "] = "Cambiato in", -- ["Syntax Errol"] = "", -- A_Classic_Fairytale:dragon -- ["Talk about mixed signals..."] = "", -- A_Classic_Fairytale:dragon - ["Team %d: "] = "Squadra %d: ", + ["Team %d: "] = "Squadra %d: ", ["Team Scores"] = "Punteggi della Squadra", -- Control, Space_Invasion -- ["Teleport hint: just use the mouse to select the destination!"] = "", -- A_Classic_Fairytale:dragon -- ["Thanks!"] = "", -- A_Classic_Fairytale:family @@ -715,9 +715,9 @@ -- ["The Bull's Eye"] = "", -- A_Classic_Fairytale:first_blood -- ["The caves are well hidden, they won't find us there!"] = "", -- A_Classic_Fairytale:united -- ["The Crate Frenzy"] = "", -- A_Classic_Fairytale:first_blood --- ["The Dilemma"] = "", -- A_Classic_Fairytale:shadow + ["The Dilemma"] = "Il dilemma", -- A_Classic_Fairytale:shadow -- ["The enemy can't move but it might be a good idea to stay out of sight!|"] = "", -- A_Classic_Fairytale:dragon - ["The enemy is hiding out on yonder ducky!"] = "Il nemico si sta nascondendo dietro a quella papera!", + ["The enemy is hiding out on yonder ducky!"] = "Il nemico si sta nascondendo dietro a quella papera!", -- ["The Enemy Of My Enemy"] = "", -- A_Classic_Fairytale:enemy -- ["The First Blood"] = "", -- A_Classic_Fairytale:first_blood -- ["The First Encounter"] = "", -- A_Classic_Fairytale:shadow @@ -788,15 +788,15 @@ -- ["Torn Muscle"] = "", -- A_Classic_Fairytale:journey -- [" to save the village."] = "", -- A_Classic_Fairytale:dragon -- ["To the caves..."] = "", -- A_Classic_Fairytale:united - ["Toxic Team"] = "Team Velenoso", -- User_Mission_-_Diver, User_Mission_-_Spooky_Tree, User_Mission_-_Teamwork + ["Toxic Team"] = "Team Velenoso", -- User_Mission_-_Diver, User_Mission_-_Spooky_Tree, User_Mission_-_Teamwork ["TRACK COMPLETED"] = "PISTA COMPLETATA", ["TRACK FAILED!"] = "PISTA FALLITA!", -- ["training"] = "", -- portal -- ["Traitors"] = "", -- A_Classic_Fairytale:epil -- ["Tribe"] = "", -- A_Classic_Fairytale:backstab - ["TrophyRace"] = "TrophyRace", + ["TrophyRace"] = "TrophyRace", -- ["Try to protect the chief! You won't lose if he dies, but it is advised that he survives."] = "", -- A_Classic_Fairytale:united - ["T_T"] = "T_T", + ["T_T"] = "T_T", ["Tumbling Time Extended!"] = "Tempo di Caduta Prolungato!", -- ["Turns until Sudden Death: "] = "", -- A_Classic_Fairytale:dragon -- [" turns until Sudden Death! Better hurry!"] = "", -- A_Classic_Fairytale:dragon @@ -809,7 +809,7 @@ -- ["Unexpected Igor"] = "", -- A_Classic_Fairytale:dragon -- ["Unit 0x0007"] = "", -- A_Classic_Fairytale:family -- ["Unit 334a$7%;.*"] = "", -- A_Classic_Fairytale:backstab, A_Classic_Fairytale:dragon, A_Classic_Fairytale:enemy, A_Classic_Fairytale:family, A_Classic_Fairytale:queen, A_Classic_Fairytale:united - ["Unit 3378"] = "Unità 3378", + ["Unit 3378"] = "Unità 3378", ["Unit 835"] = "Unità 835", -- ["United We Stand"] = "", -- A_Classic_Fairytale:united ["Unit"] = "Unità", @@ -825,7 +825,7 @@ -- ["Use the portal gun to get to the next crate, then use the new gun to get to the final destination!|"] = "", -- A_Classic_Fairytale:dragon -- ["Use the rope to get on the head of the mole, young one!"] = "", -- A_Classic_Fairytale:first_blood -- ["Use the rope to knock your enemies to their doom."] = "", -- User_Mission_-_Rope_Knock_Challenge - ["Use your rope to get from start to finish as fast as you can!"] = "Usa la tua corda per raggiungere il traguardo il più velocemente possibile!", + ["Use your rope to get from start to finish as fast as you can!"] = "Usa la tua corda per raggiungere il traguardo il più velocemente possibile!", -- ["Vedgies"] = "", -- A_Classic_Fairytale:journey -- ["Vegan Jack"] = "", -- A_Classic_Fairytale:enemy -- ["Victory!"] = "", -- Basic_Training_-_Rope @@ -854,7 +854,7 @@ -- ["Welcome, Leaks A Lot!"] = "", -- A_Classic_Fairytale:journey ["Well done."] = "Ben fatto.", -- ["We'll give you a problem then!"] = "", -- A_Classic_Fairytale:enemy --- ["We'll spare your life for now!"] = "", -- A_Classic_Fairytale:backstab + ["We'll spare your life for now!"] = "Ti risparmieremo la vita per ora!", -- A_Classic_Fairytale:backstab -- ["Well, that was a waste of time."] = "", -- A_Classic_Fairytale:dragon -- ["Well, well! Isn't that the cutest thing you've ever seen?"] = "", -- A_Classic_Fairytale:journey -- ["Well, yes. This was a cyborg television show."] = "", -- A_Classic_Fairytale:enemy @@ -893,49 +893,49 @@ -- ["Where do you get that?!"] = "", -- A_Classic_Fairytale:enemy -- ["Where have you been?!"] = "", -- A_Classic_Fairytale:backstab -- ["Where have you been?"] = "", -- A_Classic_Fairytale:united --- ["? Why?"] = "", -- A_Classic_Fairytale:backstab --- ["Why "] = "", -- A_Classic_Fairytale:backstab --- ["! Why?!"] = "", -- A_Classic_Fairytale:backstab, A_Classic_Fairytale:united --- ["Why are you doing this?"] = "", -- A_Classic_Fairytale:journey --- ["Why are you helping us, uhm...?"] = "", -- A_Classic_Fairytale:family + ["? Why?"] = "? Perché?", -- A_Classic_Fairytale:backstab + ["Why "] = "Perché ", -- A_Classic_Fairytale:backstab + ["! Why?!"] = "! Perché?!", -- A_Classic_Fairytale:backstab, A_Classic_Fairytale:united + ["Why are you doing this?"] = "Perché stai facendo questo?", -- A_Classic_Fairytale:journey + ["Why are you helping us, uhm...?"] = "Perché ci stai aiutando, mmm...?", -- A_Classic_Fairytale:family -- ["Why can't he just let her go?!"] = "", -- A_Classic_Fairytale:family -- ["Why do men keep hurting me?"] = "", -- A_Classic_Fairytale:first_blood --- ["Why do you not like me?"] = "", -- A_Classic_Fairytale:shadow + ["Why do you not like me?"] = "Perché non ti piaccio?", -- A_Classic_Fairytale:shadow -- ["Why do you want to take over our island?"] = "", -- A_Classic_Fairytale:enemy --- ["Why me?!"] = "", -- A_Classic_Fairytale:backstab + ["Why me?!"] = "Perché io?!", -- A_Classic_Fairytale:backstab -- ["Why would they do this?"] = "", -- A_Classic_Fairytale:backstab -- ["- Will Get 1-3 random weapons"] = "", -- Continental_supplies -- ["- Will refresh Parachute each turn."] = "", -- Continental_supplies -- ["- Will refresh portalgun each turn."] = "", -- Continental_supplies ["Will this ever end?"] = "Finirà mai?", --- ["WINNER IS "] = "", -- Mutant + ["WINNER IS "] = "IL VINCITORE E' ", -- Mutant ["WINNING TIME: "] = "TEMPO VINCENTE: ", -- ["Wise Oak"] = "", -- A_Classic_Fairytale:backstab, A_Classic_Fairytale:dragon, A_Classic_Fairytale:enemy, A_Classic_Fairytale:epil, A_Classic_Fairytale:family, A_Classic_Fairytale:queen -- ["With Dense Cloud on the land of shadows, I'm the village's only hope..."] = "", -- A_Classic_Fairytale:journey -- ["With the rest of the tribe gone, it was up to "] = "", -- A_Classic_Fairytale:dragon -- ["Worry not, for it is a peaceful animal! There is no reason to be afraid..."] = "", -- A_Classic_Fairytale:first_blood --- ["Wow, what a dream!"] = "", -- A_Classic_Fairytale:backstab + ["Wow, what a dream!"] = "Wow, che sogno!", -- A_Classic_Fairytale:backstab -- ["Y3K1337"] = "", -- A_Classic_Fairytale:journey, A_Classic_Fairytale:shadow --- ["Yay, we won!"] = "", -- A_Classic_Fairytale:enemy + ["Yay, we won!"] = "Sì, abbiamo vinto!", -- A_Classic_Fairytale:enemy -- ["Y Chwiliad"] = "", -- A_Classic_Fairytale:dragon -- ["Yeah...I think it's a 'he', lol."] = "", -- A_Classic_Fairytale:shadow -- ["Yeah, sure! I died. Hillarious!"] = "", -- A_Classic_Fairytale:backstab -- ["Yeah, take that!"] = "", -- A_Classic_Fairytale:dragon -- ["Yeah? Watcha gonna do? Cry?"] = "", -- A_Classic_Fairytale:journey --- ["Yes!"] = "", -- A_Classic_Fairytale:enemy + ["Yes!"] = "Sì!", -- A_Classic_Fairytale:enemy -- ["Yes, yeees! You are now ready to enter the real world!"] = "", -- A_Classic_Fairytale:first_blood --- ["Yo, dude, we're here, too!"] = "", -- A_Classic_Fairytale:family + ["Yo, dude, we're here, too!"] = "Ehi, tu, ci siamo anche noi, qui!", -- A_Classic_Fairytale:family -- ["You are given the chance to turn your life around..."] = "", -- A_Classic_Fairytale:shadow -- ["You are playing with our lives here!"] = "", -- A_Classic_Fairytale:enemy --- ["! You bastards!"] = "", -- A_Classic_Fairytale:backstab, A_Classic_Fairytale:united + ["! You bastards!"] = "! Bastardi!", -- A_Classic_Fairytale:backstab, A_Classic_Fairytale:united -- ["You bear impressive skills, "] = "", -- A_Classic_Fairytale:dragon -- ["You can't fire a portal on the blue surface"] = "", -- portal -- ["You couldn't possibly believe that after refusing my offer I'd just let you go!"] = "", -- A_Classic_Fairytale:journey ["You'd almost swear the water was rising!"] = "Guarda, l'acqua si sta alzando rapidamente!", -- ["You'd better watch your steps..."] = "", -- A_Classic_Fairytale:journey --- ["You did not make it in time, try again!"] = "", -- Basic_Training_-_Rope + ["You did not make it in time, try again!"] = "Non hai fatto in tempo, prova ancora!", -- Basic_Training_-_Rope -- ["You have 7 turns until the next wave arrives.|Make sure the arriving cannibals are greeted appropriately!|If the hog dies, the cause is lost.|Hint: you might want to use some mines..."] = "", -- A_Classic_Fairytale:backstab --- ["You have "] = "", -- A_Classic_Fairytale:dragon + ["You have "] = "Hai ", -- A_Classic_Fairytale:dragon -- ["You have been giving us out to the enemy, haven't you!"] = "", -- A_Classic_Fairytale:backstab -- ["You have been respawned, at your last checkpoint!"] = "", -- Basic_Training_-_Rope -- ["You have been respawned, be more carefull next time!"] = "", -- Basic_Training_-_Rope @@ -947,8 +947,8 @@ -- ["You have killed an innocent hedgehog!"] = "", -- A_Classic_Fairytale:backstab -- ["You have proven yourself worthy to see our most ancient secret!"] = "", -- A_Classic_Fairytale:first_blood -- ["You have proven yourselves worthy!"] = "", -- A_Classic_Fairytale:enemy - ["You have SCORED!!"] = "Hai guadagnato un PUNTO!!", --- ["You have to destroy 12 targets in 180 seconds"] = "", -- Basic_Training_-_Cluster_Bomb + ["You have SCORED!!"] = "Hai guadagnato un PUNTO!!", + ["You have to destroy 12 targets in 180 seconds"] = "Devi distruggere 12 bersagli in 180 secondi", -- Basic_Training_-_Cluster_Bomb -- ["You have won the game by proving true cooperative skills!"] = "", -- A_Classic_Fairytale:enemy -- ["You just appeared out of thin air!"] = "", -- A_Classic_Fairytale:backstab -- ["You just committed suicide..."] = "", -- A_Classic_Fairytale:shadow @@ -956,16 +956,16 @@ -- ["You know...taking a stroll."] = "", -- A_Classic_Fairytale:backstab -- ["You know what? I don't even regret anything!"] = "", -- A_Classic_Fairytale:backstab -- ["You'll see what I mean!"] = "", -- A_Classic_Fairytale:enemy --- ["You may only attack from a rope!"] = "", -- WxW + ["You may only attack from a rope!"] = "Puoi attaccare solo da una corda!", -- WxW -- ["You meatbags are pretty slow, you know!"] = "", -- A_Classic_Fairytale:enemy -- ["You might want to find a way to instantly kill arriving cannibals!"] = "", -- A_Classic_Fairytale:backstab -- ["Young one, you are telling us that they can instantly change location without a shaman?"] = "", -- A_Classic_Fairytale:united -- ["You probably know what to do next..."] = "", -- A_Classic_Fairytale:first_blood -- ["Your deaths will be avenged, cannibals!"] = "", -- A_Classic_Fairytale:enemy -- ["Your death will not be in vain, Dense Cloud!"] = "", -- A_Classic_Fairytale:shadow --- ["You're...alive!? But we saw you die!"] = "", -- A_Classic_Fairytale:backstab --- ["You're a pathetic liar!"] = "", -- A_Classic_Fairytale:backstab --- ["You're funny!"] = "", -- A_Classic_Fairytale:journey + ["You're...alive!? But we saw you die!"] = "Sei...vivo!? Ma noi ti abbiamo visto morire!", -- A_Classic_Fairytale:backstab + ["You're a pathetic liar!"] = "Sei un patetico bugiardo!", -- A_Classic_Fairytale:backstab + ["You're funny!"] = "Sei divertente!", -- A_Classic_Fairytale:journey -- ["You're getting pretty good! |Tip: When you shorten you rope you move faster! |and when you lengthen it you move slower"] = "", -- Basic_Training_-_Rope -- ["You're pathetic! You are not worthy of my attention..."] = "", -- A_Classic_Fairytale:shadow -- ["You're probably wondering why I bought you back..."] = "", -- A_Classic_Fairytale:backstab @@ -974,12 +974,12 @@ -- ["Your movement skills will be evaluated now."] = "", -- A_Classic_Fairytale:first_blood ["You saved"] = "Hai salvato", -- ["You've been assaulting us, we have been just defending ourselves!"] = "", -- A_Classic_Fairytale:enemy - ["You've failed. Try again."] = "Hai fallito. Prova di nuovo.", - ["You've reached the goal!| |Time: "] = "Hai raggiunto il traguardo!| |Tempo: ", --- ["You will be avenged!"] = "", -- A_Classic_Fairytale:shadow + ["You've failed. Try again."] = "Hai fallito. Prova di nuovo.", + ["You've reached the goal!| |Time: "] = "Hai raggiunto il traguardo!| |Tempo: ", + ["You will be avenged!"] = "Sarai vendicato!", -- A_Classic_Fairytale:shadow -- ["You won't believe what happened to me!"] = "", -- A_Classic_Fairytale:backstab -- ["Yuck! I bet they'll keep worshipping her even after I save the village!"] = "", -- A_Classic_Fairytale:family -- ["Zealandia"] = "", -- Continental_supplies - ["'Zooka Team"] = "Squadra 'Zooka", + ["'Zooka Team"] = "Squadra 'Zooka", -- ["Zork"] = "", -- A_Classic_Fairytale:dragon, A_Classic_Fairytale:family, A_Classic_Fairytale:queen } diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Locale/it.txt --- a/share/hedgewars/Data/Locale/it.txt Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Locale/it.txt Fri Feb 22 05:05:32 2013 +0100 @@ -54,10 +54,10 @@ 00:51=Palla di Fango 00:52=Nessuna Arma Selezionata 00:53=Macchina Spazio-Temporale -00:54=Attrezzi da Costruzione -00:55=Land Spray -00:56=Congelatore -00:57=Mannarino +; 00:54=Attrezzi da Costruzione +00:54=Land Spray +00:55=Congelatore +00:56=Mannarino 01:00=Combattiamo! 01:01=Round in parità @@ -389,7 +389,7 @@ 02:10=Proprio un bel colpo! ; Hog (%1) has to leave (team is gone) -02:11=%1 deve andare a dormire! +02:11=%1 deve andare a dormire! 02:11=%1 sembra che non abbia tempo per giocare 02:11=%1 se ne deve andare 02:11=%1 stava giocando sui PC della scuola ed è stato beccato diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Locale/ja.txt --- a/share/hedgewars/Data/Locale/ja.txt Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Locale/ja.txt Fri Feb 22 05:05:32 2013 +0100 @@ -54,8 +54,8 @@ 00:51=土地玉 00:52=武器を携えない 00:53=TARDIS -00:54=構造 -00:55=土地スプレー +; 00:54=構造 +00:54=土地スプレー 01:00=ヨシ、ファイト! 01:01=ドロー! diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Locale/ko.lua --- a/share/hedgewars/Data/Locale/ko.lua Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Locale/ko.lua Fri Feb 22 05:05:32 2013 +0100 @@ -332,7 +332,7 @@ -- ["Hmmm...perhaps a little more time will help."] = "", -- A_Classic_Fairytale:first_blood -- ["Hogminator"] = "", -- A_Classic_Fairytale:family -- ["Hogs in sight!"] = "", -- Continental_supplies --- ["HOLY SHIT!"] = "", -- Mutant +-- ["HOLY SHYTE!"] = "", -- Mutant -- ["Honest Lee"] = "", -- A_Classic_Fairytale:enemy -- ["Hooray!"] = "", -- ["Hostage Situation"] = "", -- A_Classic_Fairytale:family diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Locale/ko.txt --- a/share/hedgewars/Data/Locale/ko.txt Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Locale/ko.txt Fri Feb 22 05:05:32 2013 +0100 @@ -13,7 +13,7 @@ 00:10=다이너마이트 00:11=야구 방망이 00:12=Shoryuken -00:13=초 +00:13=초 00:14=낙하산 00:15=폭탄 공습 00:16=지뢰 공습 diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Locale/lt.lua --- a/share/hedgewars/Data/Locale/lt.lua Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Locale/lt.lua Fri Feb 22 05:05:32 2013 +0100 @@ -332,7 +332,7 @@ -- ["Hmmm...perhaps a little more time will help."] = "", -- A_Classic_Fairytale:first_blood -- ["Hogminator"] = "", -- A_Classic_Fairytale:family -- ["Hogs in sight!"] = "", -- Continental_supplies --- ["HOLY SHIT!"] = "", -- Mutant +-- ["HOLY SHYTE!"] = "", -- Mutant -- ["Honest Lee"] = "", -- A_Classic_Fairytale:enemy ["Hooray!"] = "Hurah!", -- ["Hostage Situation"] = "", -- A_Classic_Fairytale:family diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Locale/lt.txt --- a/share/hedgewars/Data/Locale/lt.txt Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Locale/lt.txt Fri Feb 22 05:05:32 2013 +0100 @@ -54,8 +54,8 @@ 00:51=Purvo Kamuolys 00:52=Joks Ginklas Nepasirinktas 00:53=TARDIS -00:54=Struktūra -00:55=Žemės Purškimas +; 00:54=Struktūra +00:54=Žemės Purškimas 01:00=Kaukimės! 01:01=Lygiosios @@ -298,7 +298,7 @@ 02:07=Tai Gali Praversti... 02:07=Naudingi Irankiai! 02:07=Išnaudok Šia Dėže -02:07=Atsargiai Žemiau +02:07=Atsargiai Žemiau 02:07=Dar Daugiau Naudingu Irankiu! 02:07=Irankiai tau! 02:07=Tai Turėtu Buti Gera! @@ -364,7 +364,7 @@ 02:09=%1 artėja prie savizudybės 02:09=%1 padeda priešui 02:09=Tai buvo kvaila %1 -02:09=%1 Palauk KA?? +02:09=%1 Palauk KA?? 02:09=%1 susimaišė 02:09=%1 sužaloja save 02:09=%1 myli žeminti save @@ -406,7 +406,7 @@ 03:11=Bonk! 03:12=Kovos Menai 03:13=UNUSED -03:14=Transporto Priemonė +03:14=Transporto Priemonė 03:15=Aviacinė Ataka 03:16=Aviacinė Ataka 03:17=Kasimosi Irankis @@ -455,7 +455,7 @@ 04:02=Atakuok savo priešus paleisdamas balistini objekta|kuris gali buti valdomas vėjo.|Ataka: Laikyk kad šautum stipriau 04:03=Paleisk sprogstančia bite kuri seks prieša|arba pasirinkta taikini. Nešauk su pilna jėga|nes tai gadina taikluma.|Pelė: Pasirink taikini|Ataka: Laikyk kad šautum stipriau 04:04=Atakuok savo priešus naudodamas šratini šautuva.|Ačiu jo pasiskirstimui tau nereikia nusitaikity tiesiai i prieša|kad padarytum žalos.|Ataka: Šauna (Keleta Kartu) -04:05=Judėk po žeme naudok kasimo iranga|kad galėtum nusileisti i tuneli arba i kita vietove.|Ataka: Pradėti ir nustoti kasima +04:05=Judėk po žeme naudok kasimo iranga|kad galėtum nusileisti i tuneli arba i kita vietove.|Ataka: Pradėti ir nustoti kasima 04:06=Nusibodo? Nėra Kaip Pulti? Taupai Kulkas?|Jokiu Problemu! Tiesiog praleisk savo eile, baily!|Ataka: Praleidžia tavo eile be veiksmo 04:07=Nuvaryk toli ir greitai|su virve. Numesk ežius i vandeni|arba numesk ant ju granata arba panašius ginklus.|Ataka: Šauk arba atleisk virve|Ilgas Šuolis: Meta granatas arba panašius ginklus 04:08=Laikyk savo priešus kuo toliau numesdamas|mina siauruose praėjimuose arba prie ju kojiu. Tik|buk tikras kad pabėgsi kad pats jos neaktyvuotum!|Ataka: Meta mina tau prie kojiu diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Locale/missions_de.txt --- a/share/hedgewars/Data/Locale/missions_de.txt Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Locale/missions_de.txt Fri Feb 22 05:05:32 2013 +0100 @@ -1,4 +1,4 @@ -Basic_Training_-_Bazooka.name=Training: Bazooka - Grundlagen +Basic_Training_-_Bazooka.name=Training: Bazooka - Grundlagen Basic_Training_-_Bazooka.desc="Nutze den Wind zu deinem Vorteil aus!" Basic_Training_-_Grenade.name=Training: Granate - Grundlagen diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Locale/missions_fr.txt --- a/share/hedgewars/Data/Locale/missions_fr.txt Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Locale/missions_fr.txt Fri Feb 22 05:05:32 2013 +0100 @@ -1,5 +1,5 @@ Basic_Training_-_Bazooka.name=Initiation au Bazooka -Basic_Training_-_Bazooka.desc="Pour gagner, utiliser le vent à votre avantage !" +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 !" @@ -16,11 +16,11 @@ 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_-_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_-_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." @@ -28,7 +28,7 @@ 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.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 @@ -44,4 +44,4 @@ 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 +User_Mission_-_RCPlane_Challenge.desc="Plutôt confiant, hein, aviateur ?" \ No newline at end of file diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Locale/missions_it.txt --- a/share/hedgewars/Data/Locale/missions_it.txt Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Locale/missions_it.txt Fri Feb 22 05:05:32 2013 +0100 @@ -4,7 +4,7 @@ Basic_Training_-_Grenade.name=Addestramento base sull'utilizzo delle Granate Basic_Training_-_Grenade.desc="Ricorda, toglierai PRIMA la sicura e POI lancerai la granata!" -Basic_Training_-_Cluster_Bomb.name=ddestramento base sull'utilizzo delle Granate a Grappolo +Basic_Training_-_Cluster_Bomb.name=Addestramento base sull'utilizzo delle Granate a Grappolo Basic_Training_-_Cluster_Bomb.desc="Qualcuno ha bisogno di una doccia (molto) calda!" Basic_Training_-_Shotgun.name=Addestramento base sull'utilizzo del Fucile a Pompa diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Locale/pl.lua --- a/share/hedgewars/Data/Locale/pl.lua Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Locale/pl.lua Fri Feb 22 05:05:32 2013 +0100 @@ -332,7 +332,7 @@ -- ["Hmmm...perhaps a little more time will help."] = "", -- A_Classic_Fairytale:first_blood -- ["Hogminator"] = "", -- A_Classic_Fairytale:family -- ["Hogs in sight!"] = "", -- Continental_supplies --- ["HOLY SHIT!"] = "", -- Mutant +-- ["HOLY SHYTE!"] = "", -- Mutant -- ["Honest Lee"] = "", -- A_Classic_Fairytale:enemy ["Hooray!"] = "Hurraaa!", -- ["Hostage Situation"] = "", -- A_Classic_Fairytale:family diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Locale/pl.txt --- a/share/hedgewars/Data/Locale/pl.txt Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Locale/pl.txt Fri Feb 22 05:05:32 2013 +0100 @@ -54,10 +54,10 @@ 00:51=Kula błotna 00:52=Nie wybrano broni 00:53=TARDIS -00:54=Budynek -00:55=Miotacz błota -00:56=Zamrażarka -00:57=Tasak +; 00:54=Budynek +00:54=Miotacz błota +00:55=Zamrażarka +00:56=Tasak 01:00=Walczmy! 01:01=Remis @@ -247,14 +247,14 @@ 02:02=Możesz uważać się za szczęśliwca jeżeli nie grasz przeciwko Jessorowi 02:02=Dajcie z siebie wszystko! 02:02=Przegrany sprząta teren. -02:02=Niech rozpocznie się walka millenium -02:02=Niech rozpocznie się walka wieku -02:02=Niech rozpocznie się walka dekady +02:02=Niech rozpocznie się walka millenium +02:02=Niech rozpocznie się walka wieku +02:02=Niech rozpocznie się walka dekady 02:02=Niech rozpocznie się walka roku 02:02=Niech rozpocznie się walka miesiąca 02:02=Niech rozpocznie się walka tygodnia 02:02=Niech rozpocznie się walka dnia -02:02=Niech rozpocznie się walka godziny +02:02=Niech rozpocznie się walka godziny 02:02=Graj jak najlepiej! 02:02=Zniszcz przeciwnika! 02:02=Powodzenia @@ -549,9 +549,9 @@ 04:02=Atakuj przeciwników pociskiem balistycznym,|który jest podatny na wiatr.|Atak: Przytrzymaj by strzelić z większą siłą 04:03=Wypuść zdenerwowaną Pszczołę, która "użądli"|zaznaczony cel. By zwiększyć precyzję nie|strzelaj pełną mocą|Kursor: Wybierz cel|Atak: Przytrzymaj by strzelić z większą siłą 04:04=Atakuj przeciwników strzelbą z dwoma strzałami.|Działa obszarowo, więc nie musisz dokładnie|celować by zranić przeciwników.|Atak: Strzel (kilka razy) -04:05=Schowaj się pod ziemię! Użyj młota pneumatycznego|do wywiercenia dziury w podłożu i dostania się do|innych miejsc.|Atak: Zacznij/Zakończ kopać +04:05=Schowaj się pod ziemię! Użyj młota pneumatycznego|do wywiercenia dziury w podłożu i dostania się do|innych miejsc.|Atak: Zacznij/Zakończ kopać 04:06=Znudzony? Brak motywacji do ataku? Oszczędzasz broń?|No problemo! Po prostu pomiń turę, tchórzu!|Atak: Pomiń turę bez walki -04:07=Skróć wielkie odległości używając liny. Rozpędź się|by wślizgnąć się w inne jeże lub upuścić na nich|granat albo inną broń.|Atak: Rozwiń albo odłącz linę|Długi skok: Upuść granat lub podobną broń +04:07=Skróć wielkie odległości używając liny. Rozpędź się|by wślizgnąć się w inne jeże lub upuścić na nich|granat albo inną broń.|Atak: Rozwiń albo odłącz linę|Długi skok: Upuść granat lub podobną broń 04:08=Trzymaj przeciwników na dystans przez upuszczenie|miny w wąskim przejściu lub zaraz obok ich stóp. I nie|zapomnij uciec zanim się włączy!|Atak: Upuść minę obok siebie 04:09=Niepewny co do umiejętności w celowaniu?|Weź pistolet i powystrzelaj ich jak kaczki.|Atak: Strzel (kilka razy) 04:10=Brutalna siła zawsze jest rozwiązaniem. Upuść ten|wybuchową laskę dynamitu obok przeciwnika i|uciekaj gdzie pieprz rośnie.|Atak: Upuść dynamit obok siebie @@ -565,15 +565,15 @@ 04:18=Potrzebujesz dodatkowej ochrony albo chcesz|przejść przez teren nie do przejścia? Umieść|konstrukcje gdzie chcesz.|Lewo/Prawo: Wybierz konstrukcję do umieszczenia|Kursor: Umieść konstrukcję w odpowiednim miejscu 04:19=Teleport użyty w odpowiednim momencie, staje|się potężniejszy niż każda inna broń,|ponieważ potrafi wyzwolić jeża z tarapatów|w przeciągu sekund.|Kursor: Wybierz region 04:20=Pozwala w tej turze zagrać innym jeżem.|Atak: Uaktywnij wybieranie jeża -04:21=Odpal moździerz, który po uderzeniu|wypuści kilka bomb.|Atak: Strzel z całą mocą +04:21=Odpal moździerz, który po uderzeniu|wypuści kilka bomb.|Atak: Strzel z całą mocą 04:22=Nie tylko dla Indiana Jones! Ten bicz może|być użyteczny w wielu wypadkach. Szczególnie|kiedy chcesz kogoś zrzucić z urwiska.|Atak: Ubiczuj wszystko co jest przed tobą 04:23=Jeśli nie masz nic do stracenia, ten atak może być|całkiem użyteczny. Poświęć swojego jeża i poślij|go w odpowiednim kierunku, raniąc wszystkich po|drodze i eksplodując na końcu.|Atak: Odpal tę niszczycielską i zabójczą technikę 04:24=Sto lat! Uruchom ciasto i pozwól mu pójść w stronę|twoich przeciwników urządzając im wybuchowe przyjęcie.|Może chodzić prawie po wszystkim, ale wtedy|wcześniej eksploduje.|Atak: Odpal ciasto albo zatrzymaj je, by wybuchło 04:25=Użyj kostiumu by sprawić, żeby twój wróg zakochał się|w Tobie (i spadł w przepaść lub dziurę).|Atak: Użyj kostiumu i uwiedź jeża 04:26=Rzuć tego smacznego arbuza w przeciwników. Kiedy jego|zapalnik wskaże zero, podzieli się na mniejsze kawałki.|1-5: Ustawia zapalnik arbuza|Atak: Przytrzymaj by rzucić z większą siłą 04:27=Niech ognie piekielne ogarną twoich przeciwników!|Nie podchodź zbyt blisko po wybuchu, gdyż ogień|pali się przez dłuższy czas|Atak: Przytrzymaj by rzucić z większą siłą -04:28=Krótko po wystrzeleniu, rakieta zacznie wiercić tunel w ziemi|i eksploduje gdy zapalnik zostanie uruchomiony lub|jeśli pojawi się po drugiej stronie terenu.|Atak: Przytrzymaj by strzelić z większą siłą -04:29=Tego nie powinny używać dzieci!|Pistolet na kulki wystrzeliwuje tony małych|kolorowych kulek wypełnionych materiałem wybuchowym.|Atak: Strzel kulkami|Góra/Dół: Kontynuuj celowanie +04:28=Krótko po wystrzeleniu, rakieta zacznie wiercić tunel w ziemi|i eksploduje gdy zapalnik zostanie uruchomiony lub|jeśli pojawi się po drugiej stronie terenu.|Atak: Przytrzymaj by strzelić z większą siłą +04:29=Tego nie powinny używać dzieci!|Pistolet na kulki wystrzeliwuje tony małych|kolorowych kulek wypełnionych materiałem wybuchowym.|Atak: Strzel kulkami|Góra/Dół: Kontynuuj celowanie 04:30=Wezwij samolot, żeby zrzucić dużą ilość|napalmu. Dzięki dobremu celowi ten atak|może zlikwidować dużą część mapy, w tym|znajdujące się tam nieszczęsne jeże.|Lewo/Prawo: Określ kierunek ataku|Kursor: Wybierz region 04:31=Zaatakuj odległych przeciwników, bądź zbierz|skrzynki! Nie zapomnij o zrzuceniu bomb!|Góra/Dół: Steruj samolotem|Atak: Zrzuć bombę (3x) |Długi skok: Niech walkirie wkroczą na pole bitwy! 04:32=Niska grawitacja jest lepsza od diety! Skacz|wyżej i dalej albo pozwól przeciwnikom fruwać.|Atak: Aktywuj @@ -598,7 +598,7 @@ 04:51=Obrzuć kogoś błotem! Broń ta nie zadaje dużych|obrażeń ale może Gogol zepchnąć z krawędzi!|Atak: Przytrzymaj by strzelić z większą siłą 04:52=UNUSED 04:53=Wybierz się na podróż w czasie i przestrzeni|zostawiając inne jeże na polu walki.|Bądź przygotowany na powrót w dowolnym momencie.|Gdy rozpocznie się|Nagła Śmierć lub większość jeży zostanie wybita.|Uwaga. Nie zadziała podczas Nagłej Śmierci,|gdy jesteś sam lub jeśli jesteś Królem. -04:54=INCOMPLETE +04:54=INCOMPLETE 04:55=Wystrzel strumień kleistej mazi.|Buduj mosty, zasypuj wrogów, zatykaj tunele.|Uważaj by nie zasypać samego siebie! ; Game goal strings diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Locale/pt_BR.lua --- a/share/hedgewars/Data/Locale/pt_BR.lua Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Locale/pt_BR.lua Fri Feb 22 05:05:32 2013 +0100 @@ -332,7 +332,7 @@ -- ["Hmmm...perhaps a little more time will help."] = "", -- A_Classic_Fairytale:first_blood -- ["Hogminator"] = "", -- A_Classic_Fairytale:family -- ["Hogs in sight!"] = "", -- Continental_supplies --- ["HOLY SHIT!"] = "", -- Mutant +-- ["HOLY SHYTE!"] = "", -- Mutant -- ["Honest Lee"] = "", -- A_Classic_Fairytale:enemy -- ["Hooray!"] = "", -- ["Hostage Situation"] = "", -- A_Classic_Fairytale:family diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Locale/pt_BR.txt --- a/share/hedgewars/Data/Locale/pt_BR.txt Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Locale/pt_BR.txt Fri Feb 22 05:05:32 2013 +0100 @@ -52,6 +52,13 @@ 00:49=Ressucitador 00:50=Ataque Perfurador 00:51=Bola de Lama +00:52=Arma não selecionada +00:53=Máquina do tempo +; 00:54=Estrutura +00:54=Spray de terra +00:55=Freezer +00:56=Machadinha + 01:00=Hora de lutar! 01:01=Partida empatou @@ -63,11 +70,18 @@ 01:07=%1 Remanescente 01:08=Combustível 01:09=Sincronizando... -01:10=Usar esta ultilidade não encerrará o turno +01:10=Usar esta utilidade não encerrará o turno 01:11=Esta arma ou utilidade ainda não está disponível 01:12=Último round antes da Morte Súbita! 01:13=%1 rounds até a Morte Súbita 01:14=Se prepare, %1! +01:15=Mínimo +01:16=Baixo +01:17=Normal +01:18=Alto +01:19=Extremo +01:20=%1 Quique +01:21=Áudio mudo ; Event messages ; Hog (%1) died @@ -122,7 +136,7 @@ 02:02=Armado e preparado! 02:02=3..2..1...! 02:02=Cúpula do Trovão!Cúpula do Trovão!Cúpula do Trovão! -02:02=Abrem-se as curtinas e começa o espetáculo +02:02=Abrem-se as cortinas e começa o espetáculo 02:02=A bola está em jogo! 02:02=Bobeou....dançou! 02:02=Só os melhores sobrevivem! @@ -134,6 +148,11 @@ 02:02=Começa a partida 02:02=Vamos a luta companheiros 02:02=Pela Pátria! +02:02=Vitória ou morte! +02:02=Esmague seu inimigo! +02:02=Solte os cães de batalha! +02:02=Apiiiita o árbitro! +02:02=Ao vencedor as batatas! ; Round ends (win; unused atm) 02:03=... @@ -148,10 +167,13 @@ 02:05=Mais um suspiro! 02:05=Chamando doutor Hans Chucrutes 02:05=Colírio para os olhos! -02:05=O Motoboy da farmácia chegou! +02:05=O motoboy da farmácia chegou! 02:05=Curativos! 02:05=Energia extra! 02:05=Energéticos! +02:05=Um Hi-Potion! Uuups, jogo errado +02:05=Posologia: Tantos quanto possas conseguir! + ; New ammo crate 02:06=Mais armas! @@ -168,6 +190,10 @@ 02:06=Suprimentos 02:06=O que faltava para você vencer! 02:06=Qual será a surpresa? +02:06=Uma caixinha de surpresas! +02:06=Não sabes o pesadelo que foi atravessar a fronteira com isso! +02:06=Cuidado! Volátil! +02:06=Brinquedinhos destrutivos do Céu! ; New utility crate 02:07=Hora das compras @@ -193,7 +219,7 @@ 02:08=%1 está se balançando na rede 02:08=%1 prefere só ficar olhando 02:08=%1 desaponta a todos -02:08=%1 ficou filosofando +02:08=%1 ficou filosofando 02:08=%1 amarelou 02:08=%1 tá de boa 02:08=%1 pegou no sono @@ -201,11 +227,17 @@ 02:08=%1 prefere Gandhi a Mandela 02:08=%1 foi ler um livro 02:08=%1 está procurando algo melhor para fazer +02:08=%1 é um franguinho! +02:08=%1 decidiu que o melhor a fazer é ... nada! +02:08=%1 está fora de forma! +02:08=%1 é um pacifista +02:08=%1 está paralizado de terror +02:08=%1 está pedindo para sair ; Hog (%1) hurts himself only 02:09=%1 se machucou 02:09=%1 fez dodói -02:09=%1 é uma anta +02:09=%1 é uma anta 02:09=%1 não sabe quem é o inimigo 02:09=%1 não gosta de si mesmo 02:09=%1 não tem amor próprio @@ -220,6 +252,12 @@ 02:09=%1 mudou de equipe 02:09=%1 acha que ninguém viu 02:09=%1 devia procurar outro jogo +02:09=%1 deveria mudar de profissão +02:09=%1 não tem instinto de sobrevivência +02:09=%1 deveria praticar pontaria +02:09=%1 acaba de demonstrar ao inimigo do que é capaz +02:09=As armas de %1 estão obviamente defeituosas! +02:09=Não, não, não, %1, deves atirar no INIMIGO! ; Hog shot an home run (using the bat and another hog) 02:10=Humilhooooouuu! @@ -227,12 +265,12 @@ 02:10=Esse aí está fora! 02:10=Home Run! 02:10=Ouriço perdido! +02:10=Bolinha perdida! ; Hog (%1) has to leave (team is gone) 02:11=%1 foi nanar 02:11=%1 abandonou o jogo 02:11=%1 estava borrando as calças -02:11=Beam him up, Scotty! 02:11=%1 teve que sair ; Weapon Categories @@ -259,7 +297,7 @@ 03:20=Ação 03:21=Arma Balística 03:22=Me chame Indiana! -03:23=Artes Marciais (Realmente) +03:23=Artes Marciais (Realmente) 03:24=O Bolo não é de brinquedo! 03:25=Disfarce 03:26=Granada Suculenta @@ -276,18 +314,23 @@ 03:37=Efeito Temporário 03:38=Arma de Fogo (múltiplos tiros) 03:39=Utilidade de Transporte -03:40=Granada Inceneradora +03:40=Granada Incendiária 03:41=Grande fan de Squawks -03:42=Última tecnologia +03:42=Eu irei fazer uma nota aqui ... 03:43=Musical -03:44=Velho e fedorento +03:44=Data de validade: 1923 03:45=Trigonometria pura -03:46=Incendiário +03:46=Quente! Quente! Quente! 03:47=Grudenta 03:48=Tanto bate até que fura! 03:49=Faz o que você imagina 03:50=Contra covardes -03:51=Devagar, e sempre.... +03:51=Encontrei no chão +03:52=Sem uso +03:53=Tipo 40 +03:54=Constrói algo +03:55=Utilidade + ; Weapon Descriptions (use | as line breaks) 04:00=Ataque seus inimigos usando uma granada simples|Ela explodirá assim que o tempo passar|1-5: Escolha o tempo da granada|Ataque: Quanto mais tempo, mais forte o lançamento. @@ -310,7 +353,7 @@ 04:15=Chame um avião para bombadear seus inimigos.|Esquerda/Direita: Determina a direção do ataque|Cursor: Seleciona a região do ataque 04:16=Chame um avião para lançar diversas minas|na área alvo.|Esquerda/Direita: Determina a direção do ataque|Cursor: Seleciona a região do ataque 04:17=Precisa de abrigo? Use o maçarico para|cavar um túnel que te de cobertura.|Ataque:Liga/Desliga o maçarico -04:18=Precisa de proteção adicional ou quer atravessar|um lugar difícil? Coloque algumas vigas.|Esquerda/Direita: Seleciona a viga a colocar|Cursor: Coloca a viga em uma posição válida. +04:18=Precisa de proteção adicional ou quer atravessar|um lugar difícil? Coloque algumas vigas.|Esquerda/Direita: Seleciona a viga a colocar|Cursor: Coloca a viga em uma posição válida. 04:19=Usada no momento certo, teleportar-se pode ser mais|poderosa que todas as outras armas, permitindo|salvar alguns ouriços em situação perigosa|Cursor: Seleciona o destino do teletransporte. 04:20=Permite você jogar este turno com um ouriço diferente.|Ataque: Ativa|Tab: Alterna o ouriço @@ -345,6 +388,12 @@ 04:47=Uma simples mina não basta? A mina aderente pode|ser arremessada e ficará aderida ao tocar no solo,|em um objeto, e até em um ouriço!|Ataque:Quanto mais tempo, mais forte o lançamento (duas vezes). 04:48=Vamos a obra? Use esta arma para martelar|o inimigo no solo, ou através dele e tirando um terço da vida dele!|Ataque: Ativa 04:49=Ressucite seus amigos, mas preste atenção|para não ressucitar seus inimigos!|Ataque: Mantenha pressionado para transferir|sua vida|Acima:Acelera a transferência de vida +04:50=Alguém está se escondendo embaixo da terra?|Desenterre-os com um Ataque Perfurador!|O timer controla a profundidade alcançada. +04:51=Ganhe um tiro de graça, atirando uma bola de barro.|Fará com que o inimigo saia voando|e arde a vista. +04:52=Sem Uso +04:53=Viage através do tempo e espaço,|deixando seus camaradas na mão.|Esteja preparado para retornar a qualquer momento,|ou para a Morte Súbita se todos os aliados foram mortos.|Aviso. Não funciona na Morte Súbita,|se você estiversozinho, ou se você for o Rei. +04:54=INCOMPLETO +04:55=Atira um jorro de barro pegajoso.|Constrói pontes, enterra inimigos, sela túneis.|Cuidado para que não pegue em você! ; Game goal strings 05:00=Modos de Jogo @@ -355,16 +404,17 @@ 05:05=Vampirismo: Ouriços serão curados pelos danos causados 05:06=Carma: Ouriços serão machucados pelos danos causados 05:07=Proteja o rei: Não deixe o seu Rei morrer!|Colocar o Rei: Escolha um lugar protegido para posicionar o seu Rei -05:08=Colocar Ouriços: Permite posicionar os ouriços antes dapartida começar +05:08=Colocar Ouriços: Permite posicionar os ouriços antes da partida começar 05:09=Artilharia: Ouriços não podem andar para mudar de lugar 05:10=Terreno Indestrutível: Maioria das armas não destrói o terreno -05:11=Armas Compartilhadas: Todos as equipes de mesma cor compratilham a munição +05:11=Munição Compartilhada: Todos as equipes de mesma cor compartilham a munição 05:12=Temporizador de mina: Minas detonarão após %1 segundo(s) 05:13=Temporizador de mina: Minas detonarão imediatamente -05:14=Temporizador de mina: Minas detonarão em 0 - 3 segundos +05:14=Temporizador de mina: Minas detonarão em 0 - 5 segundos 05:15=Modificador de Dano: Todas as armas farão %1% danos 05:16=A vida dos ouriços é reiniciada ao fim de cada turno 05:17=Ouriços da IA renascem após morrerem 05:18=Ataque ilimitado 05:19=Armas são reiniciadas ao fim do turno 05:20=Armas não são compartilhadas entre os ouriços +05:21=Tag Team: Equipes do mesmo clan se revezam entre si.|Turno compartilhado: Equipes do mesmo clan compartilham a duração do turno. diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Locale/pt_PT.lua --- a/share/hedgewars/Data/Locale/pt_PT.lua Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Locale/pt_PT.lua Fri Feb 22 05:05:32 2013 +0100 @@ -5,57 +5,57 @@ ["011101000"] = "011101000", -- A_Classic_Fairytale:dragon ["011101001"] = "011101001", -- A_Classic_Fairytale:backstab, A_Classic_Fairytale:dragon, A_Classic_Fairytale:enemy, A_Classic_Fairytale:family, A_Classic_Fairytale:journey, A_Classic_Fairytale:queen, A_Classic_Fairytale:shadow, A_Classic_Fairytale:united ["30 minutes later..."] = "30 minutos depois...", -- A_Classic_Fairytale:shadow --- ["About a month ago, a cyborg came and told us that you're the cannibals!"] = "ácerca de um mês atrás, um cyborg veio e disse-nos que voces é que eram os cabinais!", -- A_Classic_Fairytale:enemy - ["Accuracy Bonus!"] = "Bónus de precisão!", +-- ["About a month ago, a cyborg came and told us that you're the cannibals!"] = "ácerca de\aproximadamente um mês atrás, um cyborg veio e disse-nos que voces é que eram os cabinais!", -- A_Classic_Fairytale:enemy + ["Accuracy Bonus!"] = "Bónus de Precisão!", ["Ace"] = "Ás", -- User_Mission_-_RCPlane_Challenge, User_Mission_-_Rope_Knock_Challenge ["Achievement Unlocked"] = "Proeza Desbloqueada", -- User_Mission_-_Bamboo_Thicket, User_Mission_-_That_Sinking_Feeling, Tumbler ["???"] = "???", -- A_Classic_Fairytale:backstab --- ["A Classic Fairytale"] = "Um Classico Conto de Fadas", -- A_Classic_Fairytale:first_blood --- ["Actually, you aren't worthy of life! Take this..."] = "", -- A_Classic_Fairytale:shadow --- ["A cy-what?"] = "", -- A_Classic_Fairytale:enemy --- ["Adventurous"] = "", -- A_Classic_Fairytale:journey --- ["Africa"] = "", -- Continental_supplies --- ["After Leaks A Lot betrayed his tribe, he joined the cannibals..."] = "", -- A_Classic_Fairytale:first_blood --- ["After the shock caused by the enemy spy, Leaks A Lot and Dense Cloud went hunting to relax."] = "", -- A_Classic_Fairytale:shadow --- ["Again with the 'cannibals' thing!"] = "", -- A_Classic_Fairytale:enemy --- ["a Hedgewars challenge"] = "", -- User_Mission_-_RCPlane_Challenge, User_Mission_-_Rope_Knock_Challenge + ["A Classic Fairytale"] = "Um Clássico Conto de Fadas", -- A_Classic_Fairytale:first_blood +-- ["Actually, you aren't worthy of life! Take this..."] = "Pensando melhor, não mereçes viver\a vida que te foi dada\não mereces o ar que respiras! Toma\Pega isto...", -- A_Classic_Fairytale:shadow + ["A cy-what?"] = "Um cy-quê?", -- A_Classic_Fairytale:enemy + ["Adventurous"] = "Aventureiro", -- A_Classic_Fairytale:journey + ["Africa"] = "África", -- Continental_supplies +-- ["After Leaks A Lot betrayed his tribe, he joined the cannibals..."] = "Depois do Leaks A Lot ter traido a sua tribo, ele juntou-se aos canibais...", -- A_Classic_Fairytale:first_blood + ["After the shock caused by the enemy spy, Leaks A Lot and Dense Cloud went hunting to relax."] = "Depois do choque causado pelo espião inimigo, Leaks A Lot e Nuvem Densa foram caçar para relaxar.", -- A_Classic_Fairytale:shadow +-- ["Again with the 'cannibals' thing!"] = "Outra vez com a cena dos 'canibais'!", -- A_Classic_Fairytale:enemy + ["a Hedgewars challenge"] = "um desafio Hedgewars", -- User_Mission_-_RCPlane_Challenge, User_Mission_-_Rope_Knock_Challenge ["a Hedgewars mini-game"] = "um mini-jogo Hedgewars", -- Space_Invasion, The_Specialists ["Aiming Practice"] = "Pratica a tua pontaria", --Bazooka, Shotgun, SniperRifle --- ["A leap in a leap"] = "", -- A_Classic_Fairytale:first_blood --- ["A little gift from the cyborgs"] = "", -- A_Classic_Fairytale:shadow --- ["All gone...everything!"] = "", -- A_Classic_Fairytale:enemy --- ["All right, we just need to get to the other side of the island!"] = "", -- A_Classic_Fairytale:journey --- ["All walls touched!"] = "", -- WxW --- ["Ammo Depleted!"] = "", --- ["ammo extended!"] = "", --- ["Ammo is reset at the end of your turn."] = "", +-- ["A leap in a leap"] = "Um salto num salto", -- A_Classic_Fairytale:first_blood + ["A little gift from the cyborgs"] = "Um pequeno presente dos cyborgs", -- A_Classic_Fairytale:shadow + ["All gone...everything!"] = "Foi-se...tudo!", -- A_Classic_Fairytale:enemy + ["All right, we just need to get to the other side of the island!"] = "Ok, so precisamos de chegar ao outro lado da ilha!", -- A_Classic_Fairytale:journey + ["All walls touched!"] = "Todas as paredes alcançadas!", -- WxW +-- ["Ammo Depleted!"] = "Munições Esgotadas!", +-- ["ammo extended!"] = "munições adicionadas!", + ["Ammo is reset at the end of your turn."] = "O armamento é reposto no fim do teu turno.", -- ["Ammo Maniac!"] = "", ["Ammo"] = "Munições", --- ["And how am I alive?!"] = "", -- A_Classic_Fairytale:enemy +-- ["And how am I alive?!"] = "E como (raio) estou eu ainda vivo?!", -- A_Classic_Fairytale:enemy -- ["And so happenned that Leaks A Lot failed to complete the challenge! He landed, pressured by shame..."] = "", -- A_Classic_Fairytale:first_blood --- ["And so it began..."] = "", -- A_Classic_Fairytale:first_blood --- ["...and so the cyborgs took over the world..."] = "", -- A_Classic_Fairytale:shadow + ["And so it began..."] = "E assim começou...", -- A_Classic_Fairytale:first_blood +-- ["...and so the cyborgs took over the world..."] = "...e então os cyborgs tomaram conta\apoderaram-se do mundo...", -- A_Classic_Fairytale:shadow -- ["And so they discovered that cyborgs weren't invulnerable..."] = "", -- A_Classic_Fairytale:journey --- ["And where's all the weed?"] = "", -- A_Classic_Fairytale:dragon --- ["And you believed me? Oh, god, that's cute!"] = "", -- A_Classic_Fairytale:journey +-- ["And where's all the weed?"] = "E onde está a erva toda?", -- A_Classic_Fairytale:dragon +-- ["And you believed me? Oh, god, that's cute!"] = "E tu acreditaste em mim? Ai Jesus, tão fofo!", -- A_Classic_Fairytale:journey -- ["Anno 1032: [The explosion will make a strong push ~ wide range, wont affect hogs close to the target]"] = "", -- Continental_supplies --- ["Antarctica"] = "", -- Continental_supplies --- ["Are we there yet?"] = "", -- A_Classic_Fairytale:shadow --- ["Are you accusing me of something?"] = "", -- A_Classic_Fairytale:backstab --- ["Are you saying that many of us have died for your entertainment?"] = "", -- A_Classic_Fairytale:enemy + ["Antarctica"] = "Antártica", -- Continental_supplies + ["Are we there yet?"] = "Já chegámos?", -- A_Classic_Fairytale:shadow +-- ["Are you accusing me of something?"] = "Estás a acusar-me de alguma coisa?", -- A_Classic_Fairytale:backstab +-- ["Are you saying that many of us have died for your entertainment?"] = "Estás a tentar dizer-me que estas quantidade de nós morreu para o teu entertenimento?", -- A_Classic_Fairytale:enemy -- ["Artur Detour"] = "", -- A_Classic_Fairytale:queen -- ["As a reward for your performance, here's some new technology!"] = "", -- A_Classic_Fairytale:dragon --- ["a shoppa minigame"] = "", -- WxW --- ["Asia"] = "", -- Continental_supplies + ["a shoppa minigame"] = "um minijogo shoppa", -- WxW + ["Asia"] = "Ásia", -- Continental_supplies -- ["Assault Team"] = "", -- A_Classic_Fairytale:backstab --- ["As the ammo is sparse, you might want to reuse ropes while mid-air.|"] = "", -- A_Classic_Fairytale:dragon +-- ["As the ammo is sparse, you might want to reuse ropes while mid-air.|"] = "Como o armamento\munições é escaço, podes querer re-usar as cordas enquanto no ar.|", -- A_Classic_Fairytale:dragon -- ["As the challenge was completed, Leaks A Lot set foot on the ground..."] = "", -- A_Classic_Fairytale:first_blood -- ["As you can see, there is no way to get on the other side!"] = "", -- A_Classic_Fairytale:dragon -- ["Attack From Rope"] = "", -- WxW --- ["Australia"] = "", -- Continental_supplies --- ["Available points remaining: "] = "", --- ["Back Breaker"] = "", -- A_Classic_Fairytale:backstab --- ["Back in the village, after telling the villagers about the threat..."] = "", -- A_Classic_Fairytale:united + ["Australia"] = "Austrália", -- Continental_supplies +-- ["Available points remaining: "] = "Pontos activos restantes: ", +-- ["Back Breaker"] = "Parte Costas", -- A_Classic_Fairytale:backstab +-- ["Back in the village, after telling the villagers about the threat..."] = "De volta à\Mais tarde na aldeia, depois de ter avisado os aldeões sobre a ameaça...", -- A_Classic_Fairytale:united ["[Backspace]"] = "[Retrocesso (backspace)]", -- ["Backstab"] = "", -- A_Classic_Fairytale:backstab -- ["Bad Team"] = "", -- User_Mission_-_The_Great_Escape @@ -89,32 +89,32 @@ -- ["Brain Teaser"] = "", -- A_Classic_Fairytale:backstab -- ["Brutal Lily"] = "", -- A_Classic_Fairytale:enemy, A_Classic_Fairytale:epil -- ["Brutus"] = "", -- A_Classic_Fairytale:backstab --- ["Build a track and race."] = "", --- ["Bullseye"] = "", -- A_Classic_Fairytale:dragon +-- ["Build a track and race."] = "Constroi uma pista e compete numa corrida.", +-- ["Bullseye"] = "Em cheio", -- A_Classic_Fairytale:dragon -- ["But it proved to be no easy task!"] = "", -- A_Classic_Fairytale:dragon --- ["But that's impossible!"] = "", -- A_Classic_Fairytale:backstab --- ["But the ones alive are stronger in their heart!"] = "", -- A_Classic_Fairytale:enemy --- ["But...we died!"] = "", -- A_Classic_Fairytale:backstab --- ["But where can we go?"] = "", -- A_Classic_Fairytale:united --- ["But why would they help us?"] = "", -- A_Classic_Fairytale:backstab --- ["But you're cannibals. It's what you do."] = "", -- A_Classic_Fairytale:enemy --- ["But you said you'd let her go!"] = "", -- A_Classic_Fairytale:journey --- ["Call me Beep! Well, 'cause I'm such a nice...person!"] = "", -- A_Classic_Fairytale:family --- ["Cannibals"] = "", -- A_Classic_Fairytale:enemy, A_Classic_Fairytale:epil, A_Classic_Fairytale:first_blood + ["But that's impossible!"] = "Mas isso é impossível!", -- A_Classic_Fairytale:backstab +-- ["But the ones alive are stronger in their heart!"] = "Mas os sobreviventes têm um coração mais forte! (não faz sentido assim...)", -- A_Classic_Fairytale:enemy +-- ["But...we died!"] = "Mas...nós morremos!", -- A_Classic_Fairytale:backstab +-- ["But where can we go?"] = "Mas para onde podemos ir?", -- A_Classic_Fairytale:united +-- ["But why would they help us?"] = "Mas porque nos ajudariam eles?", -- A_Classic_Fairytale:backstab +-- ["But you're cannibals. It's what you do."] = "Mas voçês são canibais. É o que (voçês)fazem.", -- A_Classic_Fairytale:enemy +-- ["But you said you'd let her go!"] = "Mas disseste que a deixarias ir!", -- A_Classic_Fairytale:journey +-- ["Call me Beep! Well, 'cause I'm such a nice...person!"] = "Trata-me por Beep! Bem, porque eu sou um---a pessoa tão simpática!", -- A_Classic_Fairytale:family + ["Cannibals"] = "Canibais", -- A_Classic_Fairytale:enemy, A_Classic_Fairytale:epil, A_Classic_Fairytale:first_blood -- ["Cannibal Sentry"] = "", -- A_Classic_Fairytale:journey --- ["Cannibals?! You're the cannibals!"] = "", -- A_Classic_Fairytale:enemy +-- ["Cannibals?! You're the cannibals!"] = "Canibais?! Vocês são os canibais!", -- A_Classic_Fairytale:enemy ["CAPTURE THE FLAG"] = "CAPTURAR A BANDEIRA", ["Careless"] = "Descuidado", --- ["Carol"] = "", -- A_Classic_Fairytale:family --- ["CHALLENGE COMPLETE"] = "DESAFIO COMPLETO", -- User_Mission_-_RCPlane_Challenge + ["Carol"] = "Carol", -- A_Classic_Fairytale:family + ["CHALLENGE COMPLETE"] = "DESAFIO COMPLETO", -- User_Mission_-_RCPlane_Challenge ["Change Weapon"] = "Trocar Arma", --- ["Choose your side! If you want to join the strange man, walk up to him.|Otherwise, walk away from him. If you decide to att...nevermind..."] = "", -- A_Classic_Fairytale:shadow --- ["Clumsy"] = "", --- ["Cluster Bomb MASTER!"] = "", -- Basic_Training_-_Cluster_Bomb --- ["Cluster Bomb Training"] = "", -- Basic_Training_-_Cluster_Bomb --- ["Codename: Teamwork"] = "", --- ["Collateral Damage"] = "", -- A_Classic_Fairytale:journey --- ["Collateral Damage II"] = "", -- A_Classic_Fairytale:journey + ["Choose your side! If you want to join the strange man, walk up to him.|Otherwise, walk away from him. If you decide to att...nevermind..."] = "Escolhe o teu lado! Se quiseres juntar-te ao homem estranho, aproxima-te dele! Caso contrario, afastate dele. Se decidires atac...esquece...", -- A_Classic_Fairytale:shadow + ["Clumsy"] = "Desastrado", + ["Cluster Bomb MASTER!"] = "MESTRE da Bomba de Fragmentos!", -- Basic_Training_-_Cluster_Bomb + ["Cluster Bomb Training"] = "Treino com Bomba de Fragmentos!", -- Basic_Training_-_Cluster_Bomb +-- ["Codename: Teamwork"] = "Nome de código: Trabalho em Equipa", + ["Collateral Damage"] = "Dano Colateral", -- A_Classic_Fairytale:journey + ["Collateral Damage II"] = "Dano Colateral II", -- A_Classic_Fairytale:journey -- ["Collect all the crates, but remember, our time in this life is limited!"] = "", -- A_Classic_Fairytale:first_blood -- ["Collect or destroy all the health crates."] = "", -- User_Mission_-_RCPlane_Challenge -- ["Collect the crate on the right.|Hint: Select the rope, [Up] or [Down] to aim, [Space] to fire, directional keys to move.|Ropes can be fired again in the air!"] = "", -- A_Classic_Fairytale:first_blood @@ -147,9 +147,9 @@ -- ["Defeat the cannibals!|Grenade hint: set the timer with [1-5], aim with [Up]/[Down] and hold [Space] to set power"] = "", -- A_Classic_Fairytale:shadow -- ["Defeat the cyborgs!"] = "", -- A_Classic_Fairytale:enemy -- ["Defend yourself!|Hint: You can get tips on using weapons by moving your mouse over them in the weapon selection menu"] = "", -- A_Classic_Fairytale:shadow --- ["Demolition is fun!"] = "", --- ["Dense Cloud"] = "", -- A_Classic_Fairytale:backstab, A_Classic_Fairytale:dragon, A_Classic_Fairytale:enemy, A_Classic_Fairytale:epil, A_Classic_Fairytale:family, A_Classic_Fairytale:journey, A_Classic_Fairytale:queen, A_Classic_Fairytale:shadow, A_Classic_Fairytale:united --- ["Dense Cloud must have already told them everything..."] = "", -- A_Classic_Fairytale:shadow +-- ["Demolition is fun!"] = "Demolir é divertido!", + ["Dense Cloud"] = "Nuvem Densa", -- A_Classic_Fairytale:backstab, A_Classic_Fairytale:dragon, A_Classic_Fairytale:enemy, A_Classic_Fairytale:epil, A_Classic_Fairytale:family, A_Classic_Fairytale:journey, A_Classic_Fairytale:queen, A_Classic_Fairytale:shadow, A_Classic_Fairytale:united + ["Dense Cloud must have already told them everything..."] = "O Nuvem Densa já lhes deve ter dito tudo...", -- A_Classic_Fairytale:shadow -- ["Depleted Kamikaze!"] = "", -- ["Destroy him, Leaks A Lot! He is responsible for the deaths of many of us!"] = "", -- A_Classic_Fairytale:first_blood -- ["Destroy invaders to score points."] = "", @@ -166,32 +166,32 @@ -- ["Do the deed"] = "", -- A_Classic_Fairytale:first_blood -- ["Double Kill!"] = "", -- ["DOUBLE KILL"] = "", -- Mutant --- ["Do you have any idea how valuable grass is?"] = "", -- A_Classic_Fairytale:enemy --- ["Do you think you're some kind of god?"] = "", -- A_Classic_Fairytale:enemy +-- ["Do you have any idea how valuable grass is?"] = "Tnes alguma ideia do quão aliosa esta erva é?", -- A_Classic_Fairytale:enemy +-- ["Do you think you're some kind of god?"] = "Pensas que és\Axas-te algum tipo de deus?", -- A_Classic_Fairytale:enemy -- ["Dragon's Lair"] = "", -- A_Classic_Fairytale:dragon -- ["Drills"] = "", -- A_Classic_Fairytale:backstab -- ["Drone Hunter!"] = "", --- ["Drop a bomb: [drop some heroic wind that will turn into a bomb on impact]"] = "", -- Continental_supplies +-- ["Drop a bomb: [drop some heroic wind that will turn into a bomb on impact]"] = "Larga uma bomba: [lança algum horoico vento que se ]", -- Continental_supplies -- ["Drowner"] = "", --- ["Dude, all the plants are gone!"] = "", -- A_Classic_Fairytale:family --- ["Dude, can you see Ramon and Spiky?"] = "", -- A_Classic_Fairytale:journey --- ["Dude, that's so cool!"] = "", -- A_Classic_Fairytale:backstab --- ["Dude, we really need a new shaman..."] = "", -- A_Classic_Fairytale:shadow --- ["Dude, what's this place?!"] = "", -- A_Classic_Fairytale:dragon --- ["Dude, where are we?"] = "", -- A_Classic_Fairytale:backstab --- ["Dude, wow! I just had the weirdest high!"] = "", -- A_Classic_Fairytale:backstab --- ["Duration"] = "", -- Continental_supplies --- ["Dust storm: [Deals 20 damage to all enemies in the circle]"] = "", -- Continental_supplies --- ["Each turn you get 1-3 random weapons"] = "", --- ["Each turn you get one random weapon"] = "", +-- ["Dude, all the plants are gone!"] = "Bacano, os planetas desapareceram todos!", -- A_Classic_Fairytale:family +-- ["Dude, can you see Ramon and Spiky?"] = "Bacano, consegues ver o Ramon e o Spiky?", -- A_Classic_Fairytale:journey +-- ["Dude, that's so cool!"] = "Bacano, isso\isto é tão fixe!", -- A_Classic_Fairytale:backstab +-- ["Dude, we really need a new shaman..."] = "Bacano, precisamos mesmo de um xamã...", -- A_Classic_Fairytale:shadow +-- ["Dude, what's this place?!"] = "Bacano, que sitio é este?!", -- A_Classic_Fairytale:dragon +-- ["Dude, where are we?"] = "Bacano, onde estamos?", -- A_Classic_Fairytale:backstab +-- ["Dude, wow! I just had the weirdest high!"] = "Bacano, wow! Acabei de ter o 'high' mais esquesito de sempre.", -- A_Classic_Fairytale:backstab + ["Duration"] = "Duração", -- Continental_supplies +-- ["Dust storm: [Deals 20 damage to all enemies in the circle]"] = "Tempestade de areia: [Causa 20 pontos de dano a toros os inimigos dentro no circulo]", -- Continental_supplies +-- ["Each turn you get 1-3 random weapons"] = "Todos os turnos recebes 1-3 armas aleatórias", +-- ["Each turn you get one random weapon"] = "Todos os turnos recebes uma arma aleatória", -- ["Eagle Eye"] = "", -- A_Classic_Fairytale:backstab -- ["Eagle Eye: [Blink to the impact ~ one shot]"] = "", -- Continental_supplies --- ["Ear Sniffer"] = "", -- A_Classic_Fairytale:backstab, A_Classic_Fairytale:epil +-- ["Ear Sniffer"] = "Snifa ouvidos\orelhas", -- A_Classic_Fairytale:backstab, A_Classic_Fairytale:epil -- ["Elderbot"] = "", -- A_Classic_Fairytale:family --- ["Elimate your captor."] = "", -- User_Mission_-_The_Great_Escape +-- ["Elimate your captor."] = "Elimina o teu raptor.", -- User_Mission_-_The_Great_Escape ["Eliminate all enemies"] = "Elimina todos os inimigos", ["Eliminate all targets before your time runs out.|You have unlimited ammo for this mission."] = "Destrói todos os alvos antes do tempo terminar.|Tens munições infinitas para esta missão.", --Bazooka, Shotgun, SniperRifle --- ["Eliminate enemy hogs and take their weapons."] = "", -- Highlander +-- ["Eliminate enemy hogs and take their weapons."] = "Elimina os ouriços enimigos e fica-lhes com as armas\apodera-te das armas deles.", -- Highlander ["Eliminate Poison before the time runs out"] = "Elimina o Poison antes do tempo terminar.", ["Eliminate the Blue Team"] = "Elimina a equipa azul", -- ["Eliminate the enemy before the time runs out"] = "", -- User_Mission_-_Bamboo_Thicket, User_Mission_-_Newton_and_the_Hammock @@ -201,13 +201,13 @@ -- ["Elmo"] = "", -- A_Classic_Fairytale:dragon, A_Classic_Fairytale:family, A_Classic_Fairytale:queen -- ["Energetic Engineer"] = "", ["Enjoy the swim..."] = "Aproveita o mergulho", - ["[Enter]"] = "[Enter]", --- ["Europe"] = "", -- Continental_supplies --- [" ever done to you?!"] = "", -- A_Classic_Fairytale:backstab --- ["Everyone knows this."] = "", -- A_Classic_Fairytale:enemy + ["[Enter]"] = "[Enter]", + ["Europe"] = "Europa", -- Continental_supplies +-- [" ever done to you?!"] = " alguma vez te aconteceu?!", -- A_Classic_Fairytale:backstab +-- ["Everyone knows this."] = "Toda a gente sabe isso.", -- A_Classic_Fairytale:enemy -- ["Every single time!"] = "", -- A_Classic_Fairytale:dragon -- ["Everything looks OK..."] = "", -- A_Classic_Fairytale:enemy --- ["Exactly, man! That was my dream."] = "", -- A_Classic_Fairytale:backstab +-- ["Exactly, man! That was my dream."] = "Exactamente, homem! Esse era o meu sonho.", -- A_Classic_Fairytale:backstab -- ["Eye Chewer"] = "", -- A_Classic_Fairytale:journey -- ["INSANITY"] = "", -- Mutant -- ["Family Reunion"] = "", -- A_Classic_Fairytale:family @@ -218,274 +218,272 @@ -- ["Fell From Heaven is the best! Fell From Heaven is the greatest!"] = "", -- A_Classic_Fairytale:family -- ["Femur Lover"] = "", -- A_Classic_Fairytale:shadow -- ["Fierce Competition!"] = "", -- Space_Invasion --- ["Fiery Water"] = "", -- A_Classic_Fairytale:backstab, A_Classic_Fairytale:dragon, A_Classic_Fairytale:enemy, A_Classic_Fairytale:epil, A_Classic_Fairytale:family, A_Classic_Fairytale:queen, A_Classic_Fairytale:united --- ["Find your tribe!|Cross the lake!"] = "", -- A_Classic_Fairytale:dragon --- ["Finish your training|Hint: Animations can be skipped with the [Precise] key."] = "", -- A_Classic_Fairytale:first_blood --- ["Fire"] = "", + ["Fiery Water"] = "Água Flamejante", -- A_Classic_Fairytale:backstab, A_Classic_Fairytale:dragon, A_Classic_Fairytale:enemy, A_Classic_Fairytale:epil, A_Classic_Fairytale:family, A_Classic_Fairytale:queen, A_Classic_Fairytale:united + ["Find your tribe!|Cross the lake!"] = "Encontra a tua tribo|Atravessa o lago!", -- A_Classic_Fairytale:dragon +-- ["Finish your training|Hint: Animations can be skipped with the [Precise] key."] = "Acaba o teu treino|Ajuda: As animações podem ser saltadas com a tecla [Precisão].", -- A_Classic_Fairytale:first_blood + ["Fire"] = "Fogo", -- ["Fire a mine: [Does what it says ~ Cant be dropped close to an enemy ~ 1 sec]"] = "", -- Continental_supplies --- ["First aid kits?!"] = "", -- A_Classic_Fairytale:united + ["First aid kits?!"] = "Kits de primeiros socorros?!", -- A_Classic_Fairytale:united -- ["First Blood"] = "", -- A_Classic_Fairytale:first_blood -- ["FIRST BLOOD MUTATES"] = "", -- Mutant --- ["First Steps"] = "", -- A_Classic_Fairytale:first_blood +-- ["First Steps"] = "Primeiros Passos", -- A_Classic_Fairytale:first_blood ["Flag captured!"] = "Bandeira capturada!", ["Flag respawned!"] = "Bandeira reiniciada!", ["Flag returned!"] = "Bandeira devolvida!", -- ["Flags, and their home base will be placed where each team ends their first turn."] = "", --- ["Flamer"] = "", --- ["Flaming Worm"] = "", -- A_Classic_Fairytale:backstab +-- ["Flamer"] = "Azeiteiro", +-- ["Flaming Worm"] = "Minhoca Flamejante", -- A_Classic_Fairytale:backstab -- ["Flare: [fire up some bombs depending on hogs depending on hogs in the circle"] = "", -- Continental_supplies -- ["Flesh for Brainz"] = "", -- A_Classic_Fairytale:journey --- ["For improved features/stability, play 0.9.18+"] = "", -- WxW --- ["Free Dense Cloud and continue the mission!"] = "", -- A_Classic_Fairytale:journey --- ["Friendly Fire!"] = "", --- ["fuel extended!"] = "", --- ["GAME BEGUN!!!"] = "", + ["For improved features/stability, play 0.9.18+"] = "Para mais funcionalidades e maior estabilidade, joga 0.9.18+", -- WxW + ["Free Dense Cloud and continue the mission!"] = "Liberta o Nuvem Densa e continua a tua missão!", -- A_Classic_Fairytale:journey +-- ["Friendly Fire!"] = "Fogo amigável!", +-- ["fuel extended!"] = "combustivel aumentado!", +-- ["GAME BEGUN!!!"] = "O JOGO COMEÇOU!!!", ["Game Modifiers: "] = "Modificadores de Jogo: ", ["GAME OVER!"] = "GAME OVER!", -- ["Game Started!"] = "", --- ["Game? Was this a game to you?!"] = "", -- A_Classic_Fairytale:enemy + ["Game? Was this a game to you?!"] = "Jogo? Isto foi um jogo para ti?!", -- A_Classic_Fairytale:enemy -- ["GasBomb"] = "", -- Continental_supplies -- ["Gas Gargler"] = "", -- A_Classic_Fairytale:queen --- ["Get Dense Cloud out of the pit!"] = "", -- A_Classic_Fairytale:journey +-- ["Get Dense Cloud out of the pit!"] = "Tira o Nuvem Densa do precipicio(?)", -- A_Classic_Fairytale:journey ["Get on over there and take him out!"] = "Chega-te aqui e acaba com ele!", -- ["Get on the head of the mole"] = "", -- A_Classic_Fairytale:first_blood -- ["Get out of there!"] = "", -- User_Mission_-_The_Great_Escape --- ["Get that crate!"] = "", -- A_Classic_Fairytale:first_blood --- ["Get the crate on the other side of the island!|"] = "", -- A_Classic_Fairytale:journey +-- ["Get that crate!"] = "Vai buscar aquela caixa!", -- A_Classic_Fairytale:first_blood +-- ["Get the crate on the other side of the island!|"] = "Vai buscar a caixa no outro lado da ilha!|", -- A_Classic_Fairytale:journey -- ["Get to the target using your rope! |Controls: Left & Right to swing the rope - Up & Down to Contract and Expand!"] = "", -- Basic_Training_-_Rope -- ["Get your teammates out of their natural prison and save the princess!|Hint: Drilling holes should solve everything.|Hint: It might be a good idea to place a girder before starting to drill. Just saying.|Hint: All your hedgehogs need to be above the marked height!|Hint: Leaks A Lot needs to get really close to the princess!"] = "", -- A_Classic_Fairytale:family --- ["GG!"] = "", -- User_Mission_-_Rope_Knock_Challenge + ["GG!"] = "GG! (Excelente jogo!)", -- User_Mission_-_Rope_Knock_Challenge -- ["Gimme Bones"] = "", -- A_Classic_Fairytale:backstab -- ["Glark"] = "", -- A_Classic_Fairytale:shadow --- ["Goal"] = "", +-- ["Goal"] = "Objectivo\Fim", ["GO! GO! GO!"] = "GO! GO! GO!", --- ["Good birdy......"] = "Lindo\Bom passarito......" (needs ingame confirmation), --- ["Good Dude"] = "", -- User_Mission_-_The_Great_Escape --- ["Good idea, they'll never find us there!"] = "", -- A_Classic_Fairytale:united --- ["Good luck...or else!"] = "", -- A_Classic_Fairytale:journey + ["Good birdy......"] = "Lindo passarito......", + ["Good Dude"] = "Boa Bacano", -- User_Mission_-_The_Great_Escape + ["Good idea, they'll never find us there!"] = "Boa ideia, eles nunca nos vão encontrar aqui!", -- A_Classic_Fairytale:united + ["Good luck...or else!"] = "Boa sorte...caso contrário!", -- A_Classic_Fairytale:journey ["Good luck out there!"] = "Boa sorte aí fora!", --- ["Good so far!"] = "", --- ["Good to go!"] = "", --- ["Go on top of the flower"] = "", -- A_Classic_Fairytale:first_blood --- ["Go, quick!"] = "", -- A_Classic_Fairytale:backstab + ["Good so far!"] = "Até agora tudo bem!", +-- ["Good to go!"] = "Pronto para seguir!", + ["Go on top of the flower"] = "Vai para cima da flor", -- A_Classic_Fairytale:first_blood + ["Go, quick!"] = "Vai, rápido!", -- A_Classic_Fairytale:backstab -- ["Gorkij"] = "", -- A_Classic_Fairytale:journey --- ["Go surf!"] = "", -- WxW --- ["GOTCHA!"] = "", --- ["Grab Mines/Explosives"] = "", --- ["Great choice, Steve! Mind if I call you that?"] = "", -- A_Classic_Fairytale:shadow --- ["Great work! Now hit it with your Baseball Bat! |Tip: You can change weapon with 'Right Click'!"] = "", -- Basic_Training_-_Rope +-- ["Go surf!"] = "Vai 'surfar'!", -- WxW +-- ["GOTCHA!"] = "APANHEI-TE!", +-- ["Grab Mines/Explosives"] = "Agarra Minas/Explosivos", +-- ["Great choice, Steve! Mind if I call you that?"] = "Excelente escolha, Steve! Importas-te que te chame\trate assim?", -- A_Classic_Fairytale:shadow +-- ["Great work! Now hit it with your Baseball Bat! |Tip: You can change weapon with 'Right Click'!"] = Bom trabalho! Agora dá-lhe com o teu bastão de basebal! [Ajuada: Podes trocar de arma com o 'Click Direito'!]"", -- Basic_Training_-_Rope -- ["Great! You will be contacted soon for assistance."] = "", -- A_Classic_Fairytale:shadow --- ["Green lipstick bullet: [Is poisonous]"] = "", -- Continental_supplies +-- ["Green lipstick bullet: [Is poisonous]"] = "Batom bala verde: [É venenoso]", -- Continental_supplies -- ["Greetings, "] = "", -- A_Classic_Fairytale:dragon -- ["Greetings, cloudy one!"] = "", -- A_Classic_Fairytale:shadow --- ["Grenade Training"] = "", -- Basic_Training_-_Grenade +-- ["Grenade Training"] = "Treino com Granadas", -- Basic_Training_-_Grenade -- ["Grenadiers"] = "", -- Basic_Training_-_Grenade --- ["Guys, do you think there's more of them?"] = "", -- A_Classic_Fairytale:backstab +-- ["Guys, do you think there's more of them?"] = "Pessoal, axam que ainda há mais?\ha mais deles?", -- A_Classic_Fairytale:backstab ["HAHA!"] = "HAHA!", -- A_Classic_Fairytale:enemy ["Haha!"] = "Haha!", -- A_Classic_Fairytale:united ["Hahahaha!"] = "Hahahaha!", --- ["Haha, now THAT would be something!"] = "", --- ["Hannibal"] = "", -- A_Classic_Fairytale:epil --- ["Hapless Hogs"] = "", --- [" Hapless Hogs left!"] = "", - --- [" HAS MUTATED"] = "", -- Mutant +-- ["Haha, now THAT would be something!"] = "Haha, agora ISSO seria espetacular!\é que era!", +-- ["Hannibal"] = "Hannibal", -- A_Classic_Fairytale:epil +-- ["Hapless Hogs"] = "Ouriços Desafortunados", +-- [" Hapless Hogs left!"] = " Ouriços Desafortunados restantes!", +-- [" HAS MUTATED"] = " MUTOU", -- Mutant -- ["Hatless Jerry"] = "", -- A_Classic_Fairytale:queen --- ["Have no illusions, your tribe is dead, indifferent of your choice."] = "", -- A_Classic_Fairytale:shadow --- ["Have we ever attacked you first?"] = "", -- A_Classic_Fairytale:enemy --- ["Health crates extend your time."] = "", +-- ["Have no illusions, your tribe is dead, indifferent of your choice."] = "Não tenhas ilusoes, a tua tribo está morta, indiferentes à tua escolha.", -- A_Classic_Fairytale:shadow +-- ["Have we ever attacked you first?"] = "Alguma vez te atacamos primeiro?", -- A_Classic_Fairytale:enemy + ["Health crates extend your time."] = "As caixas de vida prolongam o teu tempo.", -- ["Heavy"] = "", -- ["Heavy Cannfantry"] = "", -- A_Classic_Fairytale:united --- ["Hedge-cogs"] = "", -- A_Classic_Fairytale:enemy +-- ["Hedge-cogs"] = "Engrenagens-ouriço", -- A_Classic_Fairytale:enemy -- ["Hedgehog projectile: [fire your hog like a Sticky Bomb]"] = "", -- Continental_supplies - ["Hedgewars-Basketball"] = "Hedgewars-Basketball", + ["Hedgewars-Basketball"] = "Hedgewars-Basquetebol", ["Hedgewars-Knockball"] = "Hedgewars-Knockball", --- ["Hedgibal Lecter"] = "", -- A_Classic_Fairytale:backstab --- ["Heh, it's not that bad."] = "", --- ["Hello again, "] = "Olá novamente\outra vez, ", -- A_Classic_Fairytale:family --- ["Help me, Leaks!"] = "", -- A_Classic_Fairytale:journey --- ["Help me, please!!!"] = "", -- A_Classic_Fairytale:journey --- ["Help me, please!"] = "", -- A_Classic_Fairytale:journey --- ["He moves like an eagle in the sky."] = "", -- A_Classic_Fairytale:first_blood --- ["He must be in the village already."] = "", -- A_Classic_Fairytale:journey --- ["Here, let me help you!"] = "", -- A_Classic_Fairytale:backstab --- ["Here, let me help you save her!"] = "", -- A_Classic_Fairytale:family --- ["Here...pick your weapon!"] = "", -- A_Classic_Fairytale:first_blood --- ["Hero Team"] = "", -- User_Mission_-_The_Great_Escape --- ["He's so brave..."] = "", -- A_Classic_Fairytale:first_blood +-- ["Hedgibal Lecter"] = "Hedgibal Lecter", -- A_Classic_Fairytale:backstab +-- ["Heh, it's not that bad."] = "Heh, não é assim tão mau.\Podia ser pior.", + ["Hello again, "] = "Olá novamente, ", -- A_Classic_Fairytale:family + ["Help me, Leaks!"] = "Ajuda-me, Leaks!", -- A_Classic_Fairytale:journey + ["Help me, please!!!"] = "Ajuda-me, por favor!!!", -- A_Classic_Fairytale:journey + ["Help me, please!"] = "Ajuda-me, por favor!", -- A_Classic_Fairytale:journey +-- ["He moves like an eagle in the sky."] = "Ele move-se tal\como uma águia no ceu.", -- A_Classic_Fairytale:first_blood +-- ["He must be in the village already."] = "Ele já deve estar\ter chegado à na aldeia.", -- A_Classic_Fairytale:journey +-- ["Here, let me help you!"] = "Aqui, deixa-me ajudar-te!", -- A_Classic_Fairytale:backstab +-- ["Here, let me help you save her!"] = "Aqui, deixa-me ajudar-te a salva-la!", -- A_Classic_Fairytale:family +-- ["Here...pick your weapon!"] = "Aqui\Pega...agarra a tua arma!", -- A_Classic_Fairytale:first_blood +-- ["Hero Team"] = "Equipa Heroi", -- User_Mission_-_The_Great_Escape + ["He's so brave..."] = "Ele é tão corajoso...", -- A_Classic_Fairytale:first_blood -- ["He won't be selling us out anymore!"] = "", -- A_Classic_Fairytale:backstab --- ["Hey, guys!"] = ",pessoal!", -- A_Classic_Fairytale:backstab --- ["Hey guys!"] = "pessoal!", -- A_Classic_Fairytale:united --- ["Hey! This is cheating!"] = "", -- A_Classic_Fairytale:journey + ["Hey, guys!"] = "Hey, pessoal!", -- A_Classic_Fairytale:backstab + ["Hey guys!"] = "Hey pessoal!", -- A_Classic_Fairytale:united +-- ["Hey! This is cheating!"] = "Hey! Isto\Isso é batota!", -- A_Classic_Fairytale:journey -- ["HIGHLANDER"] = "", -- Highlander -- ["Hightime"] = "", -- A_Classic_Fairytale:first_blood --- ["Hint: Double Jump - Press [Backspace] twice"] = "", -- A_Classic_Fairytale:first_blood +-- ["Hint: Double Jump - Press [Backspace] twice"] = "Dica: Duplo Salto - Carrega [Retroceder] duas vezes", -- A_Classic_Fairytale:first_blood -- ["Hint: Select the BlowTorch, aim and press [Fire]. Press [Fire] again to stop.|Don't blow up the crate."] = "", -- A_Classic_Fairytale:journey -- ["Hint: Select the LowGravity and press [Fire]."] = "", -- A_Classic_Fairytale:journey -- ["Hint: you might want to stay out of sight and take all the crates...|"] = "", -- A_Classic_Fairytale:journey --- ["His arms are so strong!"] = "", -- A_Classic_Fairytale:first_blood +-- ["His arms are so strong!"] = "Os braços dele são tão fortes!", -- A_Classic_Fairytale:first_blood -- ["Hit Combo!"] = "", -- ["Hmmm...actually...I didn't either."] = "", -- A_Classic_Fairytale:enemy ["Hmmm..."] = "Hmmm...", -- ["Hmmm, I'll have to find some way of moving him off this anti-portal surface..."] = "", -- portal --- ["Hmmm...it's a draw. How unfortunate!"] = "", -- A_Classic_Fairytale:enemy + ["Hmmm...it's a draw. How unfortunate!"] = "Hmmm...é um empate. Que azar!", -- A_Classic_Fairytale:enemy -- ["Hmmm...perhaps a little more time will help."] = "", -- A_Classic_Fairytale:first_blood -- ["Hogminator"] = "", -- A_Classic_Fairytale:family -- ["Hogs in sight!"] = "", -- Continental_supplies --- ["HOLY SHIT!"] = "", -- Mutant +-- ["HOLY SHYTE!"] = "", -- Mutant -- ["Honest Lee"] = "", -- A_Classic_Fairytale:enemy ["Hooray!"] = "Hurra!", -- ["Hostage Situation"] = "", -- A_Classic_Fairytale:family --- ["How can I ever repay you for saving my life?"] = "", -- A_Classic_Fairytale:journey +-- ["How can I ever repay you for saving my life?"] = "Como posso eu (possivelmente) recompensar-te por teres salvo a minha vida?", -- A_Classic_Fairytale:journey -- ["How come in a village full of warriors, it's up to me to save it?"] = "", -- A_Classic_Fairytale:dragon -- ["How difficult would you like it to be?"] = "", -- A_Classic_Fairytale:first_blood -- ["HOW DO THEY KNOW WHERE WE ARE???"] = "", -- A_Classic_Fairytale:united -- ["However, if you fail to do so, she dies a most violent death, just like your friend! Muahahaha!"] = "", -- A_Classic_Fairytale:journey -- ["However, if you fail to do so, she dies a most violent death! Muahahaha!"] = "", -- A_Classic_Fairytale:journey --- ["However, my mates don't agree with me on letting you go..."] = "", -- A_Classic_Fairytale:dragon --- [" HP"] = "", -- Mutant +-- ["However, my mates don't agree with me on letting you go..."] = "No entanto, os meus colegas não concordam com eu deixar-vos ir...", -- A_Classic_Fairytale:dragon + [" HP"] = " HP", -- Mutant ["Hunter"] = "Comando", --Bazooka, Shotgun, SniperRifle --- ["I believe there's more of them."] = "", -- A_Classic_Fairytale:backstab --- ["I can see you have been training diligently."] = "", -- A_Classic_Fairytale:first_blood --- ["I can't believe it worked!"] = "", -- A_Classic_Fairytale:shadow --- ["I can't believe this!"] = "", -- A_Classic_Fairytale:enemy --- ["I can't believe what I'm hearing!"] = "", -- A_Classic_Fairytale:backstab --- ["I can't wait any more, I have to save myself!"] = "", -- A_Classic_Fairytale:shadow --- ["I could just teleport myself there..."] = "", -- A_Classic_Fairytale:family --- ["I'd better get going myself."] = "", -- A_Classic_Fairytale:journey --- ["I didn't until about a month ago."] = "", -- A_Classic_Fairytale:enemy +-- ["I believe there's more of them."] = "Acredito que existem mais deles.", -- A_Classic_Fairytale:backstab +-- ["I can see you have been training diligently."] = "Consigo ver que tens treinado diligentemente.", -- A_Classic_Fairytale:first_blood + ["I can't believe it worked!"] = "Mal posso acreditar que funcionou!", -- A_Classic_Fairytale:shadow + ["I can't believe this!"] = "Não posso acreditar nisto!", -- A_Classic_Fairytale:enemy + ["I can't believe what I'm hearing!"] = "Não posso acreditar no que estou a ouvir!", -- A_Classic_Fairytale:backstab + ["I can't wait any more, I have to save myself!"] = "Não tenho paciencia para esperar mais, tenho de me salvar a mim mesmo!", -- A_Classic_Fairytale:shadow +-- ["I could just teleport myself there..."] = "Podia simplesmente teletransportar-me para la...", -- A_Classic_Fairytale:family +-- ["I'd better get going myself."] = "Seria melhor se fosse sozinho.", -- A_Classic_Fairytale:journey +-- ["I didn't until about a month ago."] = "Nem pensei nisso até ao mês passado.", -- A_Classic_Fairytale:enemy -- ["I don't know how you did that.. But good work! |The next one should be easy as cake for you!"] = "", -- Basic_Training_-_Rope --- ["I feel something...a place! They will arrive near the circles!"] = "", -- A_Classic_Fairytale:backstab --- ["If only I had a way..."] = "", -- A_Classic_Fairytale:backstab +-- ["I feel something...a place! They will arrive near the circles!"] = "Eu sinti algo...um lugar! Eles vão chegar perto dos circulos!", -- A_Classic_Fairytale:backstab +-- ["If only I had a way..."] = "Ao menos se eu tivesse uma maneira...", -- A_Classic_Fairytale:backstab -- ["If only I were given a chance to explain my being here..."] = "", -- A_Classic_Fairytale:first_blood --- ["I forgot that she's the daughter of the chief, too..."] = "", -- A_Classic_Fairytale:backstab +-- ["I forgot that she's the daughter of the chief, too..."] = "Esqueci-me\Tinha-me esquecido que ela também é filha do chefe...", -- A_Classic_Fairytale:backstab -- ["If they try coming here, they can have a taste of my delicious knuckles!"] = "", -- A_Classic_Fairytale:united --- ["If you agree to provide the information we need, you will be spared!"] = "", -- A_Classic_Fairytale:shadow +-- ["If you agree to provide the information we need, you will be spared!"] = "Se concordares em fornecer a informação que precisamos, serás poupado!", -- A_Classic_Fairytale:shadow -- ["If you can get that crate fast enough, your beloved \"princess\" may go free."] = "", -- A_Classic_Fairytale:journey -- ["If you decide to help us, though, we will no longer need to find a new governor for the island."] = "", -- A_Classic_Fairytale:shadow --- ["If you get stuck, use your Desert Eagle or restart the mission!|"] = "", -- A_Classic_Fairytale:journey --- ["If you know what I mean..."] = "", -- A_Classic_Fairytale:shadow --- ["If you say so..."] = "", -- A_Classic_Fairytale:shadow - --- ["I guess you'll have to kill them."] = "", -- A_Classic_Fairytale:dragon --- ["I have come to make you an offering..."] = "", -- A_Classic_Fairytale:shadow --- ["I have no idea where that mole disappeared...Can you see it?"] = "", -- A_Classic_Fairytale:shadow --- ["I have to follow that alien."] = "", -- A_Classic_Fairytale:backstab --- ["I have to get back to the village!"] = "", -- A_Classic_Fairytale:shadow --- ["I hope you are prepared for a small challenge, young one."] = "", -- A_Classic_Fairytale:first_blood --- ["I just don't want to sink to your level."] = "", -- A_Classic_Fairytale:backstab --- ["I just found out that they have captured your princess!"] = "", -- A_Classic_Fairytale:family --- ["I just wonder where Ramon and Spiky disappeared..."] = "", -- A_Classic_Fairytale:journey --- ["I'll hold them off while you return to the village!"] = "", -- A_Classic_Fairytale:shadow --- ["Imagine those targets are the wolves that killed your parents! Take your anger out on them!"] = "", -- A_Classic_Fairytale:first_blood --- ["I'm...alive? How? Why?"] = "", -- A_Classic_Fairytale:backstab --- ["I'm a ninja."] = "", -- A_Classic_Fairytale:dragon --- ["I marked the place of their arrival. You're welcome!"] = "", -- A_Classic_Fairytale:backstab --- ["I'm certain that this is a misunderstanding, fellow hedgehogs!"] = "", -- A_Classic_Fairytale:first_blood --- ["I mean, none of you ceased to live."] = "", -- A_Classic_Fairytale:enemy --- ["I'm getting old for this!"] = "", -- A_Classic_Fairytale:family --- ["I'm getting thirsty..."] = "", -- A_Classic_Fairytale:family --- ["I'm here to help you rescue her."] = "", -- A_Classic_Fairytale:family --- ["I'm not sure about that!"] = "", -- A_Classic_Fairytale:united --- ["Impressive...you are still dry as the corpse of a hawk after a week in the desert..."] = "", -- A_Classic_Fairytale:first_blood --- ["I'm so scared!"] = "", -- A_Classic_Fairytale:united --- ["Incredible..."] = "", -- A_Classic_Fairytale:shadow --- ["I need to find the others!"] = "", -- A_Classic_Fairytale:backstab --- ["I need to get to the other side of this island, fast!"] = "", -- A_Classic_Fairytale:journey --- ["I need to move the tribe!"] = "", -- A_Classic_Fairytale:united --- ["I need to prevent their arrival!"] = "", -- A_Classic_Fairytale:backstab --- ["I need to warn the others."] = "", -- A_Classic_Fairytale:backstab --- ["In fact, you are the only one that's been acting strangely."] = "", -- A_Classic_Fairytale:backstab --- ["In order to get to the other side, you need to collect the crates first.|"] = "", -- A_Classic_Fairytale:dragon +-- ["If you get stuck, use your Desert Eagle or restart the mission!|"] = "Se ficares preso, usa o teu Desert Eagle ou recomeça a missão!|", -- A_Classic_Fairytale:journey +-- ["If you know what I mean..."] = "Se percebes o que quero dizer...", -- A_Classic_Fairytale:shadow + ["If you say so..."] = "Se tu o dizes...", -- A_Classic_Fairytale:shadow + ["I guess you'll have to kill them."] = "Parece que vais ter de os matar.", -- A_Classic_Fairytale:dragon + ["I have come to make you an offering..."] = "Eu estou aqui para te fazer uma proposta...", -- A_Classic_Fairytale:shadow + ["I have no idea where that mole disappeared...Can you see it?"] = "Não faço ideia para onde se meteu aquela toupeira...Consegues vê-la?", -- A_Classic_Fairytale:shadow + ["I have to follow that alien."] = "Tenho de seguir aquele alienígena.", -- A_Classic_Fairytale:backstab + ["I have to get back to the village!"] = "Tenho de voltar para a aldeia!", -- A_Classic_Fairytale:shadow + ["I hope you are prepared for a small challenge, young one."] = "Espero que estejas preparado para um pequeno desafio jovem.", -- A_Classic_Fairytale:first_blood + ["I just don't want to sink to your level."] = "So não quero descer ao teu nível.", -- A_Classic_Fairytale:backstab + ["I just found out that they have captured your princess!"] = "Acabei de descobrir que eles capturaram a princesa!", -- A_Classic_Fairytale:family + ["I just wonder where Ramon and Spiky disappeared..."] = "Só gostava de saber para onde o Ramom e o Spiky desapareceram...", -- A_Classic_Fairytale:journey + ["I'll hold them off while you return to the village!"] = "Eu mantenho-os ocupados enquanto regressas à aldeia!", -- A_Classic_Fairytale:shadow + ["Imagine those targets are the wolves that killed your parents! Take your anger out on them!"] = "Imagina que aqueles alvos são os lobos que mataram os teus pais! Descarrega toda a tua raiva neles!", -- A_Classic_Fairytale:first_blood + ["I'm...alive? How? Why?"] = "Eu estou...vivo? Como? Por quê?", -- A_Classic_Fairytale:backstab + ["I'm a ninja."] = "Sou um ninja.", -- A_Classic_Fairytale:dragon + ["I marked the place of their arrival. You're welcome!"] = "Eu marquei o local onde vão chegar. Não é preciso agradecer!", -- A_Classic_Fairytale:backstab + ["I'm certain that this is a misunderstanding, fellow hedgehogs!"] = "Tenho a certeza que isto é um mal entendido, camaradas ouriços!", -- A_Classic_Fairytale:first_blood + ["I mean, none of you ceased to live."] = "Quer dizer, nenhum de vocês cesou de viver.", -- A_Classic_Fairytale:enemy + ["I'm getting old for this!"] = "Estou a ficar velho para isto.", -- A_Classic_Fairytale:family + ["I'm getting thirsty..."] = "Estou a ficar com sede...", -- A_Classic_Fairytale:family + ["I'm here to help you rescue her."] = "Estou aqui para te ajudar a salva-la.", -- A_Classic_Fairytale:family + ["I'm not sure about that!"] = "Não tenho a certeza quanto a isso!", -- A_Classic_Fairytale:united + ["Impressive...you are still dry as the corpse of a hawk after a week in the desert..."] = "Impressionante...ainda estás seco tal e qual um cadáver de um falcão depois de uma semana no deserto...", -- A_Classic_Fairytale:first_blood + ["I'm so scared!"] = "Tenho tanto medo!", -- A_Classic_Fairytale:united + ["Incredible..."] = "Incrível...", -- A_Classic_Fairytale:shadow + ["I need to find the others!"] = "Preciso de encontrar os outros!", -- A_Classic_Fairytale:backstab + ["I need to get to the other side of this island, fast!"] = "Preciso de chegar ao outro lado da ilha, rápido!", -- A_Classic_Fairytale:journey + ["I need to move the tribe!"] = "Preciso de mover a tribo!", -- A_Classic_Fairytale:united +-- ["I need to prevent their arrival!"] = "Não posso deixar\permitir\Preciso de prevenir que cheguem!", -- A_Classic_Fairytale:backstab + ["I need to warn the others."] = "Preciso de avisar os outros.", -- A_Classic_Fairytale:backstab + ["In fact, you are the only one that's been acting strangely."] = "Na realidade, és o único que se tem comportado de forma estranha.", -- A_Classic_Fairytale:backstab + ["In order to get to the other side, you need to collect the crates first.|"] = "De forma a conseguir chegar ao outro lado, tens primeiro de obter todas as caixas.", -- A_Classic_Fairytale:dragon ["Instructor"] = "Instrutor", -- 01#Boot_Camp, User_Mission_-_Dangerous_Ducklings --- ["Interesting idea, haha!"] = "", -- A_Classic_Fairytale:enemy --- ["Interesting! Last time you said you killed a cannibal!"] = "", -- A_Classic_Fairytale:backstab --- ["In the meantime, take these and return to your \"friend\"!"] = "", -- A_Classic_Fairytale:shadow + ["Interesting idea, haha!"] = "Interessante ideia, haha!", -- A_Classic_Fairytale:enemy + ["Interesting! Last time you said you killed a cannibal!"] = "Interessante! Da ultima vez disseste que tinhas morto um canibal!", -- A_Classic_Fairytale:backstab +-- ["In the meantime, take these and return to your \"friend\"!"] = "Entretanto, pega\toma isto e volta para o teu \"amigo\"!", -- A_Classic_Fairytale:shadow ["invaders destroyed"] = "invasores destruidos", --- ["Invasion"] = "", -- A_Classic_Fairytale:united --- ["I saw it with my own eyes!"] = "", -- A_Classic_Fairytale:shadow --- ["I see..."] = "", -- A_Classic_Fairytale:shadow --- ["I see you have already taken the leap of faith."] = "", -- A_Classic_Fairytale:first_blood --- ["I see you would like his punishment to be more...personal..."] = "", -- A_Classic_Fairytale:first_blood --- ["I sense another wave of cannibals heading my way!"] = "", -- A_Classic_Fairytale:backstab --- ["I sense another wave of cannibals heading our way!"] = "", -- A_Classic_Fairytale:backstab --- ["I shouldn't have drunk that last pint."] = "", -- A_Classic_Fairytale:dragon --- ["Is this place in my head?"] = "", -- A_Classic_Fairytale:dragon --- ["It doesn't matter. I won't let that alien hurt my daughter!"] = "", -- A_Classic_Fairytale:dragon --- ["I think we are safe here."] = "", -- A_Classic_Fairytale:backstab --- ["I thought their shaman died when he tried our medicine!"] = "", -- A_Classic_Fairytale:shadow --- ["It is called 'Hogs of Steel'."] = "", -- A_Classic_Fairytale:enemy --- ["It is time to practice your fighting skills."] = "", -- A_Classic_Fairytale:first_blood --- ["It must be a childhood trauma..."] = "", -- A_Classic_Fairytale:family --- ["It must be the aliens!"] = "", -- A_Classic_Fairytale:backstab --- ["It must be the aliens' deed."] = "", -- A_Classic_Fairytale:backstab --- ["It must be the cyborgs again!"] = "", -- A_Classic_Fairytale:enemy --- ["I told you, I just found them."] = "", -- A_Classic_Fairytale:backstab --- ["It's a good thing SUDDEN DEATH is 99 turns away..."] = "", --- ["It's always up to women to clear up the mess men created!"] = "", -- A_Classic_Fairytale:dragon --- ["It's a shame, I forgot how to do that!"] = "", -- A_Classic_Fairytale:family --- ["It's impossible to communicate with the spirits without a shaman."] = "", -- A_Classic_Fairytale:shadow --- ["It's over..."] = "", -- A_Classic_Fairytale:shadow --- ["It's time you learned that your actions have consequences!"] = "", -- A_Classic_Fairytale:journey --- ["It's worth more than wood!"] = "", -- A_Classic_Fairytale:enemy --- ["It wants our brains!"] = "", -- A_Classic_Fairytale:shadow --- ["It was not a dream, unwise one!"] = "", -- A_Classic_Fairytale:backstab --- ["I've seen this before. They just appear out of thin air."] = "", -- A_Classic_Fairytale:united --- ["I want to play a game..."] = "", -- A_Classic_Fairytale:journey --- ["I want to see how it handles this!"] = "", -- A_Classic_Fairytale:backstab --- ["I wish to help you, "] = "", -- A_Classic_Fairytale:dragon --- ["I wonder where Dense Cloud is..."] = "", -- A_Classic_Fairytale:journey, A_Classic_Fairytale:shadow --- ["I wonder why I'm so angry all the time..."] = "", -- A_Classic_Fairytale:family --- ["I won't let you kill her!"] = "", -- A_Classic_Fairytale:journey --- ["Jack"] = "", -- A_Classic_Fairytale:dragon, A_Classic_Fairytale:family, A_Classic_Fairytale:queen --- ["Jeremiah"] = "", -- A_Classic_Fairytale:dragon --- ["John"] = "", -- A_Classic_Fairytale:journey --- ["Judas"] = "", -- A_Classic_Fairytale:backstab --- ["Jumping is disabled"] = "", --- ["Just kidding, none of you have died!"] = "", -- A_Classic_Fairytale:enemy --- ["Just on a walk."] = "", -- A_Classic_Fairytale:united --- ["Just wait till I get my hands on that trauma! ARGH!"] = "", -- A_Classic_Fairytale:family + ["Invasion"] = "Invasão", -- A_Classic_Fairytale:united + ["I saw it with my own eyes!"] = "Eu vi-o com os meus próprios olhos!", -- A_Classic_Fairytale:shadow + ["I see..."] = "Estou a ver...", -- A_Classic_Fairytale:shadow +-- ["I see you have already taken the leap of faith."] = "Vejo que ja deste um salto de fé", -- A_Classic_Fairytale:first_blood +-- ["I see you would like his punishment to be more...personal..."] = "Estou a ver que gostarias que o seu fosse mais... pessoal...", -- A_Classic_Fairytale:first_blood +-- ["I sense another wave of cannibals heading my way!"] = "Sinto que outro ataque de canibais vem na minha direcção!", -- A_Classic_Fairytale:backstab +-- ["I sense another wave of cannibals heading our way!"] = "Sinto que outro ataque de canibais vem\se move na nossa direcção!", -- A_Classic_Fairytale:backstab + ["I shouldn't have drunk that last pint."] = "Não devia ter bebido aquele ultimo caneco.", -- A_Classic_Fairytale:dragon +-- ["Is this place in my head?"] = "Este lugar é na minha cabeça?", -- A_Classic_Fairytale:dragon + ["It doesn't matter. I won't let that alien hurt my daughter!"] = "Não quero saber. Não vou deixar aquele alienígena magoar a minha filha!", -- A_Classic_Fairytale:dragon + ["I think we are safe here."] = "Penso que estamos seguros aqui.", -- A_Classic_Fairytale:backstab + ["I thought their shaman died when he tried our medicine!"] = "Pensava que o xamã deles tinha morrido quando experimentou o nosso remédio!", -- A_Classic_Fairytale:shadow +-- ["It is called 'Hogs of Steel'."] = "É chamado 'Hogs of Steel'.", -- A_Classic_Fairytale:enemy + ["It is time to practice your fighting skills."] = "Está na hora de praticar os habilidades em combate.", -- A_Classic_Fairytale:first_blood + ["It must be a childhood trauma..."] = "Deve ser um trauma de criança...", -- A_Classic_Fairytale:family + ["It must be the aliens!"] = "Devem ser os alienígenas!", -- A_Classic_Fairytale:backstab + ["It must be the aliens' deed."] = "Devem ser obra dos alienígenas!", -- A_Classic_Fairytale:backstab + ["It must be the cyborgs again!"] = "Devem ser os cyborgs novamente!", -- A_Classic_Fairytale:enemy +-- ["I told you, I just found them."] = "Eu disse-te que os tinha acabado de encontrar.\que simplesmente os encontrei.", -- A_Classic_Fairytale:backstab + ["It's a good thing SUDDEN DEATH is 99 turns away..."] = "Ainda bem que ainda faltam 99 turnos para MORTE SÚBITA...", + ["It's always up to women to clear up the mess men created!"] = "Está sempre a cargo das mulheres, limpar a confusão que os homens criaram!", -- A_Classic_Fairytale:dragon +-- ["It's a shame, I forgot how to do that!"] = "É uma pena, esqueci-me de como fazer isso\tal coisa!", -- A_Classic_Fairytale:family + ["It's impossible to communicate with the spirits without a shaman."] = "É impossível comunicar com os espiritos sem um xamã.", -- A_Classic_Fairytale:shadow +-- ["It's over..."] = "Acabou...\Finalmente acabou...", -- A_Classic_Fairytale:shadow +-- ["It's time you learned that your actions have consequences!"] = "Está na hora de aprenderes que as tua ações teem consequencias!", -- A_Classic_Fairytale:journey +-- ["It's worth more than wood!"] = "É mais valioso\Vale mais que madeira!", -- A_Classic_Fairytale:enemy +-- ["It wants our brains!"] = "Quer os nosso cérebros!", -- A_Classic_Fairytale:shadow + ["It was not a dream, unwise one!"] = "Não foi um sonho, ó insensato!", -- A_Classic_Fairytale:backstab + ["I've seen this before. They just appear out of thin air."] = "Eu já vi isto antes. Eles aparecem do nada.", -- A_Classic_Fairytale:united + ["I want to play a game..."] = "Eu quero jogar um jogo...", -- A_Classic_Fairytale:journey +-- ["I want to see how it handles this!"] = "Quero ver como ele trata da situação!", -- A_Classic_Fairytale:backstab + ["I wish to help you, "] = "Desejo ajudar-te, ", -- A_Classic_Fairytale:dragon + ["I wonder where Dense Cloud is..."] = "Pergunto-me onde estará o Nuvem Densa...", -- A_Classic_Fairytale:journey, A_Classic_Fairytale:shadow + ["I wonder why I'm so angry all the time..."] = "Pergunto-me porque estou sempre tão zangado...", -- A_Classic_Fairytale:family + ["I won't let you kill her!"] = "Não te vou permitir que a mates!", -- A_Classic_Fairytale:journey + ["Jack"] = "Jack", -- A_Classic_Fairytale:dragon, A_Classic_Fairytale:family, A_Classic_Fairytale:queen + ["Jeremiah"] = "Jeremiah", -- A_Classic_Fairytale:dragon + ["John"] = "John", -- A_Classic_Fairytale:journey + ["Judas"] = "Judas", -- A_Classic_Fairytale:backstab + ["Jumping is disabled"] = "Saltar está desactivado", + ["Just kidding, none of you have died!"] = "Estou só a brincar, nenhum de vocês morreu!", -- A_Classic_Fairytale:enemy +-- ["Just on a walk."] = "Só a passear\dar um passeio.", -- A_Classic_Fairytale:united + ["Just wait till I get my hands on that trauma! ARGH!"] = "Espera até eu pôr as mãos naquele trauma! ARGH!", -- A_Classic_Fairytale:family ["Kamikaze Expert!"] = "Kamikaze profissional!", --- ["Keep it up!"] = "Continua assim!", --- ["Kerguelen"] = "", -- Continental_supplies + ["Keep it up!"] = "Continua assim!", + ["Kerguelen"] = "", -- Continental_supplies -- ["Killing spree!"] = "", --- ["KILL IT!"] = "", -- A_Classic_Fairytale:first_blood --- ["KILLS"] = "", --- ["Kill the aliens!"] = "", -- A_Classic_Fairytale:dragon --- ["Kill the cannibal!"] = "", -- A_Classic_Fairytale:first_blood --- ["Kill the traitor...or spare his life!|Kill him or press [Precise]!"] = "", -- A_Classic_Fairytale:backstab --- ["Last Target!"] = "", --- ["Leader"] = "", -- A_Classic_Fairytale:enemy +-- ["KILL IT!"] = "MATA-O!", -- A_Classic_Fairytale:first_blood +-- ["KILLS"] = "VITIMAS", + ["Kill the aliens!"] = "Mata os alienígenas!", -- A_Classic_Fairytale:dragon + ["Kill the cannibal!"] = "Destrói o canibal!", -- A_Classic_Fairytale:first_blood +-- ["Kill the traitor...or spare his life!|Kill him or press [Precise]!"] = "Acaba com o traídor...ou poupa a sua vida!|Mata-o ou pressiona [Precisão]!", -- A_Classic_Fairytale:backstab +-- ["Last Target!"] = "Ultimo Alvo!", +-- ["Leader"] = "Lider", -- A_Classic_Fairytale:enemy -- ["Leaderbot"] = "", -- A_Classic_Fairytale:queen --- ["Leaks A Lot"] = "", -- A_Classic_Fairytale:backstab, A_Classic_Fairytale:dragon, A_Classic_Fairytale:enemy, A_Classic_Fairytale:epil, A_Classic_Fairytale:family, A_Classic_Fairytale:first_blood, A_Classic_Fairytale:journey, A_Classic_Fairytale:queen, A_Classic_Fairytale:shadow, A_Classic_Fairytale:united --- ["Leaks A Lot, depressed for killing his loved one, failed to save the village..."] = "", -- A_Classic_Fairytale:journey --- ["Leaks A Lot gave his life for his tribe! He should have survived!"] = "", -- A_Classic_Fairytale:first_blood --- ["Leaks A Lot must survive!"] = "", -- A_Classic_Fairytale:journey + ["Leaks A Lot"] = "Leaks A Lot", -- A_Classic_Fairytale:backstab, A_Classic_Fairytale:dragon, A_Classic_Fairytale:enemy, A_Classic_Fairytale:epil, A_Classic_Fairytale:family, A_Classic_Fairytale:first_blood, A_Classic_Fairytale:journey, A_Classic_Fairytale:queen, A_Classic_Fairytale:shadow, A_Classic_Fairytale:united +-- ["Leaks A Lot, depressed for killing his loved one, failed to save the village..."] = "O Leaks A Lot, deprimido por ter morto a sua amada, não conseguiu salvar a aldeia...", -- A_Classic_Fairytale:journey + ["Leaks A Lot gave his life for his tribe! He should have survived!"] = "Leaks A Lot deu a sua vida pela tribo! Ele devia ter sobrevivido!", -- A_Classic_Fairytale:first_blood + ["Leaks A Lot must survive!"] = "Leaks A Lot tem de sobreviver!", -- A_Classic_Fairytale:journey -- ["Led Heart"] = "", -- A_Classic_Fairytale:queen --- ["Lee"] = "", -- A_Classic_Fairytale:dragon, A_Classic_Fairytale:family, A_Classic_Fairytale:queen + ["Lee"] = "Lee", -- A_Classic_Fairytale:dragon, A_Classic_Fairytale:family, A_Classic_Fairytale:queen ["[Left Shift]"] = "[Shift Esquerdo]", --- ["Let a Continent provide your weapons!"] = "", -- Continental_supplies --- ["Let me test your skills a little, will you?"] = "", -- A_Classic_Fairytale:journey --- ["Let's go home!"] = "", -- A_Classic_Fairytale:journey --- ["Let's head back to the village!"] = "", -- A_Classic_Fairytale:shadow --- ["Let's see what your comrade does now!"] = "", -- A_Classic_Fairytale:journey --- ["Let's show those cannibals what we're made of!"] = "", -- A_Classic_Fairytale:backstab --- ["Let them have a taste of my fury!"] = "", -- A_Classic_Fairytale:backstab --- ["Let us help, too!"] = "", -- A_Classic_Fairytale:backstab + ["Let a Continent provide your weapons!"] = "Deixa um Continente fornecer-vos armamento!", -- Continental_supplies +-- ["Let me test your skills a little, will you?"] = "Pemite-me testar as tuas habilidades um pouco\por um bocadinho.<, ok?>", -- A_Classic_Fairytale:journey + ["Let's go home!"] = "Vamos para casa!", -- A_Classic_Fairytale:journey + ["Let's head back to the village!"] = "Vamos voltar para a aldeia!", -- A_Classic_Fairytale:shadow + ["Let's see what your comrade does now!"] = "Vamos ver o que o teu camarada faz agora.", -- A_Classic_Fairytale:journey + ["Let's show those cannibals what we're made of!"] = "Vamos mostrar àqueles canibais do que somos feitos!", -- A_Classic_Fairytale:backstab +-- ["Let them have a taste of my fury!"] = "Deixa-os provar a minha fúria!", -- A_Classic_Fairytale:backstab + ["Let us help, too!"] = "Deixa-nos ajudar também!", -- A_Classic_Fairytale:backstab -- ["Light Cannfantry"] = "", -- A_Classic_Fairytale:united - ["Listen up, maggot!!"] = "Oiçam bem suas larvas!!", --- ["Little did they know that this hunt will mark them forever..."] = "", -- A_Classic_Fairytale:shadow + ["Listen up, maggot!!"] = "Ouvem bem, verme!!", +-- ["Little did they know that this hunt will mark them forever..."] = "Nunca eles imaginariam que esta caça os marcaria para sempre...", -- A_Classic_Fairytale:shadow -- ["Lively Lifeguard"] = "", --- ["Lonely Cries: [Rise the water if no hog is in the circle and deal 1 damage to all hogs]"] = "", -- Continental_supplies --- ["Look, I had no choice!"] = "", -- A_Classic_Fairytale:backstab --- ["Look out! There's more of them!"] = "", -- A_Classic_Fairytale:backstab --- ["Look out! We're surrounded by cannibals!"] = "", -- A_Classic_Fairytale:enemy +-- ["Lonely Cries: [Rise the water if no hog is in the circle and deal 1 damage to all hogs]"] = "Choros Solitarios: [Aumente o nível da água]", -- Continental_supplies + ["Look, I had no choice!"] = "Olha, eu não tive escolha!", -- A_Classic_Fairytale:backstab +-- ["Look out! There's more of them!"] = "Cuidado! Existem mais!", -- A_Classic_Fairytale:backstab +-- ["Look out! We're surrounded by cannibals!"] = "Cuidado! Estamos rodeados de cabinais!", -- A_Classic_Fairytale:enemy -- ["Looks like the whole world is falling apart!"] = "", -- A_Classic_Fairytale:enemy --- ["Luckily, I've managed to snatch some of them."] = "", -- A_Classic_Fairytale:united --- ["LUDICROUS KILL"] = "", -- Mutant +-- ["Luckily, I've managed to snatch some of them."] = "Por sorte, consegui alguns deles.", -- A_Classic_Fairytale:united + ["LUDICROUS KILL"] = "LUDICROUS KILL", -- Mutant -- ["May the spirits aid you in all your quests!"] = "", -- A_Classic_Fairytale:backstab -- ["Medicine: [Fire some exploding medicine that will heal all hogs effected by the explosion]"] = "", -- Continental_supplies --- ["MEGA KILL"] = "", -- Mutant + ["MEGA KILL"] = "MEGA KILL", -- Mutant -- ["Meiwes"] = "", -- A_Classic_Fairytale:backstab -- ["Mindy"] = "", -- A_Classic_Fairytale:united -- ["Mine Deployer"] = "", @@ -494,16 +492,16 @@ ["MISSION FAILED"] = "MISSÃO FALHADA", -- User_Mission_-_Dangerous_Ducklings, User_Mission_-_Diver, User_Mission_-_Spooky_Tree, User_Mission_-_Teamwork ["MISSION SUCCESSFUL"] = "MISSÃO COMPLETA", -- User_Mission_-_Spooky_Tree, User_Mission_-_Teamwork ["MISSION SUCCESS"] = "MISSÃO COMPLETA", -- User_Mission_-_Diver, User_Mission_-_Spooky_Tree, User_Mission_-_Teamwork --- ["Molotov"] = "", -- Continental_supplies --- ["MONSTER KILL"] = "", -- Mutant --- ["More Natives"] = "", -- A_Classic_Fairytale:epil + ["Molotov"] = "", -- Continental_supplies + ["MONSTER KILL"] = "MONSTER KILL", -- Mutant + ["More Natives"] = "Mais Nativos", -- A_Classic_Fairytale:epil ["Movement: [Up], [Down], [Left], [Right]"] = "Movimento: [Cima], [Baixo], [Esquerda], [Direita]", --- ["Multi-shot!"] = "", +-- ["Multi-shot!"] = "Multiplo-tiro!", -- ["Muriel"] = "", -- A_Classic_Fairytale:backstab, A_Classic_Fairytale:dragon, A_Classic_Fairytale:family, A_Classic_Fairytale:queen -- ["Muscle Dissolver"] = "", -- A_Classic_Fairytale:shadow --- ["-------"] = "", -- Mutant + ["-------"] = "-------", -- Mutant -- ["Nade Boy"] = "", -- Basic_Training_-_Grenade --- ["Name"] = "", -- A_Classic_Fairytale:queen + ["Name"] = "Nome", -- A_Classic_Fairytale:queen -- ["Nameless Heroes"] = "", -- ["Nancy Screw"] = "", -- A_Classic_Fairytale:enemy, A_Classic_Fairytale:queen -- ["Napalm rocket: [Fire a bomb with napalm!]"] = "", -- Continental_supplies @@ -512,65 +510,63 @@ -- ["NEW CLAN RECORD: "] = "", ["NEW fastest lap: "] = "NOVA volta recorde: ", -- ["New Mines Per Turn"] = "", --- ["NEW RACE RECORD: "] = "", +-- ["NEW RACE RECORD: "] = "NOVO RECORDE PARA ESTA PISTA: ", -- ["Newton's Hammock"] = "", --- ["Nicely done, meatbags!"] = "", -- A_Classic_Fairytale:enemy --- ["Nice work, "] = "", -- A_Classic_Fairytale:dragon --- ["Nice work!"] = "", -- A_Classic_Fairytale:enemy +-- ["Nicely done, meatbags!"] = "Muito bom trabalho\Muito bem, (seus )sacos de carne!", -- A_Classic_Fairytale:enemy + ["Nice work, "] = "Bom trabalho, ", -- A_Classic_Fairytale:dragon + ["Nice work!"] = "Bom trabalho!", -- A_Classic_Fairytale:enemy -- ["Nilarian"] = "", -- A_Classic_Fairytale:queen --- ["No, I came back to help you out..."] = "", -- A_Classic_Fairytale:shadow --- ["No...I wonder where they disappeared?!"] = "", -- A_Classic_Fairytale:journey + ["No, I came back to help you out..."] = "Não, voltei para te ajudar...", -- A_Classic_Fairytale:shadow +-- ["No...I wonder where they disappeared?!"] = "Não... Pegunto-me para onde desapareceram?!", -- A_Classic_Fairytale:journey -- ["Nom-Nom"] = "", -- A_Classic_Fairytale:journey -- ["NomNom"] = "", -- A_Classic_Fairytale:united --- ["Nope. It was one fast mole, that's for sure."] = "", -- A_Classic_Fairytale:shadow --- ["No! Please, help me!"] = "", -- A_Classic_Fairytale:journey --- ["NORMAL"] = "", -- Continental_supplies --- ["North America"] = "", -- Continental_supplies --- ["Not all hogs are born equal."] = "", -- Highlander +-- ["Nope. It was one fast mole, that's for sure."] = "Não. Mas foi uma toupeira muito rápida de certeza.", -- A_Classic_Fairytale:shadow + ["No! Please, help me!"] = "Não! Por favor, ajuda-me!", -- A_Classic_Fairytale:journey + ["NORMAL"] = "NORMAL", -- Continental_supplies + ["North America"] = "América do Norte", -- Continental_supplies +-- ["Not all hogs are born equal."] = "Nem todos os ouriços nascem iguais\da mesma maneira.", -- Highlander -- ["NOT ENOUGH WAYPOINTS"] = "", --- ["Not now, Fiery Water!"] = "", -- A_Classic_Fairytale:backstab + ["Not now, Fiery Water!"] = "Agora não Água Flamejante!", -- A_Classic_Fairytale:backstab ["Not So Friendly Match"] = "Partida não muito amigável", -- Basketball, Knockball --- ["Not you again! My head still hurts from last time!"] = "", -- A_Classic_Fairytale:shadow --- ["No, we made sure of that!"] = "", -- A_Classic_Fairytale:united +-- ["Not you again! My head still hurts from last time!"] = "Tu outra vez?! A minha cabeça ainda doi da ultima vez!", -- A_Classic_Fairytale:shadow + ["No, we made sure of that!"] = "Não, certificamo-nos disso!", -- A_Classic_Fairytale:united -- ["Now find the next target! |Tip: Normally you lose health by falling down, so be careful!"] = "", -- Basic_Training_-_Rope --- ["No! What have I done?! What have YOU done?!"] = "", -- A_Classic_Fairytale:journey --- ["No. Where did he come from?"] = "", -- A_Classic_Fairytale:shadow --- ["Now how do I get on the other side?!"] = "", -- A_Classic_Fairytale:dragon + ["No! What have I done?! What have YOU done?!"] = "Não! O que fiz eu?! O que fizeste TU?!", -- A_Classic_Fairytale:journey + ["No. Where did he come from?"] = "Não. De onde raio é que ele apareceu?", -- A_Classic_Fairytale:shadow + ["Now how do I get on the other side?!"] = "Agora, como chego ao outro lado?!", -- A_Classic_Fairytale:dragon -- ["No. You and the rest of the tribe are safer there!"] = "", -- A_Classic_Fairytale:backstab -- ["Obliterate them!|Hint: You might want to take cover..."] = "", -- A_Classic_Fairytale:shadow --- ["Obstacle course"] = "", -- A_Classic_Fairytale:dragon --- ["Of course I have to save her. What did I expect?!"] = "", -- A_Classic_Fairytale:family --- ["OH, COME ON!"] = "", -- A_Classic_Fairytale:journey --- ["Oh, my!"] = "", -- A_Classic_Fairytale:first_blood --- ["Oh, my! This is even more entertaining than I've expected!"] = "", -- A_Classic_Fairytale:backstab + ["Obstacle course"] = "Pista de obstáculos", -- A_Classic_Fairytale:dragon + ["Of course I have to save her. What did I expect?!"] = "Claro que tenho de a salvar. Estavas à espera do quê?!", -- A_Classic_Fairytale:family +-- ["OH, COME ON!"] = "OH, VÁ LÁ!", -- A_Classic_Fairytale:journey + ["Oh, my!"] = "Uau!", -- A_Classic_Fairytale:first_blood + ["Oh, my! This is even more entertaining than I've expected!"] = "Uau! Isto é mais interessante do que eu esperava!", -- A_Classic_Fairytale:backstab ["Oh no! Just try again!"] = "Oh não! Tenta novamente!", -- User_Mission_-_Diver, User_Mission_-_Spooky_Tree, User_Mission_-_Teamwork -- ["Oh no, not "] = "", -- A_Classic_Fairytale:backstab, A_Classic_Fairytale:united ["Oh no! Time's up! Just try again."] = "Oh não! Terminou o tempo! Tenta novamente.", --Bazooka, Shotgun, SniperRifle -- ["Oh no! You failed! Just try again."] = "", -- Basic_Training_-_Cluster_Bomb -- ["Oh, silly me! I forgot that I'm the shaman."] = "", -- A_Classic_Fairytale:backstab --- ["Olive"] = "", -- A_Classic_Fairytale:united --- ["Omnivore"] = "", -- A_Classic_Fairytale:first_blood --- ["Once upon a time, on an island with great natural resources, lived two tribes in heated conflict..."] = "", -- A_Classic_Fairytale:first_blood --- ["ONE HOG PER TEAM! KILLING EXCESS HEDGES"] = "", -- Mutant + ["Olive"] = "Azeitona", -- A_Classic_Fairytale:united + ["Omnivore"] = "Omnívoro", -- A_Classic_Fairytale:first_blood +-- ["Once upon a time, on an island with great natural resources, lived two tribes in heated conflict..."] = "Era uma vez, numa ilha de grandes recursos naturais, viviam duas tribos com um profundo conflituo...", -- A_Classic_Fairytale:first_blood + ["ONE HOG PER TEAM! KILLING EXCESS HEDGES"] = "UM OURIÇO POR EQUIPA! A REMOVER OS OURIÇOS EM EXCESSO", -- Mutant -- ["One tribe was peaceful, spending their time hunting and training, enjoying the small pleasures of life..."] = "", -- A_Classic_Fairytale:first_blood --- ["Oops...I dropped them."] = "", -- A_Classic_Fairytale:united --- ["Open that crate and we will continue!"] = "", -- A_Classic_Fairytale:first_blood + ["Oops...I dropped them."] = "Oops...deixei-os cair.", -- A_Classic_Fairytale:united + ["Open that crate and we will continue!"] = "Abre a caixa e podemos prosseguir!", -- A_Classic_Fairytale:first_blood ["Operation Diver"] = "Operação Mergulho", ["Opposing Team: "] = "Equipa adversária", -- ["Orlando Boom!"] = "", -- A_Classic_Fairytale:queen --- ["Ouch!"] = "", -- User_Mission_-_Rope_Knock_Challenge --- ["Our tribe, our beautiful island!"] = "", -- A_Classic_Fairytale:enemy --- ["Parachute"] = "", -- Continental_supplies + ["Ouch!"] = "Ouch!", -- User_Mission_-_Rope_Knock_Challenge + ["Our tribe, our beautiful island!"] = "A nossa tribo, a nossa bela ilha!", -- A_Classic_Fairytale:enemy + ["Parachute"] = "Pára-quedas", -- Continental_supplies ["Pathetic Hog #%d"] = "Ouriço patético #%d", --- ["Pathetic Resistance"] = "", -- User_Mission_-_Bamboo_Thicket, User_Mission_-_Newton_and_the_Hammock --- ["Perfect! Now try to get the next crate without hurting yourself!"] = "", -- A_Classic_Fairytale:first_blood --- ["Per-Hog Ammo"] = "", +-- ["Pathetic Resistance"] = "Pátetica Resistencia", -- User_Mission_-_Bamboo_Thicket, User_Mission_-_Newton_and_the_Hammock + ["Perfect! Now try to get the next crate without hurting yourself!"] = "Perfeito! Agora tenta obter a proxima caixa sem te aleijares!", -- A_Classic_Fairytale:first_blood +-- ["Per-Hog Ammo"] = "Armamento por-Ouriço", -- ["- Per team weapons|- 9 weaponschemes|- Unique new weapons| |Select continent first round with the Weapon Menu or by ([switch/tab]=Increase,[precise/left shift]=Decrease) on Skip|Some weapons have a second option. Find them with [switch/tab]"] = "", -- Continental_supplies - --- ["Pfew! That was close!"] = "", -- A_Classic_Fairytale:shadow --- ["Piñata bullet: [Contains some sweet candy!]"] = "", -- Continental_supplies + ["Pfew! That was close!"] = "Ufa! Foi por um triz.", -- A_Classic_Fairytale:shadow +-- ["Piñata bullet: [Contains some sweet candy!]"] = "Bala pinhata: [Contem goluzeimas\doces!]", -- Continental_supplies -- ["Pings left:"] = "", -- Space_Invasion - -- ["Place more waypoints using the 'Air Attack' weapon."] = "", -- ["Planes Used:"] = "", -- User_Mission_-_RCPlane_Challenge -- ["Planes Used"] = "", -- User_Mission_-_RCPlane_Challenge @@ -585,19 +581,19 @@ -- ["Portal mission"] = "", -- portal ["Power Remaining"] = "Energia Restante", ["Prepare yourself"] = "Prepara-te!", --- ["Press [Enter] to accept this configuration."] = "", -- WxW --- ["Press [Left] or [Right] to move around, [Enter] to jump"] = "", -- A_Classic_Fairytale:first_blood --- ["Press [Precise] to skip intro"] = "", + ["Press [Enter] to accept this configuration."] = "Pressiona [Enter] para aceitar esta configuração.", -- WxW + ["Press [Left] or [Right] to move around, [Enter] to jump"] = "Pressiona [Esquerda] ou [Direita] para te moveres, [Enter] para saltar", -- A_Classic_Fairytale:first_blood +-- ["Press [Precise] to skip intro"] = "Pressiona [] para saltar a introdução", -- ["Private Novak"] = "", -- Basic_Training_-_Cluster_Bomb -- ["Protect yourselves!|Grenade hint: set the timer with [1-5], aim with [Up]/[Down] and hold [Space] to set power"] = "", -- A_Classic_Fairytale:shadow -- ["Race complexity limit reached."] = "", -- ["RACER"] = "", --- ["Rachel"] = "", -- A_Classic_Fairytale:dragon, A_Classic_Fairytale:family, A_Classic_Fairytale:queen + ["Rachel"] = "Rachel", -- A_Classic_Fairytale:dragon, A_Classic_Fairytale:family, A_Classic_Fairytale:queen -- ["Radar Ping"] = "", -- Space_Invasion -- ["Raging Buffalo"] = "", -- A_Classic_Fairytale:backstab, A_Classic_Fairytale:dragon, A_Classic_Fairytale:enemy, A_Classic_Fairytale:epil, A_Classic_Fairytale:family, A_Classic_Fairytale:queen, A_Classic_Fairytale:united -- ["Ramon"] = "", -- A_Classic_Fairytale:enemy, A_Classic_Fairytale:epil, A_Classic_Fairytale:family, A_Classic_Fairytale:queen, A_Classic_Fairytale:shadow -- ["RC PLANE TRAINING"] = "", -- User_Mission_-_RCPlane_Challenge --- ["Really?! You thought you could harm me with your little toys?"] = "", -- A_Classic_Fairytale:shadow +-- ["Really?! You thought you could harm me with your little toys?"] = "A SÉRIO?! Pensavas que me podias fazer mal com os teus pequenos brinquedos?", -- A_Classic_Fairytale:shadow -- ["Regurgitator"] = "", -- A_Classic_Fairytale:backstab -- ["Reinforcements"] = "", -- A_Classic_Fairytale:backstab -- ["Remember: The rope only bend around objects, |if it doesn't hit anything it's always stright!"] = "", -- Basic_Training_-_Rope @@ -610,36 +606,36 @@ -- ["Rot Molester"] = "", -- A_Classic_Fairytale:shadow -- ["Round Limit:"] = "", -- ["Round Limit"] = "", --- ["Rounds Complete: "] = "", --- ["Rounds Complete"] = "", +-- ["Rounds Complete: "] = "Rondas Completas: ", +-- ["Rounds Complete"] = "Rondas Completas", ["RULES OF THE GAME [Press ESC to view]"] = "REGRAS DE JOGO [Pressiona ESC para as visualizar]", --- ["Rusty Joe"] = "", -- A_Classic_Fairytale:queen +-- ["Rusty Joe"] = "Joe Emferrujado", -- A_Classic_Fairytale:queen -- ["s|"] = "", -- ["Sabotage: [Sabotage all hogs in the circle and deal ~10 dmg]"] = "", -- Continental_supplies -- ["Salivaslurper"] = "", -- A_Classic_Fairytale:united --- ["Salvation"] = "", -- A_Classic_Fairytale:family +-- ["Salvation"] = "Salvação", -- A_Classic_Fairytale:family -- ["Salvation was one step closer now..."] = "", -- A_Classic_Fairytale:dragon --- ["Save as many hapless hogs as possible!"] = "", + ["Save as many hapless hogs as possible!"] = "Salva o máximo de ouriços desafortunados possível!", -- ["Save Fell From Heaven!"] = "", -- A_Classic_Fairytale:journey --- ["Save Leaks A Lot!|Hint: The Switch utility might be of help to you."] = "", -- A_Classic_Fairytale:shadow +-- ["Save Leaks A Lot!|Hint: The Switch utility might be of help to you."] = "Salva o Leaks A Lot! Ajuda: A abilidade\ferramente Switch(?) pode ser-te util.", -- A_Classic_Fairytale:shadow -- ["Save the princess! All your hogs must survive!|Hint: Kill the cyborgs first! Use the ammo very carefully!|Hint: You might want to spare a girder for cover!"] = "", -- A_Classic_Fairytale:family -- ["Save the princess by collecting the crate in under 12 turns!"] = "", -- A_Classic_Fairytale:journey -- ["Scalp Muncher"] = "", -- A_Classic_Fairytale:backstab --- ["Score"] = "", -- Mutant - ["SCORE"] = "RESULTADOS", + ["Score"] = "Resultado", -- Mutant + ["SCORE"] = "RESULTADO", -- ["Scream from a Walrus: [Deal 20 damage + 10% of your hogs health to all hogs around you and get half back]"] = "", -- Continental_supplies ["sec"] = "seg", -- 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 --- ["Seduction"] = "", -- Continental_supplies + ["Seduction"] = "Sedução", -- Continental_supplies -- ["Seems like every time you take a \"walk\", the enemy find us!"] = "", -- A_Classic_Fairytale:backstab -- ["See that crate farther on the right?"] = "", -- A_Classic_Fairytale:first_blood ["See ya!"] = "Chau!", -- ["Segmentation Paul"] = "", -- A_Classic_Fairytale:dragon --- ["Select continent!"] = "", -- Continental_supplies --- ["Select difficulty: [Left] - easier or [Right] - harder"] = "", -- A_Classic_Fairytale:first_blood + ["Select continent!"] = "Seleciona o continente!", -- Continental_supplies +-- ["Select difficulty: [Left] - easier or [Right] - harder"] = "Seleciona a dificuldade: [Esquerda] - facil ou [Direita] - dificil", -- A_Classic_Fairytale:first_blood ["selected!"] = "seleccionado!", --- ["... share your beauty with the world every morning, my princess!"] = "", -- A_Classic_Fairytale:journey --- ["She's behind that tall thingy."] = "", -- A_Classic_Fairytale:family --- ["Shield boosted! +30 power"] = "Escudo melhorado! +30 energia (-unconfirmed)", + ["... share your beauty with the world every morning, my princess!"] = "... partilha a tua beleza com o mundo todas as manhãs, minha princesa!", -- A_Classic_Fairytale:journey + ["She's behind that tall thingy."] = "Ela está atráz daquela coisa alta.", -- A_Classic_Fairytale:family +-- ["Shield boosted! +30 power"] = "Escudo reparado\aumentado! +30 energia (-unconfirmed)", ["Shield Depleted"] = "Escudo Esgotado", ["Shield is fully recharged!"] = "Escudo completamente recarregado!", -- ["Shield Master!"] = "", @@ -647,7 +643,7 @@ ["Shield OFF:"] = "Escudo DESLIGADO:", ["Shield ON:"] = "Escudo LIGADO:", -- ["Shield Seeker!"] = "", --- ["Shotgun"] = "", -- Continental_supplies + ["Shotgun"] = "Caçadeira", -- Continental_supplies ["Shotgun Team"] = "Caçadores", ["Shotgun Training"] = "Treino com Caçadeira", -- ["shots remaining."] = "tiros restantes.", @@ -656,7 +652,7 @@ -- ["Sirius Lee"] = "", -- A_Classic_Fairytale:enemy ["%s is out and Team %d|scored a penalty!| |Score:"] = "%s está fora e a equipa %d|perde um ponto!| |Pontuação:", -- Basketball, Knockball ["%s is out and Team %d|scored a point!| |Score:"] = "%s está fora e a equipa %d|soma um ponto!| |Pontuação:", -- Basketball, Knockball --- ["Slippery"] = "", -- A_Classic_Fairytale:journey +-- ["Slippery"] = "Escorregadio", -- A_Classic_Fairytale:journey -- ["Smith 0.97"] = "", -- A_Classic_Fairytale:enemy -- ["Smith 0.98"] = "", -- A_Classic_Fairytale:enemy -- ["Smith 0.99a"] = "", -- A_Classic_Fairytale:enemy @@ -667,23 +663,23 @@ -- ["Sniper!"] = "", -- Space_Invasion ["Sniper Training"] = "Treino com Sniper", ["Sniperz"] = "Sniperz", --- ["So humiliating..."] = "", -- A_Classic_Fairytale:first_blood --- ["South America"] = "", -- Continental_supplies --- ["So? What will it be?"] = "", -- A_Classic_Fairytale:shadow --- ["Spawn the crate, and attack!"] = "", -- WxW --- ["Special Weapons:"] = "", -- Continental_supplies --- ["Spiky Cheese"] = "", -- A_Classic_Fairytale:enemy, A_Classic_Fairytale:epil, A_Classic_Fairytale:family, A_Classic_Fairytale:queen, A_Classic_Fairytale:shadow + ["So humiliating..."] = "Tão humilhante...", -- A_Classic_Fairytale:first_blood + ["South America"] = "América do Sul", -- Continental_supplies + ["So? What will it be?"] = "Então? O que vai ser?", -- A_Classic_Fairytale:shadow +-- ["Spawn the crate, and attack!"] = "Faz aparecer a caixa, e ataca!", -- WxW +-- ["Special Weapons:"] = "Armas Especiais:", -- Continental_supplies +-- ["Spiky Cheese"] = "Queijo \"Picante\"", -- A_Classic_Fairytale:enemy, A_Classic_Fairytale:epil, A_Classic_Fairytale:family, A_Classic_Fairytale:queen, A_Classic_Fairytale:shadow -- ["Spleenlover"] = "", -- A_Classic_Fairytale:united --- ["Sponge"] = "", +-- ["Sponge"] = "Esponja", -- ["Spooky Tree"] = "", ["s"] = "s", -- GaudyRacer, Space_Invasion -- ["STATUS UPDATE"] = "", -- GaudyRacer, Space_Invasion --- ["Steel Eye"] = "", -- A_Classic_Fairytale:queen --- ["Step By Step"] = "", -- A_Classic_Fairytale:first_blood --- ["Steve"] = "", -- A_Classic_Fairytale:dragon, A_Classic_Fairytale:family, A_Classic_Fairytale:queen +-- ["Steel Eye"] = "Olho de Ferro", -- A_Classic_Fairytale:queen +-- ["Step By Step"] = "Passo a Passo", -- A_Classic_Fairytale:first_blood + ["Steve"] = "Steve", -- A_Classic_Fairytale:dragon, A_Classic_Fairytale:family, A_Classic_Fairytale:queen -- ["Sticky Mine"] = "", -- Continental_supplies -- ["Stronglings"] = "", -- A_Classic_Fairytale:shadow --- ["Structure"] = "", -- Continental_supplies + ["Structure"] = "Estrutura", -- Continental_supplies -- ["Super Weapons"] = "", -- WxW -- ["Surf Before Crate"] = "", -- WxW -- ["Surfer! +15 points!"] = "", -- Space_Invasion @@ -694,28 +690,28 @@ -- ["Syntax Errol"] = "", -- A_Classic_Fairytale:dragon -- ["Talk about mixed signals..."] = "", -- A_Classic_Fairytale:dragon ["Team %d: "] = "Equipa %d: ", --- ["Team Scores"] = "", -- Control, Space_Invasion --- ["Teleport hint: just use the mouse to select the destination!"] = "", -- A_Classic_Fairytale:dragon --- ["Thanks!"] = "", -- A_Classic_Fairytale:family --- ["Thank you, my hero!"] = "", -- A_Classic_Fairytale:family --- ["Thank you, oh, thank you, Leaks A Lot!"] = "", -- A_Classic_Fairytale:journey --- ["Thank you, oh, thank you, my heroes!"] = "", -- A_Classic_Fairytale:journey --- ["That is, indeed, very weird..."] = "", -- A_Classic_Fairytale:united +-- ["Team Scores"] = "Pontuações Equipa", -- Control, Space_Invasion +-- ["Teleport hint: just use the mouse to select the destination!"] = "Ajuda com o Teleporte: usa o rato para selecionar o teu destino!", -- A_Classic_Fairytale:dragon + ["Thanks!"] = "Obrigada!", -- A_Classic_Fairytale:family + ["Thank you, my hero!"] = "Obrigada, meu herói!", -- A_Classic_Fairytale:family + ["Thank you, oh, thank you, Leaks A Lot!"] = "Obrigada, oh, obrigada, Leaks A Lot!", -- A_Classic_Fairytale:journey + ["Thank you, oh, thank you, my heroes!"] = "Obrigada, oh, obrigada, meus heróis!", -- A_Classic_Fairytale:journey + ["That is, indeed, very weird..."] = "Isto é, de facto, muito estranho...", -- A_Classic_Fairytale:united -- ["That makes it almost invaluable!"] = "", -- A_Classic_Fairytale:enemy -- ["That ought to show them!"] = "", -- A_Classic_Fairytale:backstab -- ["That's for my father!"] = "", -- A_Classic_Fairytale:backstab --- ["That shaman sure knows what he's doing!"] = "", -- A_Classic_Fairytale:shadow +-- ["That shaman sure knows what he's doing!"] = "Aquele xamã sabe mesmo o que está a fazer!", -- A_Classic_Fairytale:shadow -- ["That Sinking Feeling"] = "", --- ["That's not our problem!"] = "", -- A_Classic_Fairytale:enemy --- ["That's typical of you!"] = "", -- A_Classic_Fairytale:family --- ["That was just mean!"] = "", -- A_Classic_Fairytale:backstab, A_Classic_Fairytale:united +-- ["That's not our problem!"] = "Não temos nada a ver com o teu problema.\Esse problema não tem nada a ver comnosco!", -- A_Classic_Fairytale:enemy + ["That's typical of you!"] = "Típico vindo de ti!", -- A_Classic_Fairytale:family +-- ["That was just mean!"] = "Isso foi desnecessariamente mau! -errr má tradução", -- A_Classic_Fairytale:backstab, A_Classic_Fairytale:united ["That was pointless."] = "Isso foi completamente desnecessario.", --- ["The answer is...entertaintment. You'll see what I mean."] = "", -- A_Classic_Fairytale:backstab +-- ["The answer is...entertaintment. You'll see what I mean."] = "A resposta é...entertenimento. Já vais perceber ao que me refiro\quero dizer.", -- A_Classic_Fairytale:backstab -- ["The anti-portal zone is all over the floor, and I have nothing to kill him...Droping something could hurt him enough to kill him..."] = "", -- portal -- ["The Bull's Eye"] = "", -- A_Classic_Fairytale:first_blood -- ["The caves are well hidden, they won't find us there!"] = "", -- A_Classic_Fairytale:united -- ["The Crate Frenzy"] = "", -- A_Classic_Fairytale:first_blood --- ["The Dilemma"] = "", -- A_Classic_Fairytale:shadow +-- ["The Dilemma"] = "O Dilema", -- A_Classic_Fairytale:shadow -- ["The enemy can't move but it might be a good idea to stay out of sight!|"] = "", -- A_Classic_Fairytale:dragon ["The enemy is hiding out on yonder ducky!"] = "O inimigo está escondido ali a diante ao pé do patinho!", -- ["The Enemy Of My Enemy"] = "", -- A_Classic_Fairytale:enemy @@ -723,10 +719,10 @@ -- ["The First Encounter"] = "", -- A_Classic_Fairytale:shadow ["The flag will respawn next round."] = "A bandeira ira reaparecer no próximo turno.", -- ["The food bites back"] = "", -- A_Classic_Fairytale:backstab --- ["The giant umbrella from the last crate should help break the fall."] = "", -- A_Classic_Fairytale:first_blood +-- ["The giant umbrella from the last crate should help break the fall."] = "O guarda-chuva gigante que estava na ultima caixa deve ajudar a amparar a tua queda.", -- A_Classic_Fairytale:first_blood -- ["The Great Escape"] = "", -- User_Mission_-_The_Great_Escape --- ["The guardian"] = "", -- A_Classic_Fairytale:shadow --- ["The Individualist"] = "", -- A_Classic_Fairytale:shadow +-- ["The guardian"] = "O guardião", -- A_Classic_Fairytale:shadow +-- ["The Individualist"] = "O Individualista", -- A_Classic_Fairytale:shadow -- ["Their buildings were very primitive back then, even for an uncivilised island."] = "", -- A_Classic_Fairytale:united -- ["The Journey Back"] = "", -- A_Classic_Fairytale:journey -- ["The Leap of Faith"] = "", -- A_Classic_Fairytale:first_blood @@ -742,7 +738,7 @@ -- ["There's nothing more satisfying to us than seeing you share your beauty with the world every morning, my princess!"] = "", -- A_Classic_Fairytale:journey -- ["The Rising"] = "", -- A_Classic_Fairytale:first_blood -- ["The Savior"] = "", -- A_Classic_Fairytale:journey --- ["These primitive people are so funny!"] = "", -- A_Classic_Fairytale:backstab +-- ["These primitive people are so funny!"] = "Esta gente primitiva é tão divertida!", -- A_Classic_Fairytale:backstab -- ["The Shadow Falls"] = "", -- A_Classic_Fairytale:shadow -- ["The Showdown"] = "", -- A_Classic_Fairytale:shadow -- ["The Slaughter"] = "", -- A_Classic_Fairytale:dragon, A_Classic_Fairytale:first_blood @@ -754,32 +750,32 @@ -- ["The Union"] = "", -- A_Classic_Fairytale:enemy -- ["The village, unprepared, was destroyed by the cyborgs..."] = "", -- A_Classic_Fairytale:journey -- ["The walk of Fame"] = "", -- A_Classic_Fairytale:shadow --- ["The wasted youth"] = "", -- A_Classic_Fairytale:first_blood +-- ["The wasted youth"] = "A juventude desperdiçada", -- A_Classic_Fairytale:first_blood -- ["The weapon in that last crate was bestowed upon us by the ancients!"] = "", -- A_Classic_Fairytale:first_blood --- ["The what?!"] = "", -- A_Classic_Fairytale:dragon --- ["The wind whispers that you are ready to become familiar with tools, now..."] = "", -- A_Classic_Fairytale:first_blood + ["The what?!"] = "Os quê?!", -- A_Classic_Fairytale:dragon +-- ["The wind whispers that you are ready to become familiar with tools, now..."] = "O vento sussura que tu estás pronto para te familiarizares com as ferramentas agora...", -- A_Classic_Fairytale:first_blood -- ["They are all waiting back in the village, haha."] = "", -- A_Classic_Fairytale:enemy -- ["They Call Me Bullseye!"] = "", -- Space_Invasion --- ["They have weapons we've never seen before!"] = "", -- A_Classic_Fairytale:united + ["They have weapons we've never seen before!"] = "Eles têm armas que nunca vimos antes!", -- A_Classic_Fairytale:united -- ["They keep appearing like this. It's weird!"] = "", -- A_Classic_Fairytale:united --- ["They killed "] = "", -- A_Classic_Fairytale:backstab, A_Classic_Fairytale:united + ["They killed "] = "Eles mataram ", -- A_Classic_Fairytale:backstab, A_Classic_Fairytale:united -- ["They must be trying to weaken us!"] = "", -- A_Classic_Fairytale:enemy --- ["They never learn"] = "", -- A_Classic_Fairytale:journey --- ["They told us to wear these clothes. They said that this is the newest trend."] = "", -- A_Classic_Fairytale:enemy + ["They never learn"] = "Eles nunca aprendem", -- A_Classic_Fairytale:journey + ["They told us to wear these clothes. They said that this is the newest trend."] = "Eles disseram-nos para usar estas roupas. Eles disseram que isto era a última moda.", -- A_Classic_Fairytale:enemy -- ["They've been manipulating us all this time!"] = "", -- A_Classic_Fairytale:enemy -- ["Thighlicker"] = "", -- A_Classic_Fairytale:united -- ["This is it! It's time to make Fell From Heaven fall for me..."] = "", -- A_Classic_Fairytale:first_blood --- ["This island is the only place left on Earth with grass on it!"] = "", -- A_Classic_Fairytale:enemy --- ["This is typical!"] = "", -- A_Classic_Fairytale:dragon --- ["This must be some kind of sorcery!"] = "", -- A_Classic_Fairytale:shadow --- ["This must be the caves!"] = "", -- A_Classic_Fairytale:backstab --- ["This one's tricky."] = "", --- ["This rain is really something..."] = "", --- ["This will be fun!"] = "", -- A_Classic_Fairytale:enemy --- ["Those aliens are destroying the island!"] = "", -- A_Classic_Fairytale:family +-- ["This island is the only place left on Earth with grass on it!"] = "Esta ilha é o último lugar que resta na Terra com erva nele!", -- A_Classic_Fairytale:enemy + ["This is typical!"] = "Típico", -- A_Classic_Fairytale:dragon +-- ["This must be some kind of sorcery!"] = "Isto deve ser algum tipo de feitiçaria!", -- A_Classic_Fairytale:shadow +-- ["This must be the caves!"] = "Isto devem ser as cavernas!", -- A_Classic_Fairytale:backstab +-- ["This one's tricky."] = "Este é complicado(?)", + ["This rain is really something..."] = "Esta chuva é mesmo qualquer coisa...", + ["This will be fun!"] = "Isto vai ser divertido!", -- A_Classic_Fairytale:enemy + ["Those aliens are destroying the island!"] = "Aqueles alienígenas estão a destruir a ilha!", -- A_Classic_Fairytale:family -- ["Timed Kamikaze!"] = "", --- ["Time Extended!"] = "", --- ["Time Extension"] = "", + ["Time Extended!"] = "Tempo Prolongado!", + ["Time Extension"] = "Extensão de tempo", ["TIME: "] = "TEMPO: ", -- ["Tip: The rope physics are different than in the real world, |use it to your advantage!"] = "", -- Basic_Training_-_Rope ["Toggle Shield"] = "Ligar\Desligar Escudo", @@ -791,11 +787,11 @@ -- ["Toxic Team"] = "", -- User_Mission_-_Diver, User_Mission_-_Spooky_Tree, User_Mission_-_Teamwork -- ["TRACK COMPLETED"] = "PISTA COMPLETA", -- ["TRACK FAILED!"] = "PISTA", --- ["training"] = "", -- portal --- ["Traitors"] = "", -- A_Classic_Fairytale:epil --- ["Tribe"] = "", -- A_Classic_Fairytale:backstab + ["training"] = "treino", -- portal + ["Traitores"] = "Traidores", -- A_Classic_Fairytale:epil + ["Tribe"] = "Tribo", -- A_Classic_Fairytale:backstab ["TrophyRace"] = "TrophyRace", --- ["Try to protect the chief! You won't lose if he dies, but it is advised that he survives."] = "", -- A_Classic_Fairytale:united + ["Try to protect the chief! You won't lose if he dies, but it is advised that he survives."] = "Tenta protejer o chefe! Não perdes se ele morrer, mas é recomendado que ele sobreviva.", -- A_Classic_Fairytale:united ["T_T"] = "T_T", -- ["Tumbling Time Extended!"] = "", -- ["Turns until Sudden Death: "] = "", -- A_Classic_Fairytale:dragon @@ -803,12 +799,12 @@ -- ["Turn Time"] = "", -- ["Two little hogs cooperating, getting past obstacles..."] = "", -- A_Classic_Fairytale:journey -- ["Uhm...I met one of them and took his weapons."] = "", -- A_Classic_Fairytale:shadow --- ["Uhmm...ok no."] = "", -- A_Classic_Fairytale:enemy --- ["ULTRA KILL"] = "", -- Mutant --- ["Under Construction"] = "", -- A_Classic_Fairytale:shadow +-- ["Uhmm...ok no."] = "Uhm...ok não.", -- A_Classic_Fairytale:enemy + ["ULTRA KILL"] = "ULTRA KILL", -- Mutant + ["Under Construction"] = "Em Construção", -- A_Classic_Fairytale:shadow -- ["Unexpected Igor"] = "", -- A_Classic_Fairytale:dragon --- ["Unit 0x0007"] = "", -- A_Classic_Fairytale:family --- ["Unit 334a$7%;.*"] = "", -- A_Classic_Fairytale:backstab, A_Classic_Fairytale:dragon, A_Classic_Fairytale:enemy, A_Classic_Fairytale:family, A_Classic_Fairytale:queen, A_Classic_Fairytale:united + ["Unit 0x0007"] = "Unidade 0x0007", -- A_Classic_Fairytale:family + ["Unit 334a$7%;.*"] = "Unidade 334a$7%;.*", -- A_Classic_Fairytale:backstab, A_Classic_Fairytale:dragon, A_Classic_Fairytale:enemy, A_Classic_Fairytale:family, A_Classic_Fairytale:queen, A_Classic_Fairytale:united ["Unit 3378"] = "Unidade 3378", ["Unit 835"] = "Unidade 835", -- ["United We Stand"] = "", -- A_Classic_Fairytale:united @@ -817,169 +813,168 @@ -- ["Unlucky Sods"] = "", -- User_Mission_-_Rope_Knock_Challenge ["Unstoppable!"] = "Imparável!", -- ["Unsuspecting Louts"] = "", -- User_Mission_-_Rope_Knock_Challenge --- ["[Up], [Down] to aim, [Space] to shoot!"] = "", -- A_Classic_Fairytale:first_blood --- ["Use it wisely!"] = "", -- A_Classic_Fairytale:dragon --- ["Use it with precaution!"] = "", -- A_Classic_Fairytale:first_blood + ["[Up], [Down] to aim, [Space] to shoot!"] = "[Cima], [Baixo] para apontar, [Espaço] para disparar!", -- A_Classic_Fairytale:first_blood +-- ["Use it wisely!"] = "Usa com moderação\sábiamente", -- A_Classic_Fairytale:dragon +-- ["Use it with precaution!"] = "Usa com cuidado!", -- A_Classic_Fairytale:first_blood -- ["User Challenge"] = "", - -- ["Use the portal gun to get to the next crate, then use the new gun to get to the final destination!|"] = "", -- A_Classic_Fairytale:dragon --- ["Use the rope to get on the head of the mole, young one!"] = "", -- A_Classic_Fairytale:first_blood --- ["Use the rope to knock your enemies to their doom."] = "", -- User_Mission_-_Rope_Knock_Challenge +-- ["Use the rope to get on the head of the mole, young one!"] = "Usa a corda para chegar à cabeça da toupeira, jovem!", -- A_Classic_Fairytale:first_blood + ["Use the rope to knock your enemies to their doom."] = "Usa a corda para empurrar os teus inimigos para o seu fim.", -- User_Mission_-_Rope_Knock_Challenge ["Use your rope to get from start to finish as fast as you can!"] = "Utilizando a corda, percorre o percurso do inicio ao fim o mais rápido que conseguires!", --- ["Vedgies"] = "", -- A_Classic_Fairytale:journey --- ["Vegan Jack"] = "", -- A_Classic_Fairytale:enemy --- ["Victory!"] = "", -- Basic_Training_-_Rope + ["Vedgies"] = "Vegetais", -- A_Classic_Fairytale:journey + ["Vegan Jack"] = "Jack Vegetariano", -- A_Classic_Fairytale:enemy + ["Victory!"] = "Vitória!", -- Basic_Training_-_Rope ["Victory for the "] = "Vitória para a", -- CTF_Blizzard, Capture_the_Flag --- ["Violence is not the answer to your problems!"] = "", -- A_Classic_Fairytale:first_blood --- ["Walls Left"] = "", -- WxW --- ["Walls Required"] = "", -- WxW --- ["WALL TO WALL"] = "", -- WxW + ["Violence is not the answer to your problems!"] = "Violência não é a resposta para os teus problemas!", -- A_Classic_Fairytale:first_blood +-- ["Walls Left"] = "Faltam $1 paredes", -- WxW + ["Walls Required"] = "Paredes Necessárias", -- WxW + ["WALL TO WALL"] = "WALL TO WALL", -- WxW -- ["Wannabe Flyboys"] = "", -- User_Mission_-_RCPlane_Challenge -- ["Wannabe Shoppsta"] = "", -- User_Mission_-_Rope_Knock_Challenge --- ["Watch your steps, young one!"] = "", -- A_Classic_Fairytale:first_blood --- ["Waypoint placed."] = "", +-- ["Watch your steps, young one!"] = "Cuidado onde pões os pés, jovem!", -- A_Classic_Fairytale:first_blood +-- ["Waypoint placed."] = "Waypoint colocado.", -- ["Way-Points Remaining"] = "", --- ["Weaklings"] = "", -- A_Classic_Fairytale:shadow --- ["We all know what happens when you get frightened..."] = "", -- A_Classic_Fairytale:first_blood +-- ["Weaklings"] = "Fracotes", -- A_Classic_Fairytale:shadow +-- ["We all know what happens when you get frightened..."] = "Todos sabemos o que acontece quando te sentes assustado...", -- A_Classic_Fairytale:first_blood -- ["Weapons Reset"] = "", -- ["Weapons reset."] = "", -- Highlander --- ["We are indeed."] = "", -- A_Classic_Fairytale:backstab --- ["We can't defeat them!"] = "", -- A_Classic_Fairytale:shadow --- ["We can't hold them up much longer!"] = "", -- A_Classic_Fairytale:united --- ["We can't let them take over our little island!"] = "", -- A_Classic_Fairytale:enemy --- ["We have no time to waste..."] = "", -- A_Classic_Fairytale:journey --- ["We have nowhere else to live!"] = "", -- A_Classic_Fairytale:enemy --- ["We have to protect the village!"] = "", -- A_Classic_Fairytale:united --- ["We have to unite and defeat those cylergs!"] = "", -- A_Classic_Fairytale:enemy --- ["Welcome, Leaks A Lot!"] = "", -- A_Classic_Fairytale:journey + ["We are indeed."] = "Somos mesmo.", -- A_Classic_Fairytale:backstab +-- ["We can't defeat them!"] = "Não podemos\conseguimos derrotalos!", -- A_Classic_Fairytale:shadow +-- ["We can't hold them up much longer!"] = "Não conseguimos aguentalos por muito mais.", -- A_Classic_Fairytale:united +-- ["We can't let them take over our little island!"] = "Não os podemos deixar apoderarem-se\que se apoderem da nossa pequena ilha!", -- A_Classic_Fairytale:enemy + ["We have no time to waste..."] = "Não temos tempo a perder...", -- A_Classic_Fairytale:journey +-- ["We have nowhere else to live!"] = "Não temos mais onde viver!", -- A_Classic_Fairytale:enemy + ["We have to protect the village!"] = "Temos de protejer a aldeia!", -- A_Classic_Fairytale:united +-- ["We have to unite and defeat those cylergs!"] = "Temos de nos unir e derrotar estes ciber-pernudos!", -- A_Classic_Fairytale:enemy + ["Welcome, Leaks A Lot!"] = "Bem vindo, Leaks a Lot!", -- A_Classic_Fairytale:journey ["Well done."] = "Bom trabalho.", -- ["We'll give you a problem then!"] = "", -- A_Classic_Fairytale:enemy --- ["We'll spare your life for now!"] = "", -- A_Classic_Fairytale:backstab --- ["Well, that was a waste of time."] = "", -- A_Classic_Fairytale:dragon +-- ["We'll spare your life for now!"] = "Vamos poupar a tua vida para ja!", -- A_Classic_Fairytale:backstab +-- ["Well, that was a waste of time."] = "Bem, isto foi um desperdicio de tempo.", -- A_Classic_Fairytale:dragon -- ["Well, well! Isn't that the cutest thing you've ever seen?"] = "", -- A_Classic_Fairytale:journey --- ["Well, yes. This was a cyborg television show."] = "", -- A_Classic_Fairytale:enemy --- ["We made sure noone followed us!"] = "", -- A_Classic_Fairytale:backstab --- ["We need to move!"] = "", -- A_Classic_Fairytale:united --- ["We need to prevent their arrival!"] = "", -- A_Classic_Fairytale:backstab --- ["We need to warn the village."] = "", -- A_Classic_Fairytale:shadow +-- ["Well, yes. This was a cyborg television show."] = "Bem, claro. Isto era um programa de televisão para cyborgs.", -- A_Classic_Fairytale:enemy +-- ["We made sure noone followed us!"] = "Certificamo-nos que ninguem nos seguiu!", -- A_Classic_Fairytale:backstab +-- ["We need to move!"] = "Temos de nos mover!", -- A_Classic_Fairytale:united +-- ["We need to prevent their arrival!"] = "Temos de prevenir que cheguem!", -- A_Classic_Fairytale:backstab + ["We need to warn the village."] = "Temos de avisar a aldeia.", -- A_Classic_Fairytale:shadow -- ["We should head back to the village now."] = "", -- A_Classic_Fairytale:shadow --- ["We were trying to save her and we got lost."] = "", -- A_Classic_Fairytale:family --- ["We won't let you hurt her!"] = "", -- A_Classic_Fairytale:journey --- ["What?! A cannibal? Here? There is no time to waste! Come, you are prepared."] = "", -- A_Classic_Fairytale:first_blood --- ["What a douche!"] = "", -- A_Classic_Fairytale:enemy +-- ["We were trying to save her and we got lost."] = "Estavamos a tentar salva-la e acabamos por nos perder.", -- A_Classic_Fairytale:family +-- ["We won't let you hurt her!"] = "Não vamos deixar que a magoes!", -- A_Classic_Fairytale:journey +-- ["What?! A cannibal? Here? There is no time to waste! Come, you are prepared."] = "O quê? Um canibal? Aqui? Não ha tempo a perder! Vem, estás preparado.", -- A_Classic_Fairytale:first_blood + ["What a douche!"] = "Que otário!", -- A_Classic_Fairytale:enemy -- ["What am I gonna...eat, yo?"] = "", -- A_Classic_Fairytale:family --- ["What are you doing at a distance so great, young one?"] = "", -- A_Classic_Fairytale:first_blood --- ["What are you doing? Let her go!"] = "", -- A_Classic_Fairytale:journey --- ["What a ride!"] = "", -- A_Classic_Fairytale:shadow --- ["What a strange cave!"] = "", -- A_Classic_Fairytale:dragon +-- ["What are you doing at a distance so great, young one?"] = "O que estás a tão grande distancia, jovem?", -- A_Classic_Fairytale:first_blood +-- ["What are you doing? Let her go!"] = "Que estás a fazer? Larga-a!", -- A_Classic_Fairytale:journey + ["What a ride!"] = "Que viagem!", -- A_Classic_Fairytale:shadow + ["What a strange cave!"] = "Que caverna estranha!", -- A_Classic_Fairytale:dragon -- ["What a strange feeling!"] = "", -- A_Classic_Fairytale:backstab --- ["What do my faulty eyes observe? A spy!"] = "", -- A_Classic_Fairytale:first_blood --- ["Whatever floats your boat..."] = "", -- A_Classic_Fairytale:shadow --- [" What !! For all of this struggle i just win some ... TIME o0"] = "", -- portal --- ["What has "] = "", -- A_Classic_Fairytale:backstab --- ["What? Here? How did they find us?!"] = "", -- A_Classic_Fairytale:backstab --- ["What is this place?"] = "", -- A_Classic_Fairytale:dragon, A_Classic_Fairytale:enemy --- ["What shall we do with the traitor?"] = "", -- A_Classic_Fairytale:backstab --- ["WHAT?! You're the ones attacking us!"] = "", -- A_Classic_Fairytale:enemy --- ["When?"] = "", -- A_Classic_Fairytale:enemy --- ["When I find it..."] = "", -- A_Classic_Fairytale:dragon --- ["Where are all these crates coming from?!"] = "", -- A_Classic_Fairytale:shadow --- ["Where are they?!"] = "", -- A_Classic_Fairytale:backstab --- ["Where did that alien run?"] = "", -- A_Classic_Fairytale:dragon --- ["Where did you get the exploding apples?"] = "", -- A_Classic_Fairytale:shadow --- ["Where did you get the exploding apples and the magic bow that shoots many arrows?"] = "", -- A_Classic_Fairytale:shadow --- ["Where did you get the magic bow that shoots many arrows?"] = "", -- A_Classic_Fairytale:shadow --- ["Where did you get the weapons in the forest, Dense Cloud?"] = "", -- A_Classic_Fairytale:backstab --- ["Where do you get that?!"] = "", -- A_Classic_Fairytale:enemy --- ["Where have you been?!"] = "", -- A_Classic_Fairytale:backstab --- ["Where have you been?"] = "", -- A_Classic_Fairytale:united --- ["? Why?"] = "", -- A_Classic_Fairytale:backstab --- ["Why "] = "", -- A_Classic_Fairytale:backstab --- ["! Why?!"] = "", -- A_Classic_Fairytale:backstab, A_Classic_Fairytale:united --- ["Why are you doing this?"] = "", -- A_Classic_Fairytale:journey --- ["Why are you helping us, uhm...?"] = "", -- A_Classic_Fairytale:family --- ["Why can't he just let her go?!"] = "", -- A_Classic_Fairytale:family --- ["Why do men keep hurting me?"] = "", -- A_Classic_Fairytale:first_blood --- ["Why do you not like me?"] = "", -- A_Classic_Fairytale:shadow --- ["Why do you want to take over our island?"] = "", -- A_Classic_Fairytale:enemy --- ["Why me?!"] = "", -- A_Classic_Fairytale:backstab --- ["Why would they do this?"] = "", -- A_Classic_Fairytale:backstab + ["What do my faulty eyes observe? A spy!"] = "O que vêm observam os meus defeituoso olhos? Um espião!", -- A_Classic_Fairytale:first_blood +-- ["Whatever floats your boat..."] = "O que quer que seja que faz o teu barco flutuar... (preciso melhor expressão verdadeiramente portuguesa)", -- A_Classic_Fairytale:shadow + [" What !! For all of this struggle i just win some ... TIME o0"] = " O quê !! Por todo este esforço tudo o que ganho é ... TEMPO o0", -- portal +-- ["What has "] = "Foi aquilo ", -- A_Classic_Fairytale:backstab + ["What? Here? How did they find us?!"] = "O quê? Aqui? Como raio nos encontraram?!", -- A_Classic_Fairytale:backstab +-- ["What is this place?"] = "O que é este sitio?\Que (raio de) sitio é este?", -- A_Classic_Fairytale:dragon, A_Classic_Fairytale:enemy +-- ["What shall we do with the traitor?"] = "O que fazemos com o traidor?", -- A_Classic_Fairytale:backstab +-- ["WHAT?! You're the ones attacking us!"] = "O QUÊ?! Voces é que nos atacaram\estão a atacar!", -- A_Classic_Fairytale:enemy + ["When?"] = "Quando?", -- A_Classic_Fairytale:enemy + ["When I find it..."] = "Quando o encontrar...", -- A_Classic_Fairytale:dragon + ["Where are all these crates coming from?!"] = "De onde vêm todas estas caixas?!", -- A_Classic_Fairytale:shadow + ["Where are they?!"] = "Onde estão eles?!", -- A_Classic_Fairytale:backstab + ["Where did that alien run?"] = "Para onde fugiu aquele alienígena?", -- A_Classic_Fairytale:dragon + ["Where did you get the exploding apples?"] = "Onde arranjaste as maçãs explosivas?", -- A_Classic_Fairytale:shadow + ["Where did you get the exploding apples and the magic bow that shoots many arrows?"] = "Onde arranjaste as maçãs explosivas e o arco mágico que dispara muitas flechas?", -- A_Classic_Fairytale:shadow + ["Where did you get the magic bow that shoots many arrows?"] = "Onde arranjaste o arco mágico que dispara muitas flechas?", -- A_Classic_Fairytale:shadow +-- ["Where did you get the weapons in the forest, Dense Cloud?"] = "Onde arranjaste as armas na floresta, Nuvem Densa?", -- A_Classic_Fairytale:backstab + ["Where do you get that?!"] = "Onde arranjaste isso?!", -- A_Classic_Fairytale:enemy + ["Where have you been?!"] = "Onde estiveste?!", -- A_Classic_Fairytale:backstab + ["Where have you been?"] = "Onde estiveste?", -- A_Classic_Fairytale:united + ["? Why?"] = "? Por quê?", -- A_Classic_Fairytale:backstab + ["Why "] = "Por quê ", -- A_Classic_Fairytale:backstab + ["! Why?!"] = "! Por quê?!", -- A_Classic_Fairytale:backstab, A_Classic_Fairytale:united + ["Why are you doing this?"] = "Porque estás a fazer isto?", -- A_Classic_Fairytale:journey + ["Why are you helping us, uhm...?"] = "Porque nos estás a ajudar, uhm...?", -- A_Classic_Fairytale:family + ["Why can't he just let her go?!"] = "Porque não podemos simplesmente deixá-la ir?!", -- A_Classic_Fairytale:family + ["Why do men keep hurting me?"] = "Porque é que os homens continuam a magoar-me?", -- A_Classic_Fairytale:first_blood + ["Why do you not like me?"] = "Porque não gostas de mim?", -- A_Classic_Fairytale:shadow + ["Why do you want to take over our island?"] = "Porque querem apoderar-se da nossa ilha?", -- A_Classic_Fairytale:enemy + ["Why me?!"] = "Por quê eu?!", -- A_Classic_Fairytale:backstab + ["Why would they do this?"] = "Porque fariam eles isto?", -- A_Classic_Fairytale:backstab -- ["- Will Get 1-3 random weapons"] = "", -- Continental_supplies -- ["- Will refresh Parachute each turn."] = "", -- Continental_supplies -- ["- Will refresh portalgun each turn."] = "", -- Continental_supplies --- ["Will this ever end?"] = "", --- ["WINNER IS "] = "", -- Mutant +-- ["Will this ever end?"] = "Será que isto alguma vez vai acabar?", + ["WINNER IS "] = "O VENCEDOR É ", -- Mutant ["WINNING TIME: "] = "TEMPO VENCEDOR: ", --- ["Wise Oak"] = "", -- A_Classic_Fairytale:backstab, A_Classic_Fairytale:dragon, A_Classic_Fairytale:enemy, A_Classic_Fairytale:epil, A_Classic_Fairytale:family, A_Classic_Fairytale:queen +-- ["Wise Oak"] = "Carvalho Sábio", -- A_Classic_Fairytale:backstab, A_Classic_Fairytale:dragon, A_Classic_Fairytale:enemy, A_Classic_Fairytale:epil, A_Classic_Fairytale:family, A_Classic_Fairytale:queen -- ["With Dense Cloud on the land of shadows, I'm the village's only hope..."] = "", -- A_Classic_Fairytale:journey -- ["With the rest of the tribe gone, it was up to "] = "", -- A_Classic_Fairytale:dragon --- ["Worry not, for it is a peaceful animal! There is no reason to be afraid..."] = "", -- A_Classic_Fairytale:first_blood --- ["Wow, what a dream!"] = "", -- A_Classic_Fairytale:backstab --- ["Y3K1337"] = "", -- A_Classic_Fairytale:journey, A_Classic_Fairytale:shadow --- ["Yay, we won!"] = "", -- A_Classic_Fairytale:enemy + ["Worry not, for it is a peaceful animal! There is no reason to be afraid..."] = "Não te preocupes, pois este animal é perfeitamente pacífico! Não há qualquer fazão para receio...", -- A_Classic_Fairytale:first_blood + ["Wow, what a dream!"] = "Wow, mas que sonho!", -- A_Classic_Fairytale:backstab + ["Y3K1337"] = "Y3K1337", -- A_Classic_Fairytale:journey, A_Classic_Fairytale:shadow +-- ["Yay, we won!"] = "Boa, ganhamos!", -- A_Classic_Fairytale:enemy -- ["Y Chwiliad"] = "", -- A_Classic_Fairytale:dragon --- ["Yeah...I think it's a 'he', lol."] = "", -- A_Classic_Fairytale:shadow --- ["Yeah, sure! I died. Hillarious!"] = "", -- A_Classic_Fairytale:backstab --- ["Yeah, take that!"] = "", -- A_Classic_Fairytale:dragon --- ["Yeah? Watcha gonna do? Cry?"] = "", -- A_Classic_Fairytale:journey --- ["Yes!"] = "", -- A_Classic_Fairytale:enemy --- ["Yes, yeees! You are now ready to enter the real world!"] = "", -- A_Classic_Fairytale:first_blood --- ["Yo, dude, we're here, too!"] = "", -- A_Classic_Fairytale:family --- ["You are given the chance to turn your life around..."] = "", -- A_Classic_Fairytale:shadow --- ["You are playing with our lives here!"] = "", -- A_Classic_Fairytale:enemy --- ["! You bastards!"] = "", -- A_Classic_Fairytale:backstab, A_Classic_Fairytale:united --- ["You bear impressive skills, "] = "", -- A_Classic_Fairytale:dragon --- ["You can't fire a portal on the blue surface"] = "", -- portal +-- ["Yeah...I think it's a 'he', lol."] = "Sim...penso que é um \"ele\", lol.", -- A_Classic_Fairytale:shadow + ["Yeah, sure! I died. Hillarious!"] = "Sim, claro! Morri. Que piada!", -- A_Classic_Fairytale:backstab +-- ["Yeah, take that!"] = "Sim, toma isto!", -- A_Classic_Fairytale:dragon + ["Yeah? Watcha gonna do? Cry?"] = "Ai sim? E o que vais fazer? Chorar?", -- A_Classic_Fairytale:journey + ["Yes!"] = "Sim!", -- A_Classic_Fairytale:enemy +-- ["Yes, yeees! You are now ready to enter the real world!"] = "Sim, SIM! Estás agora pronto para entrar no mundo real!", -- A_Classic_Fairytale:first_blood +-- ["Yo, dude, we're here, too!"] = "Yo, bacano, também estamos aqui!\chagámos, também!", -- A_Classic_Fairytale:family + ["You are given the chance to turn your life around..."] = "Foi-te oferecida uma oportunidade para mudar a tua vida...", -- A_Classic_Fairytale:shadow +-- ["You are playing with our lives here!"] = "Estas a bincar com as nossas vidas com isto!", -- A_Classic_Fairytale:enemy +-- ["! You bastards!"] = "! Seus bastardos!", -- A_Classic_Fairytale:backstab, A_Classic_Fairytale:united +-- ["You bear impressive skills, "] = "As tuas habilidades são impressionantes, ", -- A_Classic_Fairytale:dragon +-- ["You can't fire a portal on the blue surface"] = "Não podes disparar um portal na superficie azul", -- portal -- ["You couldn't possibly believe that after refusing my offer I'd just let you go!"] = "", -- A_Classic_Fairytale:journey ["You'd almost swear the water was rising!"] = "Quase eras capaz jurar que a água estava a subir!", --- ["You'd better watch your steps..."] = "", -- A_Classic_Fairytale:journey --- ["You did not make it in time, try again!"] = "", -- Basic_Training_-_Rope +-- ["You'd better watch your steps..."] = "É melhor teres cuidado onde pôes os pés...", -- A_Classic_Fairytale:journey +-- ["You did not make it in time, try again!"] = "Não chegaste a tempo, tenta novamente!", -- Basic_Training_-_Rope -- ["You have 7 turns until the next wave arrives.|Make sure the arriving cannibals are greeted appropriately!|If the hog dies, the cause is lost.|Hint: you might want to use some mines..."] = "", -- A_Classic_Fairytale:backstab --- ["You have "] = "", -- A_Classic_Fairytale:dragon +-- ["You have "] = "Tens ", -- A_Classic_Fairytale:dragon -- ["You have been giving us out to the enemy, haven't you!"] = "", -- A_Classic_Fairytale:backstab -- ["You have been respawned, at your last checkpoint!"] = "", -- Basic_Training_-_Rope -- ["You have been respawned, be more carefull next time!"] = "", -- Basic_Training_-_Rope --- ["You have chosen the perfect moment to leave."] = "", -- A_Classic_Fairytale:united --- ["You have failed to complete your task, young one!"] = "", -- A_Classic_Fairytale:journey --- ["You have failed to save the tribe!"] = "", -- A_Classic_Fairytale:backstab --- ["You have finally figured it out!"] = "", -- A_Classic_Fairytale:enemy --- ["You have kidnapped our whole tribe!"] = "", -- A_Classic_Fairytale:enemy +-- ["You have chosen the perfect moment to leave."] = "Escolheste o momento perfeito para ir embora\sair.", -- A_Classic_Fairytale:united +-- ["You have failed to complete your task, young one!"] = "Não foste capaz de completar a tua tarefa, jovem!", -- A_Classic_Fairytale:journey +-- ["You have failed to save the tribe!"] = "Não foste capaz de salvar a tribo!", -- A_Classic_Fairytale:backstab +-- ["You have finally figured it out!"] = "Finalmente percebeste!", -- A_Classic_Fairytale:enemy +-- ["You have kidnapped our whole tribe!"] = "Tu raptaste toda a nossa tribo!", -- A_Classic_Fairytale:enemy -- ["You have killed an innocent hedgehog!"] = "", -- A_Classic_Fairytale:backstab -- ["You have proven yourself worthy to see our most ancient secret!"] = "", -- A_Classic_Fairytale:first_blood -- ["You have proven yourselves worthy!"] = "", -- A_Classic_Fairytale:enemy ["You have SCORED!!"] = "Marcaste!!", --- ["You have to destroy 12 targets in 180 seconds"] = "", -- Basic_Training_-_Cluster_Bomb --- ["You have won the game by proving true cooperative skills!"] = "", -- A_Classic_Fairytale:enemy --- ["You just appeared out of thin air!"] = "", -- A_Classic_Fairytale:backstab --- ["You just committed suicide..."] = "", -- A_Classic_Fairytale:shadow --- ["You killed my father, you monster!"] = "", -- A_Classic_Fairytale:backstab --- ["You know...taking a stroll."] = "", -- A_Classic_Fairytale:backstab --- ["You know what? I don't even regret anything!"] = "", -- A_Classic_Fairytale:backstab --- ["You'll see what I mean!"] = "", -- A_Classic_Fairytale:enemy --- ["You may only attack from a rope!"] = "", -- WxW --- ["You meatbags are pretty slow, you know!"] = "", -- A_Classic_Fairytale:enemy + ["You have to destroy 12 targets in 180 seconds"] = "Tens de destruir 12 alvos em 180 segundos", -- Basic_Training_-_Cluster_Bomb +-- ["You have won the game by proving true cooperative skills!"] = "Ganhaste o jogo demonstrando a tua excelente habilidade em cooperar!", -- A_Classic_Fairytale:enemy + ["You just appeared out of thin air!"] = "Simplesmente apareceste do nada!", -- A_Classic_Fairytale:backstab + ["You just committed suicide..."] = "Acabaste de cometer suicídio...", -- A_Classic_Fairytale:shadow + ["You killed my father, you monster!"] = "Tu mataste o meu pai, seu monstro!", -- A_Classic_Fairytale:backstab +-- ["You know...taking a stroll."] = "Tu sabes...a passear.", -- A_Classic_Fairytale:backstab +-- ["You know what? I don't even regret anything!"] = "Sabes que mais? Nem me arrependo de nada disto!", -- A_Classic_Fairytale:backstab +-- ["You'll see what I mean!"] = "Já vais perceber o que quero dizer!", -- A_Classic_Fairytale:enemy + ["You may only attack from a rope!"] = "Só podes atacar da corda!", -- WxW + ["You meatbags are pretty slow, you know!"] = "Voçês sacos de carne são muito lentos, sabiam?", -- A_Classic_Fairytale:enemy -- ["You might want to find a way to instantly kill arriving cannibals!"] = "", -- A_Classic_Fairytale:backstab -- ["Young one, you are telling us that they can instantly change location without a shaman?"] = "", -- A_Classic_Fairytale:united -- ["You probably know what to do next..."] = "", -- A_Classic_Fairytale:first_blood --- ["Your deaths will be avenged, cannibals!"] = "", -- A_Classic_Fairytale:enemy --- ["Your death will not be in vain, Dense Cloud!"] = "", -- A_Classic_Fairytale:shadow --- ["You're...alive!? But we saw you die!"] = "", -- A_Classic_Fairytale:backstab +-- ["Your deaths will be avenged, cannibals!"] = "As vossas mortes serão vingadas canibais!", -- A_Classic_Fairytale:enemy + ["Your death will not be in vain, Dense Cloud!"] = "A tua morte não será em vão, Nuvem Densa!", -- A_Classic_Fairytale:shadow + ["You're...alive!? But we saw you die!"] = "Estás...vivo!? Mas nós vimos-te morrer!", -- A_Classic_Fairytale:backstab -- ["You're a pathetic liar!"] = "", -- A_Classic_Fairytale:backstab --- ["You're funny!"] = "", -- A_Classic_Fairytale:journey --- ["You're getting pretty good! |Tip: When you shorten you rope you move faster! |and when you lengthen it you move slower"] = "", -- Basic_Training_-_Rope --- ["You're pathetic! You are not worthy of my attention..."] = "", -- A_Classic_Fairytale:shadow --- ["You're probably wondering why I bought you back..."] = "", -- A_Classic_Fairytale:backstab --- ["You're terrorizing the forest...We won't catch anything like this!"] = "", -- A_Classic_Fairytale:shadow --- ["Your hogs must survive!"] = "", -- A_Classic_Fairytale:journey --- ["Your movement skills will be evaluated now."] = "", -- A_Classic_Fairytale:first_blood --- ["You saved"] = "", --- ["You've been assaulting us, we have been just defending ourselves!"] = "", -- A_Classic_Fairytale:enemy +-- ["You're funny!"] = "És engraçado!", -- A_Classic_Fairytale:journey +-- ["You're getting pretty good! |Tip: When you shorten you rope you move faster! |and when you lengthen it you move slower"] = "Estás a ficar muito bom!", -- Basic_Training_-_Rope +-- ["You're pathetic! You are not worthy of my attention..."] = "És patetico! Não és digno da minha atenção...", -- A_Classic_Fairytale:shadow +-- ["You're probably wondering why I bought you back..."] = "Deves-te estar(?) a perguntar-te porque te trouxe de volta...", -- A_Classic_Fairytale:backstab + ["You're terrorizing the forest...We won't catch anything like this!"] = "Estás a aterrorizar a floresta...Não vamos conseguir apanhar nada assim!", -- A_Classic_Fairytale:shadow + ["Your hogs must survive!"] = "Os teus ouriços têm de sobreviver!", -- A_Classic_Fairytale:journey +-- ["Your movement skills will be evaluated now."] = "A tua habilidade para te movimentares serão agora avaliadas.", -- A_Classic_Fairytale:first_blood +-- ["You saved"] = "Salvaste", +-- ["You've been assaulting us, we have been just defending ourselves!"] = "Voces têm-nos atacado, apenas nos estamos a defender!", -- A_Classic_Fairytale:enemy ["You've failed. Try again."] = "Falhaste. Tenta novamente.", ["You've reached the goal!| |Time: "] = "Chegaste ao fim!| |Tempo: ", --- ["You will be avenged!"] = "", -- A_Classic_Fairytale:shadow --- ["You won't believe what happened to me!"] = "", -- A_Classic_Fairytale:backstab --- ["Yuck! I bet they'll keep worshipping her even after I save the village!"] = "", -- A_Classic_Fairytale:family + ["You will be avenged!"] = "Serás vingado!", -- A_Classic_Fairytale:shadow + ["You won't believe what happened to me!"] = "Não vais acreditar no que se passou comigo!", -- A_Classic_Fairytale:backstab +-- ["Yuck! I bet they'll keep worshipping her even after I save the village!"] = "Yuck! Aposto que eles vão continuar a venerala mesmo depois de eu ter salvo a aldeia deles~~~~~~", -- A_Classic_Fairytale:family -- ["Zealandia"] = "", -- Continental_supplies ["'Zooka Team"] = "Bazuqueiros", --- ["Zork"] = "", -- A_Classic_Fairytale:dragon, A_Classic_Fairytale:family, A_Classic_Fairytale:queen + ["Zork"] = "Zork", -- A_Classic_Fairytale:dragon, A_Classic_Fairytale:family, A_Classic_Fairytale:queen } diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Locale/pt_PT.txt --- a/share/hedgewars/Data/Locale/pt_PT.txt Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Locale/pt_PT.txt Fri Feb 22 05:05:32 2013 +0100 @@ -54,10 +54,10 @@ 00:51=Bola de Lama 00:52=Nenhuma arma selecionada 00:53=Caixote do Tempo -00:54=Estrutura -00:55=Terreno-instantâneo -00:56=Congelador -00:57=Cutelo +; 00:54=Estrutura +00:54=Terreno-instantâneo +00:55=Congelador +00:56=Cutelo 01:00=Vamos lutar! 01:01=Ronda empatada diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Locale/ro.txt --- a/share/hedgewars/Data/Locale/ro.txt Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Locale/ro.txt Fri Feb 22 05:05:32 2013 +0100 @@ -20,7 +20,7 @@ 00:17=Lovitura de torță 00:18=Constructie 00:19=Teleportare -00:20=Schimbă ariciuș +00:20=Schimbă ariciuș 00:21=Mortar 00:22=Bici 00:23=Kamikaze @@ -28,7 +28,7 @@ 00:25=Seducere 00:26=Pepene bombă 00:27=Grenadă de mână infernală -00:28=Racheta burghiu +00:28=Racheta burghiu 00:29=Pistol cu bile 00:30=Napalm 00:31=Avion RC @@ -54,8 +54,8 @@ 00:51=Bila de noroi 00:52=Nici o armă selectată 00:53=Cutia timpului -00:54=Structură -00:55=Spray de teren +; 00:54=Structură +00:54=Spray de teren 01:00=Hai să ne batem! 01:01=Remizăr @@ -505,7 +505,7 @@ 04:51=Get in a free shot by hurling a ball of mud.|Stings a bit, and knocks hogs back. 04:52=UNUSED 04:53=Go on an adventure through time and space,|while leaving your comrades to fight on alone.|Be prepared to return at any time,|or for Sudden Death or if they are all defeated.|Disclaimer. Does not function in Sudden Death,|if you are alone, or if you are a King. -04:54=INCOMPLETE +04:54=INCOMPLETE 04:55=Spray a stream of sticky flakes.|Build bridges, bury enemies, seal off tunnels.|Be careful you don't get any on you! ; Game goal strings diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Locale/ru.lua --- a/share/hedgewars/Data/Locale/ru.lua Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Locale/ru.lua Fri Feb 22 05:05:32 2013 +0100 @@ -332,7 +332,7 @@ ["Hmmm..."] = "Хммм...", -- ["Hogminator"] = "", -- A_Classic_Fairytale:family -- ["Hogs in sight!"] = "", -- Continental_supplies --- ["HOLY SHIT!"] = "", -- Mutant +-- ["HOLY SHYTE!"] = "", -- Mutant -- ["Honest Lee"] = "", -- A_Classic_Fairytale:enemy ["Hooray!"] = "Ура!", -- ["Hostage Situation"] = "", -- A_Classic_Fairytale:family diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Locale/ru.txt --- a/share/hedgewars/Data/Locale/ru.txt Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Locale/ru.txt Fri Feb 22 05:05:32 2013 +0100 @@ -54,10 +54,10 @@ 00:51=Комок грязи 00:52=Оружие не выбрано 00:53=Будка времени -00:54=Структура -00:55=Распылитель земли -00:56=Замораживатель -00:57=Секач +; 00:54=Структура +00:54=Распылитель земли +00:55=Замораживатель +00:56=Секач 01:00=Вперёд к победе! 01:01=Ничья diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Locale/sk.lua --- a/share/hedgewars/Data/Locale/sk.lua Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Locale/sk.lua Fri Feb 22 05:05:32 2013 +0100 @@ -332,7 +332,7 @@ -- ["Hmmm...perhaps a little more time will help."] = "", -- A_Classic_Fairytale:first_blood -- ["Hogminator"] = "", -- A_Classic_Fairytale:family -- ["Hogs in sight!"] = "", -- Continental_supplies --- ["HOLY SHIT!"] = "", -- Mutant +-- ["HOLY SHYTE!"] = "", -- Mutant -- ["Honest Lee"] = "", -- A_Classic_Fairytale:enemy ["Hooray!"] = "Hurá!", -- ["Hostage Situation"] = "", -- A_Classic_Fairytale:family diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Locale/sk.txt --- a/share/hedgewars/Data/Locale/sk.txt Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Locale/sk.txt Fri Feb 22 05:05:32 2013 +0100 @@ -54,8 +54,10 @@ 00:51=Blatová guľa 00:52=Žiadna zbraň nie je vybraná 00:53=TARDIS -00:54=Budova -00:55=Postrek zeme +; 00:54=Budova +00:54=Postrek zeme +00:55=Zmrazovač +00:56=Sekáčik 01:00=Do boja! 01:01=Remíza @@ -78,6 +80,7 @@ 01:18=Vysoký 01:19=Extrémny 01:20=%1 odskok +01:21=Vypnutý zvuk ; Správy o udalostiach ; Ježko (%1) zomrel diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Locale/stub.lua --- a/share/hedgewars/Data/Locale/stub.lua Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Locale/stub.lua Fri Feb 22 05:05:32 2013 +0100 @@ -332,7 +332,7 @@ -- ["Hmmm...perhaps a little more time will help."] = "", -- A_Classic_Fairytale:first_blood -- ["Hogminator"] = "", -- A_Classic_Fairytale:family -- ["Hogs in sight!"] = "", -- Continental_supplies --- ["HOLY SHIT!"] = "", -- Mutant +-- ["HOLY SHYTE!"] = "", -- Mutant -- ["Honest Lee"] = "", -- A_Classic_Fairytale:enemy -- ["Hooray!"] = "", -- ["Hostage Situation"] = "", -- A_Classic_Fairytale:family diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Locale/sv.lua --- a/share/hedgewars/Data/Locale/sv.lua Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Locale/sv.lua Fri Feb 22 05:05:32 2013 +0100 @@ -332,7 +332,7 @@ -- ["Hmmm...perhaps a little more time will help."] = "", -- A_Classic_Fairytale:first_blood -- ["Hogminator"] = "", -- A_Classic_Fairytale:family -- ["Hogs in sight!"] = "", -- Continental_supplies --- ["HOLY SHIT!"] = "", -- Mutant +-- ["HOLY SHYTE!"] = "", -- Mutant -- ["Honest Lee"] = "", -- A_Classic_Fairytale:enemy ["Hooray!"] = "Hurra!", -- ["Hostage Situation"] = "", -- A_Classic_Fairytale:family diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Locale/sv.txt --- a/share/hedgewars/Data/Locale/sv.txt Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Locale/sv.txt Fri Feb 22 05:05:32 2013 +0100 @@ -54,8 +54,8 @@ 00:51=Jordboll 00:52=Inget vapen valt 00:53=Tidslåda -00:54=Struktur -00:55=Markspruta +; 00:54=Struktur +00:54=Markspruta 01:00=Nu kör vi! 01:01=Oavgjort @@ -535,7 +535,7 @@ 04:51=Få till en gratisträff genom att kasta en boll med|jord. Känns lite gran, och knuffar tillbaka|igelkottar. 04:52=UNUSED 04:53=Åk på ett äventyr genom tid och rymd, medan dina|kamrater blir kvar själva att slåss. Var beredd|att komma tillbaka när som helst, eller till|Sudden Death eller om de andra blir besegrade.|Varning. Fungerar inte under Sudden Death, om du|är ensam, eller om du är en kung. -04:54=INCOMPLETE +04:54=INCOMPLETE 04:55=Spruta en ström av fästande jord.|Bygg broar, gräv ner fienden, stäng igen tunnlar.|Var försiktig så att du inte får något på dig! ; Game goal strings diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Locale/uk.lua --- a/share/hedgewars/Data/Locale/uk.lua Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Locale/uk.lua Fri Feb 22 05:05:32 2013 +0100 @@ -331,7 +331,7 @@ ["Hmmm..."] = "Хмм...", -- ["Hogminator"] = "", -- A_Classic_Fairytale:family -- ["Hogs in sight!"] = "", -- Continental_supplies --- ["HOLY SHIT!"] = "", -- Mutant +-- ["HOLY SHYTE!"] = "", -- Mutant -- ["Honest Lee"] = "", -- A_Classic_Fairytale:enemy ["Hooray!"] = "Урааа!", -- ["Hostage Situation"] = "", -- A_Classic_Fairytale:family diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Locale/uk.txt --- a/share/hedgewars/Data/Locale/uk.txt Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Locale/uk.txt Fri Feb 22 05:05:32 2013 +0100 @@ -54,8 +54,8 @@ 00:51=Грудка багна 00:52=Зброя не вибрана 00:53=Будка Часу -00:54=Структура -00:55=Земляний Спрей +; 00:54=Структура +00:54=Земляний Спрей 01:00=Вперед до перемоги! 01:01=Нічия @@ -110,7 +110,7 @@ 02:01=%1 забув надіти рятувальний жилет 02:01=%1 спить серед риб 02:01=%1 хоче пити -02:01=%1 загубився в морі +02:01=%1 загубився в морі 02:01=%1 забув надіти акваланг 02:01=%1 похований у морі 02:01=%1 пробує плавати на спині @@ -344,7 +344,7 @@ 04:51=Здійсни халявний удар, шпурни грудку багна.|Трохи пече і відкидає їжака назад. 04:52=UNUSED 04:53=Здійсни подорож крізь час та простір,|залишивши товаришів битись далі самим.|Будь готовий повернутись в кожну мить,|або до Раптової смерті або до їх поразки.|Відмова. Не працює в Раптовій Смерті,|якщо ти один, або якщо ти Король. -04:54=НЕЗАВЕРШЕНО +04:54=НЕЗАВЕРШЕНО 04:55=Розпили потік лепких пластівців.|будуй мости, хорони ворогів, перекривай тунелі.|Стеж щоб на тебе не впала жодна з них! ; Game goal strings diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Locale/zh_CN.lua --- a/share/hedgewars/Data/Locale/zh_CN.lua Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Locale/zh_CN.lua Fri Feb 22 05:05:32 2013 +0100 @@ -331,7 +331,7 @@ ["Hmmm..."] = "呃...", -- ["Hogminator"] = "", -- A_Classic_Fairytale:family -- ["Hogs in sight!"] = "", -- Continental_supplies --- ["HOLY SHIT!"] = "", -- Mutant +-- ["HOLY SHYTE!"] = "", -- Mutant -- ["Honest Lee"] = "", -- A_Classic_Fairytale:enemy ["Hooray!"] = "呼!", -- ["Hostage Situation"] = "", -- A_Classic_Fairytale:family diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Maps/Bamboo/CMakeLists.txt --- a/share/hedgewars/Data/Maps/Bamboo/CMakeLists.txt Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Maps/Bamboo/CMakeLists.txt Fri Feb 22 05:05:32 2013 +0100 @@ -1,5 +1,5 @@ install(FILES - map.png - map.cfg - preview.png - DESTINATION ${SHAREPATH}Data/Maps/Bamboo) + map.png + map.cfg + preview.png + DESTINATION ${SHAREPATH}Data/Maps/Bamboo) diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Maps/BambooPlinko/CMakeLists.txt --- a/share/hedgewars/Data/Maps/BambooPlinko/CMakeLists.txt Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Maps/BambooPlinko/CMakeLists.txt Fri Feb 22 05:05:32 2013 +0100 @@ -1,5 +1,5 @@ install(FILES - map.png - map.cfg - preview.png - DESTINATION ${SHAREPATH}Data/Maps/BambooPlinko) + map.png + map.cfg + preview.png + DESTINATION ${SHAREPATH}Data/Maps/BambooPlinko) diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Maps/Basketball/CMakeLists.txt --- a/share/hedgewars/Data/Maps/Basketball/CMakeLists.txt Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Maps/Basketball/CMakeLists.txt Fri Feb 22 05:05:32 2013 +0100 @@ -1,7 +1,8 @@ install(FILES - map.png - map.cfg - map.lua - mask.png - preview.png - DESTINATION ${SHAREPATH}Data/Maps/Basketball) + map.png + map.cfg + map.lua + mask.png + preview.png + desc.txt + DESTINATION ${SHAREPATH}Data/Maps/Basketball) diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Maps/Basketball/desc.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/share/hedgewars/Data/Maps/Basketball/desc.txt Fri Feb 22 05:05:32 2013 +0100 @@ -0,0 +1,1 @@ +en_US=Who said hedgehogs can't play basketball? diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Maps/Basketball/map.cfg --- a/share/hedgewars/Data/Maps/Basketball/map.cfg Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Maps/Basketball/map.cfg Fri Feb 22 05:05:32 2013 +0100 @@ -1,2 +1,2 @@ Nature -12 +12 \ No newline at end of file diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Maps/Basketball/map.lua --- a/share/hedgewars/Data/Maps/Basketball/map.lua Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Maps/Basketball/map.lua Fri Feb 22 05:05:32 2013 +0100 @@ -1,6 +1,6 @@ -- Hedgewars - Basketball for 2+ Players -loadfile(GetDataPath() .. "Scripts/Locale.lua")() +HedgewarsScriptLoad("Scripts/Locale.lua")() local score = {[0] = 0, [1] = 0, [2] = 0, [3] = 0, [4] = 0, [5] = 0} diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Maps/Bath/CMakeLists.txt --- a/share/hedgewars/Data/Maps/Bath/CMakeLists.txt Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Maps/Bath/CMakeLists.txt Fri Feb 22 05:05:32 2013 +0100 @@ -1,5 +1,5 @@ install(FILES - map.png - map.cfg - preview.png - DESTINATION ${SHAREPATH}Data/Maps/Bath) + map.png + map.cfg + preview.png + DESTINATION ${SHAREPATH}Data/Maps/Bath) diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Maps/Battlefield/CMakeLists.txt --- a/share/hedgewars/Data/Maps/Battlefield/CMakeLists.txt Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Maps/Battlefield/CMakeLists.txt Fri Feb 22 05:05:32 2013 +0100 @@ -1,7 +1,7 @@ install(FILES - map.png - mask.png - map.cfg - preview.png - DESTINATION ${SHAREPATH}Data/Maps/Battlefield) + map.png + mask.png + map.cfg + preview.png + DESTINATION ${SHAREPATH}Data/Maps/Battlefield) diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Maps/Blizzard/CMakeLists.txt --- a/share/hedgewars/Data/Maps/Blizzard/CMakeLists.txt Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Maps/Blizzard/CMakeLists.txt Fri Feb 22 05:05:32 2013 +0100 @@ -1,7 +1,7 @@ install(FILES - map.png - map.cfg - mask.png - preview.png - DESTINATION ${SHAREPATH}Data/Maps/Blizzard) + map.png + map.cfg + mask.png + preview.png + DESTINATION ${SHAREPATH}Data/Maps/Blizzard) diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Maps/Blox/CMakeLists.txt --- a/share/hedgewars/Data/Maps/Blox/CMakeLists.txt Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Maps/Blox/CMakeLists.txt Fri Feb 22 05:05:32 2013 +0100 @@ -1,6 +1,6 @@ install(FILES - map.png - mask.png - map.cfg - preview.png - DESTINATION ${SHAREPATH}Data/Maps/Blox) + map.png + mask.png + map.cfg + preview.png + DESTINATION ${SHAREPATH}Data/Maps/Blox) diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Maps/Bubbleflow/CMakeLists.txt --- a/share/hedgewars/Data/Maps/Bubbleflow/CMakeLists.txt Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Maps/Bubbleflow/CMakeLists.txt Fri Feb 22 05:05:32 2013 +0100 @@ -1,5 +1,5 @@ install(FILES - map.png - map.cfg - preview.png - DESTINATION ${SHAREPATH}Data/Maps/Bubbleflow) + map.png + map.cfg + preview.png + DESTINATION ${SHAREPATH}Data/Maps/Bubbleflow) diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Maps/CMakeLists.txt --- a/share/hedgewars/Data/Maps/CMakeLists.txt Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Maps/CMakeLists.txt Fri Feb 22 05:05:32 2013 +0100 @@ -1,45 +1,45 @@ foreach(dir - Bamboo - BambooPlinko - Basketball - Bath - Battlefield - Blizzard - Blox - Bubbleflow - Cake - Castle - Cave - Cheese - Cogs - Control - CrazyMission - CTF_Blizzard - EarthRise - Eyes - Hammock - HedgeFortress - Hedgelove - Hedgewars - Hogville - Hydrant - Islands - Knockball - Lonely_Island - Mushrooms - Octorama - PirateFlag - Plane - portal - Ropes - Ruler - Sheep - ShoppaKing - Sticks - Trash - Tree - TrophyRace - ) + Bamboo + BambooPlinko + Basketball + Bath + Battlefield + Blizzard + Blox + Bubbleflow + Cake + Castle + Cave + Cheese + Cogs + Control + CrazyMission + CTF_Blizzard + EarthRise + Eyes + Hammock + HedgeFortress + Hedgelove + Hedgewars + Hogville + Hydrant + Islands + Knockball + Lonely_Island + Mushrooms + Octorama + PirateFlag + Plane + portal + Ropes + Ruler + Sheep + ShoppaKing + Sticks + Trash + Tree + TrophyRace + ) add_subdirectory(${dir}) endforeach(dir) diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Maps/CTF_Blizzard/CMakeLists.txt --- a/share/hedgewars/Data/Maps/CTF_Blizzard/CMakeLists.txt Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Maps/CTF_Blizzard/CMakeLists.txt Fri Feb 22 05:05:32 2013 +0100 @@ -1,5 +1,6 @@ install(FILES - map.cfg - map.lua - preview.png - DESTINATION ${SHAREPATH}Data/Maps/CTF_Blizzard) + map.cfg + map.lua + preview.png + desc.txt + DESTINATION ${SHAREPATH}Data/Maps/CTF_Blizzard) diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Maps/CTF_Blizzard/desc.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/share/hedgewars/Data/Maps/CTF_Blizzard/desc.txt Fri Feb 22 05:05:32 2013 +0100 @@ -0,0 +1,1 @@ +en_US=Capture the Flag\, blizzard style! diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Maps/CTF_Blizzard/map.lua --- a/share/hedgewars/Data/Maps/CTF_Blizzard/map.lua Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Maps/CTF_Blizzard/map.lua Fri Feb 22 05:05:32 2013 +0100 @@ -91,7 +91,7 @@ -- add support for more players -- re-enable sudden death, but set water rise to 0 -loadfile(GetDataPath() .. "Scripts/Locale.lua")() +HedgewarsScriptLoad("Scripts/Locale.lua")() --------------------------------------------------------------- ----------lots of bad variables and things diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Maps/Cake/CMakeLists.txt --- a/share/hedgewars/Data/Maps/Cake/CMakeLists.txt Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Maps/Cake/CMakeLists.txt Fri Feb 22 05:05:32 2013 +0100 @@ -1,6 +1,6 @@ install(FILES - map.png - mask.png - map.cfg - preview.png - DESTINATION ${SHAREPATH}Data/Maps/Cake) + map.png + mask.png + map.cfg + preview.png + DESTINATION ${SHAREPATH}Data/Maps/Cake) diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Maps/Castle/CMakeLists.txt --- a/share/hedgewars/Data/Maps/Castle/CMakeLists.txt Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Maps/Castle/CMakeLists.txt Fri Feb 22 05:05:32 2013 +0100 @@ -1,6 +1,6 @@ install(FILES - map.png - mask.png - map.cfg - preview.png - DESTINATION ${SHAREPATH}Data/Maps/Castle) + map.png + mask.png + map.cfg + preview.png + DESTINATION ${SHAREPATH}Data/Maps/Castle) diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Maps/Cave/CMakeLists.txt --- a/share/hedgewars/Data/Maps/Cave/CMakeLists.txt Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Maps/Cave/CMakeLists.txt Fri Feb 22 05:05:32 2013 +0100 @@ -1,6 +1,6 @@ install(FILES - map.png - mask.png - map.cfg - preview.png - DESTINATION ${SHAREPATH}Data/Maps/Cave) + map.png + mask.png + map.cfg + preview.png + DESTINATION ${SHAREPATH}Data/Maps/Cave) diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Maps/Cheese/CMakeLists.txt --- a/share/hedgewars/Data/Maps/Cheese/CMakeLists.txt Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Maps/Cheese/CMakeLists.txt Fri Feb 22 05:05:32 2013 +0100 @@ -1,6 +1,6 @@ install(FILES - map.png - mask.png - map.cfg - preview.png - DESTINATION ${SHAREPATH}Data/Maps/Cheese) + map.png + mask.png + map.cfg + preview.png + DESTINATION ${SHAREPATH}Data/Maps/Cheese) diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Maps/Cogs/CMakeLists.txt --- a/share/hedgewars/Data/Maps/Cogs/CMakeLists.txt Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Maps/Cogs/CMakeLists.txt Fri Feb 22 05:05:32 2013 +0100 @@ -1,5 +1,5 @@ install(FILES - map.png - map.cfg - preview.png - DESTINATION ${SHAREPATH}Data/Maps/Cogs) + map.png + map.cfg + preview.png + DESTINATION ${SHAREPATH}Data/Maps/Cogs) diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Maps/Control/CMakeLists.txt --- a/share/hedgewars/Data/Maps/Control/CMakeLists.txt Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Maps/Control/CMakeLists.txt Fri Feb 22 05:05:32 2013 +0100 @@ -1,6 +1,7 @@ install(FILES - map.cfg - map.lua - map.png - preview.png - DESTINATION ${SHAREPATH}Data/Maps/Control) + map.cfg + map.lua + map.png + preview.png + desc.txt + DESTINATION ${SHAREPATH}Data/Maps/Control) diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Maps/Control/desc.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/share/hedgewars/Data/Maps/Control/desc.txt Fri Feb 22 05:05:32 2013 +0100 @@ -0,0 +1,1 @@ +en_US=Islands scattered everywhere\, full set of weapons. diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Maps/Control/map.cfg --- a/share/hedgewars/Data/Maps/Control/map.cfg Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Maps/Control/map.cfg Fri Feb 22 05:05:32 2013 +0100 @@ -1,4 +1,4 @@ Deepspace 48 Default -Crazy +Crazy \ No newline at end of file diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Maps/Control/map.lua --- a/share/hedgewars/Data/Maps/Control/map.lua Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Maps/Control/map.lua Fri Feb 22 05:05:32 2013 +0100 @@ -49,7 +49,7 @@ --script begins ----------------- -loadfile(GetDataPath() .. "Scripts/Locale.lua")() +HedgewarsScriptLoad("Scripts/Locale.lua")() --------------------------------------------------------------- ----------lots of bad variables and things diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Maps/CrazyMission/CMakeLists.txt --- a/share/hedgewars/Data/Maps/CrazyMission/CMakeLists.txt Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Maps/CrazyMission/CMakeLists.txt Fri Feb 22 05:05:32 2013 +0100 @@ -1,5 +1,5 @@ install(FILES - map.png - map.cfg - preview.png - DESTINATION ${SHAREPATH}Data/Maps/CrazyMission) + map.png + map.cfg + preview.png + DESTINATION ${SHAREPATH}Data/Maps/CrazyMission) diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Maps/EarthRise/CMakeLists.txt --- a/share/hedgewars/Data/Maps/EarthRise/CMakeLists.txt Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Maps/EarthRise/CMakeLists.txt Fri Feb 22 05:05:32 2013 +0100 @@ -1,6 +1,6 @@ install(FILES - map.png - mask.png - map.cfg - preview.png - DESTINATION ${SHAREPATH}Data/Maps/EarthRise) + map.png + mask.png + map.cfg + preview.png + DESTINATION ${SHAREPATH}Data/Maps/EarthRise) diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Maps/Eyes/CMakeLists.txt --- a/share/hedgewars/Data/Maps/Eyes/CMakeLists.txt Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Maps/Eyes/CMakeLists.txt Fri Feb 22 05:05:32 2013 +0100 @@ -1,5 +1,5 @@ install(FILES - map.png - map.cfg - preview.png - DESTINATION ${SHAREPATH}Data/Maps/Eyes) + map.png + map.cfg + preview.png + DESTINATION ${SHAREPATH}Data/Maps/Eyes) diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Maps/Hammock/CMakeLists.txt --- a/share/hedgewars/Data/Maps/Hammock/CMakeLists.txt Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Maps/Hammock/CMakeLists.txt Fri Feb 22 05:05:32 2013 +0100 @@ -1,5 +1,5 @@ install(FILES - map.png - map.cfg - preview.png - DESTINATION ${SHAREPATH}Data/Maps/Hammock) + map.png + map.cfg + preview.png + DESTINATION ${SHAREPATH}Data/Maps/Hammock) diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Maps/HedgeFortress/CMakeLists.txt --- a/share/hedgewars/Data/Maps/HedgeFortress/CMakeLists.txt Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Maps/HedgeFortress/CMakeLists.txt Fri Feb 22 05:05:32 2013 +0100 @@ -1,6 +1,6 @@ install(FILES - map.png - mask.png - map.cfg - preview.png - DESTINATION ${SHAREPATH}Data/Maps/HedgeFortress) + map.png + mask.png + map.cfg + preview.png + DESTINATION ${SHAREPATH}Data/Maps/HedgeFortress) diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Maps/Hedgelove/CMakeLists.txt --- a/share/hedgewars/Data/Maps/Hedgelove/CMakeLists.txt Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Maps/Hedgelove/CMakeLists.txt Fri Feb 22 05:05:32 2013 +0100 @@ -1,5 +1,5 @@ install(FILES - map.png - map.cfg - preview.png - DESTINATION ${SHAREPATH}Data/Maps/Hedgelove) + map.png + map.cfg + preview.png + DESTINATION ${SHAREPATH}Data/Maps/Hedgelove) diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Maps/Hedgewars/CMakeLists.txt --- a/share/hedgewars/Data/Maps/Hedgewars/CMakeLists.txt Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Maps/Hedgewars/CMakeLists.txt Fri Feb 22 05:05:32 2013 +0100 @@ -1,5 +1,5 @@ install(FILES - map.png - map.cfg - preview.png - DESTINATION ${SHAREPATH}Data/Maps/Hedgewars) + map.png + map.cfg + preview.png + DESTINATION ${SHAREPATH}Data/Maps/Hedgewars) diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Maps/Hogville/CMakeLists.txt --- a/share/hedgewars/Data/Maps/Hogville/CMakeLists.txt Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Maps/Hogville/CMakeLists.txt Fri Feb 22 05:05:32 2013 +0100 @@ -1,5 +1,5 @@ install(FILES - map.png - map.cfg - preview.png - DESTINATION ${SHAREPATH}Data/Maps/Hogville) + map.png + map.cfg + preview.png + DESTINATION ${SHAREPATH}Data/Maps/Hogville) diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Maps/Hydrant/CMakeLists.txt --- a/share/hedgewars/Data/Maps/Hydrant/CMakeLists.txt Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Maps/Hydrant/CMakeLists.txt Fri Feb 22 05:05:32 2013 +0100 @@ -1,5 +1,5 @@ install(FILES - map.png - map.cfg - preview.png - DESTINATION ${SHAREPATH}Data/Maps/Hydrant) + map.png + map.cfg + preview.png + DESTINATION ${SHAREPATH}Data/Maps/Hydrant) diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Maps/Islands/CMakeLists.txt --- a/share/hedgewars/Data/Maps/Islands/CMakeLists.txt Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Maps/Islands/CMakeLists.txt Fri Feb 22 05:05:32 2013 +0100 @@ -1,5 +1,5 @@ install(FILES - map.png - map.cfg - preview.png - DESTINATION ${SHAREPATH}Data/Maps/Islands) + map.png + map.cfg + preview.png + DESTINATION ${SHAREPATH}Data/Maps/Islands) diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Maps/Knockball/CMakeLists.txt --- a/share/hedgewars/Data/Maps/Knockball/CMakeLists.txt Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Maps/Knockball/CMakeLists.txt Fri Feb 22 05:05:32 2013 +0100 @@ -1,6 +1,7 @@ install(FILES - map.png - map.cfg - map.lua - preview.png - DESTINATION ${SHAREPATH}Data/Maps/Knockball) + map.png + map.cfg + map.lua + preview.png + desc.txt + DESTINATION ${SHAREPATH}Data/Maps/Knockball) diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Maps/Knockball/desc.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/share/hedgewars/Data/Maps/Knockball/desc.txt Fri Feb 22 05:05:32 2013 +0100 @@ -0,0 +1,1 @@ +en_US=Knock your opponents off the platforms using only a bat! diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Maps/Knockball/map.lua --- a/share/hedgewars/Data/Maps/Knockball/map.lua Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Maps/Knockball/map.lua Fri Feb 22 05:05:32 2013 +0100 @@ -1,6 +1,6 @@ -- Hedgewars - Knockball for 2+ Players -loadfile(GetDataPath() .. "Scripts/Locale.lua")() +HedgewarsScriptLoad("Scripts/Locale.lua")() local score = {[0] = 0, [1] = 0, [2] = 0, [3] = 0, [4] = 0, [5] = 0} diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Maps/Lonely_Island/CMakeLists.txt --- a/share/hedgewars/Data/Maps/Lonely_Island/CMakeLists.txt Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Maps/Lonely_Island/CMakeLists.txt Fri Feb 22 05:05:32 2013 +0100 @@ -1,6 +1,6 @@ install(FILES - map.png - mask.png - map.cfg - preview.png - DESTINATION ${SHAREPATH}Data/Maps/Lonely_Island) + map.png + mask.png + map.cfg + preview.png + DESTINATION ${SHAREPATH}Data/Maps/Lonely_Island) diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Maps/Mushrooms/CMakeLists.txt --- a/share/hedgewars/Data/Maps/Mushrooms/CMakeLists.txt Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Maps/Mushrooms/CMakeLists.txt Fri Feb 22 05:05:32 2013 +0100 @@ -1,6 +1,6 @@ install(FILES - map.png - mask.png - map.cfg - preview.png - DESTINATION ${SHAREPATH}Data/Maps/Mushrooms) + map.png + mask.png + map.cfg + preview.png + DESTINATION ${SHAREPATH}Data/Maps/Mushrooms) diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Maps/Octorama/CMakeLists.txt --- a/share/hedgewars/Data/Maps/Octorama/CMakeLists.txt Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Maps/Octorama/CMakeLists.txt Fri Feb 22 05:05:32 2013 +0100 @@ -1,6 +1,6 @@ install(FILES - info.txt - map.png - map.cfg - preview.png - DESTINATION ${SHAREPATH}Data/Maps/Octorama) + info.txt + map.png + map.cfg + preview.png + DESTINATION ${SHAREPATH}Data/Maps/Octorama) diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Maps/Octorama/info.txt --- a/share/hedgewars/Data/Maps/Octorama/info.txt Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Maps/Octorama/info.txt Fri Feb 22 05:05:32 2013 +0100 @@ -2,9 +2,9 @@ octorama :: TYPE - custom hedgewars map - -:: VERSION + custom hedgewars map + +:: VERSION RC3 :: CHANGELOG @@ -27,13 +27,13 @@ - shades on upper left bubbles are now correct - removed the theme for now since the theme didn't bring anything new but the music (tiyuri) - -:: DESCRIPTION - just a fun map similar to bubbleflow - -:: CREATOR + +:: DESCRIPTION + just a fun map similar to bubbleflow + +:: CREATOR jesse/jessor - http://geekosphere.org - + :: RIGHTZ Octopod Vector Art: http://iconicon.net/ (CC) diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Maps/PirateFlag/CMakeLists.txt --- a/share/hedgewars/Data/Maps/PirateFlag/CMakeLists.txt Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Maps/PirateFlag/CMakeLists.txt Fri Feb 22 05:05:32 2013 +0100 @@ -1,6 +1,6 @@ install(FILES - map.png - map.cfg - preview.png - DESTINATION ${SHAREPATH}Data/Maps/PirateFlag) + map.png + map.cfg + preview.png + DESTINATION ${SHAREPATH}Data/Maps/PirateFlag) diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Maps/Plane/CMakeLists.txt --- a/share/hedgewars/Data/Maps/Plane/CMakeLists.txt Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Maps/Plane/CMakeLists.txt Fri Feb 22 05:05:32 2013 +0100 @@ -1,6 +1,6 @@ install(FILES - map.png - map.cfg - preview.png - DESTINATION ${SHAREPATH}Data/Maps/Plane) + map.png + map.cfg + preview.png + DESTINATION ${SHAREPATH}Data/Maps/Plane) diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Maps/Ropes/CMakeLists.txt --- a/share/hedgewars/Data/Maps/Ropes/CMakeLists.txt Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Maps/Ropes/CMakeLists.txt Fri Feb 22 05:05:32 2013 +0100 @@ -1,5 +1,5 @@ install(FILES - map.png - map.cfg - preview.png - DESTINATION ${SHAREPATH}Data/Maps/Ropes) + map.png + map.cfg + preview.png + DESTINATION ${SHAREPATH}Data/Maps/Ropes) diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Maps/Ruler/CMakeLists.txt --- a/share/hedgewars/Data/Maps/Ruler/CMakeLists.txt Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Maps/Ruler/CMakeLists.txt Fri Feb 22 05:05:32 2013 +0100 @@ -1,6 +1,6 @@ install(FILES - map.png - map.cfg - preview.png - DESTINATION ${SHAREPATH}Data/Maps/Ruler) + map.png + map.cfg + preview.png + DESTINATION ${SHAREPATH}Data/Maps/Ruler) diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Maps/Sheep/CMakeLists.txt --- a/share/hedgewars/Data/Maps/Sheep/CMakeLists.txt Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Maps/Sheep/CMakeLists.txt Fri Feb 22 05:05:32 2013 +0100 @@ -1,6 +1,6 @@ install(FILES - map.png - map.cfg - preview.png - DESTINATION ${SHAREPATH}Data/Maps/Sheep) + map.png + map.cfg + preview.png + DESTINATION ${SHAREPATH}Data/Maps/Sheep) diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Maps/ShoppaKing/CMakeLists.txt --- a/share/hedgewars/Data/Maps/ShoppaKing/CMakeLists.txt Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Maps/ShoppaKing/CMakeLists.txt Fri Feb 22 05:05:32 2013 +0100 @@ -1,5 +1,5 @@ install(FILES - map.png - map.cfg - preview.png - DESTINATION ${SHAREPATH}Data/Maps/ShoppaKing) + map.png + map.cfg + preview.png + DESTINATION ${SHAREPATH}Data/Maps/ShoppaKing) diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Maps/ShoppaKing/map.png Binary file share/hedgewars/Data/Maps/ShoppaKing/map.png has changed diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Maps/ShoppaKing/map.xcf Binary file share/hedgewars/Data/Maps/ShoppaKing/map.xcf has changed diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Maps/Sticks/CMakeLists.txt --- a/share/hedgewars/Data/Maps/Sticks/CMakeLists.txt Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Maps/Sticks/CMakeLists.txt Fri Feb 22 05:05:32 2013 +0100 @@ -1,5 +1,5 @@ install(FILES - map.png - map.cfg - preview.png - DESTINATION ${SHAREPATH}Data/Maps/Sticks) + map.png + map.cfg + preview.png + DESTINATION ${SHAREPATH}Data/Maps/Sticks) diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Maps/Trash/CMakeLists.txt --- a/share/hedgewars/Data/Maps/Trash/CMakeLists.txt Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Maps/Trash/CMakeLists.txt Fri Feb 22 05:05:32 2013 +0100 @@ -1,6 +1,6 @@ install(FILES - map.png - map.cfg - preview.png - DESTINATION ${SHAREPATH}Data/Maps/Trash) + map.png + map.cfg + preview.png + DESTINATION ${SHAREPATH}Data/Maps/Trash) diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Maps/Tree/CMakeLists.txt --- a/share/hedgewars/Data/Maps/Tree/CMakeLists.txt Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Maps/Tree/CMakeLists.txt Fri Feb 22 05:05:32 2013 +0100 @@ -1,5 +1,5 @@ install(FILES - map.png - map.cfg - preview.png - DESTINATION ${SHAREPATH}Data/Maps/Tree) + map.png + map.cfg + preview.png + DESTINATION ${SHAREPATH}Data/Maps/Tree) diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Maps/TrophyRace/CMakeLists.txt --- a/share/hedgewars/Data/Maps/TrophyRace/CMakeLists.txt Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Maps/TrophyRace/CMakeLists.txt Fri Feb 22 05:05:32 2013 +0100 @@ -1,7 +1,8 @@ install(FILES - map.cfg - map.lua - map.png - mask.png - preview.png - DESTINATION ${SHAREPATH}Data/Maps/TrophyRace) + map.cfg + map.lua + map.png + mask.png + preview.png + desc.txt + DESTINATION ${SHAREPATH}Data/Maps/TrophyRace) diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Maps/TrophyRace/desc.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/share/hedgewars/Data/Maps/TrophyRace/desc.txt Fri Feb 22 05:05:32 2013 +0100 @@ -0,0 +1,1 @@ +en_US=Ready\, set\, go! Who is going to be the first in this crazy race? \ No newline at end of file diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Maps/TrophyRace/map.lua --- a/share/hedgewars/Data/Maps/TrophyRace/map.lua Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Maps/TrophyRace/map.lua Fri Feb 22 05:05:32 2013 +0100 @@ -1,6 +1,6 @@ -- Hedgewars - Roperace for 2+ Players -loadfile(GetDataPath() .. "Scripts/Locale.lua")() +HedgewarsScriptLoad("Scripts/Locale.lua")() -- store number of hedgehogs local numhhs = 0 diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Maps/TrophyRace/map.png Binary file share/hedgewars/Data/Maps/TrophyRace/map.png has changed diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Maps/portal/CMakeLists.txt --- a/share/hedgewars/Data/Maps/portal/CMakeLists.txt Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Maps/portal/CMakeLists.txt Fri Feb 22 05:05:32 2013 +0100 @@ -1,6 +1,6 @@ install(FILES - map.png - mask.png - map.cfg - preview.png - DESTINATION ${SHAREPATH}Data/Maps/portal) + map.png + mask.png + map.cfg + preview.png + DESTINATION ${SHAREPATH}Data/Maps/portal) diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Missions/Campaign/A Classic Fairytale/CMakeLists.txt --- a/share/hedgewars/Data/Missions/Campaign/A Classic Fairytale/CMakeLists.txt Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Missions/Campaign/A Classic Fairytale/CMakeLists.txt Fri Feb 22 05:05:32 2013 +0100 @@ -2,6 +2,6 @@ file(GLOB Missions *.lua) install(FILES - ${Config} - ${Missions} - DESTINATION "${SHAREPATH}Data/Missions/Campaign/A Classic Fairytale") + ${Config} + ${Missions} + DESTINATION "${SHAREPATH}Data/Missions/Campaign/A Classic Fairytale") diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Missions/Campaign/CMakeLists.txt --- a/share/hedgewars/Data/Missions/Campaign/CMakeLists.txt Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Missions/Campaign/CMakeLists.txt Fri Feb 22 05:05:32 2013 +0100 @@ -3,5 +3,5 @@ file(GLOB Scripts *.lua) install(FILES - ${Scripts} - DESTINATION ${SHAREPATH}Data/Missions/Campaign) + ${Scripts} + DESTINATION ${SHAREPATH}Data/Missions/Campaign) diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Missions/Training/Basic_Training_-_Bazooka.lua --- a/share/hedgewars/Data/Missions/Training/Basic_Training_-_Bazooka.lua Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Missions/Training/Basic_Training_-_Bazooka.lua Fri Feb 22 05:05:32 2013 +0100 @@ -64,7 +64,15 @@ -- The base number for the random number generator Seed = 1 -- Game settings and rules - GameFlags = gfMultiWeapon + gfOneClanMode + gfSolidLand + EnableGameFlags(gfMultiWeapon, gfOneClanMode, gfSolidLand) + -- Uncommenting this wouldn't do anything + --EnableGameFlags(gfMultiWeapon, gfOneClanMode, gfSolidLand) + -- Neither this + --DisableGameFlags(gfArtillery) + -- Uncommenting this would make the terrain damageable + --DisableGameFlags(gfSolidLand) + -- Uncommenting this would remove all flags set previously + --ClearGameFlags() -- The time the player has to move each round (in ms) TurnTime = 60000 -- The frequency of crate drops diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Missions/Training/CMakeLists.txt --- a/share/hedgewars/Data/Missions/Training/CMakeLists.txt Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Missions/Training/CMakeLists.txt Fri Feb 22 05:05:32 2013 +0100 @@ -1,5 +1,5 @@ file(GLOB Scripts *.lua) install(FILES - ${Scripts} - DESTINATION ${SHAREPATH}Data/Missions/Training) + ${Scripts} + DESTINATION ${SHAREPATH}Data/Missions/Training) diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Music/CMakeLists.txt --- a/share/hedgewars/Data/Music/CMakeLists.txt Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Music/CMakeLists.txt Fri Feb 22 05:05:32 2013 +0100 @@ -1,5 +1,5 @@ -file(GLOB BaseMusic *.ogg) +file(GLOB BaseMusic *.ogg) install(FILES - ${BaseMusic} - DESTINATION ${SHAREPATH}Data/Music) + ${BaseMusic} + DESTINATION ${SHAREPATH}Data/Music) diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Names/CMakeLists.txt --- a/share/hedgewars/Data/Names/CMakeLists.txt Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Names/CMakeLists.txt Fri Feb 22 05:05:32 2013 +0100 @@ -2,7 +2,7 @@ file(GLOB cfgnames *.cfg) install(FILES - types.ini - ${txtnames} - ${cfgnames} - DESTINATION ${SHAREPATH}Data/Names) + types.ini + ${txtnames} + ${cfgnames} + DESTINATION ${SHAREPATH}Data/Names) diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Scripts/CMakeLists.txt --- a/share/hedgewars/Data/Scripts/CMakeLists.txt Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Scripts/CMakeLists.txt Fri Feb 22 05:05:32 2013 +0100 @@ -1,7 +1,7 @@ file(GLOB luafiles *.lua) install(FILES - ${luafiles} - DESTINATION ${SHAREPATH}Data/Scripts) + ${luafiles} + DESTINATION ${SHAREPATH}Data/Scripts) add_subdirectory(Multiplayer) diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Scripts/Locale.lua --- a/share/hedgewars/Data/Scripts/Locale.lua Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Scripts/Locale.lua Fri Feb 22 05:05:32 2013 +0100 @@ -1,11 +1,11 @@ -- Library for localizing strings in lua scripts -local lang = loadfile(GetUserDataPath() .. "Locale/" .. tostring(L) .. ".lua") +local lang = HedgewarsScriptLoad("Locale/" .. tostring(L) .. ".lua") if lang ~= nil then lang() else - lang = loadfile(GetDataPath() .. "Locale/" .. tostring(L) .. ".lua") + lang = HedgewarsScriptLoad("Locale/" .. tostring(L) .. ".lua") if lang ~= nil then lang() end diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Scripts/Multiplayer/CMakeLists.txt --- a/share/hedgewars/Data/Scripts/Multiplayer/CMakeLists.txt Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Scripts/Multiplayer/CMakeLists.txt Fri Feb 22 05:05:32 2013 +0100 @@ -2,6 +2,6 @@ file(GLOB cfgfiles *.cfg) install(FILES - ${luafiles} - ${cfgfiles} - DESTINATION ${SHAREPATH}Data/Scripts/Multiplayer) + ${luafiles} + ${cfgfiles} + DESTINATION ${SHAREPATH}Data/Scripts/Multiplayer) diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Scripts/Multiplayer/Mutant.lua --- a/share/hedgewars/Data/Scripts/Multiplayer/Mutant.lua Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Scripts/Multiplayer/Mutant.lua Fri Feb 22 05:05:32 2013 +0100 @@ -238,7 +238,7 @@ AddCaption(loc("LUDICROUS KILL")) PlaySound(sndNutter) elseif killsCounter == 7 then - AddCaption(loc("HOLY SHIT!")) + AddCaption(loc("HOLY SHYTE!")) PlaySound(sndLaugh) elseif killsCounter > 8 then AddCaption(loc("INSANITY")) diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Sounds/CMakeLists.txt --- a/share/hedgewars/Data/Sounds/CMakeLists.txt Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Sounds/CMakeLists.txt Fri Feb 22 05:05:32 2013 +0100 @@ -1,7 +1,7 @@ add_subdirectory(voices) -file(GLOB BaseSounds *.ogg) +file(GLOB BaseSounds *.ogg) install(FILES - ${BaseSounds} - DESTINATION ${SHAREPATH}Data/Sounds) + ${BaseSounds} + DESTINATION ${SHAREPATH}Data/Sounds) diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Sounds/voices/British/CMakeLists.txt --- a/share/hedgewars/Data/Sounds/voices/British/CMakeLists.txt Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Sounds/voices/British/CMakeLists.txt Fri Feb 22 05:05:32 2013 +0100 @@ -37,5 +37,5 @@ ) install(FILES - ${VoiceSounds} - DESTINATION ${SHAREPATH}Data/Sounds/voices/British) + ${VoiceSounds} + DESTINATION ${SHAREPATH}Data/Sounds/voices/British) diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Sounds/voices/CMakeLists.txt --- a/share/hedgewars/Data/Sounds/voices/CMakeLists.txt Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Sounds/voices/CMakeLists.txt Fri Feb 22 05:05:32 2013 +0100 @@ -1,16 +1,16 @@ foreach(dir British - Classic - Default - Mobster - Pirate - Robot - Russian - Singer - Surfer - Default_uk - Default_es - HillBilly - ) - add_subdirectory(${dir}) + Classic + Default + Mobster + Pirate + Robot + Russian + Singer + Surfer + Default_uk + Default_es + HillBilly + ) + add_subdirectory(${dir}) endforeach(dir) diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Sounds/voices/Classic/CMakeLists.txt --- a/share/hedgewars/Data/Sounds/voices/Classic/CMakeLists.txt Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Sounds/voices/Classic/CMakeLists.txt Fri Feb 22 05:05:32 2013 +0100 @@ -37,5 +37,5 @@ ) install(FILES - ${VoiceSounds} - DESTINATION ${SHAREPATH}Data/Sounds/voices/Classic) + ${VoiceSounds} + DESTINATION ${SHAREPATH}Data/Sounds/voices/Classic) diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Sounds/voices/Default/CMakeLists.txt --- a/share/hedgewars/Data/Sounds/voices/Default/CMakeLists.txt Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Sounds/voices/Default/CMakeLists.txt Fri Feb 22 05:05:32 2013 +0100 @@ -37,5 +37,5 @@ ) install(FILES - ${VoiceSounds} - DESTINATION ${SHAREPATH}Data/Sounds/voices/Default) + ${VoiceSounds} + DESTINATION ${SHAREPATH}Data/Sounds/voices/Default) diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Sounds/voices/Default_es/CMakeLists.txt --- a/share/hedgewars/Data/Sounds/voices/Default_es/CMakeLists.txt Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Sounds/voices/Default_es/CMakeLists.txt Fri Feb 22 05:05:32 2013 +0100 @@ -37,5 +37,5 @@ ) install(FILES - ${VoiceSounds} - DESTINATION ${SHAREPATH}Data/Sounds/voices/Default_es) + ${VoiceSounds} + DESTINATION ${SHAREPATH}Data/Sounds/voices/Default_es) diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Sounds/voices/Default_uk/CMakeLists.txt --- a/share/hedgewars/Data/Sounds/voices/Default_uk/CMakeLists.txt Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Sounds/voices/Default_uk/CMakeLists.txt Fri Feb 22 05:05:32 2013 +0100 @@ -37,5 +37,5 @@ ) install(FILES - ${VoiceSounds} - DESTINATION ${SHAREPATH}Data/Sounds/voices/Default_uk) + ${VoiceSounds} + DESTINATION ${SHAREPATH}Data/Sounds/voices/Default_uk) diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Sounds/voices/HillBilly/CMakeLists.txt --- a/share/hedgewars/Data/Sounds/voices/HillBilly/CMakeLists.txt Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Sounds/voices/HillBilly/CMakeLists.txt Fri Feb 22 05:05:32 2013 +0100 @@ -37,5 +37,5 @@ ) install(FILES - ${VoiceSounds} - DESTINATION ${SHAREPATH}Data/Sounds/voices/HillBilly) + ${VoiceSounds} + DESTINATION ${SHAREPATH}Data/Sounds/voices/HillBilly) diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Sounds/voices/HillBilly/readme.txt --- a/share/hedgewars/Data/Sounds/voices/HillBilly/readme.txt Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Sounds/voices/HillBilly/readme.txt Fri Feb 22 05:05:32 2013 +0100 @@ -3,8 +3,8 @@ -What can I say? I got bored and decided to add a little West Virginia to the game. +What can I say? I got bored and decided to add a little West Virginia to the game. -This version has better quality audio, and the oofs, fireballs, oops, and ows were replaced as well. +This version has better quality audio, and the oofs, fireballs, oops, and ows were replaced as well. Enjoy. diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Sounds/voices/Mobster/CMakeLists.txt --- a/share/hedgewars/Data/Sounds/voices/Mobster/CMakeLists.txt Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Sounds/voices/Mobster/CMakeLists.txt Fri Feb 22 05:05:32 2013 +0100 @@ -37,5 +37,5 @@ ) install(FILES - ${VoiceSounds} - DESTINATION ${SHAREPATH}Data/Sounds/voices/Mobster) + ${VoiceSounds} + DESTINATION ${SHAREPATH}Data/Sounds/voices/Mobster) diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Sounds/voices/Pirate/CMakeLists.txt --- a/share/hedgewars/Data/Sounds/voices/Pirate/CMakeLists.txt Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Sounds/voices/Pirate/CMakeLists.txt Fri Feb 22 05:05:32 2013 +0100 @@ -37,5 +37,5 @@ ) install(FILES - ${VoiceSounds} - DESTINATION ${SHAREPATH}Data/Sounds/voices/Pirate) + ${VoiceSounds} + DESTINATION ${SHAREPATH}Data/Sounds/voices/Pirate) diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Sounds/voices/Robot/CMakeLists.txt --- a/share/hedgewars/Data/Sounds/voices/Robot/CMakeLists.txt Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Sounds/voices/Robot/CMakeLists.txt Fri Feb 22 05:05:32 2013 +0100 @@ -37,5 +37,5 @@ ) install(FILES - ${VoiceSounds} - DESTINATION ${SHAREPATH}Data/Sounds/voices/Robot) + ${VoiceSounds} + DESTINATION ${SHAREPATH}Data/Sounds/voices/Robot) diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Sounds/voices/Russian/CMakeLists.txt --- a/share/hedgewars/Data/Sounds/voices/Russian/CMakeLists.txt Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Sounds/voices/Russian/CMakeLists.txt Fri Feb 22 05:05:32 2013 +0100 @@ -37,5 +37,5 @@ ) install(FILES - ${VoiceSounds} - DESTINATION ${SHAREPATH}Data/Sounds/voices/Russian) + ${VoiceSounds} + DESTINATION ${SHAREPATH}Data/Sounds/voices/Russian) diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Sounds/voices/Singer/CMakeLists.txt --- a/share/hedgewars/Data/Sounds/voices/Singer/CMakeLists.txt Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Sounds/voices/Singer/CMakeLists.txt Fri Feb 22 05:05:32 2013 +0100 @@ -37,5 +37,5 @@ ) install(FILES - ${VoiceSounds} - DESTINATION ${SHAREPATH}Data/Sounds/voices/Singer) + ${VoiceSounds} + DESTINATION ${SHAREPATH}Data/Sounds/voices/Singer) diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Sounds/voices/Surfer/CMakeLists.txt --- a/share/hedgewars/Data/Sounds/voices/Surfer/CMakeLists.txt Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Sounds/voices/Surfer/CMakeLists.txt Fri Feb 22 05:05:32 2013 +0100 @@ -37,5 +37,5 @@ ) install(FILES - ${VoiceSounds} - DESTINATION ${SHAREPATH}Data/Sounds/voices/Surfer) + ${VoiceSounds} + DESTINATION ${SHAREPATH}Data/Sounds/voices/Surfer) diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/Themes/CMakeLists.txt --- a/share/hedgewars/Data/Themes/CMakeLists.txt Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/Themes/CMakeLists.txt Fri Feb 22 05:05:32 2013 +0100 @@ -1,34 +1,34 @@ foreach(dir - Art - Bamboo - Bath - Blox - Brick - Cake - Cave - Castle - Cheese - Christmas - Compost - Deepspace - Desert - City - CrazyMission - EarthRise - Eyes - Freeway - Golf - Halloween - Hell - Island - Jungle - Nature - Olympics - Planes - Sheep - Snow - Stage - Underwater - ) - add_subdirectory(${dir}) + Art + Bamboo + Bath + Blox + Brick + Cake + Cave + Castle + Cheese + Christmas + Compost + Deepspace + Desert + City + CrazyMission + EarthRise + Eyes + Freeway + Golf + Halloween + Hell + Island + Jungle + Nature + Olympics + Planes + Sheep + Snow + Stage + Underwater + ) + add_subdirectory(${dir}) endforeach(dir) diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/misc/CMakeLists.txt --- a/share/hedgewars/Data/misc/CMakeLists.txt Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/misc/CMakeLists.txt Fri Feb 22 05:05:32 2013 +0100 @@ -1,14 +1,9 @@ -if(DEFINED DATA_INSTALL_DIR) - set(HEDGEWARS_DATADIR ${DATA_INSTALL_DIR} -) -else() - set(HEDGEWARS_DATADIR ${CMAKE_INSTALL_PREFIX}/share/) -endif() if(UNIX AND NOT APPLE) -configure_file(hwengine.desktop.in hwengine.desktop) + configure_file(hwengine.desktop.in hwengine.desktop) + + file(GLOB miscfiles *.xml *.desktop) + + install(FILES ${miscfiles} DESTINATION ${SHAREPATH}/Data/misc) endif() -file(GLOB miscfiles *.xml *.desktop) - -install(FILES ${miscfiles} DESTINATION ${SHAREPATH}Data/misc) diff -r d5d5e1698554 -r 1dedcc37bfe8 share/hedgewars/Data/misc/hwengine.desktop.in --- a/share/hedgewars/Data/misc/hwengine.desktop.in Sun Nov 18 01:06:01 2012 +0400 +++ b/share/hedgewars/Data/misc/hwengine.desktop.in Fri Feb 22 05:05:32 2013 +0100 @@ -17,7 +17,7 @@ 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 +Exec=${CMAKE_INSTALL_PREFIX}/${target_binary_install_dir}/hwengine %f Path=/tmp Terminal=false StartupNotify=false diff -r d5d5e1698554 -r 1dedcc37bfe8 tools/CMakeLists.txt --- a/tools/CMakeLists.txt Sun Nov 18 01:06:01 2012 +0400 +++ b/tools/CMakeLists.txt Fri Feb 22 05:05:32 2013 +0100 @@ -29,13 +29,20 @@ string(REGEX REPLACE "(.*)/include.*" "\\1" qt_base_dir "${QT_INCLUDE_DIR}") #remove the ";-framework Cocoa" from the SDL_LIBRARY variable - string(REGEX REPLACE "(.*);-.*" "\\1" sdl_dir "${SDL_LIBRARY}") + string(REGEX REPLACE "(.*);-.*" "\\1" sdl_library_only "${SDL_LIBRARY}") if(NOT NOPNG) #get the neme of the library (harmelss if it is static) string(REGEX REPLACE ".*/(.*)$" "\\1" PNG_LIBNAME "${PNG_LIBRARY}") endif() + set(frameworks_dir ${CMAKE_INSTALL_PREFIX}/${target_library_install_dir}) + if(${BUILD_ENGINE_LIBRARY}) + set(engine_full_path "${frameworks_dir}/${CMAKE_SHARED_LIBRARY_PREFIX}hwengine${CMAKE_SHARED_LIBRARY_SUFFIX}") + else() + set(engine_full_path "${CMAKE_INSTALL_PREFIX}/hwengine${CMAKE_EXECUTABLE_SUFFIX}") + endif() + #this tool is present in qt 4.5 but only if you compile from sources #from qt 4.6 is present also in the binary version find_program(macdeployqt_executable NAMES macdeployqt macdeployqt-mac PATHS ${qt_base_dir}/bin) diff -r d5d5e1698554 -r 1dedcc37bfe8 tools/CreateMacBundle.cmake.in --- a/tools/CreateMacBundle.cmake.in Sun Nov 18 01:06:01 2012 +0400 +++ b/tools/CreateMacBundle.cmake.in Fri Feb 22 05:05:32 2013 +0100 @@ -1,34 +1,34 @@ message(STATUS "Performing standalone bundle creation...") -execute_process(COMMAND ls ${frameworks_dir} RESULT_VARIABLE doBundle OUTPUT_QUIET ERROR_QUIET) +execute_process(COMMAND stat ${frameworks_dir} RESULT_VARIABLE doBundle OUTPUT_QUIET ERROR_QUIET) execute_process(COMMAND mkdir -p ${frameworks_dir}) # macdeployqt will convert safely any absolute path library for 'hedgewars' -execute_process(COMMAND ${macdeployqt_executable} ${CMAKE_BINARY_DIR}/${bundle_name} OUTPUT_QUIET ERROR_QUIET) +execute_process(COMMAND ${macdeployqt_executable} ${CMAKE_BINARY_DIR}/Hedgewars.app OUTPUT_QUIET ERROR_QUIET) if(NOT ${NOVIDEOREC}) # but macdeployqt will not work for 'hwengine'; luckily the dylibs were already updated before - execute_process(COMMAND install_name_tool -change ${FFMPEG_LIBAVCODEC} @executable_path/../Frameworks/libavcodec.dylib ${CMAKE_BINARY_DIR}/${bundle_name}/Contents/MacOS/hwengine) - execute_process(COMMAND install_name_tool -change ${FFMPEG_LIBAVFORMAT} @executable_path/../Frameworks/libavformat.dylib ${CMAKE_BINARY_DIR}/${bundle_name}/Contents/MacOS/hwengine) - execute_process(COMMAND install_name_tool -change ${FFMPEG_LIBAVUTIL} @executable_path/../Frameworks/libavutil.dylib ${CMAKE_BINARY_DIR}/${bundle_name}/Contents/MacOS/hwengine) + execute_process(COMMAND install_name_tool -change ${FFMPEG_LIBAVCODEC} @executable_path/../Frameworks/libavcodec.dylib ${engine_full_path}) + execute_process(COMMAND install_name_tool -change ${FFMPEG_LIBAVFORMAT} @executable_path/../Frameworks/libavformat.dylib ${engine_full_path}) + execute_process(COMMAND install_name_tool -change ${FFMPEG_LIBAVUTIL} @executable_path/../Frameworks/libavutil.dylib ${engine_full_path}) endif() if(NOT ${NOPNG}) #same here, for libpng and hwengine, let's assume the version pulled by macdeployqt is the same #(yes libpng is pulled by macdeployqt even when NOVIDEOREC is active) - execute_process(COMMAND install_name_tool -change ${PNG_LIBRARY} @executable_path/../Frameworks/${PNG_LIBNAME} ${CMAKE_BINARY_DIR}/${bundle_name}/Contents/MacOS/hwengine) + execute_process(COMMAND install_name_tool -change ${PNG_LIBRARY} @executable_path/../Frameworks/${PNG_LIBNAME} ${engine_full_path}) endif() if(doBundle EQUAL 1) - execute_process(COMMAND cp -pPR ${sdl_dir} ${CMAKE_BINARY_DIR}/${frameworks_dir}/SDL.framework) - execute_process(COMMAND cp -pPR ${SDLIMAGE_LIBRARY} ${CMAKE_BINARY_DIR}/${frameworks_dir}/SDL_image.framework) - execute_process(COMMAND cp -pPR ${SDLNET_LIBRARY} ${CMAKE_BINARY_DIR}/${frameworks_dir}/SDL_net.framework) - execute_process(COMMAND cp -pPR ${SDLTTF_LIBRARY} ${CMAKE_BINARY_DIR}/${frameworks_dir}/SDL_ttf.framework) - execute_process(COMMAND cp -pPR ${SDLMIXER_LIBRARY} ${CMAKE_BINARY_DIR}/${frameworks_dir}/SDL_mixer.framework) - execute_process(COMMAND cp -pPR ${OGG_LIBRARY} ${CMAKE_BINARY_DIR}/${frameworks_dir}/Ogg.framework) - execute_process(COMMAND cp -pPR ${VORBIS_LIBRARY} ${CMAKE_BINARY_DIR}/${frameworks_dir}/Vorbis.framework) + execute_process(COMMAND cp -pPR ${sdl_library_only} ${frameworks_dir}/SDL.framework) + execute_process(COMMAND cp -pPR ${SDLIMAGE_LIBRARY} ${frameworks_dir}/SDL_image.framework) + execute_process(COMMAND cp -pPR ${SDLNET_LIBRARY} ${frameworks_dir}/SDL_net.framework) + execute_process(COMMAND cp -pPR ${SDLTTF_LIBRARY} ${frameworks_dir}/SDL_ttf.framework) + execute_process(COMMAND cp -pPR ${SDLMIXER_LIBRARY} ${frameworks_dir}/SDL_mixer.framework) + execute_process(COMMAND cp -pPR ${OGG_LIBRARY} ${frameworks_dir}/Ogg.framework) + execute_process(COMMAND cp -pPR ${VORBIS_LIBRARY} ${frameworks_dir}/Vorbis.framework) if(${SPARKLE_FOUND}) - execute_process(COMMAND cp -pPR ${SPARKLE_LIBRARY} ${CMAKE_BINARY_DIR}/${frameworks_dir}/Sparkle.framework) + execute_process(COMMAND cp -pPR ${SPARKLE_LIBRARY} ${frameworks_dir}/Sparkle.framework) endif() message(STATUS "Bundle frameworks added") else() diff -r d5d5e1698554 -r 1dedcc37bfe8 tools/PascalParser.hs --- a/tools/PascalParser.hs Sun Nov 18 01:06:01 2012 +0400 +++ b/tools/PascalParser.hs Fri Feb 22 05:05:32 2013 +0100 @@ -45,7 +45,7 @@ parens pas (liftM RefExpression expression >>= postfixes) >>= postfixes , try $ typeCast >>= postfixes , char '@' >> liftM Address reference >>= postfixes - , liftM SimpleReference iD >>= postfixes + , liftM SimpleReference iD >>= postfixes ] "simple reference" table = [ @@ -149,7 +149,7 @@ if null r then return $ ArrayDecl Nothing t else - return $ foldr (\a b -> ArrayDecl (Just a) b) (ArrayDecl (Just $ head r) t) (tail r) + return $ foldr (\a b -> ArrayDecl (Just a) b) (ArrayDecl (Just $ head r) t) (tail r) recordDecl = do try $ do optional $ (try $ string "packed") >> comments @@ -401,7 +401,7 @@ {-, [ Infix (try $ string "shl" >> return (BinOp "shl")) AssocNone , Infix (try $ string "shr" >> return (BinOp "shr")) AssocNone ] - , [ + , [ Infix (try $ string "or" >> return (BinOp "or")) AssocLeft , Infix (try $ string "xor" >> return (BinOp "xor")) AssocLeft ]-} @@ -497,7 +497,7 @@ optionMaybe $ choice [ try $ string "to" , try $ string "downto" - ] + ] --choice [string "to", string "downto"] comments e2 <- expression @@ -563,7 +563,7 @@ initExpression = buildExpressionParser table term "initialization expression" where term = comments >> choice [ - liftM (uncurry BuiltInFunction) $ builtInFunction initExpression + liftM (uncurry BuiltInFunction) $ builtInFunction initExpression , try $ brackets pas (commaSep pas $ initExpression) >>= return . InitSet , try $ parens pas (commaSep pas $ initExpression) >>= \ia -> when (null $ tail ia) mzero >> return (InitArray ia) , try $ parens pas (sepEndBy recField (char ';' >> comments)) >>= return . InitRecord diff -r d5d5e1698554 -r 1dedcc37bfe8 tools/PascalPreprocessor.hs --- a/tools/PascalPreprocessor.hs Sun Nov 18 01:06:01 2012 +0400 +++ b/tools/PascalPreprocessor.hs Fri Feb 22 05:05:32 2013 +0100 @@ -19,7 +19,6 @@ ("FPC", "") , ("PAS2C", "") , ("ENDIAN_LITTLE", "") - , ("S3D_DISABLED", "") ] preprocess :: String -> IO String diff -r d5d5e1698554 -r 1dedcc37bfe8 tools/build_windows.bat --- a/tools/build_windows.bat Sun Nov 18 01:06:01 2012 +0400 +++ b/tools/build_windows.bat Fri Feb 22 05:05:32 2013 +0100 @@ -1,6 +1,6 @@ @echo off ::edit these variables if you need -set PASCAL=C:\FPC\2.4.4\bin\i386-win32\ +set PASCAL=C:\FPC\2.6.0\bin\i386-win32\ set QTDIR=C:\QtSDK\Desktop\Qt\4.7.4\mingw\bin set PATH=%PATH%;%PASCAL% set BUILD_TYPE="Debug" @@ -39,13 +39,13 @@ echo Running cmake... set ERRORLEVEL= -cmake -G "MinGW Makefiles" -DCMAKE_INCLUDE_PATH="%CD%\misc\winutils\include" -DCMAKE_LIBRARY_PATH="%CD%\misc\winutils\lib" -DPNG_LIBRARY="%CD%\misc\winutils\bin\libpng13.dll" . -DCMAKE_BUILD_TYPE=%BUILD_TYPE% +cmake -G "MinGW Makefiles" -DPNG_LIBRARY="%CD%\misc\winutils\bin\libpng13.dll" . -DCMAKE_BUILD_TYPE=%BUILD_TYPE% if %ERRORLEVEL% NEQ 0 goto exitpoint echo Running make... set ERRORLEVEL= -mingw32-make +mingw32-make VERBOSE=1 if %ERRORLEVEL% NEQ 0 goto exitpoint echo Installing... diff -r d5d5e1698554 -r 1dedcc37bfe8 tools/pas2c.hs --- a/tools/pas2c.hs Sun Nov 18 01:06:01 2012 +0400 +++ b/tools/pas2c.hs Fri Feb 22 05:05:32 2013 +0100 @@ -502,7 +502,7 @@ liftM (map(\i -> t' i)) $ mapM (id2CTyped2 (Just $ t' empty) (VarParamType t)) ids tvar2C _ externVar includeType ignoreInit (VarDeclaration _ isConst (ids, t) mInitExpr) = do - t' <- liftM (((if isConst then text "static const" else if externVar + t' <- liftM (((if isConst then text "static const" else if externVar then text "extern" else empty) <+>) . ) $ type2C t @@ -522,18 +522,18 @@ ie' <- return $ case (r, mInitExpr, ignoreInit) of (RangeInfinite, Nothing, False) -> text "= NULL" -- force dynamic array to be initialized as NULL if not initialized at all (_, _, _) -> ie - result <- liftM (map(\i -> varDeclDecision isConst includeType (t' i) ie')) $ mapM (id2CTyped t) ids + result <- liftM (map(\i -> varDeclDecision isConst includeType (t' i) ie')) $ mapM (id2CTyped t) ids case (r, ignoreInit) of - (RangeInfinite, False) -> + (RangeInfinite, False) -> -- if the array is dynamic, add dimension info to it return $ [dimDecl] ++ result - where + where arrayDimStr = show $ arrayDimension t arrayDimInitExp = text ("={" ++ ".dim = " ++ arrayDimStr ++ ", .a = {0, 0, 0, 0}}") dimDecl = varDeclDecision isConst includeType (text "fpcrtl_dimension_t" <+> i' <> text "_dimension_info") arrayDimInitExp - + (_, _) -> return result - + _ -> liftM (map(\i -> varDeclDecision isConst includeType (t' i) ie)) $ mapM (id2CTyped2 (Just $ t' empty) t) ids where initExpr Nothing = return $ empty @@ -815,7 +815,7 @@ i <+> text "=" <+> e1 <> semi $$ iType <+> iEnd <+> text "=" <+> e2 <> semi - $$ + $$ text "if" <+> (parens $ i <+> text "<=" <+> iEnd) <+> text "do" <+> ph <+> text "while" <> parens (i <+> text "!=" <+> iEnd <+> text add) <> semi where diff -r d5d5e1698554 -r 1dedcc37bfe8 tools/templates/mainform.cpp --- a/tools/templates/mainform.cpp Sun Nov 18 01:06:01 2012 +0400 +++ b/tools/templates/mainform.cpp Fri Feb 22 05:05:32 2013 +0100 @@ -9,102 +9,102 @@ #include "mainform.h" MyWindow::MyWindow(QWidget * parent, Qt::WFlags flags) - : QMainWindow(parent, flags) + : QMainWindow(parent, flags) { - QWidget * centralWidget = new QWidget(this); - QGridLayout * mainlayout = new QGridLayout(centralWidget); - mainlayout->setMargin(1); - mainlayout->setSpacing(1); + QWidget * centralWidget = new QWidget(this); + QGridLayout * mainlayout = new QGridLayout(centralWidget); + mainlayout->setMargin(1); + mainlayout->setSpacing(1); - sa_xy = new QScrollArea(centralWidget); - xy = new PixLabel(); - xy->setFixedSize(1024, 512); - sa_xy->setWidget(xy); + sa_xy = new QScrollArea(centralWidget); + xy = new PixLabel(); + xy->setFixedSize(1024, 512); + sa_xy->setWidget(xy); - mainlayout->addWidget(sa_xy, 0, 0, 1, 4); + mainlayout->addWidget(sa_xy, 0, 0, 1, 4); - setCentralWidget(centralWidget); + setCentralWidget(centralWidget); - buttAdd = new QPushButton(centralWidget); - buttAdd->setText(tr("Add")); - mainlayout->addWidget(buttAdd, 1, 0); + buttAdd = new QPushButton(centralWidget); + buttAdd->setText(tr("Add")); + mainlayout->addWidget(buttAdd, 1, 0); - buttCode = new QPushButton(centralWidget); - buttCode->setText(tr("Code")); - mainlayout->addWidget(buttCode, 1, 1); + buttCode = new QPushButton(centralWidget); + buttCode->setText(tr("Code")); + mainlayout->addWidget(buttCode, 1, 1); - buttSave = new QPushButton(centralWidget); - buttSave->setText(tr("Save")); - mainlayout->addWidget(buttSave, 1, 3); + buttSave = new QPushButton(centralWidget); + buttSave->setText(tr("Save")); + mainlayout->addWidget(buttSave, 1, 3); - buttLoad = new QPushButton(centralWidget); - buttLoad->setText(tr("Load")); - mainlayout->addWidget(buttLoad, 1, 2); + buttLoad = new QPushButton(centralWidget); + buttLoad->setText(tr("Load")); + mainlayout->addWidget(buttLoad, 1, 2); - connect(buttAdd, SIGNAL(clicked()), xy, SLOT(AddRect())); - connect(buttCode, SIGNAL(clicked()), this, SLOT(Code())); - connect(buttSave, SIGNAL(clicked()), this, SLOT(Save())); - connect(buttLoad, SIGNAL(clicked()), this, SLOT(Load())); + connect(buttAdd, SIGNAL(clicked()), xy, SLOT(AddRect())); + connect(buttCode, SIGNAL(clicked()), this, SLOT(Code())); + connect(buttSave, SIGNAL(clicked()), this, SLOT(Save())); + connect(buttLoad, SIGNAL(clicked()), this, SLOT(Load())); } void MyWindow::Code() { - if (xy->rects.size()) - { - QFile f("template.pas"); - if (!f.open(QIODevice::WriteOnly)) - { - QMessageBox::information(this, tr("Error"), - tr("Cannot save")); - return ; - } + if (xy->rects.size()) + { + QFile f("template.pas"); + if (!f.open(QIODevice::WriteOnly)) + { + QMessageBox::information(this, tr("Error"), + tr("Cannot save")); + return ; + } - QTextStream stream(&f); - stream << QString("const Template0Points: array[0..%1] of TSDL_Rect =").arg(xy->rects.size() - 1) << endl; - stream << " (" << endl; - for(int i = 0; i < xy->rects.size(); i++) - { - QRect r = xy->rects[i].normalized(); - stream << QString(" (x: %1; y: %2; w: %3; h: %4),"). - arg(r.x() * 4, 4).arg(r.y() * 4, 4).arg(r.width() * 4, 4).arg(r.height() * 4, 4) << endl; - } - stream << " );" << endl; - f.close(); - } + QTextStream stream(&f); + stream << QString("const Template0Points: array[0..%1] of TSDL_Rect =").arg(xy->rects.size() - 1) << endl; + stream << " (" << endl; + for(int i = 0; i < xy->rects.size(); i++) + { + QRect r = xy->rects[i].normalized(); + stream << QString(" (x: %1; y: %2; w: %3; h: %4),"). + arg(r.x() * 4, 4).arg(r.y() * 4, 4).arg(r.width() * 4, 4).arg(r.height() * 4, 4) << endl; + } + stream << " );" << endl; + f.close(); + } } void MyWindow::Save() { - Code(); + Code(); } void MyWindow::Load() { - QFile f("template.pas"); - if (!f.open(QIODevice::ReadOnly)) - { - QMessageBox::information(this, tr("Error"), - tr("Cannot open file")); - return ; - } + QFile f("template.pas"); + if (!f.open(QIODevice::ReadOnly)) + { + QMessageBox::information(this, tr("Error"), + tr("Cannot open file")); + return ; + } - QTextStream stream(&f); - QStringList sl; - while (!stream.atEnd()) - { - sl << stream.readLine(); - } - xy->rects.clear(); - for (int i = 0; i < sl.size(); ++i) - { - QRegExp re("x:\\s+(\\d+);\\sy:\\s+(\\d+);\\sw:\\s+(\\d+);\\sh:\\s+(\\d+)"); - re.indexIn(sl.at(i)); - QStringList coords = re.capturedTexts(); - qDebug() << sl.at(i) << coords; - if ((coords.size() == 5) && (coords[0].size())) - xy->rects.push_back(QRect(coords[1].toInt() / 4, coords[2].toInt() / 4, coords[3].toInt() / 4, coords[4].toInt() / 4)); - } - f.close(); - xy->repaint(); + QTextStream stream(&f); + QStringList sl; + while (!stream.atEnd()) + { + sl << stream.readLine(); + } + xy->rects.clear(); + for (int i = 0; i < sl.size(); ++i) + { + QRegExp re("x:\\s+(\\d+);\\sy:\\s+(\\d+);\\sw:\\s+(\\d+);\\sh:\\s+(\\d+)"); + re.indexIn(sl.at(i)); + QStringList coords = re.capturedTexts(); + qDebug() << sl.at(i) << coords; + if ((coords.size() == 5) && (coords[0].size())) + xy->rects.push_back(QRect(coords[1].toInt() / 4, coords[2].toInt() / 4, coords[3].toInt() / 4, coords[4].toInt() / 4)); + } + f.close(); + xy->repaint(); } diff -r d5d5e1698554 -r 1dedcc37bfe8 tools/templates/mainform.h --- a/tools/templates/mainform.h Sun Nov 18 01:06:01 2012 +0400 +++ b/tools/templates/mainform.h Fri Feb 22 05:05:32 2013 +0100 @@ -7,23 +7,23 @@ class MyWindow : public QMainWindow { - Q_OBJECT + Q_OBJECT public: - MyWindow(QWidget * parent = 0, Qt::WFlags flags = 0); + MyWindow(QWidget * parent = 0, Qt::WFlags flags = 0); private: - QScrollArea * sa_xy; - PixLabel * xy; - QPushButton * buttAdd; - QPushButton * buttCode; - QPushButton * buttSave; - QPushButton * buttLoad; + QScrollArea * sa_xy; + PixLabel * xy; + QPushButton * buttAdd; + QPushButton * buttCode; + QPushButton * buttSave; + QPushButton * buttLoad; private slots: - void Code(); - void Save(); - void Load(); + void Code(); + void Save(); + void Load(); }; diff -r d5d5e1698554 -r 1dedcc37bfe8 tools/templates/pixlabel.cpp --- a/tools/templates/pixlabel.cpp Sun Nov 18 01:06:01 2012 +0400 +++ b/tools/templates/pixlabel.cpp Fri Feb 22 05:05:32 2013 +0100 @@ -3,49 +3,49 @@ #include "pixlabel.h" PixLabel::PixLabel() - : QLabel(0) + : QLabel(0) { } void PixLabel::paintEvent(QPaintEvent * event) { - QLabel::paintEvent(event); - QPainter p(this); + QLabel::paintEvent(event); + QPainter p(this); - p.fillRect(QRect(0, 0, 1024, 512), QBrush(Qt::black)); + p.fillRect(QRect(0, 0, 1024, 512), QBrush(Qt::black)); - if (rects.size()) - { - p.setPen(QPen(Qt::lightGray)); - QVector centers; - for(QList::const_iterator it = rects.begin(); it != rects.end(); ++it) - centers.push_back((*it).center()); - p.drawPolyline(QPolygon(centers)); + if (rects.size()) + { + p.setPen(QPen(Qt::lightGray)); + QVector centers; + for(QList::const_iterator it = rects.begin(); it != rects.end(); ++it) + centers.push_back((*it).center()); + p.drawPolyline(QPolygon(centers)); - p.setPen(QPen(Qt::white)); - p.drawRects(rects.toVector()); + p.setPen(QPen(Qt::white)); + p.drawRects(rects.toVector()); - p.setPen(QPen(Qt::yellow)); - p.drawRect(rects.last()); - } + p.setPen(QPen(Qt::yellow)); + p.drawRect(rects.last()); + } } void PixLabel::mousePressEvent(QMouseEvent * e) { - if (!rects.empty()) - { - if (e->button() == Qt::LeftButton) - rects[rects.size() - 1].moveTopLeft(QPoint(e->x(), e->y())); - else - if (e->button() == Qt::RightButton) - rects[rects.size() - 1].setBottomRight(QPoint(e->x(), e->y())); - repaint(); - } + if (!rects.empty()) + { + if (e->button() == Qt::LeftButton) + rects[rects.size() - 1].moveTopLeft(QPoint(e->x(), e->y())); + else + if (e->button() == Qt::RightButton) + rects[rects.size() - 1].setBottomRight(QPoint(e->x(), e->y())); + repaint(); + } } void PixLabel::AddRect() { - rects.push_back(QRect(0, 0, 1, 1)); - repaint(); + rects.push_back(QRect(0, 0, 1, 1)); + repaint(); } diff -r d5d5e1698554 -r 1dedcc37bfe8 tools/templates/pixlabel.h --- a/tools/templates/pixlabel.h Sun Nov 18 01:06:01 2012 +0400 +++ b/tools/templates/pixlabel.h Fri Feb 22 05:05:32 2013 +0100 @@ -5,17 +5,17 @@ class PixLabel : public QLabel { - Q_OBJECT + Q_OBJECT public: - PixLabel(); - QList rects; + PixLabel(); + QList rects; public slots: - void AddRect(); + void AddRect(); private: - void paintEvent(QPaintEvent * event); - void mousePressEvent(QMouseEvent * e); + void paintEvent(QPaintEvent * event); + void mousePressEvent(QMouseEvent * e); };