mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
Merge branch 'master' of https://github.com/ddnet/ddnet
This commit is contained in:
commit
629bf2c5f9
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -65,6 +65,7 @@ DDNet-Server_d
|
|||
DDNet-Server_sql
|
||||
DDNet-Server_sql_d
|
||||
|
||||
/build
|
||||
CMakeCache.txt
|
||||
CMakeSettings*
|
||||
CMakeFiles
|
||||
|
|
|
@ -19,6 +19,7 @@ script:
|
|||
- if [ "$TRAVIS_OS_NAME" != "osx" ]; then cmake -Werror=dev -DGTEST_LIBRARY=../gtest_build/libgtest.a -DGTEST_MAIN_LIBRARY=../gtest_build/libgtest_main.a ..; fi
|
||||
- make everything
|
||||
- if [ "$TRAVIS_OS_NAME" != "osx" ]; then make run_tests; fi
|
||||
- make package_default
|
||||
env:
|
||||
global:
|
||||
- CFLAGS="-Wdeclaration-after-statement -Werror"
|
||||
|
|
250
CMakeLists.txt
250
CMakeLists.txt
|
@ -1,5 +1,27 @@
|
|||
cmake_minimum_required(VERSION 2.8)
|
||||
project(DDNet)
|
||||
|
||||
file(STRINGS src/game/version.h VERSION_LINE
|
||||
LIMIT_COUNT 1
|
||||
REGEX GAME_RELEASE_VERSION
|
||||
)
|
||||
|
||||
if(VERSION_LINE MATCHES "\"([0-9]+)\\.([0-9]+)\\.([0-9]+)\"")
|
||||
set(VERSION_MAJOR ${CMAKE_MATCH_1})
|
||||
set(VERSION_MINOR ${CMAKE_MATCH_2})
|
||||
set(VERSION_PATCH ${CMAKE_MATCH_3})
|
||||
else()
|
||||
message(FATAL_ERROR "Couldn't parse version from src/game/version.h")
|
||||
endif()
|
||||
|
||||
if(POLICY CMP0048)
|
||||
cmake_policy(SET CMP0048 NEW)
|
||||
project(DDNet VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH})
|
||||
else()
|
||||
project(DDNet)
|
||||
set(PROJECT_VERSION_MAJOR ${VERSION_MAJOR})
|
||||
set(PROJECT_VERSION_MINOR ${VERSION_MINOR})
|
||||
set(PROJECT_VERSION_PATCH ${VERSION_PATCH})
|
||||
endif()
|
||||
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR}/cmake)
|
||||
|
||||
|
@ -309,12 +331,22 @@ endif()
|
|||
########################################################################
|
||||
|
||||
file(COPY data DESTINATION .)
|
||||
<<<<<<< HEAD
|
||||
file(COPY shader DESTINATION .)
|
||||
file(COPY ${CURL_COPY_FILES} DESTINATION .)
|
||||
file(COPY ${FREETYPE_COPY_FILES} DESTINATION .)
|
||||
file(COPY ${OPUSFILE_COPY_FILES} DESTINATION .)
|
||||
file(COPY ${SDL2_COPY_FILES} DESTINATION .)
|
||||
file(COPY ${GLEW_COPY_FILES} DESTINATION .)
|
||||
=======
|
||||
set(COPY_FILES
|
||||
${CURL_COPY_FILES}
|
||||
${FREETYPE_COPY_FILES}
|
||||
${OPUSFILE_COPY_FILES}
|
||||
${SDL2_COPY_FILES}
|
||||
)
|
||||
file(COPY ${COPY_FILES} DESTINATION .)
|
||||
>>>>>>> 73d9ad76151f8d3c0a77b3dc8c97999e5126a959
|
||||
|
||||
########################################################################
|
||||
# CODE GENERATION
|
||||
|
@ -847,13 +879,17 @@ foreach(ABS_T ${TOOLS})
|
|||
if(T MATCHES "\\.cpp$")
|
||||
string(REGEX REPLACE "\\.cpp$" "" TOOL "${T}")
|
||||
set(EXTRA_TOOL_SRC)
|
||||
if(TOOL MATCHES "^(tileset_|dilate|map_extract|map_replace_image$)")
|
||||
set(EXCLUDE_FROM_ALL EXCLUDE_FROM_ALL)
|
||||
if(TOOL MATCHES "^(tileset_.*|dilate|map_extract|map_replace_image)$")
|
||||
list(APPEND EXTRA_TOOL_SRC ${DEP_PNG})
|
||||
endif()
|
||||
if(TOOL MATCHES "^config_")
|
||||
list(APPEND EXTRA_TOOL_SRC "src/tools/config_common.h")
|
||||
endif()
|
||||
add_executable(${TOOL} EXCLUDE_FROM_ALL
|
||||
if(TOOL MATCHES "^(config_retrieve|config_store|dilate|map_diff|map_extract)$")
|
||||
set(EXCLUDE_FROM_ALL)
|
||||
endif()
|
||||
add_executable(${TOOL} ${EXCLUDE_FROM_ALL}
|
||||
${DEPS}
|
||||
src/tools/${TOOL}.cpp
|
||||
${EXTRA_TOOL_SRC}
|
||||
|
@ -900,6 +936,214 @@ if(GTEST_FOUND)
|
|||
)
|
||||
endif()
|
||||
|
||||
########################################################################
|
||||
# INSTALLATION
|
||||
########################################################################
|
||||
|
||||
function(escape_regex VAR STRING)
|
||||
string(REGEX REPLACE "([][^$.+*?|()\\\\])" "\\\\\\1" ESCAPED "${STRING}")
|
||||
set(${VAR} ${ESCAPED} PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
function(max_length VAR)
|
||||
set(MAX_LENGTH 0)
|
||||
foreach(str ${ARGN})
|
||||
string(LENGTH ${str} LENGTH)
|
||||
if(LENGTH GREATER MAX_LENGTH)
|
||||
set(MAX_LENGTH ${LENGTH})
|
||||
endif()
|
||||
endforeach()
|
||||
set(${VAR} ${MAX_LENGTH} PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
# Tries to generate a list of regex that matches everything except the given
|
||||
# parameters.
|
||||
function(regex_inverted VAR)
|
||||
max_length(MAX_LENGTH ${ARGN})
|
||||
math(EXPR UPPER_BOUND "${MAX_LENGTH}-1")
|
||||
|
||||
set(REMAINING ${ARGN})
|
||||
set(RESULT)
|
||||
|
||||
foreach(i RANGE ${UPPER_BOUND})
|
||||
set(TEMP ${REMAINING})
|
||||
set(REMAINING)
|
||||
foreach(str ${TEMP})
|
||||
string(LENGTH ${str} LENGTH)
|
||||
if(i LESS LENGTH)
|
||||
list(APPEND REMAINING ${str})
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
set(ADDITIONAL)
|
||||
foreach(outer ${REMAINING})
|
||||
string(SUBSTRING ${outer} 0 ${i} OUTER_PREFIX)
|
||||
set(CHARS "")
|
||||
foreach(inner ${REMAINING})
|
||||
string(SUBSTRING ${inner} 0 ${i} INNER_PREFIX)
|
||||
if(OUTER_PREFIX STREQUAL INNER_PREFIX)
|
||||
string(SUBSTRING ${inner} ${i} 1 INNER_NEXT)
|
||||
set(CHARS "${CHARS}${INNER_NEXT}")
|
||||
endif()
|
||||
endforeach()
|
||||
escape_regex(OUTER_PREFIX_ESCAPED "${OUTER_PREFIX}")
|
||||
|
||||
list(APPEND ADDITIONAL "${OUTER_PREFIX_ESCAPED}([^${CHARS}]|$)")
|
||||
endforeach()
|
||||
list(REMOVE_DUPLICATES ADDITIONAL)
|
||||
list(APPEND RESULT ${ADDITIONAL})
|
||||
endforeach()
|
||||
set(${VAR} ${RESULT} PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
set(CPACK_PACKAGE_NAME ${PROJECT_NAME})
|
||||
set(CPACK_VERBATIM_VARIABLES ON)
|
||||
set(CPACK_GENERATOR TGZ TXZ)
|
||||
set(CPACK_ARCHIVE_COMPONENT_INSTALL ON)
|
||||
set(CPACK_COMPONENTS_ALL portable)
|
||||
set(CPACK_SOURCE_GENERATOR ZIP TGZ TBZ2 TXZ)
|
||||
set(CPACK_PACKAGE_VERSION_MAJOR ${PROJECT_VERSION_MAJOR})
|
||||
set(CPACK_PACKAGE_VERSION_MINOR ${PROJECT_VERSION_MINOR})
|
||||
set(CPACK_PACKAGE_VERSION_PATCH ${PROJECT_VERSION_PATCH})
|
||||
set(CPACK_PACKAGE_VERSION ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH})
|
||||
set(CPACK_SYSTEM_NAME ${CMAKE_SYSTEM_NAME})
|
||||
|
||||
if(TARGET_OS AND TARGET_BITS)
|
||||
if(TARGET_OS STREQUAL "windows")
|
||||
set(CPACK_SYSTEM_NAME "win${TARGET_BITS}")
|
||||
set(CPACK_GENERATOR ZIP)
|
||||
elseif(TARGET_OS STREQUAL "linux")
|
||||
# Assuming Intel here.
|
||||
if(TARGET_BITS EQUAL 32)
|
||||
set(CPACK_SYSTEM_NAME "linux_x86")
|
||||
elseif(TARGET_BITS EQUAL 64)
|
||||
set(CPACK_SYSTEM_NAME "linux_x86_64")
|
||||
endif()
|
||||
elseif(TARGET_OS STREQUAL "mac")
|
||||
set(CPACK_SYSTEM_NAME "osx")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set(CPACK_PACKAGE_FILE_NAME ${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-${CPACK_SYSTEM_NAME})
|
||||
set(CPACK_SOURCE_PACKAGE_FILE_NAME ${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-src)
|
||||
set(CPACK_SOURCE_FILES
|
||||
CMakeLists.txt
|
||||
README.md
|
||||
autoexec_server.cfg
|
||||
bam.lua
|
||||
cmake/
|
||||
configure.lua
|
||||
data/
|
||||
datasrc/
|
||||
ddnet-libs/
|
||||
license.txt
|
||||
other/
|
||||
scripts/
|
||||
src/
|
||||
storage.cfg
|
||||
)
|
||||
set(CPACK_SOURCE_IGNORE_FILES
|
||||
"\\.pyc$"
|
||||
"/\\.git"
|
||||
"/__pycache__/"
|
||||
)
|
||||
|
||||
regex_inverted(CPACK_SOURCE_FILES_INVERTED ${CPACK_SOURCE_FILES})
|
||||
escape_regex(PROJECT_SOURCE_DIR_ESCAPED ${PROJECT_SOURCE_DIR})
|
||||
|
||||
foreach(str ${CPACK_SOURCE_FILES_INVERTED})
|
||||
list(APPEND CPACK_SOURCE_IGNORE_FILES "${PROJECT_SOURCE_DIR_ESCAPED}/${str}")
|
||||
endforeach()
|
||||
|
||||
set(CMAKE_INSTALL_DEFAULT_COMPONENT_NAME ${PROJECT_NAME})
|
||||
install(TARGETS ${TARGET_CLIENT} ${TARGET_SERVER} DESTINATION bin)
|
||||
install(DIRECTORY data DESTINATION share/DDNet)
|
||||
|
||||
set(CPACK_TARGETS
|
||||
${TARGET_CLIENT}
|
||||
${TARGET_SERVER}
|
||||
config_retrieve
|
||||
config_store
|
||||
dilate
|
||||
map_diff
|
||||
map_extract
|
||||
)
|
||||
set(CPACK_DIRS data)
|
||||
set(CPACK_FILES
|
||||
license.txt
|
||||
storage.cfg
|
||||
autoexec_server.cfg
|
||||
${COPY_FILES}
|
||||
)
|
||||
if(TARGET_OS STREQUAL "windows")
|
||||
list(APPEND CPACK_FILES other/config_directory.bat)
|
||||
endif()
|
||||
|
||||
if(CMAKE_VERSION VERSION_GREATER 3.6 OR CMAKE_VERSION VERSION_EQUAL 3.6)
|
||||
set(EXTRA_ARGS DESTINATION ${CPACK_PACKAGE_FILE_NAME} COMPONENT portable)
|
||||
install(TARGETS ${CPACK_TARGETS} ${EXTRA_ARGS})
|
||||
install(DIRECTORY ${CPACK_DIRS} ${EXTRA_ARGS})
|
||||
install(FILES ${CPACK_FILES} ${EXTRA_ARGS})
|
||||
else()
|
||||
message(WARNING "Cannot create CPack targets, CMake version too old. Use CMake 3.6 or newer.")
|
||||
endif()
|
||||
|
||||
set(COPY_FILE_COMMANDS)
|
||||
set(COPY_DIR_COMMANDS)
|
||||
set(COPY_TARGET_COMMANDS)
|
||||
foreach(file ${CPACK_FILES})
|
||||
list(APPEND COPY_FILE_COMMANDS COMMAND cmake -E copy ${PROJECT_SOURCE_DIR}/${file} ${CPACK_PACKAGE_FILE_NAME}/)
|
||||
endforeach()
|
||||
foreach(dir ${CPACK_DIRS})
|
||||
list(APPEND COPY_DIR_COMMAND COMMAND cmake -E copy_directory ${PROJECT_SOURCE_DIR}/${dir} ${CPACK_PACKAGE_FILE_NAME}/${dir})
|
||||
endforeach()
|
||||
foreach(target ${CPACK_TARGETS})
|
||||
list(APPEND COPY_TARGET_COMMANDS COMMAND cmake -E copy $<TARGET_FILE:${target}> ${CPACK_PACKAGE_FILE_NAME}/)
|
||||
endforeach()
|
||||
|
||||
foreach(ext zip tar.gz tar.xz)
|
||||
set(TAR_MODE c)
|
||||
set(TAR_EXTRA_ARGS)
|
||||
string(REPLACE . _ EXT_SLUG ${ext})
|
||||
if(ext STREQUAL zip)
|
||||
set(TAR_EXTRA_ARGS --format=zip)
|
||||
elseif(ext STREQUAL tar.gz)
|
||||
set(TAR_MODE cz)
|
||||
elseif(ext STREQUAL tar.xz)
|
||||
set(TAR_MODE cJ)
|
||||
endif()
|
||||
add_custom_command(OUTPUT ${CPACK_PACKAGE_FILE_NAME}.${ext}
|
||||
COMMAND cmake -E make_directory ${CPACK_PACKAGE_FILE_NAME}
|
||||
${COPY_FILE_COMMANDS}
|
||||
${COPY_DIR_COMMANDS}
|
||||
${COPY_TARGET_COMMANDS}
|
||||
COMMAND cmake -E tar ${TAR_MODE} ${CPACK_PACKAGE_FILE_NAME}.${ext} ${TAR_EXTRA_ARGS} -- ${CPACK_PACKAGE_FILE_NAME}/
|
||||
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
|
||||
)
|
||||
add_custom_target(package_${EXT_SLUG} DEPENDS ${CPACK_PACKAGE_FILE_NAME}.${ext})
|
||||
endforeach()
|
||||
|
||||
set(PACKAGE_DEFAULT tar_xz)
|
||||
if(TARGET_OS STREQUAL "windows")
|
||||
set(PACKAGE_DEFAULT zip)
|
||||
endif()
|
||||
add_custom_target(package_default DEPENDS package_${PACKAGE_DEFAULT})
|
||||
|
||||
add_custom_target(package_all DEPENDS
|
||||
package_tar_gz
|
||||
package_tar_xz
|
||||
package_zip
|
||||
)
|
||||
|
||||
# Unset these variables, they might do something in the future of CPack.
|
||||
unset(CPACK_SOURCE_FILES)
|
||||
unset(CPACK_SOURCE_FILES_INVERTED)
|
||||
unset(CPACK_TARGETS)
|
||||
unset(CPACK_DIRS)
|
||||
unset(CPACK_FILES)
|
||||
|
||||
include(CPack)
|
||||
|
||||
########################################################################
|
||||
# COMPILER-SPECIFICS
|
||||
########################################################################
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
# HeroiAmarelo 2012-08-01 15:50:18
|
||||
# Rafael Fontenelle 2014-11-21 13:31:06
|
||||
# Rafael Fontenelle 2016-12-12 13:31:06
|
||||
# Rafael Fontenelle 2017-09-06 09:51:00
|
||||
##### /authors #####
|
||||
|
||||
##### translated strings #####
|
||||
|
@ -387,7 +388,7 @@ Rename demo
|
|||
== Renomear demo
|
||||
|
||||
Reset filter
|
||||
== Resetar filtro
|
||||
== Redefinir filtro
|
||||
|
||||
Respawn
|
||||
== Reaparecer
|
||||
|
@ -986,22 +987,20 @@ Name plates size
|
|||
Grabs
|
||||
== Pega
|
||||
|
||||
##### generated by copy_fix.py, please translate this #####
|
||||
|
||||
Hi o/
|
||||
==
|
||||
== Olá o/
|
||||
|
||||
Automatically create statboard csv
|
||||
==
|
||||
== Criar csv de statboard automaticamente
|
||||
|
||||
Enable long pain sound (used when shooting in freeze)
|
||||
==
|
||||
== Habilita som de dor longa (usado ao atirar em congelamento)
|
||||
|
||||
Spree
|
||||
==
|
||||
== Sequência
|
||||
|
||||
Max CSVs
|
||||
==
|
||||
== CSVs máx
|
||||
|
||||
Friend
|
||||
==
|
||||
== Amigo
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit d2b509bbad1a473be8fa31f902bc586b41da6b4b
|
||||
Subproject commit 3d28233cbc36a810e3164ace4bb61b62162519e5
|
|
@ -35,11 +35,7 @@ FreeType = {
|
|||
settings.link.libpath:Add("ddnet-libs/freetype/windows/lib64")
|
||||
end
|
||||
settings.link.libs:Add("freetype")
|
||||
elseif platform == "macosx" and string.find(settings.config_name, "64") then
|
||||
settings.link.libpath:Add("ddnet-libs/freetype/mac/lib64")
|
||||
settings.link.libs:Add("freetype")
|
||||
elseif platform == "macosx" then
|
||||
settings.link.libpath:Add("ddnet-libs/freetype/mac/lib32")
|
||||
else
|
||||
settings.link.libs:Add("freetype")
|
||||
end
|
||||
end
|
||||
|
|
|
@ -2690,7 +2690,10 @@ void CClient::Run()
|
|||
// loads the existing ddnet-info.json file if it exists
|
||||
LoadDDNetInfo();
|
||||
// but still request the new one from server
|
||||
RequestDDNetInfo();
|
||||
if(g_Config.m_ClShowWelcome)
|
||||
g_Config.m_ClShowWelcome = 0;
|
||||
else
|
||||
RequestDDNetInfo();
|
||||
|
||||
bool LastD = false;
|
||||
bool LastQ = false;
|
||||
|
@ -3622,10 +3625,23 @@ bool CClient::RaceRecordIsRecording()
|
|||
void CClient::RequestDDNetInfo()
|
||||
{
|
||||
char aUrl[256];
|
||||
char aEscaped[128];
|
||||
#if defined(CONF_FAMILY_WINDOWS)
|
||||
static bool s_IsWinXP = os_compare_version(5U, 1U) <= 0;
|
||||
#else
|
||||
static bool s_IsWinXP = false;
|
||||
#endif
|
||||
if(s_IsWinXP)
|
||||
str_copy(aUrl, "http://info.ddnet.tw/info", sizeof(aUrl));
|
||||
else
|
||||
str_copy(aUrl, "https://info.ddnet.tw/info", sizeof(aUrl));
|
||||
|
||||
Fetcher()->Escape(aEscaped, sizeof(aEscaped), g_Config.m_PlayerName);
|
||||
str_format(aUrl, sizeof(aUrl), "https://info.ddnet.tw/info?name=%s", aEscaped);
|
||||
if(g_Config.m_BrIndicateFinished)
|
||||
{
|
||||
char aEscaped[128];
|
||||
Fetcher()->Escape(aEscaped, sizeof(aEscaped), g_Config.m_PlayerName);
|
||||
str_append(aUrl, "?name=", sizeof(aUrl));
|
||||
str_append(aUrl, aEscaped, sizeof(aUrl));
|
||||
}
|
||||
|
||||
m_pDDNetInfoTask = new CFetchTask(true, /*UseDDNetCA*/ true);
|
||||
Fetcher()->QueueAdd(m_pDDNetInfoTask, aUrl, "ddnet-info.json.tmp", IStorage::TYPE_SAVE);
|
||||
|
|
|
@ -42,7 +42,7 @@ MACRO_CONFIG_INT(InpGrab, inp_grab, 0, 0, 1, CFGFLAG_SAVE|CFGFLAG_CLIENT, "Use f
|
|||
MACRO_CONFIG_INT(InpGrab, inp_grab, 1, 0, 1, CFGFLAG_SAVE|CFGFLAG_CLIENT, "Use forceful input grabbing method")
|
||||
#endif
|
||||
|
||||
MACRO_CONFIG_STR(BrFilterString, br_filter_string, 25, "", CFGFLAG_SAVE|CFGFLAG_CLIENT, "Server browser filtering string")
|
||||
MACRO_CONFIG_STR(BrFilterString, br_filter_string, 25, "Novice", CFGFLAG_SAVE|CFGFLAG_CLIENT, "Server browser filtering string")
|
||||
MACRO_CONFIG_STR(BrExcludeString, br_exclude_string, 25, "", CFGFLAG_SAVE|CFGFLAG_CLIENT, "Server browser exclusion string")
|
||||
MACRO_CONFIG_INT(BrFilterFull, br_filter_full, 0, 0, 1, CFGFLAG_SAVE|CFGFLAG_CLIENT, "Filter out full server in browser")
|
||||
MACRO_CONFIG_INT(BrFilterEmpty, br_filter_empty, 0, 0, 1, CFGFLAG_SAVE|CFGFLAG_CLIENT, "Filter out empty server in browser")
|
||||
|
@ -62,6 +62,7 @@ MACRO_CONFIG_INT(BrFilterUnfinishedMap, br_filter_unfinished_map, 0, 0, 1, CFGFL
|
|||
|
||||
MACRO_CONFIG_STR(BrFilterExcludeCountries, br_filter_exclude_countries, 128, "", CFGFLAG_SAVE|CFGFLAG_CLIENT, "Filter out ddnet servers by country")
|
||||
MACRO_CONFIG_STR(BrFilterExcludeTypes, br_filter_exclude_types, 128, "", CFGFLAG_SAVE|CFGFLAG_CLIENT, "Filter out ddnet servers by type (mod)")
|
||||
MACRO_CONFIG_INT(BrIndicateFinished, br_indicate_finished, 1, 0, 1, CFGFLAG_SAVE|CFGFLAG_CLIENT, "Show whether you have finished a DDNet map (transmits your player name to info.ddnet.tw)")
|
||||
|
||||
MACRO_CONFIG_INT(BrSort, br_sort, 4, 0, 256, CFGFLAG_SAVE|CFGFLAG_CLIENT, "")
|
||||
MACRO_CONFIG_INT(BrSortOrder, br_sort_order, 1, 0, 1, CFGFLAG_SAVE|CFGFLAG_CLIENT, "")
|
||||
|
@ -133,7 +134,7 @@ MACRO_CONFIG_INT(GfxQuadAsTriangle, gfx_quad_as_triangle, 0, 0, 0, CFGFLAG_SAVE|
|
|||
MACRO_CONFIG_INT(GfxQuadAsTriangle, gfx_quad_as_triangle, 1, 0, 1, CFGFLAG_SAVE|CFGFLAG_CLIENT, "Render quads as triangles (fixes quad coloring on some GPUs)")
|
||||
#endif
|
||||
|
||||
MACRO_CONFIG_INT(InpMousesens, inp_mousesens, 100, 5, 100000, CFGFLAG_SAVE|CFGFLAG_CLIENT, "Mouse sensitivity")
|
||||
MACRO_CONFIG_INT(InpMousesens, inp_mousesens, 200, 5, 100000, CFGFLAG_SAVE|CFGFLAG_CLIENT, "Mouse sensitivity")
|
||||
MACRO_CONFIG_INT(InpMouseOld, inp_mouseold, 0, 0, 1, CFGFLAG_SAVE|CFGFLAG_CLIENT, "Use old mouse mode (warp mouse instead of raw input)")
|
||||
MACRO_CONFIG_INT(InpIgnoredModifiers, inp_ignored_modifiers, 0, 0, 65536, CFGFLAG_SAVE|CFGFLAG_CLIENT, "Ignored keyboard modifier mask")
|
||||
|
||||
|
|
|
@ -925,11 +925,7 @@ void CMenus::OnInit()
|
|||
// */
|
||||
|
||||
if(g_Config.m_ClShowWelcome)
|
||||
{
|
||||
m_Popup = POPUP_LANGUAGE;
|
||||
str_copy(g_Config.m_BrFilterString, "Novice [DDraceNetwork]", sizeof(g_Config.m_BrFilterString));
|
||||
}
|
||||
g_Config.m_ClShowWelcome = 0;
|
||||
|
||||
Console()->Chain("add_favorite", ConchainServerbrowserUpdate, this);
|
||||
Console()->Chain("remove_favorite", ConchainServerbrowserUpdate, this);
|
||||
|
@ -1159,7 +1155,7 @@ int CMenus::Render()
|
|||
}
|
||||
else if(m_Popup == POPUP_FIRST_LAUNCH)
|
||||
{
|
||||
pTitle = Localize("Welcome to Teeworlds");
|
||||
pTitle = Localize("Welcome to DDNet");
|
||||
pExtraText = Localize("As this is the first time you launch the game, please enter your nick name below. It's recommended that you check the settings to adjust them to your liking before joining a server.");
|
||||
pButtonText = Localize("Ok");
|
||||
ExtraAlign = -1;
|
||||
|
@ -1609,9 +1605,22 @@ int CMenus::Render()
|
|||
|
||||
static int s_EnterButton = 0;
|
||||
if(DoButton_Menu(&s_EnterButton, Localize("Enter"), 0, &Part) || m_EnterPressed)
|
||||
{
|
||||
Client()->RequestDDNetInfo();
|
||||
m_Popup = POPUP_NONE;
|
||||
}
|
||||
|
||||
Box.HSplitBottom(20.f, &Box, &Part);
|
||||
#if defined(__ANDROID__)
|
||||
Box.HSplitBottom(60.f, &Box, &Part);
|
||||
#else
|
||||
Box.HSplitBottom(24.f, &Box, &Part);
|
||||
#endif
|
||||
|
||||
Part.VSplitLeft(60.0f, 0, &Part);
|
||||
if (DoButton_CheckBox(&g_Config.m_BrIndicateFinished, Localize("Show DDNet map finishes in server browser\n(transmits your player name to info.ddnet.tw)"), g_Config.m_BrIndicateFinished, &Part))
|
||||
g_Config.m_BrIndicateFinished ^= 1;
|
||||
|
||||
Box.HSplitBottom(40.f, &Box, &Part);
|
||||
#if defined(__ANDROID__)
|
||||
Box.HSplitBottom(60.f, &Box, &Part);
|
||||
#else
|
||||
|
|
|
@ -669,8 +669,19 @@ void CMenus::RenderServerbrowserFilters(CUIRect View)
|
|||
if(g_Config.m_UiPage == PAGE_DDNET)
|
||||
{
|
||||
ServerFilter.HSplitTop(20.0f, &Button, &ServerFilter);
|
||||
if (DoButton_CheckBox(&g_Config.m_BrFilterUnfinishedMap, Localize("Unfinished map"), g_Config.m_BrFilterUnfinishedMap, &Button))
|
||||
g_Config.m_BrFilterUnfinishedMap ^= 1;
|
||||
if (DoButton_CheckBox(&g_Config.m_BrIndicateFinished, Localize("Indicate map finish"), g_Config.m_BrIndicateFinished, &Button))
|
||||
g_Config.m_BrIndicateFinished ^= 1;
|
||||
|
||||
if(g_Config.m_BrIndicateFinished)
|
||||
{
|
||||
ServerFilter.HSplitTop(20.0f, &Button, &ServerFilter);
|
||||
if (DoButton_CheckBox(&g_Config.m_BrFilterUnfinishedMap, Localize("Unfinished map"), g_Config.m_BrFilterUnfinishedMap, &Button))
|
||||
g_Config.m_BrFilterUnfinishedMap ^= 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
g_Config.m_BrFilterUnfinishedMap = 0;
|
||||
}
|
||||
|
||||
// add more space
|
||||
ServerFilter.HSplitTop(10.0f, 0, &ServerFilter);
|
||||
|
|
|
@ -1047,7 +1047,10 @@ void CMenus::RenderSettingsGraphics(CUIRect MainView)
|
|||
|
||||
MainView.HSplitTop(20.0f, &Label, &MainView);
|
||||
Label.VSplitLeft(130.0f, &Label, &Button);
|
||||
str_format(aBuf, sizeof(aBuf), "%s: %i Hz", Localize("Refresh Rate"), g_Config.m_GfxRefreshRate);
|
||||
if(g_Config.m_GfxRefreshRate)
|
||||
str_format(aBuf, sizeof(aBuf), "%s: %i Hz", Localize("Refresh Rate"), g_Config.m_GfxRefreshRate);
|
||||
else
|
||||
str_format(aBuf, sizeof(aBuf), "%s: %s", Localize("Refresh Rate"), Localize("no limit"));
|
||||
UI()->DoLabelScaled(&Label, aBuf, 14.0f, -1);
|
||||
Button.HMargin(2.0f, &Button);
|
||||
g_Config.m_GfxRefreshRate = static_cast<int>(DoScrollbarH(&g_Config.m_GfxRefreshRate, &Button, g_Config.m_GfxRefreshRate/1000.0f)*1000.0f+0.1f);
|
||||
|
|
|
@ -87,11 +87,11 @@ MACRO_CONFIG_STR(ClPlayerSkin, player_skin, 24, "default", CFGFLAG_CLIENT|CFGFLA
|
|||
MACRO_CONFIG_INT(ClKittySkins, cl_kitty_skins, 0, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Enable kitty skins instead of vanilla skins")
|
||||
MACRO_CONFIG_INT(ClFatSkins, cl_fat_skins, 0, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Enable fat skins")
|
||||
|
||||
MACRO_CONFIG_INT(UiPage, ui_page, 6, 0, 11, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Interface page")
|
||||
MACRO_CONFIG_INT(UiPage, ui_page, 9, 0, 11, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Interface page")
|
||||
MACRO_CONFIG_INT(UiToolboxPage, ui_toolbox_page, 0, 0, 2, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Toolbox page")
|
||||
MACRO_CONFIG_STR(UiServerAddress, ui_server_address, 64, "localhost:8303", CFGFLAG_CLIENT|CFGFLAG_SAVE, "Interface server address")
|
||||
MACRO_CONFIG_INT(UiScale, ui_scale, 100, 50, 150, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Interface scale")
|
||||
MACRO_CONFIG_INT(UiMousesens, ui_mousesens, 100, 5, 100000, CFGFLAG_SAVE|CFGFLAG_CLIENT, "Mouse sensitivity for menus/editor")
|
||||
MACRO_CONFIG_INT(UiMousesens, ui_mousesens, 200, 5, 100000, CFGFLAG_SAVE|CFGFLAG_CLIENT, "Mouse sensitivity for menus/editor")
|
||||
|
||||
MACRO_CONFIG_INT(UiColorHue, ui_color_hue, 160, 0, 255, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Interface color hue")
|
||||
MACRO_CONFIG_INT(UiColorSat, ui_color_sat, 70, 0, 255, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Interface color saturation")
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
#ifndef GAME_VERSION_H
|
||||
#define GAME_VERSION_H
|
||||
#include "generated/nethash.cpp"
|
||||
#define GAME_VERSION "0.6.3, 10.8.5"
|
||||
#define GAME_VERSION "0.6.3, 10.8.6"
|
||||
#define GAME_NETVERSION "0.6 626fce9a778df4d4"
|
||||
#define GAME_RELEASE_VERSION "10.8.5"
|
||||
#define CLIENT_VERSIONNR 10085
|
||||
#define GAME_RELEASE_VERSION "10.8.6"
|
||||
#define CLIENT_VERSIONNR 10086
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue