This is an automated email from the git hooks/post-receive script. locutusofborg-guest pushed a commit to branch master in repository hedgewars.
commit 7b18fb03d9c11a6f61facad33519c431b89b3a34 Author: Gianfranco Costamagna <[email protected]> Date: Thu Jan 2 12:31:34 2014 +0100 Imported Upstream version 0.9.20.3 --- CMakeLists.txt | 10 +-- QTfrontend/CMakeLists.txt | 4 +- QTfrontend/res/css/chat.css | 2 +- QTfrontend/servermessages.h | 12 +-- QTfrontend/ui/page/pagemain.cpp | 8 +- cmake_modules/CMakePascalInformation.cmake | 4 +- cmake_modules/paths.cmake | 28 ++++--- cmake_modules/platform.cmake | 36 ++++----- gameServer/Actions.hs | 3 +- gameServer/CoreTypes.hs | 2 +- gameServer/OfficialServer/checker.hs | 6 +- gameServer/OfficialServer/extdbinterface.hs | 13 +-- hedgewars/CMakeLists.txt | 4 + hedgewars/uGearsHandlersMess.pas | 2 +- hedgewars/uLand.pas | 4 +- hedgewars/uLandGraphics.pas | 118 ++++++++++++++-------------- misc/libphysfs/platform_unix.c | 2 +- share/hedgewars/Data/misc/hedgewars.desktop | 2 +- share/version_info.txt | 4 +- tools/CreateMacBundle.cmake.in | 18 +++-- 20 files changed, 143 insertions(+), 139 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f9337b2..20ab9b7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -51,9 +51,10 @@ message(STATUS "Building ${HEDGEWARS_VERSION}-r${HEDGEWARS_REVISION} (${HEDGEWAR #general utilities include(${CMAKE_MODULE_PATH}/utils.cmake) +#paths initialization +include(${CMAKE_MODULE_PATH}/paths.cmake) #platform specific init code include(${CMAKE_MODULE_PATH}/platform.cmake) -include(${CMAKE_MODULE_PATH}/paths.cmake) #when build type is not specified, assume Debug/Release according to build version information @@ -73,14 +74,11 @@ include(${CMAKE_MODULE_PATH}/compilerchecks.cmake) #set default compiler flags add_flag_append(CMAKE_C_FLAGS "-Wall -pipe") -add_flag_append(CMAKE_C_FLAGS_RELEASE "-Os") +add_flag_append(CMAKE_C_FLAGS_RELEASE "-O2") add_flag_append(CMAKE_C_FLAGS_DEBUG "-Wextra -O0") add_flag_append(CMAKE_CXX_FLAGS "-Wall -pipe") -add_flag_append(CMAKE_CXX_FLAGS_RELEASE "-Os") +add_flag_append(CMAKE_CXX_FLAGS_RELEASE "-O2") add_flag_append(CMAKE_CXX_FLAGS_DEBUG "-Wextra -O0") -add_flag_append(CMAKE_Pascal_FLAGS "-Cs2000000") -add_flag_append(CMAKE_Pascal_FLAGS_DEBUG "-O- -gv") -add_flag_append(CMAKE_Pascal_FLAGS_RELEASE "-Os -Xs") #CMake adds a lot of additional configuration flags, so let's clear them up if(${MINIMAL_FLAGS}) diff --git a/QTfrontend/CMakeLists.txt b/QTfrontend/CMakeLists.txt index 02da735..a8e427b 100644 --- a/QTfrontend/CMakeLists.txt +++ b/QTfrontend/CMakeLists.txt @@ -61,8 +61,8 @@ 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(${PHYSFS_INCLUDE_DIR}) -include_directories(${PHYSLAYER_INCLUDE_DIR}) +include_directories(BEFORE ${PHYSFS_INCLUDE_DIR}) +include_directories(BEFORE ${PHYSLAYER_INCLUDE_DIR}) if(UNIX) diff --git a/QTfrontend/res/css/chat.css b/QTfrontend/res/css/chat.css index a914c7f..19dc58f 100644 --- a/QTfrontend/res/css/chat.css +++ b/QTfrontend/res/css/chat.css @@ -9,7 +9,7 @@ * * In the QTfrontend of hedgewars also display:none; will work for class names * that start with msg_ and .timestamp - as long as they are referenced - * directly and not within any class hierachy. + * directly and not within any class hierarchy. * Note: Will only effect new lines! * ****************************************************************************** diff --git a/QTfrontend/servermessages.h b/QTfrontend/servermessages.h index 96bc20a..e57b1ff 100644 --- a/QTfrontend/servermessages.h +++ b/QTfrontend/servermessages.h @@ -1,5 +1,4 @@ const char * serverMessages[] = { -QT_TRANSLATE_NOOP("server", "Empty config entry"), QT_TRANSLATE_NOOP("server", "Restricted"), QT_TRANSLATE_NOOP("server", "Not room master"), QT_TRANSLATE_NOOP("server", "Corrupted hedgehogs info"), @@ -13,20 +12,21 @@ QT_TRANSLATE_NOOP("server", "Not team owner!"), QT_TRANSLATE_NOOP("server", "Less than two clans!"), QT_TRANSLATE_NOOP("server", "Illegal room name"), QT_TRANSLATE_NOOP("server", "Room with such name already exists"), +QT_TRANSLATE_NOOP("server", "Nickname already chosen"), +QT_TRANSLATE_NOOP("server", "Illegal nickname"), +QT_TRANSLATE_NOOP("server", "Protocol already known"), +QT_TRANSLATE_NOOP("server", "Bad number"), QT_TRANSLATE_NOOP("server", "Nickname is already in use"), QT_TRANSLATE_NOOP("server", "No checker rights"), QT_TRANSLATE_NOOP("server", "Authentication failed"), QT_TRANSLATE_NOOP("server", "60 seconds cooldown after kick"), QT_TRANSLATE_NOOP("server", "kicked"), QT_TRANSLATE_NOOP("server", "Ping timeout"), +QT_TRANSLATE_NOOP("server", "bye"), QT_TRANSLATE_NOOP("server", "No such room"), QT_TRANSLATE_NOOP("server", "Room version incompatible to your hedgewars version"), QT_TRANSLATE_NOOP("server", "Joining restricted"), QT_TRANSLATE_NOOP("server", "Registered users only"), QT_TRANSLATE_NOOP("server", "You are banned in this room"), -QT_TRANSLATE_NOOP("server", "Nickname already chosen"), -QT_TRANSLATE_NOOP("server", "Illegal nickname"), -QT_TRANSLATE_NOOP("server", "Protocol already known"), -QT_TRANSLATE_NOOP("server", "Bad number"), -QT_TRANSLATE_NOOP("server", "bye") +QT_TRANSLATE_NOOP("server", "Empty config entry") }; diff --git a/QTfrontend/ui/page/pagemain.cpp b/QTfrontend/ui/page/pagemain.cpp index f43c80b..d75376c 100644 --- a/QTfrontend/ui/page/pagemain.cpp +++ b/QTfrontend/ui/page/pagemain.cpp @@ -158,7 +158,7 @@ QString PageMain::randomTip() #else int platform = 3; #endif - if(Tips.length() == 0) + if(!Tips.length()) { DataManager & dataMgr = DataManager::instance(); @@ -209,7 +209,11 @@ QString PageMain::randomTip() file.close(); } - return Tips[QTime(0, 0, 0).secsTo(QTime::currentTime()) % Tips.length()]; + + if(Tips.length()) + return Tips[QTime(0, 0, 0).secsTo(QTime::currentTime()) % Tips.length()]; + else + return QString(); } void PageMain::toggleNetworkChoice() diff --git a/cmake_modules/CMakePascalInformation.cmake b/cmake_modules/CMakePascalInformation.cmake index c78e157..f2af300 100644 --- a/cmake_modules/CMakePascalInformation.cmake +++ b/cmake_modules/CMakePascalInformation.cmake @@ -9,9 +9,9 @@ set(CMAKE_SYSTEM_AND_Pascal_COMPILER_INFO_FILE include(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME} OPTIONAL) # This section should actually be in Platform/${CMAKE_SYSTME_NAME}-fpc.cmake -set(CMAKE_Pascal_FLAGS_DEBUG_INIT "-g -gl -gp -gh") +set(CMAKE_Pascal_FLAGS_DEBUG_INIT "-O- -g -gl -gp -gh") set(CMAKE_Pascal_FLAGS_MINSIZEREL_INIT "-Os -dNDEBUG") -set(CMAKE_Pascal_FLAGS_RELEASE_INIT "-O3 -dNDEBUG") +set(CMAKE_Pascal_FLAGS_RELEASE_INIT "-O2 -dNDEBUG") set(CMAKE_Pascal_FLAGS_RELWITHDEBINFO_INIT "-O2 -g -gl -gp") # This should be included before the _INIT variables are diff --git a/cmake_modules/paths.cmake b/cmake_modules/paths.cmake index ddf2623..6cdcd2d 100644 --- a/cmake_modules/paths.cmake +++ b/cmake_modules/paths.cmake @@ -14,8 +14,8 @@ set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_DEBUG ${LIBRARY_OUTPUT_PATH}) #resource paths if(UNIX AND NOT APPLE) - set(target_binary_install_dir "bin") - set(target_library_install_dir "lib") + set(target_binary_install_dir "bin" CACHE PATH "install dest for binaries") + set(target_library_install_dir "lib" CACHE PATH "install dest for libs") string(SUBSTRING "${DATA_INSTALL_DIR}" 0 1 sharepath_start) if (NOT (${sharepath_start} MATCHES "/")) @@ -55,14 +55,16 @@ set(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE) #which point to directories outside the build tree to the install RPATH set(CMAKE_INSTALL_RPATH_USE_LINK_PATH FALSE) -#paths where to find libraries (final slash not optional): -# - the first is relative to the executable -# - the second is the same directory of the executable (so it runs in bin/) -# - the third one is the full path of the system dir -#source http://www.cmake.org/pipermail/cmake/2008-January/019290.html -set(CMAKE_INSTALL_RPATH "$ORIGIN/../${target_library_install_dir}/:$ORIGIN/:${CMAKE_INSTALL_PREFIX}/${target_library_install_dir}/") - - -#install_name_tool magic for OS X -set(CMAKE_INSTALL_NAME_DIR "@executable_path/../Frameworks") - +if(APPLE) + #@rpath mangling + set(CMAKE_INSTALL_RPATH "@executable_path/../Frameworks") + #install_name_tool for libraries + set(CMAKE_INSTALL_NAME_DIR "@executable_path/../Frameworks") +else(APPLE) + #paths where to find libraries (final slash not optional): + # - the first is relative to the executable + # - the second is the same directory of the executable (so it runs in bin/) + # - the third one is the full path of the system dir + #source http://www.cmake.org/pipermail/cmake/2008-January/019290.html + set(CMAKE_INSTALL_RPATH "$ORIGIN/../${target_library_install_dir}/:$ORIGIN/:${CMAKE_INSTALL_PREFIX}/${target_library_install_dir}/") +endif(APPLE) diff --git a/cmake_modules/platform.cmake b/cmake_modules/platform.cmake index bd5342c..fcb5bef 100644 --- a/cmake_modules/platform.cmake +++ b/cmake_modules/platform.cmake @@ -31,24 +31,15 @@ if(APPLE) set(minimum_macosx_version ${current_macosx_version}) endif() - #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 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") - add_flag_append(CMAKE_C_FLAGS "${DYLIB_SMPEG} ${DYLIB_MIKMOD}") - add_flag_append(CMAKE_CXX_FLAGS "${DYLIB_SMPEG} ${DYLIB_MIKMOD}") - add_flag_append(CMAKE_Pascal_FLAGS "-k${DYLIB_SMPEG} -k${DYLIB_MIKMOD}") + #10.3 systems don't have enough processing power anyway + #10.4 does not have @rpath support (which SDL uses) + if(minimum_macosx_version VERSION_LESS "10.5") + message(FATAL_ERROR "Hedgewars is not supported on your version of Mac OS X") endif() if(NOT CMAKE_OSX_ARCHITECTURES) if(current_macosx_version VERSION_LESS "10.6") - #SDL is only 32 bit on lower OS + #SDL is only 32 bit on older OS version if(${CMAKE_SYSTEM_PROCESSOR} MATCHES "powerpc*") set(CMAKE_OSX_ARCHITECTURES "ppc7400") else() @@ -83,20 +74,21 @@ if(APPLE) #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} 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 "/Developer/usr/bin/gcc-4.0") - set(CMAKE_CXX_COMPILER "/Developer/usr/bin/g++-4.0") - else() - string(REGEX REPLACE "([0-9]+.[0-9]+).[0-9]+" "\\1" sdk_version ${minimum_macosx_version}) - set(CMAKE_OSX_SYSROOT "/Developer/SDKs/MacOSX${sdk_version}.sdk/") - endif() + string(REGEX REPLACE "([0-9]+.[0-9]+).[0-9]+" "\\1" sdk_version ${minimum_macosx_version}) + set(CMAKE_OSX_SYSROOT "/Developer/SDKs/MacOSX${sdk_version}.sdk/") add_flag_append(CMAKE_Pascal_FLAGS "-XR${CMAKE_OSX_SYSROOT}") add_flag_append(CMAKE_Pascal_FLAGS "-k-macosx_version_min -k${minimum_macosx_version}") endif() #add user framework directory add_flag_append(CMAKE_Pascal_FLAGS "-Ff~/Library/Frameworks") + + #workaround older cmake versions + if(${CMAKE_VERSION} VERSION_LESS "2.8.12") + add_flag_append(CMAKE_C_LINK_FLAGS "-Wl,-rpath -Wl,${CMAKE_INSTALL_RPATH}") + add_flag_append(CMAKE_CXX_LINK_FLAGS "-Wl,-rpath -Wl,${CMAKE_INSTALL_RPATH}") + add_flag_append(CMAKE_Pascal_LINK_FLAGS "-k-rpath -k${CMAKE_INSTALL_RPATH}") + endif() endif(APPLE) if(MINGW) diff --git a/gameServer/Actions.hs b/gameServer/Actions.hs index 447f254..2cebe4f 100644 --- a/gameServer/Actions.hs +++ b/gameServer/Actions.hs @@ -717,8 +717,9 @@ processAction (CheckFailed msg) = do processAction (CheckSuccess info) = do Just (CheckInfo fileName teams) <- client's checkInfo + p <- client's clientProto si <- gets serverInfo - io $ writeChan (dbQueries si) $ StoreAchievements (B.pack fileName) (map toPair teams) info + io $ writeChan (dbQueries si) $ StoreAchievements p (B.pack fileName) (map toPair teams) info io $ moveCheckedRecord fileName where toPair t = (teamname t, teamowner t) diff --git a/gameServer/CoreTypes.hs b/gameServer/CoreTypes.hs index 4ce60a2..8d6d988 100644 --- a/gameServer/CoreTypes.hs +++ b/gameServer/CoreTypes.hs @@ -275,7 +275,7 @@ data DBQuery = CheckAccount ClientIndex Int B.ByteString B.ByteString | ClearCache | SendStats Int Int - | StoreAchievements B.ByteString [(B.ByteString, B.ByteString)] [B.ByteString] + | StoreAchievements Word16 B.ByteString [(B.ByteString, B.ByteString)] [B.ByteString] | GetReplayName ClientIndex Int B.ByteString deriving (Show, Read) diff --git a/gameServer/OfficialServer/checker.hs b/gameServer/OfficialServer/checker.hs index 3c053d4..cb5d2bc 100644 --- a/gameServer/OfficialServer/checker.hs +++ b/gameServer/OfficialServer/checker.hs @@ -36,7 +36,7 @@ data Message = Packet [B.ByteString] deriving Show serverAddress = "netserver.hedgewars.org" -protocolNumber = "45" +protocolNumber = "47" getLines :: Handle -> IO [B.ByteString] getLines h = g @@ -77,10 +77,10 @@ checkReplay coreChan msgs = do hFlush h hClose h - (_, _, Just hOut, _) <- createProcess (proc "/usr/home/unC0Rr/Sources/Hedgewars/Releases/0.9.19/bin/hwengine" + (_, _, Just hOut, _) <- createProcess (proc "/usr/home/unC0Rr/Sources/Hedgewars/Releases/0.9.20/bin/hwengine" [fileName , "--user-prefix", "/usr/home/unC0Rr/.hedgewars" - , "--prefix", "/usr/home/unC0Rr/Sources/Hedgewars/Releases/0.9.19/share/hedgewars/Data" + , "--prefix", "/usr/home/unC0Rr/Sources/Hedgewars/Releases/0.9.20/share/hedgewars/Data" , "--nomusic" , "--nosound" , "--stats-only" diff --git a/gameServer/OfficialServer/extdbinterface.hs b/gameServer/OfficialServer/extdbinterface.hs index 0091a1e..f62de3a 100644 --- a/gameServer/OfficialServer/extdbinterface.hs +++ b/gameServer/OfficialServer/extdbinterface.hs @@ -26,9 +26,9 @@ dbQueryStats = "INSERT INTO gameserver_stats (players, rooms, last_update) VALUES (?, ?, UNIX_TIMESTAMP())" dbQueryAchievement = - "INSERT INTO achievements (time, typeid, userid, value, filename, location) \ + "INSERT INTO achievements (time, typeid, userid, value, filename, location, protocol) \ \ VALUES (?, (SELECT id FROM achievement_types WHERE name = ?), (SELECT uid FROM users WHERE name = ?), \ - \ ?, ?, ?)" + \ ?, ?, ?, ?)" dbQueryReplayFilename = "SELECT filename FROM achievements WHERE id = ?" @@ -70,15 +70,15 @@ dbInteractionLoop dbConn = forever $ do SendStats clients rooms -> run dbConn dbQueryStats [SqlInt32 $ fromIntegral clients, SqlInt32 $ fromIntegral rooms] >> return () --StoreAchievements (B.pack fileName) (map toPair teams) info - StoreAchievements fileName teams info -> - mapM_ (run dbConn dbQueryAchievement) $ (parseStats fileName teams) info + StoreAchievements p fileName teams info -> + mapM_ (run dbConn dbQueryAchievement) $ (parseStats p fileName teams) info readTime = read . B.unpack . B.take 19 . B.drop 8 -parseStats :: B.ByteString -> [(B.ByteString, B.ByteString)] -> [B.ByteString] -> [[SqlValue]] -parseStats fileName teams = ps +parseStats :: Word16 -> B.ByteString -> [(B.ByteString, B.ByteString)] -> [B.ByteString] -> [[SqlValue]] +parseStats p fileName teams = ps where time = readTime fileName ps [] = [] @@ -91,6 +91,7 @@ parseStats fileName teams = ps , SqlInt32 (readInt_ value) , SqlByteString fileName , SqlByteString location + , SqlInt32 p ] : ps bs ps (b:bs) = ps bs diff --git a/hedgewars/CMakeLists.txt b/hedgewars/CMakeLists.txt index b5e4625..4f22453 100644 --- a/hedgewars/CMakeLists.txt +++ b/hedgewars/CMakeLists.txt @@ -8,6 +8,10 @@ include (CheckLibraryExists) enable_language(Pascal) +add_flag_append(CMAKE_Pascal_FLAGS "-Cs2000000") +add_flag_append(CMAKE_Pascal_FLAGS_DEBUG "-gv") +add_flag_append(CMAKE_Pascal_FLAGS_RELEASE "-Xs") + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.inc.in ${CMAKE_CURRENT_BINARY_DIR}/config.inc) include_directories(${CMAKE_CURRENT_BINARY_DIR}) diff --git a/hedgewars/uGearsHandlersMess.pas b/hedgewars/uGearsHandlersMess.pas index bd8c5fd..677422a 100644 --- a/hedgewars/uGearsHandlersMess.pas +++ b/hedgewars/uGearsHandlersMess.pas @@ -5481,7 +5481,7 @@ begin if (Timer = iceCollideWithGround) and ((GameTicks - Power) > groundFreezingTime) then begin - FillRoundInLand(target.x, target.y, iceRadius, icePixel); + FillRoundInLandFT(target.x, target.y, iceRadius, icePixel); landRect.x := min(max(target.x - iceRadius, 0), LAND_WIDTH - 1); landRect.y := min(max(target.y - iceRadius, 0), LAND_HEIGHT - 1); landRect.w := min(2*iceRadius, LAND_WIDTH - landRect.x - 1); diff --git a/hedgewars/uLand.pas b/hedgewars/uLand.pas index 71d3d37..c91b84d 100644 --- a/hedgewars/uLand.pas +++ b/hedgewars/uLand.pas @@ -123,7 +123,7 @@ begin for x:= 0 to LAND_WIDTH - 1 do for y:= 0 to LAND_HEIGHT - 1 do - if LandPixels[y, x] = 0 then + if Land[y, x] = 0 then if s < y then begin for i:= max(s, y - 8) to y - 1 do @@ -157,7 +157,7 @@ begin for y:= 0 to LAND_HEIGHT - 1 do for x:= 0 to LAND_WIDTH - 1 do - if LandPixels[y, x] = 0 then + if Land[y, x] = 0 then if s < x then begin for i:= max(s, x - 8) to x - 1 do diff --git a/hedgewars/uLandGraphics.pas b/hedgewars/uLandGraphics.pas index 2609388..6a2ea66 100644 --- a/hedgewars/uLandGraphics.pas +++ b/hedgewars/uLandGraphics.pas @@ -40,7 +40,7 @@ function DrawExplosion(X, Y, Radius: LongInt): Longword; procedure DrawHLinesExplosions(ar: PRangeArray; Radius: LongInt; y, dY: LongInt; Count: Byte); procedure DrawTunnel(X, Y, dX, dY: hwFloat; ticks, HalfWidth: LongInt); procedure FillRoundInLand(X, Y, Radius: LongInt; Value: Longword); -function FillRoundInLand(X, Y, Radius: LongInt; fill: fillType): LongWord; +function FillRoundInLandFT(X, Y, Radius: LongInt; fill: fillType): Longword; procedure ChangeRoundInLand(X, Y, Radius: LongInt; doSet, isCurrent: boolean); function LandBackPixel(x, y: LongInt): LongWord; procedure DrawLine(X1, Y1, X2, Y2: LongInt; Color: Longword); @@ -171,87 +171,87 @@ if Land[landY, landX] > 255 then Land[landY, landX] := Land[landY, landX] or lfI end; -function FillLandCircleLine(y, fromPix, toPix: LongInt; fill : fillType): Longword; +function FillLandCircleLineFT(y, fromPix, toPix: LongInt; fill : fillType): Longword; var px, py, i: LongInt; begin //get rid of compiler warning px := 0; py := 0; - FillLandCircleLine := 0; + FillLandCircleLineFT := 0; case fill of backgroundPixel: - for i:= fromPix to toPix do - begin - calculatePixelsCoordinates(i, y, px, py); - inc(FillLandCircleLine, drawPixelBG(i, y, px, py)); - end; + for i:= fromPix to toPix do + begin + calculatePixelsCoordinates(i, y, px, py); + inc(FillLandCircleLineFT, drawPixelBG(i, y, px, py)); + end; ebcPixel: - for i:= fromPix to toPix do - begin - calculatePixelsCoordinates(i, y, px, py); - drawPixelEBC(i, y, px, py); - end; + for i:= fromPix to toPix do + begin + calculatePixelsCoordinates(i, y, px, py); + drawPixelEBC(i, y, px, py); + end; nullPixel: - for i:= fromPix to toPix do - begin - calculatePixelsCoordinates(i, y, px, py); - if ((Land[y, i] and lfIndestructible) = 0) and (not disableLandBack or (Land[y, i] > 255)) then - LandPixels[py, px]:= 0 - end; + for i:= fromPix to toPix do + begin + calculatePixelsCoordinates(i, y, px, py); + if ((Land[y, i] and lfIndestructible) = 0) and (not disableLandBack or (Land[y, i] > 255)) then + LandPixels[py, px]:= 0 + end; icePixel: - for i:= fromPix to toPix do - begin - calculatePixelsCoordinates(i, y, px, py); - DrawPixelIce(i, y, px, py); - end; + for i:= fromPix to toPix do + begin + calculatePixelsCoordinates(i, y, px, py); + DrawPixelIce(i, y, px, py); + end; setNotCurrentMask: - for i:= fromPix to toPix do - begin - Land[y, i]:= Land[y, i] and lfNotCurrentMask; - end; + for i:= fromPix to toPix do + begin + Land[y, i]:= Land[y, i] and lfNotCurrentMask; + end; changePixelSetNotCurrent: - for i:= fromPix to toPix do - begin - if Land[y, i] and lfObjMask > 0 then - Land[y, i]:= (Land[y, i] and lfNotObjMask) or ((Land[y, i] and lfObjMask) - 1); - end; + for i:= fromPix to toPix do + begin + if Land[y, i] and lfObjMask > 0 then + Land[y, i]:= Land[y, i] - 1; + end; setCurrentHog: - for i:= fromPix to toPix do - begin - Land[y, i]:= Land[y, i] or lfCurrentHog - end; + for i:= fromPix to toPix do + begin + Land[y, i]:= Land[y, i] or lfCurrentHog + end; changePixelNotSetNotCurrent: - for i:= fromPix to toPix do - begin - if Land[y, i] and lfObjMask < lfObjMask then - Land[y, i]:= (Land[y, i] and lfNotObjMask) or ((Land[y, i] and lfObjMask) + 1) - end; + for i:= fromPix to toPix do + begin + if Land[y, i] and lfObjMask < lfObjMask then + Land[y, i]:= Land[y, i] + 1 + end; end; end; -function FillLandCircleSegment(x, y, dx, dy: LongInt; fill : fillType): Longword; inline; +function FillLandCircleSegmentFT(x, y, dx, dy: LongInt; fill : fillType): Longword; inline; begin - FillLandCircleSegment := 0; + FillLandCircleSegmentFT := 0; if ((y + dy) and LAND_HEIGHT_MASK) = 0 then - inc(FillLandCircleSegment, FillLandCircleLine(y + dy, Max(x - dx, 0), Min(x + dx, LAND_WIDTH - 1), fill)); + inc(FillLandCircleSegmentFT, FillLandCircleLineFT(y + dy, Max(x - dx, 0), Min(x + dx, LAND_WIDTH - 1), fill)); if ((y - dy) and LAND_HEIGHT_MASK) = 0 then - inc(FillLandCircleSegment, FillLandCircleLine(y - dy, Max(x - dx, 0), Min(x + dx, LAND_WIDTH - 1), fill)); + inc(FillLandCircleSegmentFT, FillLandCircleLineFT(y - dy, Max(x - dx, 0), Min(x + dx, LAND_WIDTH - 1), fill)); if ((y + dx) and LAND_HEIGHT_MASK) = 0 then - inc(FillLandCircleSegment, FillLandCircleLine(y + dx, Max(x - dy, 0), Min(x + dy, LAND_WIDTH - 1), fill)); + inc(FillLandCircleSegmentFT, FillLandCircleLineFT(y + dx, Max(x - dy, 0), Min(x + dy, LAND_WIDTH - 1), fill)); if ((y - dx) and LAND_HEIGHT_MASK) = 0 then - inc(FillLandCircleSegment, FillLandCircleLine(y - dx, Max(x - dy, 0), Min(x + dy, LAND_WIDTH - 1), fill)); + inc(FillLandCircleSegmentFT, FillLandCircleLineFT(y - dx, Max(x - dy, 0), Min(x + dy, LAND_WIDTH - 1), fill)); end; -function FillRoundInLand(X, Y, Radius: LongInt; fill: fillType): Longword; inline; +function FillRoundInLandFT(X, Y, Radius: LongInt; fill: fillType): Longword; inline; var dx, dy, d: LongInt; begin dx:= 0; dy:= Radius; d:= 3 - 2 * Radius; -FillRoundInLand := 0; +FillRoundInLandFT := 0; while (dx < dy) do begin - inc(FillRoundInLand, FillLandCircleSegment(x, y, dx, dy, fill)); + inc(FillRoundInLandFT, FillLandCircleSegmentFT(x, y, dx, dy, fill)); if (d < 0) then d:= d + 4 * dx + 6 else @@ -262,7 +262,7 @@ while (dx < dy) do inc(dx) end; if (dx = dy) then - inc (FillRoundInLand, FillLandCircleSegment(x, y, dx, dy, fill)); + inc (FillRoundInLandFT, FillLandCircleSegmentFT(x, y, dx, dy, fill)); end; @@ -343,13 +343,13 @@ end; procedure ChangeRoundInLand(X, Y, Radius: LongInt; doSet, isCurrent: boolean); begin if not doSet and isCurrent then - FillRoundInLand(X, Y, Radius, setNotCurrentMask) + FillRoundInLandFT(X, Y, Radius, setNotCurrentMask) else if not doSet and not IsCurrent then - FillRoundInLand(X, Y, Radius, changePixelSetNotCurrent) + FillRoundInLandFT(X, Y, Radius, changePixelSetNotCurrent) else if doSet and IsCurrent then - FillRoundInLand(X, Y, Radius, setCurrentHog) + FillRoundInLandFT(X, Y, Radius, setCurrentHog) else if doSet and not IsCurrent then - FillRoundInLand(X, Y, Radius, changePixelNotSetNotCurrent); + FillRoundInLandFT(X, Y, Radius, changePixelNotSetNotCurrent); end; procedure DrawIceBreak(x, y, iceRadius, iceHeight: Longint); @@ -379,11 +379,11 @@ function DrawExplosion(X, Y, Radius: LongInt): Longword; var tx, ty, dx, dy: Longint; begin - DrawExplosion := FillRoundInLand(x, y, Radius, backgroundPixel); + DrawExplosion := FillRoundInLandFT(x, y, Radius, backgroundPixel); if Radius > 20 then - FillRoundInLand(x, y, Radius - 15, nullPixel); + FillRoundInLandFT(x, y, Radius - 15, nullPixel); FillRoundInLand(X, Y, Radius, 0); - FillRoundInLand(x, y, Radius + 4, ebcPixel); + FillRoundInLandFT(x, y, Radius + 4, ebcPixel); tx:= Max(X - Radius - 5, 0); dx:= Min(X + Radius + 5, LAND_WIDTH) - tx; ty:= Max(Y - Radius - 5, 0); diff --git a/misc/libphysfs/platform_unix.c b/misc/libphysfs/platform_unix.c index 51af43a..05356df 100644 --- a/misc/libphysfs/platform_unix.c +++ b/misc/libphysfs/platform_unix.c @@ -193,7 +193,7 @@ static char *findBinaryInPath(const char *bin, char *envr) if (access(exe, X_OK) == 0) /* Exists as executable? We're done. */ { - exe[size - binlen] = '\0'; /* chop off filename, leave '/' */ + exe[size - binlen - 1] = '\0'; /* chop off filename, leave '/' */ return exe; } /* if */ diff --git a/share/hedgewars/Data/misc/hedgewars.desktop b/share/hedgewars/Data/misc/hedgewars.desktop index f8bd895..47f4d0b 100755 --- a/share/hedgewars/Data/misc/hedgewars.desktop +++ b/share/hedgewars/Data/misc/hedgewars.desktop @@ -20,5 +20,5 @@ Icon=hedgewars Exec=hedgewars %U Terminal=false StartupNotify=false -Categories=Application;Game;StrategyGame; +Categories=Game;StrategyGame; MimeType=x-scheme-handler/hwplay; diff --git a/share/version_info.txt b/share/version_info.txt index 5655aec..2cc4d44 100644 --- a/share/version_info.txt +++ b/share/version_info.txt @@ -1,3 +1,3 @@ Hedgewars versioning information, do not modify -rev 9821 -hash 2b8f928faa14 +rev 9860 +hash af0520a6bf00 diff --git a/tools/CreateMacBundle.cmake.in b/tools/CreateMacBundle.cmake.in index 3b0bcc8..2813900 100644 --- a/tools/CreateMacBundle.cmake.in +++ b/tools/CreateMacBundle.cmake.in @@ -19,16 +19,18 @@ if(NOT ${NOPNG}) endif() if(doBundle EQUAL 1) - 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) + execute_process(COMMAND cp ${PNG_LIBRARY} ${frameworks_dir}) + + execute_process(COMMAND cp -pPR ${sdl_library_only} ${frameworks_dir}) + execute_process(COMMAND cp -pPR ${SDLIMAGE_LIBRARY} ${frameworks_dir}) + execute_process(COMMAND cp -pPR ${SDLNET_LIBRARY} ${frameworks_dir}) + execute_process(COMMAND cp -pPR ${SDLTTF_LIBRARY} ${frameworks_dir}) + execute_process(COMMAND cp -pPR ${SDLMIXER_LIBRARY} ${frameworks_dir}) + execute_process(COMMAND cp -pPR ${OGG_LIBRARY} ${frameworks_dir}) + execute_process(COMMAND cp -pPR ${VORBIS_LIBRARY} ${frameworks_dir}) if(${SPARKLE_FOUND}) - execute_process(COMMAND cp -pPR ${SPARKLE_LIBRARY} ${frameworks_dir}/Sparkle.framework) + execute_process(COMMAND cp -pPR ${SPARKLE_LIBRARY} ${frameworks_dir}) endif() message(STATUS "Frameworks and libraries successfully copied...") else() -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/collab-maint/hedgewars.git _______________________________________________ Pkg-games-commits mailing list [email protected] http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-games-commits

