--- a/CMakeLists.txt Tue Jan 07 11:40:58 2014 +0100
+++ b/CMakeLists.txt Fri Jan 17 06:58:28 2014 -0800
@@ -21,6 +21,13 @@
#set this to ON when 2.1.0 becomes more widespread (and only for linux)
option(PHYSFS_SYSTEM "Use system physfs (off)" OFF)
+#system paths for finding required fonts (see share/hedgewars/Data/fonts)
+#subdirectories will NOT be searched.
+#all founds that can't be found will be bundled with hedgewars
+option(PHYSFS_SYSTEM "Use system physfs (off)" OFF)
+
+option(BUILD_SHARED_LIBS "Build libraries as shared modules (on)" ON)
+
if(WIN32 OR APPLE)
option(LUA_SYSTEM "Use system lua (off)" OFF)
else()
@@ -38,11 +45,12 @@
set(DATA_INSTALL_DIR "share/hedgewars" CACHE STRING "Resource folder path")
endif()
+set(FONTS_DIRS "" CACHE STRING "Additional paths to folders where required fonts can be found ( ; is separator)")
#versioning
set(CPACK_PACKAGE_VERSION_MAJOR 0)
set(CPACK_PACKAGE_VERSION_MINOR 9)
-set(CPACK_PACKAGE_VERSION_PATCH 20)
+set(CPACK_PACKAGE_VERSION_PATCH 21)
set(HEDGEWARS_PROTO_VER 48)
set(HEDGEWARS_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
include(${CMAKE_MODULE_PATH}/revinfo.cmake)
@@ -58,15 +66,16 @@
#when build type is not specified, assume Debug/Release according to build version information
-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 "Build type (Debug/Release)" FORCE)
- message (STATUS "Unknown build type, using default (${default_build_type})")
- endif ()
-else (CMAKE_BUILD_TYPE)
- set (CMAKE_BUILD_TYPE ${default_build_type} CACHE STRING "Build type (Debug/Release)" FORCE)
-endif (CMAKE_BUILD_TYPE)
+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 "Build type (Debug/Release)" FORCE)
+ message(STATUS "Unknown build type, using default (${default_build_type})")
+ endif()
+else(CMAKE_BUILD_TYPE)
+ set(CMAKE_BUILD_TYPE ${default_build_type} CACHE STRING "Build type (Debug/Release)" FORCE)
+endif(CMAKE_BUILD_TYPE)
#perform safe check that enable/disable compilation features
@@ -81,7 +90,7 @@
add_flag_append(CMAKE_CXX_FLAGS_DEBUG "-Wextra -O0")
#CMake adds a lot of additional configuration flags, so let's clear them up
-if(${MINIMAL_FLAGS})
+if(MINIMAL_FLAGS)
unset(CMAKE_C_FLAGS_RELEASE)
unset(CMAKE_C_FLAGS_DEBUG)
unset(CMAKE_CXX_FLAGS_RELEASE)
@@ -94,7 +103,7 @@
if(${CMAKE_VERSION} VERSION_GREATER 2.6)
separate_arguments(ghflags_parsed UNIX_COMMAND ${GHFLAGS})
else()
- message(${WARNING} "GHFLAGS are available only when using CMake >= 2.8")
+ message("*** GHFLAGS are available only when using CMake >= 2.8 ***")
endif()
endif()
@@ -114,12 +123,12 @@
#lua discovery
-if (${LUA_SYSTEM})
- if (NOT LUA_LIBRARY OR NOT LUA_INCLUDE_DIR)
+if(LUA_SYSTEM)
+ if(NOT LUA_LIBRARY OR NOT LUA_INCLUDE_DIR)
find_package(Lua)
endif()
- if (LUA_LIBRARY AND LUA_INCLUDE_DIR)
+ if(LUA_LIBRARY AND LUA_INCLUDE_DIR)
set(LUA_FOUND TRUE)
#use an IMPORTED tharget so that we can just use 'lua' to link
add_library(lua UNKNOWN IMPORTED)
@@ -128,7 +137,7 @@
message(FATAL_ERROR "Missing Lua! Rerun cmake with -DLUA_SYSTEM=off to build the internal version")
endif()
else()
- if (NOT LUA_LIBRARY OR NOT LUA_INCLUDE_DIR)
+ if(NOT LUA_LIBRARY OR NOT LUA_INCLUDE_DIR)
message(STATUS "LUA will be provided by the bundled sources")
endif()
set(lua_output_name "hwlua")
@@ -137,8 +146,8 @@
#physfs discovery
-if (${PHYSFS_SYSTEM})
- if (NOT PHYSFS_LIBRARY OR NOT PHYSFS_INCLUDE_DIR)
+if(PHYSFS_SYSTEM)
+ if(NOT PHYSFS_LIBRARY OR NOT PHYSFS_INCLUDE_DIR)
find_package(PhysFS)
endif()
@@ -152,13 +161,13 @@
string(REGEX MATCH "([0-9]+)" physfs_patchversion "${physfs_patchversion}")
set(physfs_detected_ver "${physfs_majorversion}.${physfs_minorversion}.${physfs_patchversion}")
- if (physfs_detected_ver VERSION_LESS "2.1.0")
- message(FATAL_ERROR "PhysFS version is too old (dected ${physfs_detected_ver}, required 2.1.0)")
+ if (physfs_detected_ver VERSION_LESS "2.0.0")
+ message(FATAL_ERROR "PhysFS version is too old (detected ${physfs_detected_ver}, required 2.0.0)")
set(physfs_too_old true)
endif()
endif()
- if (NOT PHYSFS_LIBRARY OR NOT PHYSFS_INCLUDE_DIR)
+ if(NOT PHYSFS_LIBRARY OR NOT PHYSFS_INCLUDE_DIR)
message(FATAL_ERROR "Missing PhysFS! Rerun cmake with -DPHYSFS_SYSTEM=off to build the internal version")
else()
#use an IMPORTED tharget so that we can just use 'physfs' to link
@@ -166,14 +175,14 @@
set_target_properties(physfs PROPERTIES IMPORTED_LOCATION ${PHYSFS_LIBRARY})
endif()
else()
- if (NOT PHYSFS_LIBRARY OR NOT PHYSFS_INCLUDE_DIR)
+ if(NOT PHYSFS_LIBRARY OR NOT PHYSFS_INCLUDE_DIR)
message(STATUS "PhysFS will be provided by the bundled sources")
endif()
set(physfs_output_name "hwphysfs")
add_subdirectory(misc/libphysfs)
endif()
-find_package_or_disable_msg(FFMPEG NOVIDEOREC "Video recording will not be built")
+find_package_or_disable_msg(LIBAV NOVIDEOREC "Video recording will not be built")
#physfs helper library
add_subdirectory(misc/libphyslayer)
@@ -203,3 +212,10 @@
include(${CMAKE_MODULE_PATH}/cpackvars.cmake)
+enable_testing()
+
+set(LUATESTS "${CMAKE_SOURCE_DIR}/tests/lua")
+set(LUAAPITESTS "${LUATESTS}/luaAPI")
+set(TESTSDATADIR "${CMAKE_SOURCE_DIR}/share/hedgewars/Data")
+
+add_test("LuaAPI:GetZoom/SetZoom" "bin/hwengine" "--prefix" "${TESTSDATADIR}" "--lua-test" "${LUATESTS}/luaAPI/zoom_get_set.lua")
--- a/INSTALL Tue Jan 07 11:40:58 2014 +0100
+++ b/INSTALL Fri Jan 17 06:58:28 2014 -0800
@@ -8,7 +8,7 @@
- SDL_image >= 1.2
- SDL_ttf >= 2.0
- Lua >= 5.1.0
- - Physfs >= 2.1.0
+ - Physfs >= 2.0.0
For server:
- Glasgow Haskell Compiler >= 6.10
- bytestring-show package
--- a/QTfrontend/CMakeLists.txt Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/CMakeLists.txt Fri Jan 17 06:58:28 2014 -0800
@@ -22,10 +22,10 @@
find_package(SDL1or2) #video in SDLInteraction
find_package(SDL_mixer REQUIRED) #audio in SDLInteraction
-if(${FFMPEG_FOUND})
+if(LIBAV_FOUND)
add_definitions(-DVIDEOREC -D__STDC_CONSTANT_MACROS)
- include_directories(${FFMPEG_INCLUDE_DIR})
- list(APPEND HW_LINK_LIBS ${FFMPEG_LIBRARIES})
+ include_directories(${LIBAV_INCLUDE_DIR})
+ list(APPEND HW_LINK_LIBS ${LIBAV_LIBRARIES})
endif()
# server messages localization
@@ -152,7 +152,7 @@
set(hwfr_rez hedgewars.qrc)
-if(${BUILD_ENGINE_LIBRARY})
+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})
--- a/QTfrontend/achievements.cpp Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/achievements.cpp Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
/*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/achievements.h Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/achievements.h Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
/*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/binds.cpp Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/binds.cpp Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
/*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -65,6 +65,7 @@
{"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:")},
+ {"+speedup", "s", QT_TRANSLATE_NOOP("binds", "speed up replay"), NULL, QT_TRANSLATE_NOOP("binds (descriptions)", "Demo replay:")},
{"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:")}
--- a/QTfrontend/binds.h Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/binds.h Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
/*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -22,9 +22,9 @@
#include <QString>
#ifdef VIDEOREC
-#define BINDS_NUMBER 46
+#define BINDS_NUMBER 47
#else
-#define BINDS_NUMBER 45
+#define BINDS_NUMBER 46
#endif
struct BindAction
--- a/QTfrontend/campaign.cpp Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/campaign.cpp Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
/*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/campaign.h Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/campaign.h Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
/*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/drawmapscene.cpp Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/drawmapscene.cpp Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
/*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/drawmapscene.h Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/drawmapscene.h Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
/*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/game.cpp Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/game.cpp Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
/*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/game.h Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/game.h Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
/*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/gameuiconfig.cpp Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/gameuiconfig.cpp Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
/*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/gameuiconfig.h Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/gameuiconfig.h Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
/*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/hwconsts.cpp.in Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/hwconsts.cpp.in Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
/*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/hwconsts.h Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/hwconsts.h Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
/*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/hwform.cpp Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/hwform.cpp Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
/*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/hwform.h Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/hwform.h Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
/*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/main.cpp Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/main.cpp Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
/*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/model/GameStyleModel.cpp Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/model/GameStyleModel.cpp Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
/*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/model/GameStyleModel.h Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/model/GameStyleModel.h Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
/*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/model/HatModel.cpp Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/model/HatModel.cpp Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
/*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/model/HatModel.h Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/model/HatModel.h Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
/*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/model/MapModel.cpp Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/model/MapModel.cpp Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
/*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/model/MapModel.h Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/model/MapModel.h Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
/*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/model/ThemeModel.cpp Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/model/ThemeModel.cpp Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
/*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/model/ThemeModel.h Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/model/ThemeModel.h Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
/*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/model/ammoSchemeModel.cpp Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/model/ammoSchemeModel.cpp Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
/*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/model/ammoSchemeModel.h Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/model/ammoSchemeModel.h Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
/*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/model/netserverslist.cpp Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/model/netserverslist.cpp Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
/*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/model/netserverslist.h Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/model/netserverslist.h Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
/*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/model/roomslistmodel.cpp Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/model/roomslistmodel.cpp Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
/*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/model/roomslistmodel.h Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/model/roomslistmodel.h Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
/*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/net/hwmap.cpp Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/net/hwmap.cpp Fri Jan 17 06:58:28 2014 -0800
@@ -1,7 +1,7 @@
/*
* Hedgewars, a free turn based strategy game
* Copyright (c) 2006-2007 Ulyanov Igor <iulyanov@gmail.com>
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/net/hwmap.h Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/net/hwmap.h Fri Jan 17 06:58:28 2014 -0800
@@ -1,7 +1,7 @@
/*
* Hedgewars, a free turn based strategy game
* Copyright (c) 2006 Igor Ulyanov <iulyanov@gmail.com>
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/net/netregister.cpp Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/net/netregister.cpp Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
/*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/net/netregister.h Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/net/netregister.h Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
/*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/net/netserver.cpp Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/net/netserver.cpp Fri Jan 17 06:58:28 2014 -0800
@@ -1,7 +1,7 @@
/*
* Hedgewars, a free turn based strategy game
* Copyright (c) 2006-2008 Igor Ulyanov <iulyanov@gmail.com>
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/net/netserver.h Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/net/netserver.h Fri Jan 17 06:58:28 2014 -0800
@@ -1,7 +1,7 @@
/*
* Hedgewars, a free turn based strategy game
* Copyright (c) 2006-2008 Igor Ulyanov <iulyanov@gmail.com>
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/net/netudpserver.cpp Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/net/netudpserver.cpp Fri Jan 17 06:58:28 2014 -0800
@@ -1,7 +1,7 @@
/*
* Hedgewars, a free turn based strategy game
* Copyright (c) 2007-2008 Igor Ulyanov <iulyanov@gmail.com>
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/net/netudpserver.h Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/net/netudpserver.h Fri Jan 17 06:58:28 2014 -0800
@@ -1,7 +1,7 @@
/*
* Hedgewars, a free turn based strategy game
* Copyright (c) 2007-2008 Igor Ulyanov <iulyanov@gmail.com>
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/net/netudpwidget.cpp Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/net/netudpwidget.cpp Fri Jan 17 06:58:28 2014 -0800
@@ -1,7 +1,7 @@
/*
* Hedgewars, a free turn based strategy game
* Copyright (c) 2007 Igor Ulyanov <iulyanov@gmail.com>
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/net/netudpwidget.h Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/net/netudpwidget.h Fri Jan 17 06:58:28 2014 -0800
@@ -1,7 +1,7 @@
/*
* Hedgewars, a free turn based strategy game
* Copyright (c) 2007 Igor Ulyanov <iulyanov@gmail.com>
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/net/newnetclient.cpp Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/net/newnetclient.cpp Fri Jan 17 06:58:28 2014 -0800
@@ -1,7 +1,7 @@
/*
* Hedgewars, a free turn based strategy game
* Copyright (c) 2006-2008 Igor Ulyanov <iulyanov@gmail.com>
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/net/newnetclient.h Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/net/newnetclient.h Fri Jan 17 06:58:28 2014 -0800
@@ -1,7 +1,7 @@
/*
* Hedgewars, a free turn based strategy game
* Copyright (c) 2006-2008 Igor Ulyanov <iulyanov@gmail.com>
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/net/proto.cpp Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/net/proto.cpp Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
/*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/net/proto.h Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/net/proto.h Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
/*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/net/recorder.cpp Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/net/recorder.cpp Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
/*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/net/recorder.h Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/net/recorder.h Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
/*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/net/tcpBase.cpp Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/net/tcpBase.cpp Fri Jan 17 06:58:28 2014 -0800
@@ -1,7 +1,7 @@
/*
* Hedgewars, a free turn based strategy game
* Copyright (c) 2006-2007 Igor Ulyanov <iulyanov@gmail.com>
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/net/tcpBase.h Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/net/tcpBase.h Fri Jan 17 06:58:28 2014 -0800
@@ -1,7 +1,7 @@
/*
* Hedgewars, a free turn based strategy game
* Copyright (c) 2006-2007 Igor Ulyanov <iulyanov@gmail.com>
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/sdlkeys.h Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/sdlkeys.h Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
/*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/team.cpp Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/team.cpp Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
/*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/team.h Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/team.h Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
/*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
* Copyright (c) 2007 Igor Ulyanov <iulyanov@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
--- a/QTfrontend/ui/dialog/ask_quit.cpp Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/ui/dialog/ask_quit.cpp Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
/*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/ui/dialog/ask_quit.h Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/ui/dialog/ask_quit.h Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
/*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/ui/dialog/input_ip.cpp Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/ui/dialog/input_ip.cpp Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
/*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/ui/dialog/input_ip.h Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/ui/dialog/input_ip.h Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
/*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/ui/dialog/input_password.cpp Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/ui/dialog/input_password.cpp Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
/*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/ui/dialog/input_password.h Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/ui/dialog/input_password.h Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
/*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/ui/dialog/upload_video.cpp Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/ui/dialog/upload_video.cpp Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
/*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/ui/dialog/upload_video.h Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/ui/dialog/upload_video.h Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
/*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/ui/page/AbstractPage.cpp Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/ui/page/AbstractPage.cpp Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
/*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/ui/page/AbstractPage.h Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/ui/page/AbstractPage.h Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
/*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/ui/page/pageadmin.cpp Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/ui/page/pageadmin.cpp Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
/*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/ui/page/pageadmin.h Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/ui/page/pageadmin.h Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
/*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/ui/page/pagecampaign.cpp Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/ui/page/pagecampaign.cpp Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
/*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/ui/page/pagecampaign.h Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/ui/page/pagecampaign.h Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
/*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/ui/page/pageconnecting.cpp Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/ui/page/pageconnecting.cpp Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
/*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/ui/page/pageconnecting.h Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/ui/page/pageconnecting.h Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
/*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/ui/page/pagedata.cpp Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/ui/page/pagedata.cpp Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
/*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/ui/page/pagedata.h Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/ui/page/pagedata.h Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
/*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/ui/page/pagedrawmap.cpp Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/ui/page/pagedrawmap.cpp Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
/*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/ui/page/pagedrawmap.h Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/ui/page/pagedrawmap.h Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
/*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/ui/page/pageeditteam.cpp Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/ui/page/pageeditteam.cpp Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
/*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/ui/page/pageeditteam.h Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/ui/page/pageeditteam.h Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
/*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/ui/page/pagegamestats.cpp Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/ui/page/pagegamestats.cpp Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
/*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/ui/page/pagegamestats.h Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/ui/page/pagegamestats.h Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
/*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/ui/page/pageinfo.cpp Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/ui/page/pageinfo.cpp Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
/*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/ui/page/pageinfo.h Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/ui/page/pageinfo.h Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
/*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/ui/page/pageingame.cpp Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/ui/page/pageingame.cpp Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
/*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/ui/page/pageingame.h Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/ui/page/pageingame.h Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
/*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/ui/page/pagemain.cpp Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/ui/page/pagemain.cpp Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
/*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/ui/page/pagemain.h Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/ui/page/pagemain.h Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
/*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/ui/page/pagemultiplayer.cpp Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/ui/page/pagemultiplayer.cpp Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
/*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/ui/page/pagemultiplayer.h Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/ui/page/pagemultiplayer.h Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
/*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/ui/page/pagenet.cpp Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/ui/page/pagenet.cpp Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
/*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/ui/page/pagenet.h Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/ui/page/pagenet.h Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
/*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/ui/page/pagenetgame.cpp Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/ui/page/pagenetgame.cpp Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
/*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/ui/page/pagenetgame.h Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/ui/page/pagenetgame.h Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
/*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/ui/page/pagenetserver.cpp Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/ui/page/pagenetserver.cpp Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
/*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/ui/page/pagenetserver.h Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/ui/page/pagenetserver.h Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
/*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/ui/page/pageoptions.cpp Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/ui/page/pageoptions.cpp Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
/*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/ui/page/pageoptions.h Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/ui/page/pageoptions.h Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
/*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/ui/page/pageplayrecord.cpp Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/ui/page/pageplayrecord.cpp Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
/*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/ui/page/pageplayrecord.h Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/ui/page/pageplayrecord.h Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
/*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/ui/page/pageroomslist.cpp Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/ui/page/pageroomslist.cpp Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
/*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -53,6 +53,8 @@
QLayout * PageRoomsList::bodyLayoutDefinition()
{
+ // TODO move stylesheet stuff into css/qt.css
+
QVBoxLayout * pageLayout = new QVBoxLayout();
pageLayout->setSpacing(0);
@@ -60,10 +62,29 @@
topLayout->setSpacing(0);
pageLayout->addLayout(topLayout, 0);
+ // State button
+
+ QPushButton * btnState = new QPushButton(tr("Room state"));
+ btnState->setStyleSheet("QPushButton { background-color: #F6CB1C; border-color: #F6CB1C; color: #130F2A; padding: 1px 3px 3px 3px; margin: 0px; border-bottom: none; border-radius: 0px; border-top-left-radius: 10px; } QPushButton:hover { background-color: #FFEB3C; border-color: #F6CB1C; color: #000000 } QPushButton:pressed { background-color: #FFEB3C; border-color: #F6CB1C; color: #000000; }");
+ btnState->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Preferred);
+
+ // State menu
+
+ 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);
+
// 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->setStyleSheet("#lblDesc { color: #130F2A; background: #F6CB1C; border: solid 4px #F6CB1C; padding: 5px 10px 3px 6px;}");
lblDesc->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
lblDesc->setFixedHeight(24);
lblDesc->setMinimumWidth(0);
@@ -97,16 +118,17 @@
BtnJoin->setEnabled(false);
// 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);
+ topLayout->addWidget(btnState, 1, 0);
+ topLayout->addWidget(lblDesc, 1, 1);
+ topLayout->addWidget(searchContainer, 1, 2);
+ topLayout->addWidget(corner, 1, 3, Qt::AlignBottom);
+ topLayout->addWidget(BtnCreate, 0, 5, 2, 1);
+ topLayout->addWidget(BtnJoin, 0, 6, 2, 1);
// Top layout stretch
topLayout->setRowStretch(0, 1);
topLayout->setRowStretch(1, 0);
- topLayout->setColumnStretch(3, 1);
+ topLayout->setColumnStretch(4, 1);
// Rooms list and chat with splitter
m_splitter = new QSplitter();
@@ -132,43 +154,6 @@
roomsList->setFocusPolicy(Qt::NoFocus);
roomsLayout->addWidget(roomsList, 200);
- // Room filters container
-
- QWidget * filtersContainer = new QWidget();
- filtersContainer->setMaximumWidth(800);
- filtersContainer->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
-
- roomsLayout->addSpacing(7);
- roomsLayout->addWidget(filtersContainer, 0, Qt::AlignHCenter);
- roomsLayout->addSpacing(7);
-
- QHBoxLayout * filterLayout = new QHBoxLayout(filtersContainer);
- filterLayout->setSpacing(0);
- filterLayout->setMargin(0);
-
- const int filterSpacing = 20;
-
- // State button
-
- 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
-
- 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);
-
// Lobby chat
chatWidget = new HWChatWidget(this, false);
--- a/QTfrontend/ui/page/pageroomslist.h Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/ui/page/pageroomslist.h Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
/*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/ui/page/pagescheme.cpp Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/ui/page/pagescheme.cpp Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
/*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/ui/page/pagescheme.h Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/ui/page/pagescheme.h Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
/*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/ui/page/pageselectweapon.cpp Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/ui/page/pageselectweapon.cpp Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
/*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/ui/page/pageselectweapon.h Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/ui/page/pageselectweapon.h Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
/*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/ui/page/pagesingleplayer.cpp Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/ui/page/pagesingleplayer.cpp Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
/*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/ui/page/pagesingleplayer.h Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/ui/page/pagesingleplayer.h Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
/*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/ui/page/pagetraining.cpp Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/ui/page/pagetraining.cpp Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
/*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/ui/page/pagetraining.h Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/ui/page/pagetraining.h Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
/*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/ui/page/pagevideos.cpp Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/ui/page/pagevideos.cpp Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
/*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/ui/page/pagevideos.h Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/ui/page/pagevideos.h Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
/*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/ui/widget/FreqSpinBox.cpp Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/ui/widget/FreqSpinBox.cpp Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
/*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/ui/widget/FreqSpinBox.h Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/ui/widget/FreqSpinBox.h Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
/*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/ui/widget/HistoryLineEdit.cpp Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/ui/widget/HistoryLineEdit.cpp Fri Jan 17 06:58:28 2014 -0800
@@ -1,7 +1,7 @@
/*
* Hedgewars, a free turn based strategy game
* Copyright (c) 2006-2007 Igor Ulyanov <iulyanov@gmail.com>
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/ui/widget/HistoryLineEdit.h Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/ui/widget/HistoryLineEdit.h Fri Jan 17 06:58:28 2014 -0800
@@ -1,7 +1,7 @@
/*
* Hedgewars, a free turn based strategy game
* Copyright (c) 2006-2007 Igor Ulyanov <iulyanov@gmail.com>
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/ui/widget/SmartLineEdit.cpp Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/ui/widget/SmartLineEdit.cpp Fri Jan 17 06:58:28 2014 -0800
@@ -1,7 +1,7 @@
/*
* Hedgewars, a free turn based strategy game
* Copyright (c) 2006-2007 Igor Ulyanov <iulyanov@gmail.com>
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/ui/widget/SmartLineEdit.h Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/ui/widget/SmartLineEdit.h Fri Jan 17 06:58:28 2014 -0800
@@ -1,7 +1,7 @@
/*
* Hedgewars, a free turn based strategy game
* Copyright (c) 2006-2007 Igor Ulyanov <iulyanov@gmail.com>
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/ui/widget/SquareLabel.cpp Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/ui/widget/SquareLabel.cpp Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
/*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/ui/widget/SquareLabel.h Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/ui/widget/SquareLabel.h Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
/*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/ui/widget/about.cpp Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/ui/widget/about.cpp Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
/*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -35,7 +35,9 @@
#ifdef VIDEOREC
extern "C"
{
-#include "libavutil/avutil.h"
+ #include "libavcodec/version.h"
+ #include "libavformat/version.h"
+ #include "libavutil/avutil.h" // version.h only from 51.36.0
}
#endif
@@ -159,7 +161,15 @@
libinfo.append(QString("<a href=\"http://qt-project.org/\">Qt</a> version: %1<br>").arg(QT_VERSION_STR));
#ifdef VIDEOREC
- libinfo.append(QString("<a href=\"http://libav.org\">Libav</a> version: %1.%2.%3<br>")
+ libinfo.append(QString("<a href=\"http://libav.org\">libavcodec</a> version: %1.%2.%3<br>")
+ .arg(LIBAVCODEC_VERSION_MAJOR)
+ .arg(LIBAVCODEC_VERSION_MINOR)
+ .arg(LIBAVCODEC_VERSION_MICRO));
+ libinfo.append(QString("<a href=\"http://libav.org\">libavformat</a> version: %1.%2.%3<br>")
+ .arg(LIBAVFORMAT_VERSION_MAJOR)
+ .arg(LIBAVFORMAT_VERSION_MINOR)
+ .arg(LIBAVFORMAT_VERSION_MICRO));
+ libinfo.append(QString("<a href=\"http://libav.org\">libavutil</a> version: %1.%2.%3<br>")
.arg(LIBAVUTIL_VERSION_MAJOR)
.arg(LIBAVUTIL_VERSION_MINOR)
.arg(LIBAVUTIL_VERSION_MICRO));
--- a/QTfrontend/ui/widget/about.h Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/ui/widget/about.h Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
/*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/ui/widget/bgwidget.cpp Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/ui/widget/bgwidget.cpp Fri Jan 17 06:58:28 2014 -0800
@@ -1,7 +1,7 @@
/*
* Hedgewars, a free turn based strategy game
* Copyright (c) 2009 Kristian Lehmann <email@thexception.net>
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/ui/widget/bgwidget.h Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/ui/widget/bgwidget.h Fri Jan 17 06:58:28 2014 -0800
@@ -1,7 +1,7 @@
/*
* Hedgewars, a free turn based strategy game
* Copyright (c) 2009 Kristian Lehmann <email@thexception.net>
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/ui/widget/chatwidget.cpp Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/ui/widget/chatwidget.cpp Fri Jan 17 06:58:28 2014 -0800
@@ -1,7 +1,7 @@
/*
* Hedgewars, a free turn based strategy game
* Copyright (c) 2007 Igor Ulyanov <iulyanov@gmail.com>
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -544,7 +544,8 @@
QString hlRegExp("^(.* )?%1[^-a-z0-9_]*( .*)?$");
QRegExp whitespace("\\s");
- m_highlights.append(QRegExp(hlRegExp.arg(m_userNick.toLower())));
+ if (!m_userNick.isEmpty())
+ m_highlights.append(QRegExp(hlRegExp.arg(QRegExp::escape(m_userNick.toLower()))));
QFile file(cfgdir->absolutePath() + "/" + m_userNick.toLower() + "_highlight.txt");
--- a/QTfrontend/ui/widget/chatwidget.h Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/ui/widget/chatwidget.h Fri Jan 17 06:58:28 2014 -0800
@@ -1,7 +1,7 @@
/*
* Hedgewars, a free turn based strategy game
* Copyright (c) 2007 Igor Ulyanov <iulyanov@gmail.com>
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/ui/widget/databrowser.cpp Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/ui/widget/databrowser.cpp Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
/*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/ui/widget/databrowser.h Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/ui/widget/databrowser.h Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
/*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/ui/widget/drawmapwidget.cpp Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/ui/widget/drawmapwidget.cpp Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
/*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/ui/widget/drawmapwidget.h Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/ui/widget/drawmapwidget.h Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
/*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/ui/widget/feedbackdialog.cpp Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/ui/widget/feedbackdialog.cpp Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
/*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/ui/widget/feedbackdialog.h Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/ui/widget/feedbackdialog.h Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
/*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/ui/widget/fpsedit.cpp Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/ui/widget/fpsedit.cpp Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
/*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/ui/widget/fpsedit.h Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/ui/widget/fpsedit.h Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
/*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/ui/widget/frameTeam.cpp Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/ui/widget/frameTeam.cpp Fri Jan 17 06:58:28 2014 -0800
@@ -1,7 +1,7 @@
/*
* Hedgewars, a free turn based strategy game
* Copyright (c) 2006-2007 Igor Ulyanov <iulyanov@gmail.com>
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/ui/widget/frameTeam.h Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/ui/widget/frameTeam.h Fri Jan 17 06:58:28 2014 -0800
@@ -1,7 +1,7 @@
/*
* Hedgewars, a free turn based strategy game
* Copyright (c) 2006-2007 Igor Ulyanov <iulyanov@gmail.com>
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/ui/widget/gamecfgwidget.cpp Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/ui/widget/gamecfgwidget.cpp Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
/*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/ui/widget/gamecfgwidget.h Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/ui/widget/gamecfgwidget.h Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
/*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/ui/widget/hatbutton.cpp Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/ui/widget/hatbutton.cpp Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
/*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/ui/widget/hatbutton.h Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/ui/widget/hatbutton.h Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
/*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/ui/widget/hatprompt.cpp Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/ui/widget/hatprompt.cpp Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
/*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/ui/widget/hatprompt.h Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/ui/widget/hatprompt.h Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
/*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/ui/widget/hedgehogerWidget.cpp Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/ui/widget/hedgehogerWidget.cpp Fri Jan 17 06:58:28 2014 -0800
@@ -1,7 +1,7 @@
/*
* Hedgewars, a free turn based strategy game
* Copyright (c) 2006-2008 Ulyanov Igor <iulyanov@gmail.com>
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/ui/widget/hedgehogerWidget.h Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/ui/widget/hedgehogerWidget.h Fri Jan 17 06:58:28 2014 -0800
@@ -1,7 +1,7 @@
/*
* Hedgewars, a free turn based strategy game
* Copyright (c) 2006-2007 Ulyanov Igor <iulyanov@gmail.com>
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/ui/widget/igbox.cpp Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/ui/widget/igbox.cpp Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
/*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/ui/widget/igbox.h Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/ui/widget/igbox.h Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
/*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/ui/widget/keybinder.cpp Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/ui/widget/keybinder.cpp Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
/*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/ui/widget/keybinder.h Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/ui/widget/keybinder.h Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
/*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/ui/widget/lineeditcursor.cpp Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/ui/widget/lineeditcursor.cpp Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
/*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/ui/widget/lineeditcursor.h Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/ui/widget/lineeditcursor.h Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
/*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/ui/widget/mapContainer.h Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/ui/widget/mapContainer.h Fri Jan 17 06:58:28 2014 -0800
@@ -1,7 +1,7 @@
/*
* Hedgewars, a free turn based strategy game
* Copyright (c) 2006-2007 Igor Ulyanov <iulyanov@gmail.com>
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/ui/widget/qpushbuttonwithsound.cpp Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/ui/widget/qpushbuttonwithsound.cpp Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
/*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/ui/widget/qpushbuttonwithsound.h Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/ui/widget/qpushbuttonwithsound.h Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
/*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/ui/widget/roomnameprompt.cpp Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/ui/widget/roomnameprompt.cpp Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
/*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/ui/widget/roomnameprompt.h Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/ui/widget/roomnameprompt.h Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
/*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/ui/widget/seedprompt.cpp Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/ui/widget/seedprompt.cpp Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
/*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/ui/widget/seedprompt.h Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/ui/widget/seedprompt.h Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
/*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/ui/widget/selectWeapon.cpp Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/ui/widget/selectWeapon.cpp Fri Jan 17 06:58:28 2014 -0800
@@ -1,7 +1,7 @@
/*
* Hedgewars, a free turn based strategy game
* Copyright (c) 2006-2008 Igor Ulyanov <iulyanov@gmail.com>
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/ui/widget/selectWeapon.h Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/ui/widget/selectWeapon.h Fri Jan 17 06:58:28 2014 -0800
@@ -1,7 +1,7 @@
/*
* Hedgewars, a free turn based strategy game
* Copyright (c) 2006-2008 Igor Ulyanov <iulyanov@gmail.com>
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/ui/widget/teamselect.cpp Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/ui/widget/teamselect.cpp Fri Jan 17 06:58:28 2014 -0800
@@ -1,7 +1,7 @@
/*
* Hedgewars, a free turn based strategy game
* Copyright (c) 2006-2007 Igor Ulyanov <iulyanov@gmail.com>
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/ui/widget/teamselect.h Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/ui/widget/teamselect.h Fri Jan 17 06:58:28 2014 -0800
@@ -1,7 +1,7 @@
/*
* Hedgewars, a free turn based strategy game
* Copyright (c) 2006-2007 Igor Ulyanov <iulyanov@gmail.com>
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/ui/widget/teamselhelper.cpp Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/ui/widget/teamselhelper.cpp Fri Jan 17 06:58:28 2014 -0800
@@ -1,7 +1,7 @@
/*
* Hedgewars, a free turn based strategy game
* Copyright (c) 2006-2007 Igor Ulyanov <iulyanov@gmail.com>
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/ui/widget/teamselhelper.h Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/ui/widget/teamselhelper.h Fri Jan 17 06:58:28 2014 -0800
@@ -1,7 +1,7 @@
/*
* Hedgewars, a free turn based strategy game
* Copyright (c) 2006-2007 Igor Ulyanov <iulyanov@gmail.com>
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/ui/widget/themeprompt.cpp Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/ui/widget/themeprompt.cpp Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
/*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/ui/widget/themeprompt.h Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/ui/widget/themeprompt.h Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
/*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/ui/widget/togglebutton.cpp Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/ui/widget/togglebutton.cpp Fri Jan 17 06:58:28 2014 -0800
@@ -1,7 +1,7 @@
/*
* Hedgewars, a free turn based strategy game
* Copyright (c) 2009 Kristian Lehmann <email@thexception.net>
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/ui/widget/togglebutton.h Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/ui/widget/togglebutton.h Fri Jan 17 06:58:28 2014 -0800
@@ -1,7 +1,7 @@
/*
* Hedgewars, a free turn based strategy game
* Copyright (c) 2009 Kristian Lehmann <email@thexception.net>
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/ui/widget/vertScrollArea.cpp Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/ui/widget/vertScrollArea.cpp Fri Jan 17 06:58:28 2014 -0800
@@ -1,7 +1,7 @@
/*
* Hedgewars, a free turn based strategy game
* Copyright (c) 2006 Igor Ulyanov <iulyanov@gmail.com>
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/ui/widget/vertScrollArea.h Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/ui/widget/vertScrollArea.h Fri Jan 17 06:58:28 2014 -0800
@@ -1,7 +1,7 @@
/*
* Hedgewars, a free turn based strategy game
* Copyright (c) 2006 Igor Ulyanov <iulyanov@gmail.com>
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/ui/widget/weaponItem.cpp Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/ui/widget/weaponItem.cpp Fri Jan 17 06:58:28 2014 -0800
@@ -1,7 +1,7 @@
/*
* Hedgewars, a free turn based strategy game
* Copyright (c) 2006-2008 Igor Ulyanov <iulyanov@gmail.com>
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/ui/widget/weaponItem.h Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/ui/widget/weaponItem.h Fri Jan 17 06:58:28 2014 -0800
@@ -1,7 +1,7 @@
/*
* Hedgewars, a free turn based strategy game
* Copyright (c) 2006-2008 Igor Ulyanov <iulyanov@gmail.com>
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/ui_hwform.cpp Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/ui_hwform.cpp Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
/*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/ui_hwform.h Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/ui_hwform.h Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
/*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/util/DataManager.cpp Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/util/DataManager.cpp Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
/*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/util/DataManager.h Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/util/DataManager.h Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
/*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/util/LibavInteraction.cpp Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/util/LibavInteraction.cpp Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
/*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/util/LibavInteraction.h Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/util/LibavInteraction.h Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
/*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/util/MessageDialog.cpp Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/util/MessageDialog.cpp Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
/*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/util/MessageDialog.h Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/util/MessageDialog.h Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
/*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/util/SDLInteraction.cpp Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/util/SDLInteraction.cpp Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
/*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/util/SDLInteraction.h Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/util/SDLInteraction.h Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
/*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/util/namegen.cpp Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/util/namegen.cpp Fri Jan 17 06:58:28 2014 -0800
@@ -1,7 +1,7 @@
/*
* Hedgewars, a free turn based strategy game
* Copyright (c) 2009 Martin Minarik <ttsmj@pokec.sk>
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/util/namegen.h Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/util/namegen.h Fri Jan 17 06:58:28 2014 -0800
@@ -1,7 +1,7 @@
/*
* Hedgewars, a free turn based strategy game
* Copyright (c) 2009 Martin Minarik <ttsmj@pokec.sk>
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/util/platform/CocoaInitializer.h Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/util/platform/CocoaInitializer.h Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
/*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/util/platform/CocoaInitializer.mm Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/util/platform/CocoaInitializer.mm Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
/*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/util/platform/InstallController.cpp Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/util/platform/InstallController.cpp Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
/*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/util/platform/InstallController.h Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/util/platform/InstallController.h Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
/*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/util/platform/M3Panel.h Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/util/platform/M3Panel.h Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
/*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/util/platform/M3Panel.mm Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/util/platform/M3Panel.mm Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
/*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/util/platform/SparkleAutoUpdater.mm Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/util/platform/SparkleAutoUpdater.mm Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
/*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/util/platform/xfire.cpp Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/util/platform/xfire.cpp Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
/*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/QTfrontend/util/platform/xfire.h Tue Jan 07 11:40:58 2014 +0100
+++ b/QTfrontend/util/platform/xfire.h Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
/*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/README Tue Jan 07 11:40:58 2014 +0100
+++ b/README Fri Jan 17 06:58:28 2014 -0800
@@ -1,7 +1,7 @@
Hedgewars - a turn based strategy game.
=======================================
-Copyright 2004-2013 Andrey Korotaev <unC0Rr@gmail.com> and others.
+Copyright 2004-2014 Andrey Korotaev <unC0Rr@gmail.com> and others.
See QTfrontend/res/html/about.html and CREDITS for a complete list of authors.
Licence:
--- a/cmake_modules/FindFFMPEG.cmake Tue Jan 07 11:40:58 2014 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,85 +0,0 @@
-# Find ffmpeg/libav libraries (libavcodec, libavformat and libavutil)
-# Once done this will define
-#
-# FFMPEG_FOUND - system has libavcodec, libavformat, libavutil
-# FFMPEG_INCLUDE_DIR - the libav include directories
-# FFMPEG_LIBRARIES - the libav libraries
-#
-# LIBAVCODEC_LIBRARY - the libavcodec library
-# LIBAVCODEC_INCLUDE_DIR - the libavcodec include directory
-# LIBAVFORMAT_LIBRARY - the libavformat library
-# LIBAVUTIL_LIBRARY - the libavutil library
-#
-# Copyright (c) 2008 Andreas Schneider <mail@cynapses.org>
-# Modified for other libraries by Lasse Kärkkäinen <tronic>
-# Modified for Hedgewars by Stepik777
-# Copyright (c) 2013 Vittorio Giovara <vittorio.giovara@gmail.com>
-#
-# Redistribution and use is allowed according to the terms of the New
-# BSD license.
-#
-
-include(FindPackageHandleStandardArgs)
-
-
-# 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)
- if(NOT LIBAVCODEC_INCLUDE_DIR OR NOT LIBAVCODEC_LIBRARY)
- pkg_check_modules(_FFMPEG_AVCODEC libavcodec)
- endif()
- if(NOT LIBAVFORMAT_LIBRARY)
- pkg_check_modules(_FFMPEG_AVFORMAT libavformat)
- endif()
- if(NOT LIBAVUTIL_LIBRARY)
- pkg_check_modules(_FFMPEG_AVUTIL libavutil)
- endif()
-endif(PKG_CONFIG_FOUND)
-
-find_path(LIBAVCODEC_INCLUDE_DIR
- NAMES libavcodec/avcodec.h
- PATHS ${_FFMPEG_AVCODEC_INCLUDE_DIRS} #pkg-config
- /usr/include /usr/local/include #system level
- /opt/local/include /sw/include #macports & fink
- PATH_SUFFIXES libav ffmpeg
-)
-
-#TODO: add other include paths
-
-find_library(LIBAVCODEC_LIBRARY
- NAMES avcodec
- PATHS ${_FFMPEG_AVCODEC_LIBRARY_DIRS} #pkg-config
- /usr/lib /usr/local/lib #system level
- /opt/local/lib /sw/lib #macports & fink
-)
-
-find_library(LIBAVFORMAT_LIBRARY
- NAMES avformat
- PATHS ${_FFMPEG_AVFORMAT_LIBRARY_DIRS} #pkg-config
- /usr/lib /usr/local/lib #system level
- /opt/local/lib /sw/lib #macports & fink
-)
-
-find_library(LIBAVUTIL_LIBRARY
- NAMES avutil
- PATHS ${_FFMPEG_AVUTIL_LIBRARY_DIRS} #pkg-config
- /usr/lib /usr/local/lib #system level
- /opt/local/lib /sw/lib #macports & fink
-)
-
-find_package_handle_standard_args(FFMPEG DEFAULT_MSG LIBAVCODEC_LIBRARY LIBAVCODEC_INCLUDE_DIR
- LIBAVFORMAT_LIBRARY
- LIBAVUTIL_LIBRARY
- )
-set(FFMPEG_INCLUDE_DIR ${LIBAVCODEC_INCLUDE_DIR}
- #TODO: add other include paths
- )
-set(FFMPEG_LIBRARIES ${LIBAVCODEC_LIBRARY}
- ${LIBAVFORMAT_LIBRARY}
- ${LIBAVUTIL_LIBRARY}
- )
-
-mark_as_advanced(FFMPEG_INCLUDE_DIR FFMPEG_LIBRARIES LIBAVCODEC_LIBRARY LIBAVCODEC_INCLUDE_DIR LIBAVFORMAT_LIBRARY LIBAVUTIL_LIBRARY)
-
-
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/cmake_modules/FindLIBAV.cmake Fri Jan 17 06:58:28 2014 -0800
@@ -0,0 +1,90 @@
+# Find ffmpeg/libav libraries (libavcodec, libavformat and libavutil)
+# Once done this will define
+#
+# LIBAV_FOUND - system has libavcodec, libavformat, libavutil
+# LIBAV_INCLUDE_DIR - libav include directories
+# LIBAV_LIBRARIES - libav libraries (libavcodec, libavformat, libavutil)
+#
+# LIBAVCODEC_LIBRARY - libavcodec library
+# LIBAVCODEC_INCLUDE_DIR - libavcodec include directory
+# LIBAVFORMAT_LIBRARY - libavformat library
+# LIBAVUTIL_LIBRARY - libavutil library
+#
+# Copyright (c) 2008 Andreas Schneider <mail@cynapses.org>
+# Modified for other libraries by Lasse Kärkkäinen <tronic>
+# Modified for Hedgewars by Stepik777
+# Copyright (c) 2013 Vittorio Giovara <vittorio.giovara@gmail.com>
+#
+# Redistribution and use is allowed according to the terms of the New
+# BSD license.
+#
+
+include(FindPackageHandleStandardArgs)
+
+
+# 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)
+ if(NOT LIBAVCODEC_INCLUDE_DIR OR NOT LIBAVCODEC_LIBRARY)
+ pkg_check_modules(_LIBAV_AVCODEC libavcodec)
+ endif()
+ if(NOT LIBAVFORMAT_LIBRARY)
+ pkg_check_modules(_LIBAV_AVFORMAT libavformat)
+ endif()
+ if(NOT LIBAVUTIL_LIBRARY)
+ pkg_check_modules(_LIBAV_AVUTIL libavutil)
+ endif()
+endif(PKG_CONFIG_FOUND)
+
+find_path(LIBAVCODEC_INCLUDE_DIR
+ NAMES libavcodec/avcodec.h
+ PATHS ${_LIBAV_AVCODEC_INCLUDE_DIRS} #pkg-config
+ /usr/include /usr/local/include #system level
+ /opt/local/include /sw/include #macports & fink
+ PATH_SUFFIXES libav ffmpeg
+)
+
+#TODO: add other include paths
+
+find_library(LIBAVCODEC_LIBRARY
+ NAMES avcodec
+ PATHS ${_LIBAV_AVCODEC_LIBRARY_DIRS} #pkg-config
+ /usr/lib /usr/local/lib #system level
+ /opt/local/lib /sw/lib #macports & fink
+)
+
+find_library(LIBAVFORMAT_LIBRARY
+ NAMES avformat
+ PATHS ${_LIBAV_AVFORMAT_LIBRARY_DIRS} #pkg-config
+ /usr/lib /usr/local/lib #system level
+ /opt/local/lib /sw/lib #macports & fink
+)
+
+find_library(LIBAVUTIL_LIBRARY
+ NAMES avutil
+ PATHS ${_LIBAV_AVUTIL_LIBRARY_DIRS} #pkg-config
+ /usr/lib /usr/local/lib #system level
+ /opt/local/lib /sw/lib #macports & fink
+)
+
+find_package_handle_standard_args(LIBAV DEFAULT_MSG LIBAVCODEC_LIBRARY
+ LIBAVCODEC_INCLUDE_DIR
+ LIBAVFORMAT_LIBRARY
+ LIBAVUTIL_LIBRARY
+ )
+set(LIBAV_INCLUDE_DIR ${LIBAVCODEC_INCLUDE_DIR}
+ #TODO: add other include paths
+ )
+set(LIBAV_LIBRARIES ${LIBAVCODEC_LIBRARY}
+ ${LIBAVFORMAT_LIBRARY}
+ ${LIBAVUTIL_LIBRARY}
+ )
+
+mark_as_advanced(LIBAV_INCLUDE_DIR
+ LIBAV_LIBRARIES
+ LIBAVCODEC_LIBRARY
+ LIBAVCODEC_INCLUDE_DIR
+ LIBAVFORMAT_LIBRARY
+ LIBAVUTIL_LIBRARY)
+
--- a/cmake_modules/cpackvars.cmake Tue Jan 07 11:40:58 2014 +0100
+++ b/cmake_modules/cpackvars.cmake Fri Jan 17 06:58:28 2014 -0800
@@ -84,6 +84,7 @@
"cmake_uninstall\\\\.cmake$"
"CMakeCache\\\\.txt$"
"build_windows_.*\\\\.bat$"
+ "arch\\\\.c$"
"^${CMAKE_CURRENT_SOURCE_DIR}/misc/liblua"
# "^${CMAKE_CURRENT_SOURCE_DIR}/project_files/frontlib"
# "^${CMAKE_CURRENT_SOURCE_DIR}/project_files/cmdlineClient"
--- a/gameServer/Actions.hs Tue Jan 07 11:40:58 2014 +0100
+++ b/gameServer/Actions.hs Fri Jan 17 06:58:28 2014 -0800
@@ -569,13 +569,18 @@
return ci
modify (\s -> s{clientIndex = Just newClId})
- mapM_ processAction
- [
- AnswerClients [sendChan cl] ["CONNECTED", "Hedgewars server http://www.hedgewars.org/", serverVersion]
- , CheckBanned True
- , AddIP2Bans (host cl) "Reconnected too fast" (addUTCTime 10 $ connectTime cl)
- ]
+
+ jm <- gets joinsMonitor
+ pass <- io $ joinsSentry jm (host cl) (connectTime cl)
+ if pass then
+ mapM_ processAction
+ [
+ CheckBanned True
+ , AnswerClients [sendChan cl] ["CONNECTED", "Hedgewars server http://www.hedgewars.org/", serverVersion]
+ ]
+ else
+ processAction $ ByeClient $ loc "Reconnected too fast"
processAction (AddNick2Bans n reason expiring) = do
processAction $ ModifyServerInfo (\s -> s{bans = BanByNick n reason expiring : bans s})
@@ -760,3 +765,11 @@
, [AnswerClients [c] $ "EM" : roundMsgs']
, [AnswerClients [c] ["KICKED"]]
]
+
+
+processAction Cleanup = do
+ jm <- gets joinsMonitor
+
+ io $ do
+ t <- getCurrentTime
+ cleanup jm t
--- a/gameServer/CMakeLists.txt Tue Jan 07 11:40:58 2014 +0100
+++ b/gameServer/CMakeLists.txt Fri Jan 17 06:58:28 2014 -0800
@@ -16,6 +16,7 @@
HWProtoLobbyState.hs
HWProtoNEState.hs
HandlerUtils.hs
+ JoinsMonitor.hs
NetRoutines.hs
Opts.hs
RoomsAndClients.hs
--- a/gameServer/CoreTypes.hs Tue Jan 07 11:40:58 2014 +0100
+++ b/gameServer/CoreTypes.hs Fri Jan 17 06:58:28 2014 -0800
@@ -16,7 +16,6 @@
-----------------------
import RoomsAndClients
-
#if __GLASGOW_HASKELL__ < 706
instance NFData B.ByteString
#endif
@@ -78,6 +77,7 @@
| Random [ClientChan] [B.ByteString]
| QueryReplay B.ByteString
| ShowReplay B.ByteString
+ | Cleanup
type ClientChan = Chan [B.ByteString]
@@ -212,8 +212,8 @@
)
(
Map.fromList $ Prelude.zip
- ["SCHEME", "SCRIPT"]
- [["Default"], ["Normal"]]
+ ["SCHEME", "SCRIPT", "Theme"]
+ [["Default"], ["Normal"], ["Theme"]]
)
--- a/gameServer/HWProtoInRoomState.hs Tue Jan 07 11:40:58 2014 +0100
+++ b/gameServer/HWProtoInRoomState.hs Fri Jan 17 06:58:28 2014 -0800
@@ -15,6 +15,39 @@
import RoomsAndClients
import EngineInteraction
+
+startGame :: Reader (ClientIndex, IRnC) [Action]
+startGame = do
+ (ci, rnc) <- ask
+ cl <- thisClient
+ rm <- thisRoom
+ chans <- roomClientsChans
+
+ let nicks = map (nick . client rnc) . roomClients rnc $ clientRoom rnc ci
+ let allPlayersRegistered = all ((<) 0 . B.length . webPassword . client rnc . teamownerId) $ teams rm
+
+ if (playersIn rm == readyPlayers rm || clientProto cl > 43) && not (isJust $ gameInfo rm) then
+ if enoughClans rm then
+ return [
+ ModifyRoom
+ (\r -> r{
+ gameInfo = Just $ newGameInfo (teams rm) (length $ teams rm) allPlayersRegistered (mapParams rm) (params rm)
+ }
+ )
+ , AnswerClients chans ["RUN_GAME"]
+ , SendUpdateOnThisRoom
+ , AnswerClients chans $ "CLIENT_FLAGS" : "+g" : nicks
+ , ModifyRoomClients (\c -> c{isInGame = True})
+ ]
+ else
+ return [Warning $ loc "Less than two clans!"]
+ else
+ return []
+ where
+ enoughClans = not . null . drop 1 . group . map teamcolor . teams
+
+
+
handleCmd_inRoom :: CmdHandler
handleCmd_inRoom ["CHAT", msg] = do
@@ -173,48 +206,29 @@
handleCmd_inRoom ["TOGGLE_READY"] = do
cl <- thisClient
- chans <- roomClientsChans
-
- return [
- ModifyRoom (\r -> r{readyPlayers = readyPlayers r + (if isReady cl then -1 else 1)}),
- ModifyClient (\c -> c{isReady = not $ isReady cl}),
- AnswerClients chans $ if clientProto cl < 38 then
- [if isReady cl then "NOT_READY" else "READY", nick cl]
- else
- ["CLIENT_FLAGS", if isReady cl then "-r" else "+r", nick cl]
- ]
-
-
-handleCmd_inRoom ["START_GAME"] = do
- (ci, rnc) <- ask
- cl <- thisClient
rm <- thisRoom
chans <- roomClientsChans
- let nicks = map (nick . client rnc) . roomClients rnc $ clientRoom rnc ci
- let allPlayersRegistered = all ((<) 0 . B.length . webPassword . client rnc . teamownerId) $ teams rm
+ (ci, rnc) <- ask
+ let ri = clientRoom rnc ci
+ let unreadyClients = filter (not . isReady) . map (client rnc) $ roomClients rnc ri
+
+ gs <- if (not $ isReady cl) && (isSpecial rm) && (unreadyClients == [cl]) then startGame else return []
- if isMaster cl && (playersIn rm == readyPlayers rm || clientProto cl > 43) && not (isJust $ gameInfo rm) then
- if enoughClans rm then
- return [
- ModifyRoom
- (\r -> r{
- gameInfo = Just $ newGameInfo (teams rm) (length $ teams rm) allPlayersRegistered (mapParams rm) (params rm)
- }
- )
- , AnswerClients chans ["RUN_GAME"]
- , SendUpdateOnThisRoom
- , AnswerClients chans $ "CLIENT_FLAGS" : "+g" : nicks
- , ModifyRoomClients (\c -> c{isInGame = True})
- ]
- else
- return [Warning $ loc "Less than two clans!"]
- else
- return []
- where
- enoughClans = not . null . drop 1 . group . map teamcolor . teams
+ return $
+ ModifyRoom (\r -> r{readyPlayers = readyPlayers r + (if isReady cl then -1 else 1)})
+ : ModifyClient (\c -> c{isReady = not $ isReady cl})
+ : (AnswerClients chans $ if clientProto cl < 38 then
+ [if isReady cl then "NOT_READY" else "READY", nick cl]
+ else
+ ["CLIENT_FLAGS", if isReady cl then "-r" else "+r", nick cl])
+ : gs
+handleCmd_inRoom ["START_GAME"] = do
+ cl <- thisClient
+ if isMaster cl then startGame else return []
+
handleCmd_inRoom ["EM", msg] = do
cl <- thisClient
rm <- thisRoom
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gameServer/JoinsMonitor.hs Fri Jan 17 06:58:28 2014 -0800
@@ -0,0 +1,43 @@
+{-# LANGUAGE BangPatterns #-}
+
+module JoinsMonitor(
+ JoinsMonitor
+ , newJoinMonitor
+ , cleanup
+ , joinsSentry
+ ) where
+
+import qualified Data.Map as Map
+import Data.Time
+import Data.IORef
+import qualified Data.ByteString as B
+import Data.Maybe
+import Control.Monad
+
+newtype JoinsMonitor = JoinsMonitor (IORef (Map.Map B.ByteString [UTCTime]))
+
+
+newJoinMonitor :: IO JoinsMonitor
+newJoinMonitor = do
+ ioref <- newIORef Map.empty
+ return (JoinsMonitor ioref)
+
+
+cleanup :: JoinsMonitor -> UTCTime -> IO ()
+cleanup (JoinsMonitor ref) time = modifyIORef' ref f
+ where
+ f = Map.mapMaybe (\v -> let v' = takeWhile (\t -> diffUTCTime time t < 60*60) v in if null v' then Nothing else Just v')
+
+
+joinsSentry :: JoinsMonitor -> B.ByteString -> UTCTime -> IO Bool
+joinsSentry (JoinsMonitor ref) host time = do
+ m <- readIORef ref
+ let lastJoins = map (diffUTCTime time) $ Map.findWithDefault [] host m
+ let last30sec = length $ takeWhile (< 30) lastJoins
+ let last2min = length $ takeWhile (< 120) lastJoins
+ let last10min = length $ takeWhile (< 600) lastJoins
+ let pass = last30sec < 2 && last2min < 4 && last10min < 6
+
+ when pass $ writeIORef ref $ Map.alter (Just . (:) time . fromMaybe []) host m
+
+ return pass
--- a/gameServer/ServerCore.hs Tue Jan 07 11:40:58 2014 +0100
+++ b/gameServer/ServerCore.hs Fri Jan 17 06:58:28 2014 -0800
@@ -62,7 +62,9 @@
TimerAction tick ->
mapM_ processAction $
- PingAll : [StatsAction | even tick]
+ PingAll
+ : [StatsAction | even tick]
+ ++ [Cleanup | tick `mod` 100 == 0]
startServer :: ServerInfo -> IO ()
@@ -79,5 +81,6 @@
startDBConnection si
rnc <- newRoomsAndClients newRoom
+ jm <- newJoinMonitor
- evalStateT mainLoop (ServerState Nothing si Set.empty rnc)
+ evalStateT mainLoop (ServerState Nothing si Set.empty rnc jm)
--- a/gameServer/ServerState.hs Tue Jan 07 11:40:58 2014 +0100
+++ b/gameServer/ServerState.hs Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,7 @@
module ServerState
(
module RoomsAndClients,
+ module JoinsMonitor,
clientRoomA,
ServerState(..),
client's,
@@ -17,12 +18,14 @@
----------------------
import RoomsAndClients
import CoreTypes
+import JoinsMonitor
data ServerState = ServerState {
clientIndex :: !(Maybe ClientIndex),
serverInfo :: !ServerInfo,
removedClients :: !(Set.Set ClientIndex),
- roomsClients :: !MRnC
+ roomsClients :: !MRnC,
+ joinsMonitor :: !JoinsMonitor
}
--- a/hedgewars/ArgParsers.pas Tue Jan 07 11:40:58 2014 +0100
+++ b/hedgewars/ArgParsers.pas Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
(*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -45,7 +45,6 @@
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;
@@ -188,13 +187,13 @@
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..18] of String = ('--fullscreen-width','--fullscreen-height', '--width', '--height', '--depth','--volume','--nomusic','--nosound','--locale','--fullscreen','--showfps','--altdmg','--frame-interval','--low-quality','--no-teamtag','--no-hogtag','--no-healthtag','--translucent-tags');
- reallyAll: array[0..34] of shortstring = (
+ reallyAll: array[0..35] 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','--no-teamtag','--no-hogtag','--no-healthtag','--translucent-tags');
+ {misc} '--stats-only', '--gci', '--help','--no-teamtag','--no-hogtag','--no-healthtag','--translucent-tags','--lua-test');
var cmdIndex: byte;
begin
parseParameter:= false;
@@ -242,10 +241,11 @@
{--no-teamtag} 31 : cTagsMask := cTagsMask and not htTeamName;
{--no-hogtag} 32 : cTagsMask := cTagsMask and not htName;
{--no-healthtag} 33 : cTagsMask := cTagsMask and not htHealth;
- {--translucent-tags} 34 : cTagsMask := cTagsMask or htTransparent
+ {--translucent-tags} 34 : cTagsMask := cTagsMask or htTransparent;
+ {--lua-test} 35 : begin cTestLua := true; cScriptName := getStringParameter(arg, paramIndex, parseParameter); WriteLn(stdout, 'Lua test file specified: ' + cScriptName);end;
else
begin
- //Asusme the first "non parameter" is the replay file, anything else is invalid
+ //Assume the first "non parameter" is the replay file, anything else is invalid
if (recordFileName = '') and (Copy(cmd,1,2) <> '--') then
recordFileName := cmd
else
@@ -351,7 +351,7 @@
GameType := gmtSyntax;
end;
- if (not isInternal) and (recordFileName = '') then
+ if (not cTestLua) and (not isInternal) and (recordFileName = '') then
begin
WriteLn(stderr, 'You must specify a replay file');
GameType := gmtSyntax;
--- a/hedgewars/CMakeLists.txt Tue Jan 07 11:40:58 2014 +0100
+++ b/hedgewars/CMakeLists.txt Fri Jan 17 06:58:28 2014 -0800
@@ -20,6 +20,14 @@
endif()
endif(UNIX)
+# convert list into pascal array
+list(LENGTH FONTS_DIRS ndirs)
+set(FONTS_DIRS_ARRAY "array [0..${ndirs}] of PChar = (")
+foreach(fontdir ${FONTS_DIRS})
+ set(FONTS_DIRS_ARRAY "${FONTS_DIRS_ARRAY}\n'${fontdir}',")
+endforeach(fontdir)
+set(FONTS_DIRS_ARRAY "${FONTS_DIRS_ARRAY}\nnil);\n")
+
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.inc.in ${CMAKE_CURRENT_BINARY_DIR}/config.inc)
include_directories(${CMAKE_CURRENT_BINARY_DIR})
@@ -94,10 +102,10 @@
)
-if (${CMAKE_Pascal_COMPILER_VERSION} VERSION_LESS 2.2 OR # older versions are just ancient
- (${CMAKE_Pascal_COMPILER_VERSION} VERSION_LESS 2.6 AND APPLE)) # because of 64bit and opengl bindings
+if(${CMAKE_Pascal_COMPILER_VERSION} VERSION_LESS 2.2 OR # older versions are just ancient
+ (${CMAKE_Pascal_COMPILER_VERSION} VERSION_LESS 2.6 AND APPLE)) # because of 64bit and opengl bindings
message(FATAL_ERROR "Your FreePascal installation is too old (fpc ${CMAKE_Pascal_COMPILER_VERSION})!")
-elseif(CMAKE_Pascal_COMPILER_VERSION VERSION_GREATER 2.4)
+elseif(${CMAKE_Pascal_COMPILER_VERSION} VERSION_GREATER 2.4)
#enable INLINE only with a recent version of fpc
add_flag_prepend(CMAKE_Pascal_FLAGS_RELEASE -Si)
endif()
@@ -106,13 +114,13 @@
add_flag_append(CMAKE_Pascal_FLAGS "-Fl${LIBRARY_OUTPUT_PATH}")
#DEPENDECIES AND EXECUTABLES SECTION
-if(NOT ${BUILD_ENGINE_LIBRARY} AND APPLE)
+if(APPLE AND (NOT BUILD_ENGINE_LIBRARY))
#on OSX we need to provide the SDL_main() function when building as executable
add_subdirectory(sdlmain)
list(APPEND HW_LINK_LIBS SDLmain)
endif()
-if(FFMPEG_FOUND)
+if(LIBAV_FOUND)
add_subdirectory(avwrapper)
list(APPEND HW_LINK_LIBS avwrapper)
add_definitions(-dUSE_VIDEO_RECORDING)
@@ -141,7 +149,7 @@
add_flag_append(CMAKE_Pascal_FLAGS "-XLAlua=${lua_output_name}")
endif()
-if(PHYSFS_FOUND)
+if(PHYSFS_SYSTEM)
get_filename_component(PHYSFS_LIBRARY_DIR ${PHYSFS_LIBRARY} PATH)
add_flag_append(CMAKE_Pascal_FLAGS "-Fl${PHYSFS_LIBRARY}")
else()
@@ -167,7 +175,7 @@
add_definitions(-dSDL_IMAGE_NEWER)
endif(HAVE_IMGINIT)
-if(NOT (SDL_VERSION VERSION_LESS 2.0))
+if(${SDL_VERSION} VERSION_GREATER 1.3)
add_definitions(-dSDL2)
endif()
@@ -185,7 +193,7 @@
#SOURCE AND PROGRAMS SECTION
if(BUILD_ENGINE_LIBRARY)
message("***Engine will be built as library (experimental)***")
- if(APPLE AND current_macosx_version VERSION_GREATER "10.5")
+ if(APPLE AND ${current_macosx_version} VERSION_GREATER "10.5")
# due to compiler/linker issues on Max OS X 10.6 -k-no_order_inits is needed to avoid linking fail
add_flag_prepend(CMAKE_Pascal_FLAGS "-k-no_order_inits")
endif()
--- a/hedgewars/PNGh.pas Tue Jan 07 11:40:58 2014 +0100
+++ b/hedgewars/PNGh.pas Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
(*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/hedgewars/SDLh.pas Tue Jan 07 11:40:58 2014 +0100
+++ b/hedgewars/SDLh.pas Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
(*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/hedgewars/avwrapper/CMakeLists.txt Tue Jan 07 11:40:58 2014 +0100
+++ b/hedgewars/avwrapper/CMakeLists.txt Fri Jan 17 06:58:28 2014 -0800
@@ -1,14 +1,14 @@
-#FFMPEG/Libav libraries have been searched already in main CMakeLists.txt
+#libraries have already been searched in main CMakeLists.txt
# TODO: this check is only for SDL < 2
# fpc will take care of linking but we need to have this library installed
find_package(GLUT REQUIRED)
-include_directories(${FFMPEG_INCLUDE_DIR})
+include_directories(${LIBAV_INCLUDE_DIR})
add_library(avwrapper avwrapper.c)
#TODO: find good VERSION and SOVERSION values
-target_link_libraries(avwrapper ${FFMPEG_LIBRARIES})
+target_link_libraries(avwrapper ${LIBAV_LIBRARIES})
install(TARGETS avwrapper RUNTIME DESTINATION ${target_binary_install_dir}
LIBRARY DESTINATION ${target_library_install_dir}
ARCHIVE DESTINATION ${target_library_install_dir})
--- a/hedgewars/avwrapper/avwrapper.c Tue Jan 07 11:40:58 2014 +0100
+++ b/hedgewars/avwrapper/avwrapper.c Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
/*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/hedgewars/config.inc.in Tue Jan 07 11:40:58 2014 +0100
+++ b/hedgewars/config.inc.in Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
(*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -26,3 +26,4 @@
cRevisionString = '${HEDGEWARS_REVISION}';
cHashString = '${HEDGEWARS_HASH}';
cDefaultPathPrefix = '${HEDGEWARS_FULL_DATADIR}/Data';
+ cFontsPaths: ${FONTS_DIRS_ARRAY}
--- a/hedgewars/hwLibrary.pas Tue Jan 07 11:40:58 2014 +0100
+++ b/hedgewars/hwLibrary.pas Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
(*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/hedgewars/hwengine.pas Tue Jan 07 11:40:58 2014 +0100
+++ b/hedgewars/hwengine.pas Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
(*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -381,13 +381,20 @@
WriteLnToConsole(msgGettingConfig);
- if recordFileName = '' then
+ if cTestLua then
begin
- InitIPC;
- SendIPCAndWaitReply(_S'C'); // ask for game config
+ ParseCommand('script ' + cScriptName, true);
end
else
- LoadRecordFromFile(recordFileName);
+ begin
+ if recordFileName = '' then
+ begin
+ InitIPC;
+ SendIPCAndWaitReply(_S'C'); // ask for game config
+ end
+ else
+ LoadRecordFromFile(recordFileName);
+ end;
ScriptOnGameInit;
s:= 'eproto ' + inttostr(cNetProtoVersion);
--- a/hedgewars/options.inc Tue Jan 07 11:40:58 2014 +0100
+++ b/hedgewars/options.inc Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
(*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/hedgewars/uAI.pas Tue Jan 07 11:40:58 2014 +0100
+++ b/hedgewars/uAI.pas Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
(*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/hedgewars/uAIActions.pas Tue Jan 07 11:40:58 2014 +0100
+++ b/hedgewars/uAIActions.pas Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
(*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/hedgewars/uAIAmmoTests.pas Tue Jan 07 11:40:58 2014 +0100
+++ b/hedgewars/uAIAmmoTests.pas Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
(*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/hedgewars/uAIMisc.pas Tue Jan 07 11:40:58 2014 +0100
+++ b/hedgewars/uAIMisc.pas Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
(*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/hedgewars/uAmmos.pas Tue Jan 07 11:40:58 2014 +0100
+++ b/hedgewars/uAmmos.pas Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
(*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/hedgewars/uCaptions.pas Tue Jan 07 11:40:58 2014 +0100
+++ b/hedgewars/uCaptions.pas Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
(*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/hedgewars/uChat.pas Tue Jan 07 11:40:58 2014 +0100
+++ b/hedgewars/uChat.pas Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
(*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/hedgewars/uCollisions.pas Tue Jan 07 11:40:58 2014 +0100
+++ b/hedgewars/uCollisions.pas Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
(*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/hedgewars/uCommandHandlers.pas Tue Jan 07 11:40:58 2014 +0100
+++ b/hedgewars/uCommandHandlers.pas Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
(*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -121,7 +121,8 @@
procedure chScriptParam(var s: shortstring);
begin
- cScriptParam:= s;
+ ScriptSetString('ScriptParam', s);
+ ScriptCall('onParameters');
end;
procedure chCurU_p(var s: shortstring);
--- a/hedgewars/uCommands.pas Tue Jan 07 11:40:58 2014 +0100
+++ b/hedgewars/uCommands.pas Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
(*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/hedgewars/uConsole.pas Tue Jan 07 11:40:58 2014 +0100
+++ b/hedgewars/uConsole.pas Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
(*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/hedgewars/uConsts.pas Tue Jan 07 11:40:58 2014 +0100
+++ b/hedgewars/uConsts.pas Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
(*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -300,6 +300,10 @@
kSystemSoundID_Vibrate = $00000FFF;
+ rtnTestSuccess = $00000000;
+ rtnTestFailed = $00000001;
+ rtnTestLuaErr = $00000002;
+
implementation
end.
--- a/hedgewars/uDebug.pas Tue Jan 07 11:40:58 2014 +0100
+++ b/hedgewars/uDebug.pas Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
(*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/hedgewars/uFloat.pas Tue Jan 07 11:40:58 2014 +0100
+++ b/hedgewars/uFloat.pas Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
(*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/hedgewars/uGame.pas Tue Jan 07 11:40:58 2014 +0100
+++ b/hedgewars/uGame.pas Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
(*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/hedgewars/uGears.pas Tue Jan 07 11:40:58 2014 +0100
+++ b/hedgewars/uGears.pas Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
(*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -626,7 +626,11 @@
if (not hasBorder) and cSnow then
for i:= vobCount * Longword(max(LAND_WIDTH,4096)) div 2048 downto 1 do
- AddGear(LongInt(GetRandom(snowRight - snowLeft)) + snowLeft, LAND_HEIGHT + LongInt(GetRandom(750)) - 1300, gtFlake, 0, _0, _0, 0);
+ begin
+ rx:=GetRandom(snowRight - snowLeft);
+ ry:=GetRandom(750);
+ AddGear(rx + snowLeft, LAND_HEIGHT + ry - 1300, gtFlake, 0, _0, _0, 0)
+ end
end;
procedure AssignHHCoords;
--- a/hedgewars/uGearsHandlers.pas Tue Jan 07 11:40:58 2014 +0100
+++ b/hedgewars/uGearsHandlers.pas Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
(*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -23,7 +23,7 @@
uses uTypes;
-procedure cakeStep(Gear: PGear);
+function cakeStep(Gear: PGear): boolean;
implementation
@@ -35,15 +35,17 @@
procedure PrevAngle(Gear: PGear; dA: LongInt); inline;
begin
+ inc(Gear^.WDTimer);
Gear^.Angle := (LongInt(Gear^.Angle) - dA) and 3
end;
procedure NextAngle(Gear: PGear; dA: LongInt); inline;
begin
+ inc(Gear^.WDTimer);
Gear^.Angle := (LongInt(Gear^.Angle) + dA) and 3
end;
-procedure cakeStep(Gear: PGear);
+function cakeStep(Gear: PGear): boolean;
var
xx, yy, xxn, yyn: LongInt;
dA: LongInt;
@@ -57,30 +59,40 @@
if (xx = 0) then
if TestCollisionYwithGear(Gear, yy) <> 0 then
PrevAngle(Gear, dA)
- else
- begin
- Gear^.Tag := 0;
- Gear^.Y := Gear^.Y + int2hwFloat(yy);
- if TestCollisionXwithGear(Gear, xxn) = 0 then
+ else
begin
- Gear^.X := Gear^.X + int2hwFloat(xxn);
- NextAngle(Gear, dA)
+ Gear^.Tag := 0;
+
+ if TestCollisionXwithGear(Gear, xxn) <> 0 then
+ Gear^.WDTimer:= 0;
+
+ Gear^.Y := Gear^.Y + int2hwFloat(yy);
+ if TestCollisionXwithGear(Gear, xxn) = 0 then
+ begin
+ Gear^.X := Gear^.X + int2hwFloat(xxn);
+ NextAngle(Gear, dA)
+ end
end;
- end;
if (yy = 0) then
if TestCollisionXwithGear(Gear, xx) <> 0 then
PrevAngle(Gear, dA)
- else
- begin
- Gear^.Tag := 0;
- Gear^.X := Gear^.X + int2hwFloat(xx);
- if TestCollisionYwithGear(Gear, yyn) = 0 then
+ else
begin
- Gear^.Y := Gear^.Y + int2hwFloat(yyn);
- NextAngle(Gear, dA)
+ Gear^.Tag := 0;
+
+ if TestCollisionYwithGear(Gear, yyn) <> 0 then
+ Gear^.WDTimer:= 0;
+
+ Gear^.X := Gear^.X + int2hwFloat(xx);
+ if TestCollisionYwithGear(Gear, yyn) = 0 then
+ begin
+ Gear^.Y := Gear^.Y + int2hwFloat(yyn);
+ NextAngle(Gear, dA)
+ end
end;
- end;
+
+ cakeStep:= Gear^.WDTimer < 4
end;
end.
--- a/hedgewars/uGearsHandlersMess.pas Tue Jan 07 11:40:58 2014 +0100
+++ b/hedgewars/uGearsHandlersMess.pas Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
(*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -296,9 +296,9 @@
end;
// clip velocity at 2 - over 1 per pixel, but really shouldn't cause many actual problems.
- if Gear^.dX.Round > 2 then
+ if Gear^.dX.Round > 1 then
Gear^.dX.QWordValue:= 8589934592;
- if Gear^.dY.Round > 2 then
+ if Gear^.dY.Round > 1 then
Gear^.dY.QWordValue:= 8589934592;
if (Gear^.State and gstSubmersible <> 0) and (gY > cWaterLine) then
@@ -2943,7 +2943,7 @@
exit
end;
- cakeStep(Gear);
+ if not cakeStep(Gear) then Gear^.doStep:= @doStepCakeFall;
if Gear^.Tag = 0 then
begin
--- a/hedgewars/uGearsHandlersRope.pas Tue Jan 07 11:40:58 2014 +0100
+++ b/hedgewars/uGearsHandlersRope.pas Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
(*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/hedgewars/uGearsHedgehog.pas Tue Jan 07 11:40:58 2014 +0100
+++ b/hedgewars/uGearsHedgehog.pas Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
(*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -881,7 +881,7 @@
Gear^.State:= Gear^.State and not gstCollision
end;
Gear^.State:= Gear^.State or gstMoving;
- if (CurrentHedgehog^.Gear = Gear) and (CurrentHedgehog^.Gear^.State and gstHHDriven <> 0) and
+ if (Gear^.State and gstHHDriven <> 0) and
(not CurrentTeam^.ExtDriven) and (hwSqr(Gear^.dX) + hwSqr(Gear^.dY) > _0_003) then
begin
// TODO: why so aggressive at setting FollowGear when falling?
--- a/hedgewars/uGearsList.pas Tue Jan 07 11:40:58 2014 +0100
+++ b/hedgewars/uGearsList.pas Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
(*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/hedgewars/uGearsRender.pas Tue Jan 07 11:40:58 2014 +0100
+++ b/hedgewars/uGearsRender.pas Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
(*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -929,8 +929,28 @@
DrawTextureCentered(ox, sy - cHHRadius - 7 - HealthTagTex^.h, HealthTagTex);
if bShowFinger and ((Gear^.State and gstHHDriven) <> 0) then
- DrawSprite(sprFinger, ox - 16, oy - 64,
- GameTicks div 32 mod 16);
+ begin
+ ty := oy - 32;
+ // move finger higher up if tags are above hog
+ if (cTagsMask and htTeamName) <> 0 then
+ ty := ty - Team^.NameTagTex^.h - 2;
+ if (cTagsMask and htName) <> 0 then
+ ty := ty - NameTagTex^.h - 2;
+ if (cTagsMask and htHealth) <> 0 then
+ ty := ty - HealthTagTex^.h - 2;
+ tx := ox;
+ tx := round(max(((-cScreenWidth + 16) / zoom) + SpritesData[sprFinger].Width div 2, min(((cScreenWidth - 16) / zoom) - SpritesData[sprFinger].Width div 2, tx)));
+ ty := round(max(cScreenHeight div 2 - ((cScreenHeight - 16) / (zoom)) + SpritesData[sprFinger].Height div 2, min(cScreenHeight div 2 - ((-cScreenHeight + SpritesData[sprFinger].Height) / (zoom)) - SpritesData[sprFinger].Width div 2 - 96, ty)));
+ t := tx-ox;
+ if t <> 0 then
+ dAngle := radtodeg(-arctan2(-(ty-oy),t)) + 90
+ else if ty > oy then
+ dAngle := 180
+ else
+ dAngle := 0;
+ DrawSpriteRotatedF(sprFinger, tx, ty, GameTicks div 32 mod 16, 1, dAngle);
+ end;
+
if (Gear^.State and gstDrowning) = 0 then
if (Gear^.State and gstHHThinking) <> 0 then
--- a/hedgewars/uGearsUtils.pas Tue Jan 07 11:40:58 2014 +0100
+++ b/hedgewars/uGearsUtils.pas Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
(*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/hedgewars/uIO.pas Tue Jan 07 11:40:58 2014 +0100
+++ b/hedgewars/uIO.pas Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
(*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/hedgewars/uInputHandler.pas Tue Jan 07 11:40:58 2014 +0100
+++ b/hedgewars/uInputHandler.pas Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
(*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -486,16 +486,17 @@
i:= 1;
while (i <= length(l)) and (l[i] <> '=') do
begin
- if l[i] <> '%' then
- begin
- p:= p + l[i];
- inc(i)
- end else
+ if l[i] = '%' then
begin
l[i]:= '$';
val(copy(l, i, 3), b);
p:= p + char(b);
inc(i, 3)
+ end
+ else
+ begin
+ p:= p + l[i];
+ inc(i)
end;
end;
@@ -504,6 +505,11 @@
l:= copy(l, i + 1, length(l) - i);
if l <> 'default' then
begin
+ if (length(l) = 2) and (l[1] = '\') then
+ l:= l[1]
+ else if (l[1] = '"') and (l[length(l)] = '"') then
+ l:= copy(l, 2, length(l) - 2);
+
p:= cmd + ' ' + l + ' ' + p;
ParseCommand(p, true)
end
--- a/hedgewars/uLand.pas Tue Jan 07 11:40:58 2014 +0100
+++ b/hedgewars/uLand.pas Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
(*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/hedgewars/uLandGraphics.pas Tue Jan 07 11:40:58 2014 +0100
+++ b/hedgewars/uLandGraphics.pas Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
(*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/hedgewars/uLandObjects.pas Tue Jan 07 11:40:58 2014 +0100
+++ b/hedgewars/uLandObjects.pas Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
(*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/hedgewars/uLandPainted.pas Tue Jan 07 11:40:58 2014 +0100
+++ b/hedgewars/uLandPainted.pas Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
(*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/hedgewars/uLandTemplates.pas Tue Jan 07 11:40:58 2014 +0100
+++ b/hedgewars/uLandTemplates.pas Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
(*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/hedgewars/uLandTexture.pas Tue Jan 07 11:40:58 2014 +0100
+++ b/hedgewars/uLandTexture.pas Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
(*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/hedgewars/uLocale.pas Tue Jan 07 11:40:58 2014 +0100
+++ b/hedgewars/uLocale.pas Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
(*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/hedgewars/uMisc.pas Tue Jan 07 11:40:58 2014 +0100
+++ b/hedgewars/uMisc.pas Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
(*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/hedgewars/uPhysFSLayer.pas Tue Jan 07 11:40:58 2014 +0100
+++ b/hedgewars/uPhysFSLayer.pas Fri Jan 17 06:58:28 2014 -0800
@@ -3,6 +3,8 @@
interface
uses SDLh, LuaPas;
+{$INCLUDE "config.inc"}
+
const PhysfsLibName = {$IFDEF PHYSFS_INTERNAL}'libhwphysfs'{$ELSE}'libphysfs'{$ENDIF};
const PhyslayerLibName = 'libphyslayer';
@@ -41,12 +43,13 @@
function PHYSFSRWOPS_openRead(fname: PChar): PSDL_RWops; cdecl ; external PhyslayerLibName;
function PHYSFSRWOPS_openWrite(fname: PChar): PSDL_RWops; cdecl; external PhyslayerLibName;
-function PHYSFS_mount(newDir, mountPoint: PChar; appendToPath: LongBool) : LongInt; cdecl; external PhysfsLibName;
+function PHYSFS_mount(newDir, mountPoint: PChar; appendToPath: LongBool) : LongBool; 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;
+function PHYSFS_getLastError(): PChar; cdecl; external PhysfsLibName;
procedure hedgewarsMountPackages(); cdecl; external PhyslayerLibName;
@@ -127,9 +130,23 @@
pfsBlockRead:= r
end;
+procedure pfsMount(path: AnsiString; mountpoint: PChar);
+begin
+ if PHYSFS_mount(Str2PChar(path), mountpoint, false) then
+ AddFileLog('[PhysFS] mount ' + path + ' at ' + mountpoint + ' : ok')
+ else
+ AddFileLog('[PhysFS] mount ' + path + ' at ' + mountpoint + ' : FAILED ("' + PHYSFS_getLastError() + '")');
+end;
+
+procedure pfsMountAtRoot(path: AnsiString);
+begin
+ pfsMount(path, '/');
+end;
+
procedure initModule;
var i: LongInt;
cPhysfsId: shortstring;
+ fp: PChar;
begin
{$IFDEF HWLIBRARY}
//TODO: http://icculus.org/pipermail/physfs/2011-August/001006.html
@@ -141,16 +158,27 @@
i:= PHYSFS_init(Str2PChar(cPhysfsId));
AddFileLog('[PhysFS] init: ' + inttostr(i));
- i:= PHYSFS_mount(Str2PChar(PathPrefix), nil, false);
- AddFileLog('[PhysFS] mount ' + PathPrefix + ': ' + inttostr(i));
- i:= PHYSFS_mount(Str2PChar(UserPathPrefix + '/Data'), nil, false);
- AddFileLog('[PhysFS] mount ' + UserPathPrefix + '/Data: ' + inttostr(i));
+ // mount system fonts paths first
+ for i:= low(cFontsPaths) to high(cFontsPaths) do
+ begin
+ fp := cFontsPaths[i];
+ if fp <> nil then
+ pfsMount(fp, '/Fonts');
+ end;
+
+ pfsMountAtRoot(PathPrefix);
+ pfsMountAtRoot(UserPathPrefix + '/Data');
hedgewarsMountPackages;
- i:= PHYSFS_mount(Str2PChar(UserPathPrefix), nil, false);
// need access to teams and frontend configs (for bindings)
- AddFileLog('[PhysFS] mount ' + UserPathPrefix + ': ' + inttostr(i));
+ pfsMountAtRoot(UserPathPrefix);
+
+ if cTestLua then
+ begin
+ pfsMountAtRoot(ExtractFileDir(cScriptName));
+ cScriptName := ExtractFileName(cScriptName);
+ end;
end;
procedure freeModule;
--- a/hedgewars/uRandom.pas Tue Jan 07 11:40:58 2014 +0100
+++ b/hedgewars/uRandom.pas Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
(*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/hedgewars/uRender.pas Tue Jan 07 11:40:58 2014 +0100
+++ b/hedgewars/uRender.pas Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
(*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/hedgewars/uRenderUtils.pas Tue Jan 07 11:40:58 2014 +0100
+++ b/hedgewars/uRenderUtils.pas Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
(*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/hedgewars/uScript.pas Tue Jan 07 11:40:58 2014 +0100
+++ b/hedgewars/uScript.pas Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
(*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -38,6 +38,7 @@
procedure ScriptOnGameInit;
procedure ScriptOnScreenResize;
procedure ScriptSetInteger(name : shortstring; value : LongInt);
+procedure ScriptSetString(name : shortstring; value : shortstring);
procedure ScriptCall(fname : shortstring);
function ScriptCall(fname : shortstring; par1: LongInt) : LongInt;
@@ -105,6 +106,8 @@
begin
WriteLnToConsole(s);
AddChatString(#5 + s);
+ if cTestLua then
+ halt(rtnTestLuaErr);
end;
procedure LuaParameterCountError(call, paramsyntax: shortstring; wrongcount: LongInt);
@@ -1196,7 +1199,7 @@
var gear: PGear;
begin
if lua_gettop(L) <> 3 then
- LuaParameterCountError('SetEffect', 'gearUid, effect, enabled', lua_gettop(L))
+ LuaParameterCountError('SetEffect', 'gearUid, effect, effectState', lua_gettop(L))
else begin
gear := GearByUID(lua_tointeger(L, 1));
if (gear <> nil) and (gear^.Hedgehog <> nil) then
@@ -1982,6 +1985,21 @@
declareAchievement(lua_tostring(L, 1), lua_tostring(L, 2), lua_tostring(L, 3), lua_tointeger(L, 4));
lc_declareachievement:= 0
end;
+
+// stuff for testing the lua API
+function lc_endluatest(L : Plua_State) : LongInt; Cdecl;
+begin
+ if lua_gettop(L) <> 1 then
+ begin
+ LuaParameterCountError('EndLuaAPITest', 'LUA_API_TEST_SUCCESSFUL or LUA_API_TEST_FAILED', lua_gettop(L));
+ lua_pushnil(L);
+ end
+ else
+ begin
+ halt(lua_tointeger(L, 1));
+ lc_endluatest:= 0;
+ end;
+end;
///////////////////
procedure ScriptPrintStack;
@@ -2070,7 +2088,6 @@
ScriptSetString('Map', cMapName);
ScriptSetString('Theme', '');
ScriptSetString('Goals', '');
-ScriptSetString('ScriptParam', cScriptParam);
ScriptCall('onGameInit');
@@ -2631,6 +2648,12 @@
lua_register(luaState, _P'HedgewarsScriptLoad', @lc_hedgewarsscriptload);
lua_register(luaState, _P'DeclareAchievement', @lc_declareachievement);
+if cTestLua then
+ begin
+ ScriptSetInteger('TEST_SUCCESSFUL' ,rtnTestSuccess);
+ ScriptSetInteger('TEST_FAILED' ,rtnTestFailed);
+ lua_register(luaState, _P'EndLuaTest', @lc_endluatest);
+ end;
ScriptClearStack; // just to be sure stack is empty
ScriptLoaded:= false;
--- a/hedgewars/uSinTable.pas Tue Jan 07 11:40:58 2014 +0100
+++ b/hedgewars/uSinTable.pas Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
(*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/hedgewars/uSound.pas Tue Jan 07 11:40:58 2014 +0100
+++ b/hedgewars/uSound.pas Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
(*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/hedgewars/uStats.pas Tue Jan 07 11:40:58 2014 +0100
+++ b/hedgewars/uStats.pas Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
(*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/hedgewars/uStore.pas Tue Jan 07 11:40:58 2014 +0100
+++ b/hedgewars/uStore.pas Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
(*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/hedgewars/uTeams.pas Tue Jan 07 11:40:58 2014 +0100
+++ b/hedgewars/uTeams.pas Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
(*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/hedgewars/uTextures.pas Tue Jan 07 11:40:58 2014 +0100
+++ b/hedgewars/uTextures.pas Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
(*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/hedgewars/uTypes.pas Tue Jan 07 11:40:58 2014 +0100
+++ b/hedgewars/uTypes.pas Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
(*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -264,7 +264,7 @@
// These are frequently overridden to serve some other purpose
Pos: Longword; // Commonly overridden. Example use is posCase values in uConsts.
Angle, Power : Longword; // Used for hog aiming/firing. Angle is rarely used as an Angle otherwise.
- Timer : LongWord; // Typically used for some sort of gear timer. Time to explosion, remaining fuel...
+ Timer, WDTimer : LongWord; // Typically used for some sort of gear timer. Time to explosion, remaining fuel...
Tag: LongInt; // Quite generic. Variety of uses.
FlightTime: Longword; // Initially added for batting of hogs to determine homerun. Used for some firing delays
MsgParam: LongWord; // Initially stored a set of messages. So usually gm values like Message. Frequently overriden
--- a/hedgewars/uUtils.pas Tue Jan 07 11:40:58 2014 +0100
+++ b/hedgewars/uUtils.pas Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
(*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/hedgewars/uVariables.pas Tue Jan 07 11:40:58 2014 +0100
+++ b/hedgewars/uVariables.pas Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
(*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -2365,6 +2365,8 @@
lastTurnChecksum : Longword;
+ cTestLua : Boolean;
+
var trammo: array[TAmmoStrId] of ansistring; // name of the weapon
trammoc: array[TAmmoStrId] of ansistring; // caption of the weapon
trammod: array[TAmmoStrId] of ansistring; // description of the weapon
@@ -2405,6 +2407,9 @@
PathPrefix := './';
GameType := gmtLocal;
cOnlyStats := False;
+ cScriptName := '';
+ cScriptParam := '';
+ cTestLua := False;
{$IFDEF USE_VIDEO_RECORDING}
RecPrefix := '';
@@ -2551,8 +2556,6 @@
fastUntilLag := false;
fastScrolling := false;
autoCameraOn := true;
- cScriptName := '';
- cScriptParam := '';
cSeed := '';
cVolumeDelta := 0;
cHasFocus := true;
--- a/hedgewars/uVideoRec.pas Tue Jan 07 11:40:58 2014 +0100
+++ b/hedgewars/uVideoRec.pas Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
(*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/hedgewars/uVisualGears.pas Tue Jan 07 11:40:58 2014 +0100
+++ b/hedgewars/uVisualGears.pas Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
(*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/hedgewars/uVisualGearsHandlers.pas Tue Jan 07 11:40:58 2014 +0100
+++ b/hedgewars/uVisualGearsHandlers.pas Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
(*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/hedgewars/uVisualGearsList.pas Tue Jan 07 11:40:58 2014 +0100
+++ b/hedgewars/uVisualGearsList.pas Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
(*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- a/hedgewars/uWorld.pas Tue Jan 07 11:40:58 2014 +0100
+++ b/hedgewars/uWorld.pas Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
(*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -409,6 +409,9 @@
missionTex:= nil;
FreeTexture(recTexture);
recTexture:= nil;
+ FreeTexture(AmmoMenuTex);
+ AmmoMenuInvalidated:= true;
+ AmmoMenuTex:= nil;
end;
function GetAmmoMenuTexture(Ammo: PHHAmmo): PTexture;
@@ -2042,6 +2045,8 @@
WorldEnd[2].a:= 255;
WorldEnd[3].a:= 255;
+ AmmoMenuTex:= nil;
+ AmmoMenuInvalidated:= true
end;
procedure freeModule;
--- a/misc/libphyslayer/CMakeLists.txt Tue Jan 07 11:40:58 2014 +0100
+++ b/misc/libphyslayer/CMakeLists.txt Fri Jan 17 06:58:28 2014 -0800
@@ -7,6 +7,7 @@
## extra functions needed by Hedgewars
## TODO: maybe it's better to have them in a separate library?
set(PHYSLAYER_SRCS
+ physfscompat.c
physfsrwops.c
physfslualoader.c
hwpacksmounter.c
--- a/misc/libphyslayer/hwpacksmounter.h Tue Jan 07 11:40:58 2014 +0100
+++ b/misc/libphyslayer/hwpacksmounter.h Fri Jan 17 06:58:28 2014 -0800
@@ -3,6 +3,8 @@
#include "physfs.h"
+#include "physfscompat.h"
+
#ifdef __cplusplus
extern "C" {
#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/misc/libphyslayer/physfscompat.c Fri Jan 17 06:58:28 2014 -0800
@@ -0,0 +1,73 @@
+/*
+ * Hedgewars, a free turn based strategy game
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+ */
+
+#include "physfscompat.h"
+
+#ifdef HW_PHYSFS_COMPAT
+
+PHYSFS_DECL int PHYSFS_stat(const char *fname, PHYSFS_Stat *stat)
+{
+ PHYSFS_File * handle;
+
+ if (PHYSFS_exists(fname))
+ {
+ handle = PHYSFS_openRead(fname);
+ if (handle)
+ {
+ stat->filesize = PHYSFS_fileLength(handle);
+ PHYSFS_close(handle);
+ handle = 0;
+ }
+ else
+ stat->filesize = -1;
+
+ stat->modtime = PHYSFS_getLastModTime(fname);
+ stat->createtime = -1;
+ stat->accesstime = -1;
+
+ if (PHYSFS_isSymbolicLink(fname))
+ stat->filetype = PHYSFS_FILETYPE_SYMLINK;
+ else if (PHYSFS_isDirectory(fname))
+ stat->filetype = PHYSFS_FILETYPE_DIRECTORY;
+ else stat->filetype = PHYSFS_FILETYPE_REGULAR;
+
+ stat->readonly = 0; /* not supported */
+
+ /* success */
+ return 1;
+ }
+
+ /* does not exist, can't stat */
+ return 0;
+}
+
+PHYSFS_DECL PHYSFS_sint64 PHYSFS_readBytes(PHYSFS_File *handle, void *buffer,
+ PHYSFS_uint64 len)
+{
+ return PHYSFS_read(handle, buffer, 1, len);
+}
+
+
+PHYSFS_DECL PHYSFS_sint64 PHYSFS_writeBytes(PHYSFS_File *handle,
+ const void *buffer,
+ PHYSFS_uint64 len)
+{
+ return PHYSFS_write(handle, buffer, 1, len);
+}
+
+#endif /* HW_PHYSFS_COMPAT */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/misc/libphyslayer/physfscompat.h Fri Jan 17 06:58:28 2014 -0800
@@ -0,0 +1,71 @@
+/*
+ * Hedgewars, a free turn based strategy game
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+ */
+
+#ifndef _HEDGEWARS_PHYSFSCOMPAT_C_
+#define _HEDGEWARS_PHYSFSCOMPAT_C_
+
+#include "physfs.h"
+
+#if PHYSFS_VER_MAJOR == 2
+#if PHYSFS_VER_MINOR == 0
+
+#define HW_PHYSFS_COMPAT
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define PHYSFS_DECL __EXPORT__
+
+typedef enum PHYSFS_FileType
+{
+ PHYSFS_FILETYPE_REGULAR,
+ PHYSFS_FILETYPE_DIRECTORY,
+ PHYSFS_FILETYPE_SYMLINK,
+ PHYSFS_FILETYPE_OTHER
+} PHYSFS_FileType;
+
+typedef struct PHYSFS_Stat
+{
+ PHYSFS_sint64 filesize;
+ PHYSFS_sint64 modtime;
+ PHYSFS_sint64 createtime;
+ PHYSFS_sint64 accesstime;
+ PHYSFS_FileType filetype;
+ int readonly;
+} PHYSFS_Stat;
+
+PHYSFS_DECL int PHYSFS_stat(const char *fname, PHYSFS_Stat *stat);
+
+PHYSFS_DECL PHYSFS_sint64 PHYSFS_readBytes(PHYSFS_File *handle, void *buffer,
+ PHYSFS_uint64 len);
+
+
+PHYSFS_DECL PHYSFS_sint64 PHYSFS_writeBytes(PHYSFS_File *handle,
+ const void *buffer,
+ PHYSFS_uint64 len);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* PHYSFS_VER_MAJOR == 2 */
+#endif /* PHYSFS_VER_MINOR == 0 */
+
+#endif /* _HEDGEWARS_PHYSFSCOMPAT_C_ */
--- a/misc/libphyslayer/physfslualoader.c Tue Jan 07 11:40:58 2014 +0100
+++ b/misc/libphyslayer/physfslualoader.c Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,8 @@
#include "lua.h"
#include "physfs.h"
+#include "physfscompat.h"
+
#define BUFSIZE 1024
void *physfsReaderBuffer;
--- a/misc/libphyslayer/physfsrwops.h Tue Jan 07 11:40:58 2014 +0100
+++ b/misc/libphyslayer/physfsrwops.h Fri Jan 17 06:58:28 2014 -0800
@@ -26,6 +26,8 @@
#include "physfs.h"
#include "SDL.h"
+#include "physfscompat.h"
+
#ifdef __cplusplus
extern "C" {
#endif
--- a/project_files/Android-build/CMakeLists.txt Tue Jan 07 11:40:58 2014 +0100
+++ b/project_files/Android-build/CMakeLists.txt Fri Jan 17 06:58:28 2014 -0800
@@ -26,8 +26,8 @@
endif()
if(IS_DIRECTORY "${ANDROID_NDK}")
- message(STATUS "Detected the android NDK directory at: " ${ANDROID_NDK})
-else ()
+ message(STATUS "Detected the android NDK directory at: " ${ANDROID_NDK})
+else()
message(FATAL_ERROR "Couldn't detect the Android NDK directory")
endif()
@@ -39,35 +39,35 @@
endif()
if(IS_DIRECTORY "${ANDROID_NDK_TOOLCHAINDIR}")
- message(STATUS "Detected the Android NDK toolchain at: ${ANDROID_NDK_TOOLCHAINDIR}")
-else ()
+ 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}")
endif()
-if(NOT ANDROID_SDK)#Check if its defined at the cmdline
+if(NOT ANDROID_SDK) #Check if its defined at the cmdline
find_program(ANDROID_SDK adb) #assume they've added platform-tools to their path
get_filename_component(ANDROID_SDK "${ANDROID_SDK}" PATH)
get_filename_component(ANDROID_SDK "${ANDROID_SDK}" PATH)
set(ANDROID_SDK "${ANDROID_SDK}" CACHE PATH "Path to the android sdk" FORCE)
endif()
-if( IS_DIRECTORY "${ANDROID_SDK}")
- message(STATUS "Detected the android SDK directory at: " ${ANDROID_SDK})
-else ()
+if(IS_DIRECTORY "${ANDROID_SDK}")
+ message(STATUS "Detected the android SDK directory at: " ${ANDROID_SDK})
+else()
message(FATAL_ERROR "Couldn't detect the Android SDK directory")
endif()
-if( NOT FPC_DIR)
+if(NOT FPC_DIR)
find_program(FPC_DIR ppcrossarm)
get_filename_component(FPC_DIR "${FPC_DIR}" PATH)
- if(IS_DIRECTORY "${FPC_DIR}")
- set(FPC_DIR "${FPC_DIR}" CACHE PATH "Path to fpc dir used in the android port" FORCE)
+ if(IS_DIRECTORY "${FPC_DIR}")
+ set(FPC_DIR "${FPC_DIR}" CACHE PATH "Path to fpc dir used in the android port" FORCE)
endif()
endif()
-if( IS_DIRECTORY "${FPC_DIR}")
- message(STATUS "Detected the FreePascal directory at: " "${FPC_DIR}")
-else ()
+if(IS_DIRECTORY "${FPC_DIR}")
+ message(STATUS "Detected the FreePascal directory at: ${FPC_DIR}")
+else()
message(FATAL_ERROR "Couldn't detect the FreePascal directory")
endif()
--- a/project_files/Android-build/SDL-android-project/src/org/hedgewars/hedgeroid/SDLActivity.java Tue Jan 07 11:40:58 2014 +0100
+++ b/project_files/Android-build/SDL-android-project/src/org/hedgewars/hedgeroid/SDLActivity.java Fri Jan 17 06:58:28 2014 -0800
@@ -2,7 +2,7 @@
* Hedgewars for Android. An Android port of Hedgewars, a free turn based strategy game
* Copyright (c) 2011-2012 Richard Deurwaarder <xeli@xelification.com>
* Copyright (C) 2012 Simeon Maxein <smaxein@googlemail.com>
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
--- a/project_files/frontlib/hwconsts.h Tue Jan 07 11:40:58 2014 +0100
+++ b/project_files/frontlib/hwconsts.h Fri Jan 17 06:58:28 2014 -0800
@@ -1,6 +1,6 @@
/*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
* Copyright (c) 2012 Simeon Maxein <smaxein@googlemail.com>
*
* This program is free software; you can redistribute it and/or modify
--- a/project_files/frontlib/net/netconn.c Tue Jan 07 11:40:58 2014 +0100
+++ b/project_files/frontlib/net/netconn.c Fri Jan 17 06:58:28 2014 -0800
@@ -1,7 +1,7 @@
/*
* Hedgewars, a free turn based strategy game
* Copyright (c) 2006-2008 Igor Ulyanov <iulyanov@gmail.com>
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com>
* Copyright (c) 2012 Simeon Maxein <smaxein@googlemail.com>
*
* This program is free software; you can redistribute it and/or modify
--- a/share/CMakeLists.txt Tue Jan 07 11:40:58 2014 +0100
+++ b/share/CMakeLists.txt Fri Jan 17 06:58:28 2014 -0800
@@ -8,7 +8,7 @@
#CFBundleShortVersionString is HEDGEWARS_VERSION
#libav/ffmpeg always brings in VideoDecoderAcceleration, avaible only from 10.6.3
- if(${FFMPEG_FOUND} AND ${minimum_macosx_version} VERSION_EQUAL "10.6")
+ if(LIBAV_FOUND AND ${minimum_macosx_version} VERSION_EQUAL "10.6")
set(minimum_macosx_version "10.6.3")
endif()
--- a/share/hedgewars/Data/Fonts/CMakeLists.txt Tue Jan 07 11:40:58 2014 +0100
+++ b/share/hedgewars/Data/Fonts/CMakeLists.txt Fri Jan 17 06:58:28 2014 -0800
@@ -1,4 +1,26 @@
-install(FILES
+set(FONTFILES
DejaVuSans-Bold.ttf
- wqy-zenhei.ttc
- DESTINATION ${SHAREPATH}Data/Fonts)
+ wqy-zenhei.ttc)
+
+if (FONTS_DIRS)
+ foreach(fontfile ${FONTFILES})
+ set(missing 1)
+ foreach(fontdir ${FONTS_DIRS})
+ if (EXISTS "${fontdir}/${fontfile}")
+ message(STATUS "Fonts: Found ${fontfile} in ${fontdir}")
+ set(missing 0)
+ break()
+ endif()
+ endforeach(fontdir)
+ if(missing)
+ set(MISSINGFONTFILES ${MISSINGFONTFILES} ${fontfile})
+ message(STATUS "Fonts: Could not find ${fontfile}, it will be installed")
+ endif()
+ endforeach(fontfile)
+else()
+ set(MISSINGFONTFILES ${FONTFILES})
+endif()
+
+if (MISSINGFONTFILES)
+ install(FILES ${MISSINGFONTFILES} DESTINATION ${SHAREPATH}Data/Fonts)
+endif()
--- a/share/hedgewars/Data/Locale/hedgewars_de.ts Tue Jan 07 11:40:58 2014 +0100
+++ b/share/hedgewars/Data/Locale/hedgewars_de.ts Fri Jan 17 06:58:28 2014 -0800
@@ -354,7 +354,7 @@
Password:</source>
<translation>Dieser Spitzname ist registriert und du hast kein Passwort angegeben.
-Falls dieser Spitzname nicht deiner ist, dann registirier bitte deinen eigenen Spitznamen an www.hedgewars.org.
+Falls dieser Spitzname nicht deiner ist, dann registriere bitte deinen eigenen Spitznamen an www.hedgewars.org.
Passwort:</translation>
</message>
--- a/share/hedgewars/Data/Scripts/Multiplayer/Gravity.lua Tue Jan 07 11:40:58 2014 +0100
+++ b/share/hedgewars/Data/Scripts/Multiplayer/Gravity.lua Fri Jan 17 06:58:28 2014 -0800
@@ -11,12 +11,21 @@
local wdTTL = 0
local mln = 1000000
-function onNewTurn()
+local script2_onNewTurn
+local script2_onGameTick20
+local script2_onGameStart
+
+
+function grav_onNewTurn()
SetGravity(gravity)
wdGameTicks = GameTime
+
+ if script2_onNewTurn ~= nil then
+ script2_onNewTurn()
+ end
end
-function onGameTick20()
+function grav_onGameTick20()
if wdGameTicks + 15000 < GameTime then
SetGravity(100)
else
@@ -49,9 +58,13 @@
end
wdTTL = TurnTimeLeft
+
+ if script2_onGameTick20 ~= nil then
+ script2_onGameTick20()
+ end
end
-function onGameInit()
+function onParameters()
parseParams()
gravity = params["g"]
@@ -86,9 +99,28 @@
if gravity == nil then
gravity = 100
end
+
+ secondScript = params["script2"]
+
+ if secondScript ~= nil then
+ onParameters = nil
+ HedgewarsScriptLoad("/Scripts/Multiplayer/" .. secondScript .. ".lua")
+
+ script2_onNewTurn = onNewTurn
+ script2_onGameTick20 = onGameTick20
+ script2_onGameStart = onGameStart
+
+ if onParameters ~= nil then
+ onParameters()
+ end
+ end
+
+ onNewTurn = grav_onNewTurn
+ onGameTick20 = grav_onGameTick20
+ onGameStart = grav_onGameStart
end
-function onGameStart()
+function grav_onGameStart()
if delta == nil then
v = string.format(loc("random in range from %i%% to %i%% with period of %i msec"), div(mingravity, mln), div(maxgravity, mln), period * 40)
elseif period ~= nil then
@@ -103,4 +135,10 @@
.. loc("or 'g=50, g2=150, period=4000' for gravity changing|from 50 to 150 and back with period of 4000 msec")
.. "||" .. loc("Set period to negative value for random gravity"),
0, 5000)
+
+ if script2_onGameStart ~= nil then
+ script2_onGameStart()
+ end
end
+
+
--- a/share/hedgewars/Data/Scripts/Params.lua Tue Jan 07 11:40:58 2014 +0100
+++ b/share/hedgewars/Data/Scripts/Params.lua Fri Jan 17 06:58:28 2014 -0800
@@ -3,7 +3,9 @@
params = {}
function parseParams()
- for k, v in string.gmatch(ScriptParam, "(%w+)=([^,]+)") do
- params[k] = v
+ if ScriptParam ~= nil then
+ for k, v in string.gmatch(ScriptParam, "(%w+)=([^,]+)") do
+ params[k] = v
+ end
end
end
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/lua/luaAPI/zoom_get_set.lua Fri Jan 17 06:58:28 2014 -0800
@@ -0,0 +1,68 @@
+
+-- This function is called before the game loads its
+-- resources.
+-- It's one of the predefined function names that will
+-- be called by the game. They give you entry points
+-- where you're able to call your own code using either
+-- provided instructions or custom functions.
+function onGameInit()
+ -- At first we have to overwrite/set some global variables
+ -- that define the map, the game has to load, as well as
+ -- other things such as the game rules to use, etc.
+ -- Things we don't modify here will use their default values.
+
+ -- The base number for the random number generator
+ Seed = 1
+ -- The map to be played
+ Map = "Bamboo"
+ -- The theme to be used
+ Theme = "Bamboo"
+ -- Game settings and rules
+ EnableGameFlags(gfOneClanMode)
+
+ -- Create the player team
+ AddTeam("'Zooka Team", 14483456, "Simple", "Island", "Default")
+ -- And add a hog to it
+ player = AddHog("Hunter", 0, 1, "NoHat")
+ SetGearPosition(player, 936, 136)
+end
+
+-- from lua API wiki:
+local minZoom = 1.0;
+local maxZoom = 3.0;
+local defaultZoom = 2.0;
+
+local nFails = 0;
+
+function TestZoom(value)
+ exp = math.max(minZoom, math.min(maxZoom, value))
+ SetZoom(value)
+ z = GetZoom()
+ -- compare with some tolerance - because of float inprecision
+ if (z > exp + 0.01) or (z < exp - 0.01) then
+ WriteLnToConsole("Expected zoom value " .. exp .. " (after setting go zoom to " .. value .. "), but got: " .. z )
+ nFails = nFails + 1
+ end
+end
+
+function onGameStart()
+ if (GetZoom() ~= defaultZoom) then
+ WriteLnToConsole("Game did not start with zoom level of " .. defaultZoom)
+ nFails = 1
+ end
+
+ TestZoom(0)
+ TestZoom(1)
+ TestZoom(0.5)
+ TestZoom(3.5)
+ TestZoom(7)
+ TestZoom(2.0)
+ TestZoom(2.2)
+
+ if (nFails > 0) then
+ EndLuaTest(TEST_FAILED)
+ else
+ EndLuaTest(TEST_SUCCESSFUL)
+ end
+end
+
--- a/tools/CMakeLists.txt Tue Jan 07 11:40:58 2014 +0100
+++ b/tools/CMakeLists.txt Fri Jan 17 06:58:28 2014 -0800
@@ -1,4 +1,4 @@
-if (NOT APPLE)
+if(NOT APPLE)
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake.in"
"${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
IMMEDIATE @ONLY)
@@ -6,7 +6,7 @@
add_custom_target(uninstall "${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake")
endif()
-if (APPLE)
+if(APPLE)
find_package(Qt4 REQUIRED QUIET)
find_package(SDL REQUIRED)
find_package(SDL_image REQUIRED)
@@ -17,7 +17,7 @@
if(NOT NOAUTOUPDATE)
find_package(Sparkle) #needed for SPARKLE_FOUND variable
#needed because the 'if' clause in the script prints silly policy warnings
- if(${SPARKLE_FOUND})
+ if(SPARKLE_FOUND)
set(SPARKLE_FOUND 1)
else()
set(SPARKLE_FOUND 0)