Merge with master and solved conflicts
@ -164,6 +164,15 @@ else()
|
||||
include_directories(${OGGVORBIS_INCLUDE_DIRS})
|
||||
endif()
|
||||
|
||||
# Freetype
|
||||
find_package(Freetype)
|
||||
if(FREETYPE_FOUND)
|
||||
include_directories(${FREETYPE_INCLUDE_DIRS})
|
||||
else()
|
||||
message(FATAL_ERROR "Freetype not found. "
|
||||
"Freetype is required to display characters in SuperTuxKart. ")
|
||||
endif()
|
||||
|
||||
# Fribidi
|
||||
if(USE_FRIBIDI)
|
||||
find_package(Fribidi)
|
||||
@ -339,6 +348,7 @@ target_link_libraries(supertuxkart
|
||||
${OGGVORBIS_LIBRARIES}
|
||||
${OPENAL_LIBRARY}
|
||||
${OPENGL_LIBRARIES}
|
||||
${FREETYPE_LIBRARIES}
|
||||
)
|
||||
|
||||
if(UNIX AND NOT APPLE)
|
||||
@ -398,7 +408,7 @@ if(MSVC OR MINGW)
|
||||
endif()
|
||||
|
||||
if(MINGW)
|
||||
find_library(LIBGCC NAMES "libgcc_s_dw2-1.dll" "libgcc_s_sjlj-1.dll" PATHS ${CMAKE_FIND_ROOT_PATH})
|
||||
find_library(LIBGCC NAMES "libgcc_s_dw2-1.dll" "libgcc_s_sjlj-1.dll" "libgcc_s_seh-1.dll" PATHS ${CMAKE_FIND_ROOT_PATH})
|
||||
if(LIBGCC)
|
||||
file(COPY ${LIBGCC} DESTINATION ${CMAKE_BINARY_DIR}/bin/)
|
||||
endif()
|
||||
@ -416,9 +426,6 @@ if(MINGW)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Optional tools
|
||||
add_subdirectory(tools/font_tool)
|
||||
|
||||
|
||||
# ==== Checking if data folder exists ====
|
||||
if(NOT IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/data)
|
||||
|
@ -14,11 +14,11 @@ FIND_PATH(Angelscript_INCLUDE_DIRS angelscript.h
|
||||
)
|
||||
|
||||
FIND_LIBRARY(Angelscript_LIBRARY
|
||||
NAMES angelscript
|
||||
NAMES angelscript angelscript_s
|
||||
PATHS
|
||||
/usr/local
|
||||
/usr
|
||||
PATH_SUFFIXES lib
|
||||
PATH_SUFFIXES lib lib64 lib32
|
||||
)
|
||||
|
||||
# handle the QUIETLY and REQUIRED arguments and set ANGELSCRIPT_FOUND to TRUE if
|
||||
|
29
cmake/FindFreetype.cmake
Normal file
@ -0,0 +1,29 @@
|
||||
# - Find Freetype
|
||||
# Find the Freetype includes and libraries
|
||||
#
|
||||
# Following variables are provided:
|
||||
# FREETYPE_FOUND
|
||||
# True if Freetype has been found
|
||||
# FREETYPE_INCLUDE_DIRS
|
||||
# The include directories of Freetype
|
||||
# FREETYPE_LIBRARIES
|
||||
# Freetype library list
|
||||
|
||||
if(WIN32)
|
||||
find_path(FREETYPE_INCLUDE_DIRS NAMES freetype/freetype.h PATHS "${PROJECT_SOURCE_DIR}/dependencies/include")
|
||||
find_library(FREETYPE_LIBRARY NAMES freetype PATHS "${PROJECT_SOURCE_DIR}/dependencies/lib")
|
||||
set(FREETYPE_FOUND 1)
|
||||
set(FREETYPE_LIBRARIES ${FREETYPE_LIBRARY})
|
||||
elseif(APPLE)
|
||||
find_path(FREETYPE_INCLUDE_DIRS NAMES freetype/freetype.h PATHS "/Library/Frameworks/FreeType.Framework/Versions/2.4/unix/include")
|
||||
find_library(FREETYPE_LIBRARY NAMES freetype PATHS "/Library/Frameworks/FreeType.Framework/Versions/2.4/")
|
||||
include_directories(/Library/Frameworks/FreeType.Framework/Versions/2.4/unix/include)
|
||||
set(FREETYPE_FOUND 1)
|
||||
set(FREETYPE_LIBRARIES ${FREETYPE_LIBRARY})
|
||||
elseif(UNIX)
|
||||
include(FindPkgConfig)
|
||||
pkg_check_modules(FREETYPE freetype2)
|
||||
else()
|
||||
set(FREETYPE_FOUND 0)
|
||||
endif()
|
||||
|
20
cmake/Toolchain-mingw-64bit.cmake
Normal file
@ -0,0 +1,20 @@
|
||||
# Usage:
|
||||
# cmake .. -DCMAKE_TOOLCHAIN_FILE=../cmake/Toolchain-mingw-64bit.cmake
|
||||
|
||||
# the name of the target operating system
|
||||
SET(CMAKE_SYSTEM_NAME Windows)
|
||||
|
||||
# which compilers to use for C and C++
|
||||
SET(CMAKE_C_COMPILER x86_64-w64-mingw32-gcc-posix)
|
||||
SET(CMAKE_CXX_COMPILER x86_64-w64-mingw32-g++-posix)
|
||||
SET(CMAKE_RC_COMPILER x86_64-w64-mingw32-windres)
|
||||
|
||||
# here is the target environment located
|
||||
SET(CMAKE_FIND_ROOT_PATH /usr/x86_64-w64-mingw32 /usr/lib/gcc/x86_64-w64-mingw32/4.9-posix ${PROJECT_SOURCE_DIR}/dependencies)
|
||||
|
||||
# adjust the default behaviour of the FIND_XXX() commands:
|
||||
# search headers and libraries in the target environment, search
|
||||
# programs in the host environment
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ALWAYS)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
@ -1,3 +1,6 @@
|
||||
# Usage:
|
||||
# cmake .. -DCMAKE_TOOLCHAIN_FILE=../cmake/Toolchain-mingw.cmake
|
||||
|
||||
# the name of the target operating system
|
||||
SET(CMAKE_SYSTEM_NAME Windows)
|
||||
|
||||
|
BIN
data/CREDITS
Before Width: | Height: | Size: 46 KiB |
Before Width: | Height: | Size: 43 KiB |
Before Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 47 KiB |
Before Width: | Height: | Size: 4.3 KiB |
@ -1,22 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<materials>
|
||||
<!-- Fonts -->
|
||||
<material name="title_font.png" shader="unlit" dont-load="Y"/>
|
||||
<material name="title_font_2.png" shader="unlit" dont-load="Y"/>
|
||||
<material name="sigmar0.png" shader="unlit" dont-load="Y"/>
|
||||
<material name="comix.png" shader="unlit" dont-load="Y"/>
|
||||
<material name="LayneHansom0.png" shader="unlit" dont-load="Y"/>
|
||||
<material name="Mplus2p_JP0.png" shader="unlit" dont-load="Y"/>
|
||||
<material name="rasheeq0.png" shader="unlit" dont-load="Y"/>
|
||||
<material name="rasheeq3.png" shader="unlit" dont-load="Y"/>
|
||||
<material name="rasheeq4.png" shader="unlit" dont-load="Y"/>
|
||||
<material name="wqyMicroHei0.png" shader="unlit" dont-load="Y"/>
|
||||
<material name="wqyMicroHei1.png" shader="unlit" dont-load="Y"/>
|
||||
<material name="wqyMicroHei2.png" shader="unlit" dont-load="Y"/>
|
||||
<material name="wqyMicroHei3.png" shader="unlit" dont-load="Y"/>
|
||||
<material name="wqyMicroHei4.png" shader="unlit" dont-load="Y"/>
|
||||
<material name="wqyMicroHei5.png" shader="unlit" dont-load="Y"/>
|
||||
<material name="AR_PL_SungtiL_GB0.png" shader="unlit" dont-load="Y"/>
|
||||
<material name="LayneHansomBigDigits.png" shader="unlit" dont-load="Y"/>
|
||||
|
||||
</materials>
|
Before Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 9.1 KiB |
Before Width: | Height: | Size: 8.0 KiB |
Before Width: | Height: | Size: 9.0 KiB |
Before Width: | Height: | Size: 2.9 KiB |
Before Width: | Height: | Size: 174 KiB |
Before Width: | Height: | Size: 181 KiB |
Before Width: | Height: | Size: 61 KiB |
Before Width: | Height: | Size: 71 KiB |
Before Width: | Height: | Size: 78 KiB |
Before Width: | Height: | Size: 81 KiB |
Before Width: | Height: | Size: 75 KiB |
Before Width: | Height: | Size: 63 KiB |
Before Width: | Height: | Size: 45 KiB |
@ -4,25 +4,27 @@
|
||||
<spreading angle="10" />
|
||||
|
||||
<velocity x="0.0"
|
||||
y="0.002"
|
||||
y="0.003"
|
||||
z="0.0" />
|
||||
|
||||
<material file="smoke_black.png" />
|
||||
|
||||
<!-- Amount of particles emitted per second -->
|
||||
<rate min="25"
|
||||
max="50" />
|
||||
<rate min="7"
|
||||
max="12" />
|
||||
|
||||
<!-- Minimal and maximal lifetime of a particle, in milliseconds. -->
|
||||
<lifetime min="2500"
|
||||
max="5000" />
|
||||
|
||||
<!-- Size of the particles -->
|
||||
<size min="0.6"
|
||||
max="1.5" />
|
||||
<size min="1.6"
|
||||
max="2.5"
|
||||
x-increase-factor="2.6"
|
||||
y-increase-factor="2.6" />
|
||||
|
||||
<color min="255 255 255"
|
||||
max="255 255 255" />
|
||||
<color min="50 50 50"
|
||||
max="100 100 100" />
|
||||
|
||||
<!-- How much time in milliseconds before the particle is fully faded out -->
|
||||
<fadeout time="1000" />
|
||||
|
@ -14,13 +14,13 @@
|
||||
max="100" />
|
||||
|
||||
<!-- Minimal and maximal lifetime of a particle, in milliseconds. -->
|
||||
<lifetime min="700"
|
||||
max="700" />
|
||||
<lifetime min="1700"
|
||||
max="1700" />
|
||||
|
||||
<!-- Size of the particles -->
|
||||
<size min="0.2"
|
||||
max="0.3"
|
||||
x-increase-factor="1.1"
|
||||
<size min="0.7"
|
||||
max="1.1"
|
||||
x-increase-factor="1.3"
|
||||
y-increase-factor="1.3"
|
||||
/>
|
||||
|
||||
|
33
data/gfx/gfx_fireworkGreen_a.xml
Normal file
@ -0,0 +1,33 @@
|
||||
<?xml version="1.0"?>
|
||||
<particles emitter="sphere" radius="0.5">
|
||||
|
||||
<spreading angle="180" />
|
||||
|
||||
<velocity x="0.03"
|
||||
y="0.003"
|
||||
z="0.03" />
|
||||
|
||||
<material file="gfx_sparkGreen_a.png" />
|
||||
|
||||
<!-- Amount of particles emitted per second -->
|
||||
<rate min="65"
|
||||
max="100" />
|
||||
|
||||
<!-- Minimal and maximal lifetime of a particle, in milliseconds. -->
|
||||
<lifetime min="2700"
|
||||
max="2700" />
|
||||
|
||||
<!-- Size of the particles -->
|
||||
<size min="0.5"
|
||||
max="0.8"
|
||||
x-increase-factor="1.1"
|
||||
y-increase-factor="1.3"
|
||||
/>
|
||||
|
||||
<color min="255 255 255"
|
||||
max="255 0 0" />
|
||||
|
||||
<!-- How much time in milliseconds before the particle is fully faded out -->
|
||||
<fadeout time="50" />
|
||||
|
||||
</particles>
|
@ -1,20 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<stkgui>
|
||||
<icon-button id="back" x="0" y="0" height="8%" icon="gui/back.png"/>
|
||||
|
||||
<div x="5%" y="2%" width="90%" height="96%" layout="vertical-row" >
|
||||
|
||||
<header I18N="Title for challenges screen" text="Challenges - Trophy Room" text_align="center" align="center" width="80%" />
|
||||
|
||||
<spacer height="5" width="100%"/>
|
||||
|
||||
<box width="100%" proportion="5" layout="vertical-row">
|
||||
|
||||
<ribbon_grid id="challenges" proportion="8" width="100%"
|
||||
label_location="bottom" align="center" child_width="128" child_height="128" />
|
||||
|
||||
|
||||
<spacer proportion="1" width="100%"/>
|
||||
</box>
|
||||
</div>
|
||||
</stkgui>
|
@ -1,21 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<stkgui>
|
||||
<div x="2%" y="10%" width="96%" height="80%" layout="vertical-row" >
|
||||
|
||||
<label id="title" width="100%" text_align="center" word_wrap="true"
|
||||
I18N="In the 'add new player' dialog" text="Enter the new player's name" proportion="1" />
|
||||
|
||||
<spacer height="25" width="10" />
|
||||
|
||||
<textbox id="textfield" width="75%" I18N="In the 'add new player' dialog" align="center"/>
|
||||
|
||||
<spacer height="20" width="20" />
|
||||
|
||||
<buttonbar proportion="1" id="options" width="100%" height="100%">
|
||||
<button id="ok" I18N="In the 'add new player' dialog" text="OK" align="center"/>
|
||||
<button id="cancel" I18N="In the 'add new player' dialog" text="Cancel" align="center"/>
|
||||
</buttonbar>
|
||||
<spacer height="15" width="20" />
|
||||
|
||||
</div>
|
||||
</stkgui>
|
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<stkgui>
|
||||
<div x="0" y="0" width="100%" height="100%" layout="vertical-row" >
|
||||
<header text_align="center" width="80%" align="center" I18N="In the server creation screen" text="Server Creation"/>
|
||||
<header id="title" text_align="center" width="80%" align="center" I18N="In the server creation screen" text="Server Creation"/>
|
||||
<spacer height="15" width="10"/>
|
||||
<box proportion="4" width="90%" layout="vertical-row" align="center">
|
||||
<div width="90%" align="center" layout="vertical-row" y="2%" height="96%">
|
||||
|
@ -1,46 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<stkgui>
|
||||
<div x="0" y="0" width="100%" height="100%" layout="vertical-row" >
|
||||
|
||||
<header text_align="center" width="80%" align="center" I18N="In the online multiplayer screen" text="Online Multiplayer"/>
|
||||
<spacer height="15" width="10"/>
|
||||
<box proportion="4" width="90%" layout="vertical-row" align="center">
|
||||
<div x="2%" y="2%" width="96%" height="96%" layout="vertical-row" id="outer_box" >
|
||||
<!-- TODO: Here will come some information.. or statistics.. or whatever. Yet to be filled in! It will change depending on state. And I'd also like a close button at the right top. -->
|
||||
<label I18N="In the online multiplayer screen" proportion="4"
|
||||
word_wrap="true" text="" align="center"/>
|
||||
</div>
|
||||
</box>
|
||||
|
||||
<buttonbar id="menu_toprow" proportion="3" width="90%" align="center">
|
||||
<icon-button id="quick_play" width="128" height="128"
|
||||
icon="gui/online/menu_quick_play.png" focus_icon="gui/online/menu_quick_play_hover.png"
|
||||
I18N="In the online multiplayer screen" text="Quick Play"/>
|
||||
<icon-button id="find_server" width="128" height="128"
|
||||
icon="gui/online/menu_find_server.png" focus_icon="gui/online/menu_find_server_hover.png"
|
||||
I18N="In the online multiplayer screen" text="Find Server"/>
|
||||
<icon-button id="create_server" width="128" height="128"
|
||||
icon="gui/online/menu_create_server.png" focus_icon="gui/online/menu_create_server_hover.png"
|
||||
I18N="In the online multiplayer screen" text="Create Server"/>
|
||||
</buttonbar>
|
||||
|
||||
<spacer width="10" height="7%"/>
|
||||
|
||||
<bottombar x="2%" width="96%" height="10%" layout="horizontal-row">
|
||||
<label text_align="left" align="center" height="100%" id="online_status" proportion="1" text=""/>
|
||||
|
||||
<spacer width="10" height="10" />
|
||||
|
||||
<buttonbar id="menu_bottomrow" x="0" y="0" width="12%" height="100%" align="center">
|
||||
<icon-button id="profile" width="64" height="64" icon="gui/green_check.png" extend_label="50"
|
||||
I18N="In the online multiplayer screen" text="Profile" label_location="hover"/>
|
||||
<icon-button id="sign_out" width="64" height="64" icon="gui/main_quit.png" extend_label="70"
|
||||
I18N="In the online multiplayer screen" text="Log Out" label_location="hover"/>
|
||||
</buttonbar>
|
||||
|
||||
</bottombar>
|
||||
|
||||
</div>
|
||||
|
||||
<icon-button id="back" x="0" y="0" height="8%" icon="gui/back.png"/>
|
||||
</stkgui>
|
63
data/gui/online/online_screen.stkgui
Normal file
@ -0,0 +1,63 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<stkgui>
|
||||
<div x="0" y="0" width="100%" height="fit" layout="vertical-row">
|
||||
<button id="user-id" width="20%" height="fit" align="right"/>
|
||||
</div>
|
||||
|
||||
<div x="2%" y="2%" width="96%" height="96%" layout="vertical-row" >
|
||||
|
||||
<header text_align="center" width="80%" align="center" I18N="In the online multiplayer screen" text="Online Multiplayer"/>
|
||||
|
||||
<spacer height="5%" width="25"/>
|
||||
<box width="100%" height="38%" padding="10" layout="vertical-row">
|
||||
<bright width="100%" text="Local Networking" align="center" text_align="left" />
|
||||
|
||||
<buttonbar id="lan" proportion="2" width="90%" align="center">
|
||||
<icon-button id="find_lan_server" width="128" height="128"
|
||||
icon="gui/online/menu_find_server.png" focus_icon="gui/online/menu_find_server_hover.png"
|
||||
I18N="In the online multiplayer screen" text="Find Server"/>
|
||||
<icon-button id="create_lan_server" width="128" height="128"
|
||||
icon="gui/online/menu_create_server.png" focus_icon="gui/online/menu_create_server_hover.png"
|
||||
I18N="In the online multiplayer screen" text="Create Server"/>
|
||||
<icon-button id="manage_user" width="128" height="128"
|
||||
icon="gui/options_players.png"
|
||||
I18N="In the online multiplayer screen" text="Users"/>
|
||||
</buttonbar>
|
||||
</box>
|
||||
|
||||
<spacer height="5%" width="25"/>
|
||||
|
||||
<box width="100%" height="38%" padding="10" layout="vertical-row">
|
||||
<bright width="100%" text="Global Networking" align="center" text_align="left" />
|
||||
|
||||
<buttonbar id="menu_top_row" proportion="2" width="90%" align="center">
|
||||
<icon-button id="find_wan_server" width="128" height="128"
|
||||
icon="gui/online/menu_find_server.png" focus_icon="gui/online/menu_find_server_hover.png"
|
||||
I18N="In the online multiplayer screen" text="Find Server"/>
|
||||
<icon-button id="create_wan_server" width="128" height="128"
|
||||
icon="gui/online/menu_create_server.png" focus_icon="gui/online/menu_create_server_hover.png"
|
||||
I18N="In the online multiplayer screen" text="Create Server"/>
|
||||
<icon-button id="quick_wan_play" width="128" height="128"
|
||||
icon="gui/online/menu_quick_play.png" focus_icon="gui/online/menu_quick_play_hover.png"
|
||||
I18N="In the online multiplayer screen" text="Quick Play"/>
|
||||
</buttonbar>
|
||||
</box>
|
||||
|
||||
<bottombar x="2%" width="96%" height="10%" layout="horizontal-row">
|
||||
<label text_align="left" align="center" height="100%" id="online_status" proportion="1" text=""/>
|
||||
|
||||
<spacer width="10" height="10" />
|
||||
|
||||
<buttonbar id="menu_bottomrow" x="0" y="0" width="12%" height="100%" align="center">
|
||||
<icon-button id="profile" width="64" height="64" icon="gui/green_check.png" extend_label="50"
|
||||
I18N="In the online multiplayer screen" text="Profile" label_location="hover"/>
|
||||
<icon-button id="sign_out" width="64" height="64" icon="gui/main_quit.png" extend_label="70"
|
||||
I18N="In the online multiplayer screen" text="Log Out" label_location="hover"/>
|
||||
</buttonbar>
|
||||
|
||||
</bottombar>
|
||||
|
||||
</div>
|
||||
|
||||
<icon-button id="back" x="0" y="0" height="8%" icon="gui/back.png"/>
|
||||
</stkgui>
|
@ -11,8 +11,8 @@ msgstr ""
|
||||
"Project-Id-Version: SuperTuxKart\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2015-09-26 00:20+1000\n"
|
||||
"PO-Revision-Date: 2015-09-26 09:35+0000\n"
|
||||
"Last-Translator: Auria <auria.mg@gmail.com>\n"
|
||||
"PO-Revision-Date: 2015-10-04 03:25+0000\n"
|
||||
"Last-Translator: صفا الفليج <safaalfulaij@hotmail.com>\n"
|
||||
"Language-Team: Arabic (http://www.transifex.com/supertuxkart/supertuxkart/language/ar/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
@ -353,7 +353,7 @@ msgstr "ضغط النّقوش"
|
||||
#. I18N: ./data/gui/custom_video_settings.stkgui
|
||||
#. I18N: Video settings
|
||||
msgid "Use high definition textures"
|
||||
msgstr ""
|
||||
msgstr "استخدم نقوشًا عالية الوضوح"
|
||||
|
||||
#. I18N: ./data/gui/custom_video_settings.stkgui
|
||||
#. I18N: Video settings
|
||||
@ -622,7 +622,7 @@ msgstr "* ربط المفتاح الحاليّ يمكن رؤيته/تغييره
|
||||
#. I18N: ./data/gui/help2.stkgui
|
||||
#. I18N: In the help menu
|
||||
msgid "To help you win, there are some powerups you can collect:"
|
||||
msgstr ""
|
||||
msgstr "لمساعدتك على الفوز، ثمّة بعض التّحسينات التي يمكنك التقاطها:"
|
||||
|
||||
#. I18N: ./data/gui/help2.stkgui
|
||||
msgid ""
|
||||
@ -1840,13 +1840,13 @@ msgstr "[لاشيء]"
|
||||
#: src/input/binding.cpp:114
|
||||
msgctxt "input_key"
|
||||
msgid "Left Mouse Button"
|
||||
msgstr ""
|
||||
msgstr "زرّ الفأرة الأيسر"
|
||||
|
||||
#. I18N: input configuration screen: mouse button
|
||||
#: src/input/binding.cpp:116
|
||||
msgctxt "input_key"
|
||||
msgid "Right Mouse Button"
|
||||
msgstr ""
|
||||
msgstr "زرّ الفأرة الأيمن"
|
||||
|
||||
#. I18N: input configuration screen: keyboard key
|
||||
#: src/input/binding.cpp:118
|
||||
@ -1858,7 +1858,7 @@ msgstr ""
|
||||
#: src/input/binding.cpp:120
|
||||
msgctxt "input_key"
|
||||
msgid "Middle Mouse Button"
|
||||
msgstr ""
|
||||
msgstr "زرّ الفأرة الأوسط"
|
||||
|
||||
#. I18N: input configuration screen: mouse button
|
||||
#: src/input/binding.cpp:122
|
||||
@ -2099,61 +2099,61 @@ msgstr ""
|
||||
#: src/input/binding.cpp:237
|
||||
msgctxt "input_key"
|
||||
msgid "Numpad 0"
|
||||
msgstr ""
|
||||
msgstr "لوحة الأرقام 0"
|
||||
|
||||
#. I18N: input configuration screen: keyboard key
|
||||
#: src/input/binding.cpp:239
|
||||
msgctxt "input_key"
|
||||
msgid "Numpad 1"
|
||||
msgstr ""
|
||||
msgstr "لوحة الأرقام 1"
|
||||
|
||||
#. I18N: input configuration screen: keyboard key
|
||||
#: src/input/binding.cpp:241
|
||||
msgctxt "input_key"
|
||||
msgid "Numpad 2"
|
||||
msgstr ""
|
||||
msgstr "لوحة الأرقام 2"
|
||||
|
||||
#. I18N: input configuration screen: keyboard key
|
||||
#: src/input/binding.cpp:243
|
||||
msgctxt "input_key"
|
||||
msgid "Numpad 3"
|
||||
msgstr ""
|
||||
msgstr "لوحة الأرقام 3"
|
||||
|
||||
#. I18N: input configuration screen: keyboard key
|
||||
#: src/input/binding.cpp:245
|
||||
msgctxt "input_key"
|
||||
msgid "Numpad 4"
|
||||
msgstr ""
|
||||
msgstr "لوحة الأرقام 4"
|
||||
|
||||
#. I18N: input configuration screen: keyboard key
|
||||
#: src/input/binding.cpp:247
|
||||
msgctxt "input_key"
|
||||
msgid "Numpad 5"
|
||||
msgstr ""
|
||||
msgstr "لوحة الأرقام 5"
|
||||
|
||||
#. I18N: input configuration screen: keyboard key
|
||||
#: src/input/binding.cpp:249
|
||||
msgctxt "input_key"
|
||||
msgid "Numpad 6"
|
||||
msgstr ""
|
||||
msgstr "لوحة الأرقام 6"
|
||||
|
||||
#. I18N: input configuration screen: keyboard key
|
||||
#: src/input/binding.cpp:251
|
||||
msgctxt "input_key"
|
||||
msgid "Numpad 7"
|
||||
msgstr ""
|
||||
msgstr "لوحة الأرقام 7"
|
||||
|
||||
#. I18N: input configuration screen: keyboard key
|
||||
#: src/input/binding.cpp:253
|
||||
msgctxt "input_key"
|
||||
msgid "Numpad 8"
|
||||
msgstr ""
|
||||
msgstr "لوحة الأرقام 8"
|
||||
|
||||
#. I18N: input configuration screen: keyboard key
|
||||
#: src/input/binding.cpp:255
|
||||
msgctxt "input_key"
|
||||
msgid "Numpad 9"
|
||||
msgstr ""
|
||||
msgstr "لوحة الأرقام 9"
|
||||
|
||||
#. I18N: input configuration screen: keyboard key
|
||||
#: src/input/binding.cpp:259
|
||||
@ -2442,7 +2442,7 @@ msgstr ""
|
||||
#: src/input/input_manager.cpp:751
|
||||
#, c-format
|
||||
msgid "Ignoring '%s'. You needed to join earlier to play!"
|
||||
msgstr ""
|
||||
msgstr "سأتجاهل '%s'. كان عليك الانضمام قبل الآن للعب!"
|
||||
|
||||
#: src/input/input_manager.cpp:781
|
||||
msgid "Only the Game Master may act at this point!"
|
||||
@ -2513,7 +2513,7 @@ msgstr "إصدارة مشغّلك قديمة جدًّا. فضلًا ثبّت أ
|
||||
msgid ""
|
||||
"Your OpenGL version appears to be too old. Please verify if an update for "
|
||||
"your video driver is available. SuperTuxKart requires OpenGL 3.1 or better."
|
||||
msgstr ""
|
||||
msgstr "إصدارتك من أوبنجيإل تبدو قديمة جدًّا. فضلًا تحقّق من وجود تحديث لمشغّل الفيديوهات لديك. تطلب سوبرتكسكارت أوبنجيإل 3.1 أو أعلى."
|
||||
|
||||
#: src/modes/easter_egg_hunt.cpp:202
|
||||
#, c-format
|
||||
@ -2844,12 +2844,12 @@ msgstr "يتحقّق من المعلومات"
|
||||
#, c-format
|
||||
msgid "Confirm resolution within %i second"
|
||||
msgid_plural "Confirm resolution within %i seconds"
|
||||
msgstr[0] ""
|
||||
msgstr[1] ""
|
||||
msgstr[2] ""
|
||||
msgstr[3] ""
|
||||
msgstr[4] ""
|
||||
msgstr[5] ""
|
||||
msgstr[0] "أكّد الميز حالًا"
|
||||
msgstr[1] "أكّد الميز خلال ثانية واحدة"
|
||||
msgstr[2] "أكّد الميز خلال ثانيتين"
|
||||
msgstr[3] "أكّد الميز خلال %i ثوان"
|
||||
msgstr[4] "أكّد الميز خلال %i ثانية"
|
||||
msgstr[5] "أكّد الميز خلال %i ثانية"
|
||||
|
||||
#. I18N: in the graphical options tooltip;
|
||||
#. indicates a graphical feature is disabled
|
||||
|
@ -11,8 +11,8 @@ msgstr ""
|
||||
"Project-Id-Version: SuperTuxKart\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2015-09-26 00:20+1000\n"
|
||||
"PO-Revision-Date: 2015-09-26 09:35+0000\n"
|
||||
"Last-Translator: Auria <auria.mg@gmail.com>\n"
|
||||
"PO-Revision-Date: 2015-10-11 10:29+0000\n"
|
||||
"Last-Translator: Alan Monfort <alan.monfort@free.fr>\n"
|
||||
"Language-Team: Breton (http://www.transifex.com/supertuxkart/supertuxkart/language/br/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
@ -1043,7 +1043,7 @@ msgstr "Arventennoù ar gont"
|
||||
#. I18N: ./data/gui/online/profile_settings.stkgui
|
||||
#. I18N: In the online account settings screen
|
||||
msgid "Password:"
|
||||
msgstr ""
|
||||
msgstr "Ger-tremen :"
|
||||
|
||||
#. I18N: ./data/gui/online/profile_settings.stkgui
|
||||
msgid "Change"
|
||||
@ -1840,13 +1840,13 @@ msgstr "[hini ebet]"
|
||||
#: src/input/binding.cpp:114
|
||||
msgctxt "input_key"
|
||||
msgid "Left Mouse Button"
|
||||
msgstr ""
|
||||
msgstr "Afell gleiz al logodenn"
|
||||
|
||||
#. I18N: input configuration screen: mouse button
|
||||
#: src/input/binding.cpp:116
|
||||
msgctxt "input_key"
|
||||
msgid "Right Mouse Button"
|
||||
msgstr ""
|
||||
msgstr "Afell dehou al logodenn"
|
||||
|
||||
#. I18N: input configuration screen: keyboard key
|
||||
#: src/input/binding.cpp:118
|
||||
@ -1858,19 +1858,19 @@ msgstr "Nullañ"
|
||||
#: src/input/binding.cpp:120
|
||||
msgctxt "input_key"
|
||||
msgid "Middle Mouse Button"
|
||||
msgstr ""
|
||||
msgstr "Afell greiz al logodenn"
|
||||
|
||||
#. I18N: input configuration screen: mouse button
|
||||
#: src/input/binding.cpp:122
|
||||
msgctxt "input_key"
|
||||
msgid "X1 Mouse Button"
|
||||
msgstr ""
|
||||
msgstr "Afell X1 al logodenn"
|
||||
|
||||
#. I18N: input configuration screen: mouse button
|
||||
#: src/input/binding.cpp:124
|
||||
msgctxt "input_key"
|
||||
msgid "X2 Mouse Button"
|
||||
msgstr ""
|
||||
msgstr "Afell X2 al logodenn"
|
||||
|
||||
#. I18N: input configuration screen: keyboard key
|
||||
#: src/input/binding.cpp:126
|
||||
@ -1882,7 +1882,7 @@ msgstr "Kilesaouiñ"
|
||||
#: src/input/binding.cpp:128
|
||||
msgctxt "input_key"
|
||||
msgid "Tab"
|
||||
msgstr ""
|
||||
msgstr "Taolennata"
|
||||
|
||||
#. I18N: input configuration screen: keyboard key
|
||||
#: src/input/binding.cpp:130
|
||||
@ -1894,13 +1894,13 @@ msgstr "Skarzhañ"
|
||||
#: src/input/binding.cpp:132
|
||||
msgctxt "input_key"
|
||||
msgid "Return"
|
||||
msgstr ""
|
||||
msgstr "Distreiñ"
|
||||
|
||||
#. I18N: input configuration screen: keyboard key
|
||||
#: src/input/binding.cpp:134
|
||||
msgctxt "input_key"
|
||||
msgid "Shift"
|
||||
msgstr ""
|
||||
msgstr "Pennlizherenn"
|
||||
|
||||
#. I18N: input configuration screen: keyboard key
|
||||
#: src/input/binding.cpp:136
|
||||
@ -1912,13 +1912,13 @@ msgstr "Reolerezh"
|
||||
#: src/input/binding.cpp:138
|
||||
msgctxt "input_key"
|
||||
msgid "Alt/Menu"
|
||||
msgstr ""
|
||||
msgstr "Alt/Lañser"
|
||||
|
||||
#. I18N: input configuration screen: keyboard key
|
||||
#: src/input/binding.cpp:140
|
||||
msgctxt "input_key"
|
||||
msgid "Pause"
|
||||
msgstr ""
|
||||
msgstr "Ehan"
|
||||
|
||||
#. I18N: input configuration screen: keyboard key
|
||||
#: src/input/binding.cpp:142
|
||||
@ -1930,26 +1930,26 @@ msgstr "Prennañ ar pennlizherennoù"
|
||||
#: src/input/binding.cpp:144
|
||||
msgctxt "input_key"
|
||||
msgid "Kana"
|
||||
msgstr ""
|
||||
msgstr "Kana"
|
||||
|
||||
#. I18N: input configuration screen: keyboard key
|
||||
#: src/input/binding.cpp:146
|
||||
msgctxt "input_key"
|
||||
msgid "Junja"
|
||||
msgstr ""
|
||||
msgstr "Junja"
|
||||
|
||||
#. I18N: input configuration screen: keyboard key
|
||||
#. I18N: input configuration screen: keyboard key
|
||||
#: src/input/binding.cpp:149
|
||||
msgctxt "input_key"
|
||||
msgid "Final"
|
||||
msgstr ""
|
||||
msgstr "Diwezh"
|
||||
|
||||
#. I18N: input configuration screen: keyboard key
|
||||
#: src/input/binding.cpp:151
|
||||
msgctxt "input_key"
|
||||
msgid "Escape"
|
||||
msgstr ""
|
||||
msgstr "Achap"
|
||||
|
||||
#. I18N: input configuration screen: keyboard key
|
||||
#: src/input/binding.cpp:153
|
||||
@ -2057,7 +2057,7 @@ msgstr "Moullañ ar skramm"
|
||||
#: src/input/binding.cpp:187
|
||||
msgctxt "input_key"
|
||||
msgid "Insert"
|
||||
msgstr ""
|
||||
msgstr "Enlakaat"
|
||||
|
||||
#. I18N: input configuration screen: keyboard key
|
||||
#: src/input/binding.cpp:189
|
||||
@ -2093,73 +2093,73 @@ msgstr "Arloadoù"
|
||||
#: src/input/binding.cpp:235
|
||||
msgctxt "input_key"
|
||||
msgid "Sleep"
|
||||
msgstr ""
|
||||
msgstr "Kousket"
|
||||
|
||||
#. I18N: input configuration screen: keyboard key
|
||||
#: src/input/binding.cpp:237
|
||||
msgctxt "input_key"
|
||||
msgid "Numpad 0"
|
||||
msgstr ""
|
||||
msgstr "Nivdamer 0"
|
||||
|
||||
#. I18N: input configuration screen: keyboard key
|
||||
#: src/input/binding.cpp:239
|
||||
msgctxt "input_key"
|
||||
msgid "Numpad 1"
|
||||
msgstr ""
|
||||
msgstr "Nivdamer 1"
|
||||
|
||||
#. I18N: input configuration screen: keyboard key
|
||||
#: src/input/binding.cpp:241
|
||||
msgctxt "input_key"
|
||||
msgid "Numpad 2"
|
||||
msgstr ""
|
||||
msgstr "Nivdamer 2"
|
||||
|
||||
#. I18N: input configuration screen: keyboard key
|
||||
#: src/input/binding.cpp:243
|
||||
msgctxt "input_key"
|
||||
msgid "Numpad 3"
|
||||
msgstr ""
|
||||
msgstr "Nivdamer 3"
|
||||
|
||||
#. I18N: input configuration screen: keyboard key
|
||||
#: src/input/binding.cpp:245
|
||||
msgctxt "input_key"
|
||||
msgid "Numpad 4"
|
||||
msgstr ""
|
||||
msgstr "Nivdamer 4"
|
||||
|
||||
#. I18N: input configuration screen: keyboard key
|
||||
#: src/input/binding.cpp:247
|
||||
msgctxt "input_key"
|
||||
msgid "Numpad 5"
|
||||
msgstr ""
|
||||
msgstr "Nivdamer 5"
|
||||
|
||||
#. I18N: input configuration screen: keyboard key
|
||||
#: src/input/binding.cpp:249
|
||||
msgctxt "input_key"
|
||||
msgid "Numpad 6"
|
||||
msgstr ""
|
||||
msgstr "Nivdamer 6"
|
||||
|
||||
#. I18N: input configuration screen: keyboard key
|
||||
#: src/input/binding.cpp:251
|
||||
msgctxt "input_key"
|
||||
msgid "Numpad 7"
|
||||
msgstr ""
|
||||
msgstr "Nivdamer 7"
|
||||
|
||||
#. I18N: input configuration screen: keyboard key
|
||||
#: src/input/binding.cpp:253
|
||||
msgctxt "input_key"
|
||||
msgid "Numpad 8"
|
||||
msgstr ""
|
||||
msgstr "Nivdamer 8"
|
||||
|
||||
#. I18N: input configuration screen: keyboard key
|
||||
#: src/input/binding.cpp:255
|
||||
msgctxt "input_key"
|
||||
msgid "Numpad 9"
|
||||
msgstr ""
|
||||
msgstr "Nivdamer 9"
|
||||
|
||||
#. I18N: input configuration screen: keyboard key
|
||||
#: src/input/binding.cpp:259
|
||||
msgctxt "input_key"
|
||||
msgid "Separator"
|
||||
msgstr ""
|
||||
msgstr "Dispartier"
|
||||
|
||||
#. I18N: input configuration screen: keyboard key
|
||||
#: src/input/binding.cpp:261
|
||||
@ -2183,55 +2183,55 @@ msgstr "/ (Rannañ)"
|
||||
#: src/input/binding.cpp:291
|
||||
msgctxt "input_key"
|
||||
msgid "Num Lock"
|
||||
msgstr ""
|
||||
msgstr "Prennañ an niverennoù"
|
||||
|
||||
#. I18N: input configuration screen: keyboard key
|
||||
#: src/input/binding.cpp:293
|
||||
msgctxt "input_key"
|
||||
msgid "Scroll Lock"
|
||||
msgstr ""
|
||||
msgstr "Prennañ an dibuniñ"
|
||||
|
||||
#. I18N: input configuration screen: keyboard key
|
||||
#: src/input/binding.cpp:295
|
||||
msgctxt "input_key"
|
||||
msgid "Left Shift"
|
||||
msgstr ""
|
||||
msgstr "Pennlizherenn a-gleiz"
|
||||
|
||||
#. I18N: input configuration screen: keyboard key
|
||||
#: src/input/binding.cpp:297
|
||||
msgctxt "input_key"
|
||||
msgid "Right Shift"
|
||||
msgstr ""
|
||||
msgstr "Pennlizherenn a-zehou"
|
||||
|
||||
#. I18N: input configuration screen: keyboard key
|
||||
#: src/input/binding.cpp:299
|
||||
msgctxt "input_key"
|
||||
msgid "Left Control"
|
||||
msgstr ""
|
||||
msgstr "Reolerezh a-gleiz"
|
||||
|
||||
#. I18N: input configuration screen: keyboard key
|
||||
#: src/input/binding.cpp:301
|
||||
msgctxt "input_key"
|
||||
msgid "Right Control"
|
||||
msgstr ""
|
||||
msgstr "Reolerezh a-zehou"
|
||||
|
||||
#. I18N: input configuration screen: keyboard key
|
||||
#: src/input/binding.cpp:303
|
||||
msgctxt "input_key"
|
||||
msgid "Left Menu"
|
||||
msgstr ""
|
||||
msgstr "Lañser a-gleiz"
|
||||
|
||||
#. I18N: input configuration screen: keyboard key
|
||||
#: src/input/binding.cpp:305
|
||||
msgctxt "input_key"
|
||||
msgid "Right Menu"
|
||||
msgstr ""
|
||||
msgstr "Lañser a-zehou"
|
||||
|
||||
#. I18N: input configuration screen: keyboard key
|
||||
#: src/input/binding.cpp:311
|
||||
msgctxt "input_key"
|
||||
msgid "Attn"
|
||||
msgstr ""
|
||||
msgstr "Evezh"
|
||||
|
||||
#. I18N: input configuration screen: keyboard key
|
||||
#: src/input/binding.cpp:313
|
||||
|
@ -12,8 +12,8 @@ msgstr ""
|
||||
"Project-Id-Version: SuperTuxKart\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2015-09-26 00:20+1000\n"
|
||||
"PO-Revision-Date: 2015-09-26 09:36+0000\n"
|
||||
"Last-Translator: Auria <auria.mg@gmail.com>\n"
|
||||
"PO-Revision-Date: 2015-10-14 12:38+0000\n"
|
||||
"Last-Translator: ToMáš Marný\n"
|
||||
"Language-Team: Czech (http://www.transifex.com/supertuxkart/supertuxkart/language/cs/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
@ -2923,7 +2923,7 @@ msgid ""
|
||||
"the box below, you are confirming that you understand these terms. If you "
|
||||
"have any questions or comments regarding these terms, one of the members of "
|
||||
"the development team would gladly assist you."
|
||||
msgstr ""
|
||||
msgstr "Přečtěte si prosím podmínky použití pro SuperTuxKart na adrese '%s'. Před registrací účtu pro STK musíte s těmito podmínkami souhlasit. Zaškrtnutím políčka níže potvrzujete, že jste tyto podmínky pochopili. Máte-li jakékoli dotazy nebo připomínky týkající se těchto podmínek, některý z členů vývojového týmu vám rád pomůže."
|
||||
|
||||
#: src/states_screens/dialogs/select_challenge.cpp:53
|
||||
#, c-format
|
||||
|
@ -15,8 +15,8 @@ msgstr ""
|
||||
"Project-Id-Version: SuperTuxKart\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2015-09-26 00:20+1000\n"
|
||||
"PO-Revision-Date: 2015-09-26 09:36+0000\n"
|
||||
"Last-Translator: Auria <auria.mg@gmail.com>\n"
|
||||
"PO-Revision-Date: 2015-09-28 19:07+0000\n"
|
||||
"Last-Translator: Wuzzy <almikes@aol.com>\n"
|
||||
"Language-Team: German (http://www.transifex.com/supertuxkart/supertuxkart/language/de/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
@ -2922,7 +2922,7 @@ msgid ""
|
||||
"the box below, you are confirming that you understand these terms. If you "
|
||||
"have any questions or comments regarding these terms, one of the members of "
|
||||
"the development team would gladly assist you."
|
||||
msgstr ""
|
||||
msgstr "Bitte lies die Geschäftsbedingungen für SuperTuxKart auf „%s“. Du musst diesen Bedingungen zustimmen, um ein Benutzerkonto für STK anlegen zu können. Wenn du im untenstehenden Kästchen ein Häkchen setzt, bestätigst du damit, dass du diese Bedingungen verstehst. Falls du Fragen oder Kommentare bezüglich dieser Bedingungen hast, wird einer der Mitglieder des Entwicklungsteams dir gerne weiterhelfen."
|
||||
|
||||
#: src/states_screens/dialogs/select_challenge.cpp:53
|
||||
#, c-format
|
||||
|
@ -11,8 +11,8 @@ msgstr ""
|
||||
"Project-Id-Version: SuperTuxKart\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2015-09-26 00:20+1000\n"
|
||||
"PO-Revision-Date: 2015-09-26 09:36+0000\n"
|
||||
"Last-Translator: Auria <auria.mg@gmail.com>\n"
|
||||
"PO-Revision-Date: 2015-09-28 08:27+0000\n"
|
||||
"Last-Translator: GunChleoc\n"
|
||||
"Language-Team: Gaelic, Scottish (http://www.transifex.com/supertuxkart/supertuxkart/language/gd/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
@ -2926,7 +2926,7 @@ msgid ""
|
||||
"the box below, you are confirming that you understand these terms. If you "
|
||||
"have any questions or comments regarding these terms, one of the members of "
|
||||
"the development team would gladly assist you."
|
||||
msgstr ""
|
||||
msgstr "Feuch an leugh thu na teirmichean is cumhaichean airson SuperTuxKart air “%s”. Feumaidh tu aontachadh ris na teirmichean sin mus clàraich thu cunntas airson STK. Nuair a chuireas tu cromag sa bhogsa gu h-ìosal, dearbhaichidh tu gu bheil thu a’ tuigsinn nan teirmichean sin. Ma tha ceist no beachd sam bith agad mu na teirmichean sin, bidh ball dhen sgioba leasachaidh toilichte do chuideachadh."
|
||||
|
||||
#: src/states_screens/dialogs/select_challenge.cpp:53
|
||||
#, c-format
|
||||
|
@ -9,7 +9,7 @@ msgstr ""
|
||||
"Project-Id-Version: SuperTuxKart\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2015-09-26 00:20+1000\n"
|
||||
"PO-Revision-Date: 2015-09-27 19:23+0000\n"
|
||||
"PO-Revision-Date: 2015-10-03 11:54+0000\n"
|
||||
"Last-Translator: Karl Ove Hufthammer <karl@huftis.org>\n"
|
||||
"Language-Team: Norwegian Nynorsk (http://www.transifex.com/supertuxkart/supertuxkart/language/nn/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
@ -1140,7 +1140,7 @@ msgstr "Bruksvilkår"
|
||||
#. I18N: ./data/gui/online/registration_terms.stkgui
|
||||
#. I18N: In the registration dialog
|
||||
msgid "I agree to the above terms and am 13 years or older. "
|
||||
msgstr "I godtek vilkåra over, og er minst 13 år gammal. "
|
||||
msgstr "Eg godtek vilkåra over, og er minst 13 år gammal. "
|
||||
|
||||
#. I18N: ./data/gui/online/registration_terms.stkgui
|
||||
#. I18N: In the registration dialog
|
||||
|
3792
data/po/oc.po
Normal file
@ -10,7 +10,7 @@ msgstr ""
|
||||
"Project-Id-Version: SuperTuxKart\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2015-09-26 00:20+1000\n"
|
||||
"PO-Revision-Date: 2015-09-26 13:43+0000\n"
|
||||
"PO-Revision-Date: 2015-10-07 17:13+0000\n"
|
||||
"Last-Translator: Dawid Gan <deveee@gmail.com>\n"
|
||||
"Language-Team: Polish (http://www.transifex.com/supertuxkart/supertuxkart/language/pl/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
@ -65,7 +65,7 @@ msgstr "Złoty Kierowca"
|
||||
|
||||
#. I18N: ./data/achievements.xml
|
||||
msgid "Win against at least 3 opponents in all single player modes."
|
||||
msgstr "Wygraj z co najmniej 3 ptrzeciwnikami w każdym jednoosobowym trybie gry."
|
||||
msgstr "Wygraj z co najmniej 3 przeciwnikami w każdym jednoosobowym trybie gry."
|
||||
|
||||
#. I18N: ./data/achievements.xml
|
||||
msgid "Powerup Love"
|
||||
|
@ -11,8 +11,8 @@ msgstr ""
|
||||
"Project-Id-Version: SuperTuxKart\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2015-09-26 00:20+1000\n"
|
||||
"PO-Revision-Date: 2015-09-26 09:35+0000\n"
|
||||
"Last-Translator: Auria <auria.mg@gmail.com>\n"
|
||||
"PO-Revision-Date: 2015-10-06 00:02+0000\n"
|
||||
"Last-Translator: MiroslavR <miroslavr256@gmail.com>\n"
|
||||
"Language-Team: Slovak (http://www.transifex.com/supertuxkart/supertuxkart/language/sk/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
@ -661,7 +661,7 @@ msgstr "Menič - na krátku chvíľu sa darčekové škatule premenia na banány
|
||||
msgid ""
|
||||
"Basket Ball - bounces after the leader, and might squash and slow down karts"
|
||||
" down on the way."
|
||||
msgstr "Basketbalová lopta - skákaním prenasleduje motokáru na prvom mieste a môže rozpučiť a spomaliť aj iné motokáry stojace v jej ceste."
|
||||
msgstr "Basketbalová lopta - skákaním prenasleduje motokáru na prvom mieste, avšak môže rozpučiť a spomaliť aj iné motokáry stojace v jej ceste."
|
||||
|
||||
#. I18N: ./data/gui/help2.stkgui
|
||||
msgid "Swatter - will squash karts close by, slowing them down."
|
||||
@ -681,7 +681,7 @@ msgstr "Obyčajné preteky: Povoľujú sa všetky údery, tak sa chopte zbraní
|
||||
#. I18N: ./data/gui/help3.stkgui
|
||||
#. I18N: In the help menu
|
||||
msgid "Time Trial: Contains no powerups, so only your driving skills matter!"
|
||||
msgstr "Preteky na čas: neobsahuje žiadne bonusy, takže záleží len na vašich vodičských skúsenostiach!"
|
||||
msgstr "Preteky na čas: Neobsahuje žiadne bonusy, takže záleží len na vašich vodičských skúsenostiach!"
|
||||
|
||||
#. I18N: ./data/gui/help3.stkgui
|
||||
#. I18N: In the help menu
|
||||
@ -736,7 +736,7 @@ msgid ""
|
||||
"keyboard(s), however each player will need a different set of keys, and keep"
|
||||
" in mind that most keyboards are not appropriate for multiplayer gameplay "
|
||||
"because they do not support large number of keypresses."
|
||||
msgstr "Najprv budete potrebovať niekoľko vstupných zariadení (viac gamepadov alebo joystickov je najlepší spôsob, ako hrať s viacerými ľuďmi). Choďte do konfigurácie vstupov a nastavte gamepady. Je tiež možné hrať na klávesnici(ach), avšak každý hráč bude potrebovať iný súbor klávesov. Pamätajte si, že väčšina klávesníc nie je vhodná pre hru pre viacerých hráčov, pretože nepodporuje veľké množstvo stlačení klávesov."
|
||||
msgstr "Najprv budete potrebovať niekoľko vstupných zariadení (najlepším spôsobom, ako hrať s viacerými ľuďmi, je mať viacero gamepadov alebo joystickov). Prejdite na obrazovku konfigurácie vstupov a nastavte gamepady. Okrem toho možno hrať na klávesnici(ach), avšak každý hráč bude potrebovať iný súbor klávesov. Pamätajte si, že väčšina klávesníc nie je vhodná pre hru s viacerými hráčmi, pretože nepodporuje veľké množstvo stlačení klávesov."
|
||||
|
||||
#. I18N: ./data/gui/help4.stkgui
|
||||
#. I18N: In the help menu
|
||||
@ -747,7 +747,7 @@ msgid ""
|
||||
" the game. Each player can use their input device to select their kart. The "
|
||||
"game continues when everyone selected their kart. Note that the mouse may "
|
||||
"not be used for this operation."
|
||||
msgstr ""
|
||||
msgstr "Po nakonfigurovaní vstupných zariadení môžete začať hrať. V hlavnej ponuke vyberte ikonu pretekov pre viacerých hráčov. Keď príde na rad výber motokáry, každý hráč bude môcť vstúpiť do hry stlačením tlačidla/klávesu „útok“ na svojom gamepade alebo klávesnici. Každý hráč môže na výber motokáry použiť svoje vlastné vstupné zariadenie. Hra bude pokračovať, keď si všetci hráči vyberú motokáry. Všimnite si, že na vykonanie tejto činnosti nemožno použiť myš."
|
||||
|
||||
#. I18N: ./data/gui/karts.stkgui
|
||||
#. I18N: In the kart selection (player setup) screen
|
||||
@ -1852,7 +1852,7 @@ msgstr "Pravé tlačidlo myši"
|
||||
#: src/input/binding.cpp:118
|
||||
msgctxt "input_key"
|
||||
msgid "Cancel"
|
||||
msgstr ""
|
||||
msgstr "Cancel"
|
||||
|
||||
#. I18N: input configuration screen: mouse button
|
||||
#: src/input/binding.cpp:120
|
||||
@ -1888,7 +1888,7 @@ msgstr "Tab"
|
||||
#: src/input/binding.cpp:130
|
||||
msgctxt "input_key"
|
||||
msgid "Clear"
|
||||
msgstr ""
|
||||
msgstr "Clear"
|
||||
|
||||
#. I18N: input configuration screen: keyboard key
|
||||
#: src/input/binding.cpp:132
|
||||
@ -1943,7 +1943,7 @@ msgstr "Junja"
|
||||
#: src/input/binding.cpp:149
|
||||
msgctxt "input_key"
|
||||
msgid "Final"
|
||||
msgstr ""
|
||||
msgstr "Final"
|
||||
|
||||
#. I18N: input configuration screen: keyboard key
|
||||
#: src/input/binding.cpp:151
|
||||
@ -1967,7 +1967,7 @@ msgstr "Nonconvert"
|
||||
#: src/input/binding.cpp:157
|
||||
msgctxt "input_key"
|
||||
msgid "Accept"
|
||||
msgstr ""
|
||||
msgstr "Accept"
|
||||
|
||||
#. I18N: input configuration screen: keyboard key
|
||||
#: src/input/binding.cpp:159
|
||||
@ -2033,13 +2033,13 @@ msgstr "Šípka nadol"
|
||||
#: src/input/binding.cpp:179
|
||||
msgctxt "input_key"
|
||||
msgid "Select"
|
||||
msgstr ""
|
||||
msgstr "Select"
|
||||
|
||||
#. I18N: input configuration screen: keyboard key
|
||||
#: src/input/binding.cpp:181
|
||||
msgctxt "input_key"
|
||||
msgid "Print"
|
||||
msgstr ""
|
||||
msgstr "Print"
|
||||
|
||||
#. I18N: input configuration screen: keyboard key
|
||||
#: src/input/binding.cpp:183
|
||||
@ -2069,7 +2069,7 @@ msgstr "Delete"
|
||||
#: src/input/binding.cpp:191
|
||||
msgctxt "input_key"
|
||||
msgid "Help"
|
||||
msgstr ""
|
||||
msgstr "Help"
|
||||
|
||||
#. I18N: input configuration screen: keyboard key
|
||||
#: src/input/binding.cpp:229
|
||||
@ -2087,7 +2087,7 @@ msgstr "Pravé logo"
|
||||
#: src/input/binding.cpp:233
|
||||
msgctxt "input_key"
|
||||
msgid "Apps"
|
||||
msgstr ""
|
||||
msgstr "Apps"
|
||||
|
||||
#. I18N: input configuration screen: keyboard key
|
||||
#: src/input/binding.cpp:235
|
||||
@ -2159,7 +2159,7 @@ msgstr "9 na num. klávesnici"
|
||||
#: src/input/binding.cpp:259
|
||||
msgctxt "input_key"
|
||||
msgid "Separator"
|
||||
msgstr ""
|
||||
msgstr "Separator"
|
||||
|
||||
#. I18N: input configuration screen: keyboard key
|
||||
#: src/input/binding.cpp:261
|
||||
@ -2171,7 +2171,7 @@ msgstr "- (odčítanie)"
|
||||
#: src/input/binding.cpp:263
|
||||
msgctxt "input_key"
|
||||
msgid "Decimal"
|
||||
msgstr ""
|
||||
msgstr "Decimal"
|
||||
|
||||
#. I18N: input configuration screen: keyboard key
|
||||
#: src/input/binding.cpp:265
|
||||
@ -2231,7 +2231,7 @@ msgstr "Pravé menu"
|
||||
#: src/input/binding.cpp:311
|
||||
msgctxt "input_key"
|
||||
msgid "Attn"
|
||||
msgstr ""
|
||||
msgstr "Attn"
|
||||
|
||||
#. I18N: input configuration screen: keyboard key
|
||||
#: src/input/binding.cpp:313
|
||||
@ -2255,13 +2255,13 @@ msgstr "Ereof"
|
||||
#: src/input/binding.cpp:319
|
||||
msgctxt "input_key"
|
||||
msgid "Play"
|
||||
msgstr ""
|
||||
msgstr "Play"
|
||||
|
||||
#. I18N: input configuration screen: keyboard key
|
||||
#: src/input/binding.cpp:321
|
||||
msgctxt "input_key"
|
||||
msgid "Zoom"
|
||||
msgstr ""
|
||||
msgstr "Zoom"
|
||||
|
||||
#. I18N: input configuration screen: keyboard key
|
||||
#: src/input/binding.cpp:323
|
||||
@ -2713,7 +2713,7 @@ msgstr "štandardné"
|
||||
#: src/states_screens/kart_selection.cpp:1452
|
||||
#: src/states_screens/race_setup_screen.cpp:214
|
||||
msgid "Locked : solve active challenges to gain access to more!"
|
||||
msgstr "Uzamknuté: vyriešte aktívne úlohy, aby ste získali prístup k ďalším!"
|
||||
msgstr "Uzamknuté: ak chcete získať prístup k ďalším, vyriešte aktívne výzvy!"
|
||||
|
||||
#: src/states_screens/arenas_screen.cpp:277
|
||||
msgid "Random Arena"
|
||||
@ -2726,7 +2726,7 @@ msgstr ""
|
||||
|
||||
#: src/states_screens/create_server_screen.cpp:117
|
||||
msgid "Creating server"
|
||||
msgstr ""
|
||||
msgstr "Vytvára sa server"
|
||||
|
||||
#: src/states_screens/create_server_screen.cpp:132
|
||||
msgid "Name has to be between 4 and 30 characters long!"
|
||||
@ -2922,7 +2922,7 @@ msgid ""
|
||||
"the box below, you are confirming that you understand these terms. If you "
|
||||
"have any questions or comments regarding these terms, one of the members of "
|
||||
"the development team would gladly assist you."
|
||||
msgstr ""
|
||||
msgstr "Prečítajte si podmienky a požiadavky SuperTuxKart na stránke '%s'. Ak chcete zaregistrovať svoj účet, musíte súhlasiť s týmito podmienkami. Začiarknutím dolného políčka potvrdíte, že s týmito podmienkami súhlasíte. Ak máte akékoľvek otázky alebo pripomienky týkajúce sa týchto podmienok, môžete sa obrátiť na niektorého člena nášho tímu, ktorý vám s radosťou pomôže."
|
||||
|
||||
#: src/states_screens/dialogs/select_challenge.cpp:53
|
||||
#, c-format
|
||||
@ -2954,7 +2954,7 @@ msgstr ""
|
||||
|
||||
#: src/states_screens/dialogs/server_info_dialog.cpp:155
|
||||
msgid "Joining server"
|
||||
msgstr ""
|
||||
msgstr "Pripája sa na server"
|
||||
|
||||
#: src/states_screens/dialogs/user_info_dialog.cpp:56
|
||||
msgid "Cancel Request"
|
||||
@ -3206,15 +3206,15 @@ msgstr "Offline"
|
||||
#: src/states_screens/online_screen.cpp:139
|
||||
#, c-format
|
||||
msgid "Logged in as: %s."
|
||||
msgstr ""
|
||||
msgstr "Ste prihlásený/-á ako: %s."
|
||||
|
||||
#: src/states_screens/online_screen.cpp:155
|
||||
msgid "Logging in"
|
||||
msgstr ""
|
||||
msgstr "Prihlasuje sa"
|
||||
|
||||
#: src/states_screens/online_screen.cpp:160
|
||||
msgid "Logging out"
|
||||
msgstr ""
|
||||
msgstr "Odhlasuje sa"
|
||||
|
||||
#: src/states_screens/online_user_search.cpp:208
|
||||
#: src/states_screens/online_user_search.cpp:288
|
||||
@ -3677,7 +3677,7 @@ msgstr "Uzamknuté!"
|
||||
|
||||
#: src/states_screens/tracks_screen.cpp:285
|
||||
msgid "Locked: solve active challenges to gain access to more!"
|
||||
msgstr ""
|
||||
msgstr "Uzamknuté: ak chcete získať prístup k ďalším, vyriešte aktívne výzvy!"
|
||||
|
||||
#. I18N: when showing who is the author of track '%s'
|
||||
#. I18N: (place %s where the name of the author should appear)
|
||||
|
@ -10,8 +10,8 @@ msgstr ""
|
||||
"Project-Id-Version: SuperTuxKart\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2015-09-26 00:20+1000\n"
|
||||
"PO-Revision-Date: 2015-09-26 09:35+0000\n"
|
||||
"Last-Translator: Auria <auria.mg@gmail.com>\n"
|
||||
"PO-Revision-Date: 2015-10-13 18:00+0000\n"
|
||||
"Last-Translator: Max Lyashuk <m_lyashuk@ukr.net>\n"
|
||||
"Language-Team: Ukrainian (http://www.transifex.com/supertuxkart/supertuxkart/language/uk/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
@ -2936,7 +2936,7 @@ msgstr "Необхідний час: %i"
|
||||
#: src/states_screens/dialogs/select_challenge.cpp:64
|
||||
#, c-format
|
||||
msgid "Required Nitro Points: %i"
|
||||
msgstr ""
|
||||
msgstr "Необхідна кількість азоту: %i"
|
||||
|
||||
#: src/states_screens/dialogs/select_challenge.cpp:68
|
||||
#, c-format
|
||||
|
@ -72,20 +72,18 @@ if __name__ == "__main__":
|
||||
all_authors = old_authors + new_authors;
|
||||
all_authors = sorted(all_authors, key=lambda x: x.lower())
|
||||
all_authors_string = reduce(lambda x,y: x+"\\n"+y, all_authors, "")
|
||||
|
||||
|
||||
credits_line = "msgstr \"Launchpad Contributions:%s\"\n"%all_authors_string
|
||||
# If no old authors exists, write a new entry:
|
||||
if contributions==-1:
|
||||
lines.append("\n")
|
||||
lines.append("#: src/states_screens/credits.cpp:209\n")
|
||||
lines.append("msgid \"translator-credits\"\n")
|
||||
|
||||
lines.append(credits_line)
|
||||
else:
|
||||
# Otherwise just delete the old contribution string
|
||||
# so that the new one can be appended below.
|
||||
del lines[contributions]
|
||||
# Otherwise just replace the old contribution string
|
||||
lines[contributions] = credits_line
|
||||
|
||||
# Append new author list
|
||||
lines.append("msgstr \"Launchpad Contributions:%s\"\n"%all_authors_string)
|
||||
|
||||
# Overwrite old file
|
||||
f = open(sys.argv[1], "w")
|
||||
|
@ -11,8 +11,8 @@ msgstr ""
|
||||
"Project-Id-Version: SuperTuxKart\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2015-09-26 00:20+1000\n"
|
||||
"PO-Revision-Date: 2015-09-26 09:36+0000\n"
|
||||
"Last-Translator: Auria <auria.mg@gmail.com>\n"
|
||||
"PO-Revision-Date: 2015-09-28 02:11+0000\n"
|
||||
"Last-Translator: Ben Au\n"
|
||||
"Language-Team: Chinese (China) (http://www.transifex.com/supertuxkart/supertuxkart/language/zh_CN/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
@ -2914,7 +2914,7 @@ msgid ""
|
||||
"the box below, you are confirming that you understand these terms. If you "
|
||||
"have any questions or comments regarding these terms, one of the members of "
|
||||
"the development team would gladly assist you."
|
||||
msgstr ""
|
||||
msgstr "请在“%s”阅读 SuperTuxKart 的服务条款。您必须同意这些条款以在 STK 上注册帐号。在勾选了下面的单选框后,您就确认您已经了解了这些条款。若您对这些条款有任何问题或意见,开发人员都会很乐意为您服务。"
|
||||
|
||||
#: src/states_screens/dialogs/select_challenge.cpp:53
|
||||
#, c-format
|
||||
|
@ -14,8 +14,8 @@ msgstr ""
|
||||
"Project-Id-Version: SuperTuxKart\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2015-09-26 00:20+1000\n"
|
||||
"PO-Revision-Date: 2015-09-27 04:03+0000\n"
|
||||
"Last-Translator: Jeff Huang <s8321414@gmail.com>\n"
|
||||
"PO-Revision-Date: 2015-10-08 17:31+0000\n"
|
||||
"Last-Translator: V字龍(Vdragon) <Vdragon.Taiwan@gmail.com>\n"
|
||||
"Language-Team: Chinese (Taiwan) (http://www.transifex.com/supertuxkart/supertuxkart/language/zh_TW/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
@ -1057,7 +1057,7 @@ msgstr "變更"
|
||||
#. I18N: ./data/gui/online/recovery_input.stkgui
|
||||
#. I18N: In the recovery dialog
|
||||
msgid "Account Recovery"
|
||||
msgstr "帳號恢復"
|
||||
msgstr "帳號救援"
|
||||
|
||||
#. I18N: ./data/gui/online/recovery_info.stkgui
|
||||
#. I18N: In the recovery dialog
|
||||
|
7
data/shaders/lightning.frag
Normal file
@ -0,0 +1,7 @@
|
||||
uniform vec3 intensity;
|
||||
out vec4 FragColor;
|
||||
|
||||
void main()
|
||||
{
|
||||
FragColor = vec4(intensity, 1.0f);
|
||||
}
|
@ -2,9 +2,7 @@ layout(triangles) in;
|
||||
layout(triangle_strip, max_vertices=3) out;
|
||||
|
||||
in int layer[3];
|
||||
in vec2 uv_in[3];
|
||||
flat out int slice;
|
||||
out vec2 uv;
|
||||
|
||||
void main(void)
|
||||
{
|
||||
@ -12,7 +10,6 @@ void main(void)
|
||||
for(int i=0; i<3; i++)
|
||||
{
|
||||
slice = layer[0];
|
||||
uv = uv_in[i];
|
||||
gl_Position = gl_in[i].gl_Position;
|
||||
EmitVertex();
|
||||
}
|
||||
|
BIN
data/ttf/FreeSans.ttf
Normal file
BIN
data/ttf/FreeSansBold.ttf
Normal file
12
data/ttf/LICENSE
Normal file
@ -0,0 +1,12 @@
|
||||
GNU FreeFont (FreeSans, FreeSansBold) is released under the GPLv3
|
||||
|
||||
wqyMicroHei is released under the GPLv3 with font embedding exception and Apache-2.0 licenses
|
||||
By Qianqian Fang and The WenQuanYi Project Contributors
|
||||
Copyright (C) 2008-2009 The WenQuanYi Project Board of Trustees
|
||||
Copyright (C) 2007 Google Corporation
|
||||
|
||||
Noto Naskh Arabic UI is released under Apache-2.0 license
|
||||
|
||||
Ubuntu font is released under the ubuntu font license (http://font.ubuntu.com/licence/)
|
||||
|
||||
SigmarOne is released under the SIL open font license 1.1 ( https://www.google.com/fonts/specimen/Sigmar+One )
|
BIN
data/ttf/NotoNaskhArabicUI-Bold.ttf
Normal file
44
data/ttf/SIL Open Font License.txt
Normal file
@ -0,0 +1,44 @@
|
||||
Copyright (c) 2011, Vernon Adams (vern@newtypography.co.uk),
|
||||
with Reserved Font Name Sigmar One.
|
||||
|
||||
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
||||
This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL
|
||||
|
||||
-----------------------------------------------------------
|
||||
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
||||
-----------------------------------------------------------
|
||||
|
||||
PREAMBLE
|
||||
The goals of the Open Font License (OFL) are to stimulate worldwide development of collaborative font projects, to support the font creation efforts of academic and linguistic communities, and to provide a free and open framework in which fonts may be shared and improved in partnership with others.
|
||||
|
||||
The OFL allows the licensed fonts to be used, studied, modified and redistributed freely as long as they are not sold by themselves. The fonts, including any derivative works, can be bundled, embedded, redistributed and/or sold with any software provided that any reserved names are not used by derivative works. The fonts and derivatives, however, cannot be released under any other type of license. The requirement for fonts to remain under this license does not apply to any document created using the fonts or their derivatives.
|
||||
|
||||
DEFINITIONS
|
||||
"Font Software" refers to the set of files released by the Copyright Holder(s) under this license and clearly marked as such. This may include source files, build scripts and documentation.
|
||||
|
||||
"Reserved Font Name" refers to any names specified as such after the copyright statement(s).
|
||||
|
||||
"Original Version" refers to the collection of Font Software components as distributed by the Copyright Holder(s).
|
||||
|
||||
"Modified Version" refers to any derivative made by adding to, deleting, or substituting -- in part or in whole -- any of the components of the Original Version, by changing formats or by porting the Font Software to a new environment.
|
||||
|
||||
"Author" refers to any designer, engineer, programmer, technical writer or other person who contributed to the Font Software.
|
||||
|
||||
PERMISSION & CONDITIONS
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of the Font Software, to use, study, copy, merge, embed, modify, redistribute, and sell modified and unmodified copies of the Font Software, subject to the following conditions:
|
||||
|
||||
1) Neither the Font Software nor any of its individual components, in Original or Modified Versions, may be sold by itself.
|
||||
|
||||
2) Original or Modified Versions of the Font Software may be bundled, redistributed and/or sold with any software, provided that each copy contains the above copyright notice and this license. These can be included either as stand-alone text files, human-readable headers or in the appropriate machine-readable metadata fields within text or binary files as long as those fields can be easily viewed by the user.
|
||||
|
||||
3) No Modified Version of the Font Software may use the Reserved Font Name(s) unless explicit written permission is granted by the corresponding Copyright Holder. This restriction only applies to the primary font name as presented to the users.
|
||||
|
||||
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font Software shall not be used to promote, endorse or advertise any Modified Version, except to acknowledge the contribution(s) of the Copyright Holder(s) and the Author(s) or with their explicit written permission.
|
||||
|
||||
5) The Font Software, modified or unmodified, in part or in whole, must be distributed entirely under this license, and must not be distributed under any other license. The requirement for fonts to remain under this license does not apply to any document created using the Font Software.
|
||||
|
||||
TERMINATION
|
||||
This license becomes null and void if any of the above conditions are not met.
|
||||
|
||||
DISCLAIMER
|
||||
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE.
|
BIN
data/ttf/SigmarOne.otf
Normal file
BIN
data/ttf/Ubuntu-B.ttf
Normal file
BIN
data/ttf/Ubuntu-R.ttf
Normal file
96
data/ttf/ubuntu-font-licence-1.0.txt
Normal file
@ -0,0 +1,96 @@
|
||||
-------------------------------
|
||||
UBUNTU FONT LICENCE Version 1.0
|
||||
-------------------------------
|
||||
|
||||
PREAMBLE
|
||||
This licence allows the licensed fonts to be used, studied, modified and
|
||||
redistributed freely. The fonts, including any derivative works, can be
|
||||
bundled, embedded, and redistributed provided the terms of this licence
|
||||
are met. The fonts and derivatives, however, cannot be released under
|
||||
any other licence. The requirement for fonts to remain under this
|
||||
licence does not require any document created using the fonts or their
|
||||
derivatives to be published under this licence, as long as the primary
|
||||
purpose of the document is not to be a vehicle for the distribution of
|
||||
the fonts.
|
||||
|
||||
DEFINITIONS
|
||||
"Font Software" refers to the set of files released by the Copyright
|
||||
Holder(s) under this licence and clearly marked as such. This may
|
||||
include source files, build scripts and documentation.
|
||||
|
||||
"Original Version" refers to the collection of Font Software components
|
||||
as received under this licence.
|
||||
|
||||
"Modified Version" refers to any derivative made by adding to, deleting,
|
||||
or substituting -- in part or in whole -- any of the components of the
|
||||
Original Version, by changing formats or by porting the Font Software to
|
||||
a new environment.
|
||||
|
||||
"Copyright Holder(s)" refers to all individuals and companies who have a
|
||||
copyright ownership of the Font Software.
|
||||
|
||||
"Substantially Changed" refers to Modified Versions which can be easily
|
||||
identified as dissimilar to the Font Software by users of the Font
|
||||
Software comparing the Original Version with the Modified Version.
|
||||
|
||||
To "Propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification and with or without charging
|
||||
a redistribution fee), making available to the public, and in some
|
||||
countries other activities as well.
|
||||
|
||||
PERMISSION & CONDITIONS
|
||||
This licence does not grant any rights under trademark law and all such
|
||||
rights are reserved.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a
|
||||
copy of the Font Software, to propagate the Font Software, subject to
|
||||
the below conditions:
|
||||
|
||||
1) Each copy of the Font Software must contain the above copyright
|
||||
notice and this licence. These can be included either as stand-alone
|
||||
text files, human-readable headers or in the appropriate machine-
|
||||
readable metadata fields within text or binary files as long as those
|
||||
fields can be easily viewed by the user.
|
||||
|
||||
2) The font name complies with the following:
|
||||
(a) The Original Version must retain its name, unmodified.
|
||||
(b) Modified Versions which are Substantially Changed must be renamed to
|
||||
avoid use of the name of the Original Version or similar names entirely.
|
||||
(c) Modified Versions which are not Substantially Changed must be
|
||||
renamed to both (i) retain the name of the Original Version and (ii) add
|
||||
additional naming elements to distinguish the Modified Version from the
|
||||
Original Version. The name of such Modified Versions must be the name of
|
||||
the Original Version, with "derivative X" where X represents the name of
|
||||
the new work, appended to that name.
|
||||
|
||||
3) The name(s) of the Copyright Holder(s) and any contributor to the
|
||||
Font Software shall not be used to promote, endorse or advertise any
|
||||
Modified Version, except (i) as required by this licence, (ii) to
|
||||
acknowledge the contribution(s) of the Copyright Holder(s) or (iii) with
|
||||
their explicit written permission.
|
||||
|
||||
4) The Font Software, modified or unmodified, in part or in whole, must
|
||||
be distributed entirely under this licence, and must not be distributed
|
||||
under any other licence. The requirement for fonts to remain under this
|
||||
licence does not affect any document created using the Font Software,
|
||||
except any version of the Font Software extracted from a document
|
||||
created using the Font Software may only be distributed under this
|
||||
licence.
|
||||
|
||||
TERMINATION
|
||||
This licence becomes null and void if any of the above conditions are
|
||||
not met.
|
||||
|
||||
DISCLAIMER
|
||||
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
|
||||
COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
||||
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
||||
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER
|
||||
DEALINGS IN THE FONT SOFTWARE.
|
BIN
data/ttf/wqy-microhei.ttf
Normal file
@ -6,3 +6,4 @@ stk release svn version of assets
|
||||
0.8.2-beta2 needs r15985
|
||||
0.9 needs r16279
|
||||
0.9.1-rc1 needs r16470
|
||||
0.9.1 needs r16503
|
||||
|
@ -58,15 +58,24 @@ static inline void btAlignedFreeDefault(void *ptr)
|
||||
free(ptr);
|
||||
}
|
||||
#else
|
||||
|
||||
static inline void *btAlignedAllocDefault(size_t size, int alignment)
|
||||
{
|
||||
void *ret;
|
||||
char *real;
|
||||
#ifdef __MINGW64__
|
||||
uintptr_t offset;
|
||||
#else
|
||||
unsigned long offset;
|
||||
#endif
|
||||
|
||||
real = (char *)sAllocFunc(size + sizeof(void *) + (alignment-1));
|
||||
if (real) {
|
||||
#ifdef __MINGW64__
|
||||
offset = (alignment - (uintptr_t)(real + sizeof(void *))) & (alignment-1);
|
||||
#else
|
||||
offset = (alignment - (unsigned long)(real + sizeof(void *))) & (alignment-1);
|
||||
#endif
|
||||
ret = (void *)((real + sizeof(void *)) + offset);
|
||||
*((void **)(ret)-1) = (void *)(real);
|
||||
} else {
|
||||
|
@ -213,7 +213,11 @@ protected:
|
||||
|
||||
int *intPtr=0;
|
||||
short *shtPtr=0;
|
||||
#ifdef __MINGW64__
|
||||
char *cp = 0;int dataLen =0;intptr_t nr=0;
|
||||
#else
|
||||
char *cp = 0;int dataLen =0;long nr=0;
|
||||
#endif
|
||||
intPtr = (int*)m_dna;
|
||||
|
||||
/*
|
||||
@ -247,7 +251,11 @@ protected:
|
||||
cp++;
|
||||
}
|
||||
{
|
||||
#ifdef __MINGW64__
|
||||
nr= (intptr_t)cp;
|
||||
#else
|
||||
nr= (long)cp;
|
||||
#endif
|
||||
// long mask=3;
|
||||
nr= ((nr+3)&~3)-nr;
|
||||
while (nr--)
|
||||
@ -282,7 +290,11 @@ protected:
|
||||
}
|
||||
|
||||
{
|
||||
#ifdef __MINGW64__
|
||||
nr= (intptr_t)cp;
|
||||
#else
|
||||
nr= (long)cp;
|
||||
#endif
|
||||
// long mask=3;
|
||||
nr= ((nr+3)&~3)-nr;
|
||||
while (nr--)
|
||||
|
@ -501,7 +501,7 @@ if(APPLE)
|
||||
set_source_files_properties(source/Irrlicht/MacOSX/OSXClipboard.mm PROPERTIES LANGUAGE C)
|
||||
endif()
|
||||
|
||||
add_library(stkirrlicht ${IRRLICHT_SOURCES})
|
||||
add_library(stkirrlicht STATIC ${IRRLICHT_SOURCES})
|
||||
target_link_libraries(stkirrlicht ${PNG_LIBRARY} ${JPEG_LIBRARY} ${ZLIB_LIBRARY})
|
||||
|
||||
|
||||
|
@ -917,25 +917,12 @@ bool CIrrDeviceLinux::createWindow()
|
||||
XFlush(display);
|
||||
#endif
|
||||
|
||||
// Workaround for Gnome which sometimes creates window smaller than display
|
||||
XSizeHints *hints = XAllocSizeHints();
|
||||
hints->flags=PMinSize;
|
||||
hints->min_width=Width;
|
||||
hints->min_height=Height;
|
||||
XSetWMNormalHints(display, window, hints);
|
||||
XFree(hints);
|
||||
|
||||
// Set the fullscreen mode via the window manager. This allows alt-tabing, volume hot keys & others.
|
||||
// Get the needed atom from there freedesktop names
|
||||
Atom WMStateAtom = XInternAtom(display, "_NET_WM_STATE", true);
|
||||
Atom WMFullscreenAtom = XInternAtom(display, "_NET_WM_STATE_FULLSCREEN", true);
|
||||
// Set the fullscreen property
|
||||
XChangeProperty(display, window, WMStateAtom, XA_ATOM, 32, PropModeReplace,
|
||||
reinterpret_cast<unsigned char*>(&WMFullscreenAtom), 1);
|
||||
|
||||
// Notify the root window
|
||||
XEvent xev = {0}; // The event should be filled with zeros before setting its attributes
|
||||
|
||||
xev.type = ClientMessage;
|
||||
xev.xclient.window = window;
|
||||
xev.xclient.message_type = WMStateAtom;
|
||||
@ -946,6 +933,47 @@ bool CIrrDeviceLinux::createWindow()
|
||||
SubstructureRedirectMask | SubstructureNotifyMask, &xev);
|
||||
|
||||
XFlush(display);
|
||||
|
||||
// Wait until window state is already changed to fullscreen
|
||||
bool fullscreen = false;
|
||||
for (int i = 0; i < 500; i++)
|
||||
{
|
||||
Atom type;
|
||||
int format;
|
||||
unsigned long numItems, bytesAfter;
|
||||
unsigned char* data = NULL;
|
||||
|
||||
int s = XGetWindowProperty(display, window, WMStateAtom,
|
||||
0l, 1024, False, XA_ATOM, &type,
|
||||
&format, &numItems, &bytesAfter,
|
||||
&data);
|
||||
|
||||
if (s == Success)
|
||||
{
|
||||
Atom* atoms = (Atom*)data;
|
||||
|
||||
for (unsigned int i = 0; i < numItems; ++i)
|
||||
{
|
||||
if (atoms[i] == WMFullscreenAtom)
|
||||
{
|
||||
fullscreen = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
XFree(data);
|
||||
|
||||
if (fullscreen == true)
|
||||
break;
|
||||
|
||||
usleep(1000);
|
||||
}
|
||||
|
||||
if (!fullscreen)
|
||||
{
|
||||
os::Printer::log("Warning! Got timeout while checking fullscreen sate", ELL_WARNING);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1,5 +1,5 @@
|
||||
# Modify this file to change the last-modified date when you add/remove a file.
|
||||
# This will then trigger a new cmake run automatically.
|
||||
# This will then trigger a new cmake run automatically.
|
||||
file(GLOB_RECURSE STK_HEADERS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "src/*.hpp")
|
||||
file(GLOB_RECURSE STK_SOURCES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "src/*.cpp")
|
||||
file(GLOB_RECURSE STK_SHADERS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "data/shaders/*")
|
||||
|
@ -65,6 +65,7 @@ SavedGrandPrix::SavedGPKart::SavedGPKart(GroupUserConfigParam * group,
|
||||
// ============================================================================
|
||||
SavedGrandPrix::SavedGrandPrix(unsigned int player_id,
|
||||
const std::string &gp_id,
|
||||
RaceManager::MinorRaceModeType race_type,
|
||||
RaceManager::Difficulty difficulty,
|
||||
int player_karts,
|
||||
int last_track,
|
||||
@ -74,6 +75,7 @@ SavedGrandPrix::SavedGrandPrix(unsigned int player_id,
|
||||
"Represents the saved state of a GP"),
|
||||
m_player_id(player_id, "player_id", &m_savedgp_group),
|
||||
m_gp_id(gp_id.c_str(), "gp_id", &m_savedgp_group),
|
||||
m_race_type((int)race_type,"race_type", &m_savedgp_group),
|
||||
m_difficulty((int)difficulty,"difficulty", &m_savedgp_group),
|
||||
m_player_karts(player_karts,"player_karts", &m_savedgp_group),
|
||||
m_next_track(last_track,"last_track", &m_savedgp_group),
|
||||
@ -98,6 +100,7 @@ SavedGrandPrix::SavedGrandPrix(const XMLNode* node)
|
||||
"Represents the saved state of a GP"),
|
||||
m_player_id (0, "player_id", &m_savedgp_group),
|
||||
m_gp_id ("-", "gp_id", &m_savedgp_group),
|
||||
m_race_type (0,"race_type", &m_savedgp_group),
|
||||
m_difficulty (0,"difficulty", &m_savedgp_group),
|
||||
m_player_karts(0,"player_karts", &m_savedgp_group),
|
||||
m_next_track (0,"last_track", &m_savedgp_group),
|
||||
@ -106,6 +109,7 @@ SavedGrandPrix::SavedGrandPrix(const XMLNode* node)
|
||||
//m_player_group.findYourDataInAChildOf(node);
|
||||
m_player_id. findYourDataInAnAttributeOf(node);
|
||||
m_gp_id. findYourDataInAnAttributeOf(node);
|
||||
m_race_type. findYourDataInAnAttributeOf(node);
|
||||
m_difficulty. findYourDataInAnAttributeOf(node);
|
||||
m_player_karts.findYourDataInAnAttributeOf(node);
|
||||
m_next_track. findYourDataInAnAttributeOf(node);
|
||||
@ -181,5 +185,7 @@ void SavedGrandPrix::loadKarts(std::vector<RaceManager::KartStatus> & kart_list)
|
||||
} // if m_local_player_id == -1
|
||||
} // for i
|
||||
|
||||
std::sort(kart_list.begin(), kart_list.end(), cmp__l);
|
||||
// The line below causes issues in follow the leader race. The leader
|
||||
// is not at first place anymore.
|
||||
// std::sort(kart_list.begin(), kart_list.end(), cmp__l);
|
||||
} // loadKarts
|
||||
|
@ -66,6 +66,9 @@ protected:
|
||||
|
||||
/** Identifier of this GP. */
|
||||
StringUserConfigParam m_gp_id;
|
||||
|
||||
/** Race type at which this GP was run. */
|
||||
IntUserConfigParam m_race_type;
|
||||
|
||||
/** Difficulty at which this GP was run. */
|
||||
IntUserConfigParam m_difficulty;
|
||||
@ -88,6 +91,7 @@ public:
|
||||
*/
|
||||
SavedGrandPrix(unsigned int player_id,
|
||||
const std::string &gp_id,
|
||||
RaceManager::MinorRaceModeType race_type,
|
||||
RaceManager::Difficulty difficulty,
|
||||
int player_karts,
|
||||
int last_track,
|
||||
@ -110,6 +114,10 @@ public:
|
||||
/** Returns the grand prix id. */
|
||||
std::string getGPID() const { return m_gp_id; }
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
/** Returns the race type of this GP. */
|
||||
int getRaceType() const { return m_race_type; }
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
/** Returns the difficulty of this GP. */
|
||||
int getDifficulty() const { return m_difficulty; }
|
||||
@ -148,12 +156,14 @@ public:
|
||||
* NULL if no matching GP was found. */
|
||||
static SavedGrandPrix* getSavedGP(unsigned int player,
|
||||
const std::string &gpid,
|
||||
RaceManager::MinorRaceModeType race_type,
|
||||
const unsigned int number_of_players)
|
||||
{
|
||||
for (unsigned int n=0; n<UserConfigParams::m_saved_grand_prix_list.size(); n++)
|
||||
{
|
||||
SavedGrandPrix* gp = &UserConfigParams::m_saved_grand_prix_list[n];
|
||||
if (gp->getGPID() == gpid &&
|
||||
gp->getRaceType() == race_type &&
|
||||
gp->getPlayerID() == player &&
|
||||
gp->getPlayerKarts() == (int)number_of_players)
|
||||
return gp;
|
||||
|
@ -626,12 +626,12 @@ namespace UserConfigParams
|
||||
PARAM_DEFAULT( BoolUserConfigParam(true, "weather_gfx",
|
||||
&m_graphics_quality, "Weather effects") );
|
||||
PARAM_PREFIX IntUserConfigParam m_show_steering_animations
|
||||
PARAM_DEFAULT( IntUserConfigParam(ANIMS_ALL,
|
||||
PARAM_DEFAULT( IntUserConfigParam(ANIMS_PLAYERS_ONLY,
|
||||
"steering_animations", &m_graphics_quality,
|
||||
"Whether to display kart animations (0=disabled for all; "
|
||||
"1=enabled for humans, disabled for AIs; 2=enabled for all") );
|
||||
PARAM_PREFIX IntUserConfigParam m_anisotropic
|
||||
PARAM_DEFAULT( IntUserConfigParam(8, "anisotropic",
|
||||
PARAM_DEFAULT( IntUserConfigParam(4, "anisotropic",
|
||||
&m_graphics_quality,
|
||||
"Quality of anisotropic filtering (usual values include 2-4-8-16; 0 to disable)") );
|
||||
PARAM_PREFIX BoolUserConfigParam m_trilinear
|
||||
@ -666,7 +666,7 @@ namespace UserConfigParams
|
||||
"shadows_resoltion", &m_graphics_quality,
|
||||
"Shadow resolution (0 = disabled") );
|
||||
PARAM_PREFIX BoolUserConfigParam m_degraded_IBL
|
||||
PARAM_DEFAULT(BoolUserConfigParam(false,
|
||||
PARAM_DEFAULT(BoolUserConfigParam(true,
|
||||
"Degraded_IBL", &m_graphics_quality,
|
||||
"Disable specular IBL"));
|
||||
|
||||
|
@ -98,6 +98,7 @@ GPUTimer m_perf_query[Q_LAST];
|
||||
|
||||
const int MIN_SUPPORTED_HEIGHT = 768;
|
||||
const int MIN_SUPPORTED_WIDTH = 1024;
|
||||
const bool ALLOW_1280_X_720 = true;
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
/** The constructor creates the irrlicht device. It first creates a NULL
|
||||
@ -319,8 +320,9 @@ void IrrDriver::createListOfVideoModes()
|
||||
{
|
||||
const int w = modes->getVideoModeResolution(i).Width;
|
||||
const int h = modes->getVideoModeResolution(i).Height;
|
||||
if ( (h < MIN_SUPPORTED_HEIGHT || w < MIN_SUPPORTED_WIDTH) &&
|
||||
( ! (h==600 && w==800 && UserConfigParams::m_artist_debug_mode) ) )
|
||||
if ((h < MIN_SUPPORTED_HEIGHT || w < MIN_SUPPORTED_WIDTH) &&
|
||||
(!(h==600 && w==800 && UserConfigParams::m_artist_debug_mode) &&
|
||||
(!(h==720 && w==1280 && ALLOW_1280_X_720 == true))))
|
||||
continue;
|
||||
|
||||
VideoMode mode(w, h);
|
||||
@ -1383,7 +1385,11 @@ scene::ISceneNode *IrrDriver::addSkyBox(const std::vector<video::ITexture*> &tex
|
||||
{
|
||||
assert(texture.size() == 6);
|
||||
|
||||
m_skybox = new Skybox(texture);
|
||||
if (CVS->isGLSL())
|
||||
{
|
||||
m_skybox = new Skybox(texture);
|
||||
}
|
||||
|
||||
if(spherical_harmonics_textures.size() == 6)
|
||||
{
|
||||
m_spherical_harmonics->setTextures(spherical_harmonics_textures);
|
||||
|
@ -554,6 +554,10 @@ public:
|
||||
m_boundingboxesviz = false;
|
||||
}
|
||||
// ------------------------------------------------------------------------
|
||||
void toggleWireframe() { m_renderer->toggleWireframe(); }
|
||||
// ------------------------------------------------------------------------
|
||||
void toggleMipVisualization() { m_renderer->toggleMipVisualization(); }
|
||||
// ------------------------------------------------------------------------
|
||||
void toggleNormals() { m_normals = !m_normals; }
|
||||
// ------------------------------------------------------------------------
|
||||
bool getNormals() { return m_normals; }
|
||||
|
@ -377,6 +377,7 @@ public:
|
||||
float getZipperMinSpeed() const { return m_zipper_min_speed; }
|
||||
// ------------------------------------------------------------------------
|
||||
ShaderType getShaderType() const { return m_shader_type; }
|
||||
void setShaderType(ShaderType st) { m_shader_type = st; }
|
||||
// ------------------------------------------------------------------------
|
||||
/** True if this texture should have the U coordinates mirrored. */
|
||||
char getMirrorAxisInReverse() const { return m_mirror_axis_when_reverse; }
|
||||
|
@ -24,8 +24,10 @@
|
||||
|
||||
#include "config/user_config.hpp"
|
||||
#include "graphics/material.hpp"
|
||||
#include "graphics/shaders.hpp"
|
||||
#include "io/file_manager.hpp"
|
||||
#include "io/xml_node.hpp"
|
||||
#include "modes/profile_world.hpp"
|
||||
#include "modes/world.hpp"
|
||||
#include "tracks/track.hpp"
|
||||
#include "utils/string_utils.hpp"
|
||||
@ -40,7 +42,6 @@ MaterialManager::MaterialManager()
|
||||
{
|
||||
/* Create list - and default material zero */
|
||||
|
||||
m_default_material = NULL;
|
||||
m_materials.reserve(256);
|
||||
// We can't call init/loadMaterial here, since the global variable
|
||||
// material_manager has not yet been initialised, and
|
||||
@ -67,7 +68,7 @@ Material* MaterialManager::getMaterialFor(video::ITexture* t,
|
||||
scene::IMeshBuffer *mb)
|
||||
{
|
||||
if (t == NULL)
|
||||
return m_default_material;
|
||||
return getDefaultMaterial(mb->getMaterial().MaterialType);
|
||||
|
||||
core::stringc img_path = core::stringc(t->getName());
|
||||
const std::string image = StringUtils::getBasename(img_path.c_str());
|
||||
@ -92,7 +93,8 @@ Material* MaterialManager::getMaterialFor(video::ITexture* t,
|
||||
}
|
||||
} // for i
|
||||
}
|
||||
return m_default_material;
|
||||
|
||||
return getDefaultMaterial(mb->getMaterial().MaterialType);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
@ -111,53 +113,46 @@ void MaterialManager::setAllMaterialFlags(video::ITexture* t,
|
||||
return;
|
||||
}
|
||||
|
||||
if (m_default_material == NULL)
|
||||
m_default_material = new Material("", false, false, false);
|
||||
m_default_material->setMaterialProperties(&(mb->getMaterial()), mb);
|
||||
|
||||
/*
|
||||
// This material does not appear in materials.xml. Set some common flags...
|
||||
if (UserConfigParams::m_anisotropic > 0)
|
||||
{
|
||||
for (u32 i=0; i<video::MATERIAL_MAX_TEXTURES; ++i)
|
||||
{
|
||||
mb->getMaterial().TextureLayer[i].AnisotropicFilter =
|
||||
UserConfigParams::m_anisotropic;
|
||||
}
|
||||
}
|
||||
else if (UserConfigParams::m_trilinear)
|
||||
{
|
||||
mb->getMaterial().setFlag(video::EMF_TRILINEAR_FILTER, true);
|
||||
}
|
||||
|
||||
mb->getMaterial().ColorMaterial = video::ECM_DIFFUSE_AND_AMBIENT;
|
||||
|
||||
if (World::getWorld() != NULL)
|
||||
{
|
||||
mb->getMaterial().FogEnable = World::getWorld()->isFogEnabled();
|
||||
}
|
||||
|
||||
|
||||
// Modify lightmap materials so that vertex colors are taken into account.
|
||||
// But disable lighting because we assume all lighting is already part
|
||||
// of the lightmap
|
||||
if (mb->getMaterial().MaterialType == video::EMT_LIGHTMAP)
|
||||
{
|
||||
mb->getMaterial().MaterialType = video::EMT_LIGHTMAP_LIGHTING;
|
||||
mb->getMaterial().AmbientColor = video::SColor(255, 255, 255, 255);
|
||||
mb->getMaterial().DiffuseColor = video::SColor(255, 255, 255, 255);
|
||||
mb->getMaterial().EmissiveColor = video::SColor(255, 255, 255, 255);
|
||||
mb->getMaterial().SpecularColor = video::SColor(255, 255, 255, 255);
|
||||
}
|
||||
|
||||
|
||||
//if (UserConfigParams::m_fullscreen_antialiasing)
|
||||
// mb->getMaterial().AntiAliasing = video::EAAM_LINE_SMOOTH;
|
||||
*/
|
||||
Material* default_material = getDefaultMaterial(mb->getMaterial().MaterialType);
|
||||
default_material->setMaterialProperties(&(mb->getMaterial()), mb);
|
||||
} // setAllMaterialFlags
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
Material* MaterialManager::getDefaultMaterial(video::E_MATERIAL_TYPE shader_type)
|
||||
{
|
||||
auto it = m_default_materials.find(shader_type);
|
||||
if (it == m_default_materials.end())
|
||||
{
|
||||
Material* default_material = new Material("", false, false, false);
|
||||
|
||||
// TODO: workaround, should not hardcode these material types here?
|
||||
// Try to find a cleaner way
|
||||
// If graphics are disabled, shaders should not be accessed (getShader
|
||||
// asserts that shaders are initialised).
|
||||
if(!ProfileWorld::isNoGraphics() &&
|
||||
shader_type == Shaders::getShader(ShaderType::ES_OBJECT_UNLIT))
|
||||
default_material->setShaderType(Material::SHADERTYPE_SOLID_UNLIT);
|
||||
else if (!ProfileWorld::isNoGraphics() &&
|
||||
shader_type == Shaders::getShader(ShaderType::ES_OBJECTPASS_REF))
|
||||
default_material->setShaderType(Material::SHADERTYPE_ALPHA_TEST);
|
||||
//else if (!ProfileWorld::isNoGraphics() &&
|
||||
// shader_type == Shaders::getShader(ShaderType::ES_OBJECTPASS))
|
||||
// default_material->setShaderType(Material::SHADERTYPE_ALPHA_BLEND);
|
||||
else
|
||||
default_material->setShaderType(Material::SHADERTYPE_SOLID);
|
||||
|
||||
m_default_materials[shader_type] = default_material;
|
||||
return default_material;
|
||||
}
|
||||
else
|
||||
{
|
||||
return it->second;
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
void MaterialManager::adjustForFog(video::ITexture* t,
|
||||
scene::IMeshBuffer *mb,
|
||||
scene::ISceneNode* parent,
|
||||
@ -191,9 +186,8 @@ void MaterialManager::setAllUntexturedMaterialFlags(scene::IMeshBuffer *mb)
|
||||
material.MaterialType = irr::video::EMT_SOLID;
|
||||
}
|
||||
|
||||
if (m_default_material == NULL)
|
||||
m_default_material = new Material("", false, false, false);
|
||||
m_default_material->setMaterialProperties(&(mb->getMaterial()), mb);
|
||||
Material* default_material = getDefaultMaterial(mb->getMaterial().MaterialType);
|
||||
default_material->setMaterialProperties(&(mb->getMaterial()), mb);
|
||||
}
|
||||
//-----------------------------------------------------------------------------
|
||||
int MaterialManager::addEntity(Material *m)
|
||||
|
@ -24,13 +24,15 @@
|
||||
|
||||
namespace irr
|
||||
{
|
||||
namespace video { class ITexture; }
|
||||
namespace video { class ITexture; }
|
||||
namespace scene { class IMeshBuffer; class ISceneNode; }
|
||||
}
|
||||
using namespace irr;
|
||||
|
||||
#include <irrlicht.h>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
|
||||
class Material;
|
||||
class XMLReader;
|
||||
@ -48,7 +50,8 @@ private:
|
||||
|
||||
std::vector<Material*> m_materials;
|
||||
|
||||
Material* m_default_material;
|
||||
std::map<video::E_MATERIAL_TYPE, Material*> m_default_materials;
|
||||
Material* getDefaultMaterial(video::E_MATERIAL_TYPE material_type);
|
||||
|
||||
public:
|
||||
MaterialManager();
|
||||
|
@ -818,6 +818,24 @@ public:
|
||||
} // render
|
||||
}; // SunLightShader
|
||||
|
||||
// ============================================================================
|
||||
class LightningShader : public TextureShader<LightningShader, 1,
|
||||
core::vector3df>
|
||||
{
|
||||
public:
|
||||
LightningShader()
|
||||
{
|
||||
loadProgram(OBJECT, GL_VERTEX_SHADER, "screenquad.vert",
|
||||
GL_FRAGMENT_SHADER, "lightning.frag");
|
||||
assignUniforms("intensity");
|
||||
} // LightningShader
|
||||
// ------------------------------------------------------------------------
|
||||
void render(core::vector3df intensity)
|
||||
{
|
||||
drawFullScreenEffect(intensity);
|
||||
} // render
|
||||
}; // LightningShader
|
||||
|
||||
// ============================================================================
|
||||
|
||||
PostProcessing::PostProcessing(IVideoDriver* video_driver)
|
||||
@ -1408,6 +1426,18 @@ void PostProcessing::applyMLAA()
|
||||
glDisable(GL_STENCIL_TEST);
|
||||
} // applyMLAA
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
void PostProcessing::renderLightning(core::vector3df intensity)
|
||||
{
|
||||
glEnable(GL_BLEND);
|
||||
glBlendFunc(GL_ONE, GL_ONE);
|
||||
glBlendEquation(GL_FUNC_ADD);
|
||||
|
||||
LightningShader::getInstance()->render(intensity);
|
||||
|
||||
glDisable(GL_BLEND);
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
/** Render the post-processed scene */
|
||||
FrameBuffer *PostProcessing::render(scene::ICameraSceneNode * const camnode,
|
||||
|
@ -105,6 +105,7 @@ public:
|
||||
void renderMotionBlur(unsigned cam, const FrameBuffer &in_fbo,
|
||||
FrameBuffer &out_fbo);
|
||||
void renderGlow(unsigned tex);
|
||||
void renderLightning(core::vector3df intensity);
|
||||
|
||||
/** Render the post-processed scene */
|
||||
FrameBuffer *render(scene::ICameraSceneNode * const camnode, bool isRace);
|
||||
|
@ -65,6 +65,7 @@ GLuint ShaderBase::loadShader(const std::string &file, unsigned type)
|
||||
|
||||
std::ostringstream code;
|
||||
code << "#version " << CVS->getGLSLVersion()<<"\n";
|
||||
|
||||
if (CVS->isAMDVertexShaderLayerUsable())
|
||||
code << "#extension GL_AMD_vertex_shader_layer : enable\n";
|
||||
if (CVS->isAZDOEnabled())
|
||||
@ -79,6 +80,11 @@ GLuint ShaderBase::loadShader(const std::string &file, unsigned type)
|
||||
code << "#define VSLayer\n";
|
||||
if (CVS->needsRGBBindlessWorkaround())
|
||||
code << "#define SRGBBindlessFix\n";
|
||||
|
||||
//shader compilation fails with some drivers if there is no precision qualifier
|
||||
if (type == GL_FRAGMENT_SHADER)
|
||||
code << "precision mediump float;\n";
|
||||
|
||||
code << getHeader();
|
||||
|
||||
std::ifstream stream(file_manager->getShader(file), std::ios::in);
|
||||
|
@ -67,7 +67,7 @@ scene::IMesh* STKTextBillboard::getTextMesh(core::stringw text, gui::ScalableFon
|
||||
font->doDraw(text, core::rect<s32>(0, 0, size.Width, size.Height), video::SColor(255,255,255,255),
|
||||
false, false, NULL, this);
|
||||
|
||||
const float scale = 0.018f;
|
||||
const float scale = 0.03f;
|
||||
|
||||
//scene::SMesh* mesh = new scene::SMesh();
|
||||
std::map<video::ITexture*, scene::SMeshBuffer*> buffers;
|
||||
|
@ -688,6 +688,8 @@ namespace GUIEngine
|
||||
{
|
||||
IGUIEnvironment* g_env;
|
||||
Skin* g_skin = NULL;
|
||||
FTEnvironment* g_ft_env = NULL;
|
||||
GlyphPageCreator* g_gp_creator = NULL;
|
||||
ScalableFont *g_font;
|
||||
ScalableFont *g_outline_font;
|
||||
ScalableFont *g_large_font;
|
||||
@ -952,6 +954,11 @@ namespace GUIEngine
|
||||
//if (g_skin != NULL) delete g_skin;
|
||||
g_skin = NULL;
|
||||
|
||||
g_ft_env->~FTEnvironment();
|
||||
g_ft_env = NULL;
|
||||
g_gp_creator->~GlyphPageCreator();
|
||||
g_gp_creator = NULL;
|
||||
|
||||
for (unsigned int i=0; i<g_loaded_screens.size(); i++)
|
||||
{
|
||||
g_loaded_screens[i].unload();
|
||||
@ -982,6 +989,17 @@ namespace GUIEngine
|
||||
// kill everything along the device
|
||||
} // cleanUp
|
||||
|
||||
// -----------------------------------------------------------------------
|
||||
void cleanHollowCopyFont()
|
||||
{
|
||||
g_small_font->drop();
|
||||
g_small_font = NULL;
|
||||
g_large_font->drop();
|
||||
g_large_font = NULL;
|
||||
g_outline_font->drop();
|
||||
g_outline_font = NULL;
|
||||
} // cleanHollowCopyFont
|
||||
|
||||
// -----------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
@ -1009,6 +1027,9 @@ namespace GUIEngine
|
||||
g_focus_for_player[n] = NULL;
|
||||
}
|
||||
|
||||
g_ft_env = new FTEnvironment();
|
||||
g_gp_creator = new GlyphPageCreator();
|
||||
|
||||
/*
|
||||
To make the g_font a little bit nicer, we load an external g_font
|
||||
and set it as the new default g_font in the g_skin.
|
||||
@ -1042,45 +1063,25 @@ namespace GUIEngine
|
||||
}
|
||||
}
|
||||
|
||||
// font size is resolution-dependent.
|
||||
// normal text will range from 0.8, in 640x* resolutions (won't scale
|
||||
// below that) to 1.0, in 1024x* resolutions, and linearly up
|
||||
// normal text will range from 0.2, in 640x* resolutions (won't scale
|
||||
// below that) to 0.4, in 1024x* resolutions, and linearly up
|
||||
const int screen_width = irr_driver->getFrameSize().Width;
|
||||
const int screen_height = irr_driver->getFrameSize().Height;
|
||||
float scale = std::max(0, screen_width - 640)/564.0f;
|
||||
|
||||
// attempt to compensate for small screens
|
||||
if (screen_width < 1200) scale = std::max(0, screen_width - 640) / 750.0f;
|
||||
if (screen_width < 900 || screen_height < 700) scale = std::min(scale, 0.05f);
|
||||
|
||||
Log::info("GUIEngine", "scale: %f", scale);
|
||||
|
||||
float normal_text_scale = 0.7f + 0.2f*scale;
|
||||
float title_text_scale = 0.2f + 0.2f*scale;
|
||||
|
||||
ScalableFont* sfont =
|
||||
new ScalableFont(g_env,
|
||||
file_manager->getAssetChecked(FileManager::FONT,
|
||||
"StkFont.xml",true) );
|
||||
sfont->setScale(normal_text_scale);
|
||||
sfont->setKerningHeight(-5);
|
||||
g_font = sfont;
|
||||
|
||||
ScalableFont* digit_font =
|
||||
new ScalableFont(g_env,
|
||||
file_manager->getAssetChecked(FileManager::FONT,
|
||||
"BigDigitFont.xml",true));
|
||||
digit_font->lazyLoadTexture(0); // make sure the texture is loaded for this one
|
||||
ScalableFont* digit_font =new ScalableFont(g_env,T_DIGIT);
|
||||
digit_font->setMonospaceDigits(true);
|
||||
g_digit_font = digit_font;
|
||||
|
||||
ScalableFont* sfont2 =new ScalableFont(g_env,T_BOLD);
|
||||
sfont2->setKerningWidth(0);
|
||||
// Because the fallback font is much smaller than the title font:
|
||||
sfont2->m_fallback_font_scale = 2.0f;
|
||||
sfont2->m_fallback_kerning_width = 0;
|
||||
|
||||
ScalableFont* sfont =new ScalableFont(g_env,T_NORMAL);
|
||||
sfont->setKerningHeight(0);
|
||||
sfont->setScale(1);
|
||||
g_font = sfont;
|
||||
Private::font_height = g_font->getDimension( L"X" ).Height;
|
||||
|
||||
ScalableFont* sfont_larger = sfont->getHollowCopy();
|
||||
sfont_larger->setScale(normal_text_scale*1.4f);
|
||||
sfont_larger->setKerningHeight(-5);
|
||||
sfont_larger->setScale(1.4f);
|
||||
sfont_larger->setKerningHeight(0);
|
||||
g_large_font = sfont_larger;
|
||||
|
||||
g_outline_font = sfont->getHollowCopy();
|
||||
@ -1089,25 +1090,15 @@ namespace GUIEngine
|
||||
Private::large_font_height = g_large_font->getDimension( L"X" ).Height;
|
||||
|
||||
ScalableFont* sfont_smaller = sfont->getHollowCopy();
|
||||
sfont_smaller->setScale(normal_text_scale*0.8f);
|
||||
sfont_smaller->setKerningHeight(-5);
|
||||
sfont_smaller->setScale(0.8f);
|
||||
sfont_smaller->setKerningHeight(0);
|
||||
g_small_font = sfont_smaller;
|
||||
|
||||
Private::small_font_height =
|
||||
g_small_font->getDimension( L"X" ).Height;
|
||||
|
||||
|
||||
ScalableFont* sfont2 =
|
||||
new ScalableFont(g_env,
|
||||
file_manager->getAssetChecked(FileManager::FONT,
|
||||
"title_font.xml",
|
||||
true) );
|
||||
sfont2->m_fallback_font = sfont;
|
||||
// Because the fallback font is much smaller than the title font:
|
||||
sfont2->m_fallback_font_scale = 4.0f;
|
||||
sfont2->m_fallback_kerning_width = 15;
|
||||
sfont2->setScale(title_text_scale);
|
||||
sfont2->setKerningWidth(-18);
|
||||
sfont2->setScale(1);
|
||||
sfont2->m_black_border = true;
|
||||
g_title_font = sfont2;
|
||||
Private::title_font_height =
|
||||
@ -1125,6 +1116,32 @@ namespace GUIEngine
|
||||
g_device->getVideoDriver()->endScene();
|
||||
} // init
|
||||
|
||||
// -----------------------------------------------------------------------
|
||||
void reloadHollowCopyFont(irr::gui::ScalableFont* sfont)
|
||||
{
|
||||
//Base on the init function above
|
||||
sfont->setScale(1);
|
||||
sfont->setKerningHeight(0);
|
||||
Private::font_height = sfont->getDimension( L"X" ).Height;
|
||||
|
||||
ScalableFont* sfont_larger = sfont->getHollowCopy();
|
||||
sfont_larger->setScale(1.4f);
|
||||
sfont_larger->setKerningHeight(0);
|
||||
g_large_font = sfont_larger;
|
||||
|
||||
g_outline_font = sfont->getHollowCopy();
|
||||
g_outline_font->m_black_border = true;
|
||||
|
||||
Private::large_font_height = g_large_font->getDimension( L"X" ).Height;
|
||||
|
||||
ScalableFont* sfont_smaller = sfont->getHollowCopy();
|
||||
sfont_smaller->setScale(0.8f);
|
||||
sfont_smaller->setKerningHeight(0);
|
||||
g_small_font = sfont_smaller;
|
||||
|
||||
Private::small_font_height = g_small_font->getDimension( L"X" ).Height;
|
||||
} // reloadHollowCopyFont
|
||||
|
||||
// -----------------------------------------------------------------------
|
||||
void reloadSkin()
|
||||
{
|
||||
|
@ -39,6 +39,9 @@ namespace irr
|
||||
#include "utils/constants.hpp"
|
||||
#include "utils/ptr_vector.hpp"
|
||||
|
||||
#include "guiengine/ft_environment.hpp"
|
||||
#include "guiengine/glyph_page_creator.hpp"
|
||||
|
||||
/**
|
||||
* \ingroup guiengine
|
||||
* \brief Contains all GUI engine related classes and functions
|
||||
@ -81,6 +84,8 @@ namespace GUIEngine
|
||||
{
|
||||
extern irr::gui::IGUIEnvironment* g_env;
|
||||
extern Skin* g_skin;
|
||||
extern FTEnvironment* g_ft_env;
|
||||
extern GlyphPageCreator* g_gp_creator;
|
||||
extern irr::gui::ScalableFont* g_small_font;
|
||||
extern irr::gui::ScalableFont* g_font;
|
||||
extern irr::gui::ScalableFont* g_outline_font;
|
||||
@ -172,6 +177,18 @@ namespace GUIEngine
|
||||
*/
|
||||
inline Skin* getSkin() { return Private::g_skin; }
|
||||
|
||||
/**
|
||||
* \pre GUIEngine::init must have been called first
|
||||
* \return the freetype and library with face
|
||||
*/
|
||||
inline FTEnvironment* getFreetype() { return Private::g_ft_env; }
|
||||
|
||||
/**
|
||||
* \pre GUIEngine::init must have been called first
|
||||
* \return the glyph page creator, useful to create a glyph page from individual char
|
||||
*/
|
||||
inline GlyphPageCreator* getGlyphPageCreator() { return Private::g_gp_creator; }
|
||||
|
||||
Screen* getScreenNamed(const char* name);
|
||||
|
||||
/** \return the height of the title font in pixels */
|
||||
@ -247,6 +264,12 @@ namespace GUIEngine
|
||||
* \brief call when skin in user config was updated
|
||||
*/
|
||||
void reloadSkin();
|
||||
|
||||
/**
|
||||
* \brief call when translation in user config was updated for freetype rendering STK
|
||||
*/
|
||||
void cleanHollowCopyFont();
|
||||
void reloadHollowCopyFont(irr::gui::ScalableFont*);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
146
src/guiengine/ft_environment.cpp
Normal file
@ -0,0 +1,146 @@
|
||||
// SuperTuxKart - a fun racing game with go-kart
|
||||
// Copyright (C) 2015 Ben Au
|
||||
//
|
||||
// This 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; either version 3
|
||||
// of the License, or (at your option) any later version.
|
||||
//
|
||||
// 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 "graphics/irr_driver.hpp"
|
||||
#include "guiengine/ft_environment.hpp"
|
||||
#include "io/file_manager.hpp"
|
||||
#include "utils/log.hpp"
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
using namespace gui;
|
||||
|
||||
namespace GUIEngine
|
||||
{
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
FTEnvironment::FTEnvironment()
|
||||
{
|
||||
Log::info("Freetype Environment", "Loading fonts...");
|
||||
|
||||
checkError(FT_Init_FreeType(&m_ft_lib), "loading freetype library");
|
||||
|
||||
loadFont();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
FTEnvironment::~FTEnvironment()
|
||||
{
|
||||
for (int i = 0; i < F_COUNT; ++i)
|
||||
checkError(FT_Done_Face(m_ft_face[i]), "removing freetype face");
|
||||
|
||||
checkError(FT_Done_FreeType(m_ft_lib), "removing freetype library");
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
FT_Face FTEnvironment::getFace(const FontUse font)
|
||||
{
|
||||
return m_ft_face[font];
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
void FTEnvironment::checkError(FT_Error err, const irr::core::stringc desc)
|
||||
{
|
||||
if (err)
|
||||
{
|
||||
Log::error("Freetype Environment", "Something wrong when %s!", desc.c_str());
|
||||
}
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
void FTEnvironment::loadFont()
|
||||
{
|
||||
checkError(FT_New_Face(m_ft_lib, (file_manager->getAssetChecked
|
||||
(FileManager::TTF, "Ubuntu-R.ttf", true)).c_str(),
|
||||
0, &m_ft_face[F_DEFAULT]), "loading F_DEFAULT");
|
||||
|
||||
checkError(FT_New_Face(m_ft_lib, (file_manager->getAssetChecked
|
||||
(FileManager::TTF, "FreeSans.ttf",true)).c_str(),
|
||||
0, &m_ft_face[F_DEFAULT_FALLBACK]), "loading F_DEFAULT_FALLBACK");
|
||||
|
||||
checkError(FT_New_Face(m_ft_lib, (file_manager->getAssetChecked
|
||||
(FileManager::TTF, "wqy-microhei.ttf",true)).c_str(),
|
||||
0, &m_ft_face[F_CJK]), "loading F_CJK");
|
||||
|
||||
checkError(FT_New_Face(m_ft_lib, (file_manager->getAssetChecked
|
||||
(FileManager::TTF, "NotoNaskhArabicUI-Bold.ttf",true)).c_str(),
|
||||
0, &m_ft_face[F_AR]), "loading F_AR");
|
||||
|
||||
checkError(FT_New_Face(m_ft_lib, (file_manager->getAssetChecked
|
||||
(FileManager::TTF, "Ubuntu-B.ttf", true)).c_str(),
|
||||
0, &m_ft_face[F_BOLD]), "loading F_BOLD");
|
||||
|
||||
checkError(FT_New_Face(m_ft_lib, (file_manager->getAssetChecked
|
||||
(FileManager::TTF, "FreeSansBold.ttf", true)).c_str(),
|
||||
0, &m_ft_face[F_BOLD_FALLBACK]), "loading F_BOLD_FALLBACK");
|
||||
|
||||
checkError(FT_New_Face(m_ft_lib, (file_manager->getAssetChecked
|
||||
(FileManager::TTF, "SigmarOne.otf",true)).c_str(),
|
||||
0, &m_ft_face[F_DIGIT]), "loading F_DIGIT");
|
||||
|
||||
//Set charmap
|
||||
for (int h = 0; h < F_COUNT; ++h)
|
||||
{
|
||||
for (int i = 0; i < m_ft_face[h]->num_charmaps; ++i)
|
||||
{
|
||||
FT_UShort pid = m_ft_face[h]->charmaps[i]->platform_id;
|
||||
FT_UShort eid = m_ft_face[h]->charmaps[i]->encoding_id;
|
||||
if (((pid == 0) && (eid == 3)) || ((pid == 3) && (eid == 1)))
|
||||
checkError(FT_Set_Charmap(m_ft_face[h], m_ft_face[h]->charmaps[i]), "setting charmaps");
|
||||
}
|
||||
}
|
||||
|
||||
// Set face dpi
|
||||
// font size is resolution-dependent.
|
||||
// normal text will range from 0.8, in 640x* resolutions (won't scale
|
||||
// below that) to 1.0, in 1024x* resolutions, and linearly up
|
||||
// normal text will range from 0.2, in 640x* resolutions (won't scale
|
||||
// below that) to 0.4, in 1024x* resolutions, and linearly up
|
||||
const s32 screen_width = irr_driver->getFrameSize().Width;
|
||||
const s32 screen_height = irr_driver->getFrameSize().Height;
|
||||
float scale = std::max(0, screen_width - 640)/564.0f;
|
||||
|
||||
// attempt to compensate for small screens
|
||||
if (screen_width < 1200) scale = std::max(0, screen_width - 640) / 750.0f;
|
||||
if (screen_width < 900 || screen_height < 700) scale = std::min(scale, 0.05f);
|
||||
|
||||
const u32 normal_dpi = ((0.7f + 0.2f*scale)*27);
|
||||
const u32 title_dpi = ((0.2f + 0.2f*scale)*120);
|
||||
const u32 digit_dpi = ((0.7f + 0.2f*scale)*40);
|
||||
|
||||
Log::info("Freetype Environment", "DPI for Normal Font is %d.", normal_dpi);
|
||||
Log::info("Freetype Environment", "DPI for Title Font is %d.", title_dpi);
|
||||
Log::info("Freetype Environment", "DPI for Digit Font is %d.", digit_dpi);
|
||||
|
||||
checkError(FT_Set_Pixel_Sizes(m_ft_face[F_DEFAULT], 0, normal_dpi), "setting F_DEFAULT size");
|
||||
checkError(FT_Set_Pixel_Sizes(m_ft_face[F_DEFAULT_FALLBACK], 0, normal_dpi), "setting F_DEFAULT_FALLBACK size");
|
||||
checkError(FT_Set_Pixel_Sizes(m_ft_face[F_CJK], 0, normal_dpi), "setting F_CJK size");
|
||||
checkError(FT_Set_Pixel_Sizes(m_ft_face[F_AR], 0, normal_dpi), "setting F_AR size");
|
||||
checkError(FT_Set_Pixel_Sizes(m_ft_face[F_BOLD], 0, title_dpi), "setting F_BOLD size");
|
||||
checkError(FT_Set_Pixel_Sizes(m_ft_face[F_BOLD_FALLBACK], 0, title_dpi), "setting F_BOLD_FALLBACK size");
|
||||
checkError(FT_Set_Pixel_Sizes(m_ft_face[F_DIGIT], 0, digit_dpi), "setting F_DIGIT size");
|
||||
|
||||
}
|
||||
|
||||
FT_Library FTEnvironment::m_ft_lib = NULL;
|
||||
|
||||
} // guiengine
|
81
src/guiengine/ft_environment.hpp
Normal file
@ -0,0 +1,81 @@
|
||||
// SuperTuxKart - a fun racing game with go-kart
|
||||
// Copyright (C) 2015 Ben Au
|
||||
//
|
||||
// This 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; either version 3
|
||||
// of the License, or (at your option) any later version.
|
||||
//
|
||||
// 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 HEADER_FT_ENVIRONMENT_HPP
|
||||
#define HEADER_FT_ENVIRONMENT_HPP
|
||||
|
||||
#include <ft2build.h>
|
||||
#include FT_FREETYPE_H
|
||||
#include <irrlicht.h>
|
||||
|
||||
#include "utils/leak_check.hpp"
|
||||
|
||||
/**
|
||||
* \ingroup guiengine
|
||||
*/
|
||||
namespace GUIEngine
|
||||
{
|
||||
|
||||
enum FontUse
|
||||
{
|
||||
F_DEFAULT = 0,
|
||||
F_DEFAULT_FALLBACK = 1,
|
||||
F_CJK = 2,
|
||||
F_AR = 3,
|
||||
F_LAST_REGULAR_FONT = F_AR,
|
||||
|
||||
F_BOLD = 4,
|
||||
F_BOLD_FALLBACK = 5,
|
||||
F_DIGIT = 6,
|
||||
F_COUNT = 7
|
||||
};
|
||||
|
||||
enum TTFLoadingType {T_NORMAL, T_DIGIT, T_BOLD};
|
||||
|
||||
/**
|
||||
* \brief Initialize a freetype environment with a single freetype library.
|
||||
*/
|
||||
class FTEnvironment
|
||||
{
|
||||
public:
|
||||
|
||||
LEAK_CHECK()
|
||||
|
||||
FTEnvironment();
|
||||
~FTEnvironment();
|
||||
|
||||
/** Get a face with a suitable font type.
|
||||
*/
|
||||
FT_Face getFace(const FontUse font);
|
||||
|
||||
private:
|
||||
/** Check for any error discovered in a freetype function that will return a FT_Error value.
|
||||
* \param err The Freetype function.
|
||||
* \param desc The description of what is the function doing.
|
||||
*/
|
||||
void checkError(FT_Error err, const irr::core::stringc desc);
|
||||
|
||||
/** Load font face into memory, but don't create glyph yet.
|
||||
*/
|
||||
void loadFont();
|
||||
|
||||
FT_Face m_ft_face[F_COUNT];
|
||||
static FT_Library m_ft_lib;
|
||||
};
|
||||
|
||||
} // guiengine
|
||||
#endif // HEADER_FT_ENVIRONMENT_HPP
|
185
src/guiengine/glyph_page_creator.cpp
Normal file
@ -0,0 +1,185 @@
|
||||
// SuperTuxKart - a fun racing game with go-kart
|
||||
// Copyright (C) 2009-2010 John Norman
|
||||
// Copyright (C) 2015 Ben Au
|
||||
//
|
||||
// This 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; either version 3
|
||||
// of the License, or (at your option) any later version.
|
||||
//
|
||||
// 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.
|
||||
//
|
||||
// The image loading function is partially based on CGUITTFont.cpp by John Norman,
|
||||
// original version is located here:
|
||||
//
|
||||
// http://irrlicht.suckerfreegames.com/
|
||||
|
||||
#include <irrlicht.h>
|
||||
#include "guiengine/engine.hpp"
|
||||
|
||||
namespace GUIEngine
|
||||
{
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
GlyphPageCreator::GlyphPageCreator()
|
||||
{
|
||||
m_page = GUIEngine::getDriver()->createImage(video::ECF_A8R8G8B8, core::dimension2du(512, 512));
|
||||
m_image = 0;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
GlyphPageCreator::~GlyphPageCreator()
|
||||
{
|
||||
clearGlyphPage();
|
||||
clearNewCharHolder();
|
||||
m_page->drop();
|
||||
m_page = 0;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
void GlyphPageCreator::dumpGlyphPage(const core::stringc fn)
|
||||
{
|
||||
GUIEngine::getDriver()->writeImageToFile(m_page, fn + ".png");
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
bool GlyphPageCreator::checkEnoughSpace(FT_Bitmap bits)
|
||||
{
|
||||
core::dimension2du d(bits.width + 1, bits.rows + 1);
|
||||
core::dimension2du texture_size;
|
||||
texture_size = d.getOptimalSize(!(GUIEngine::getDriver()->queryFeature(video::EVDF_TEXTURE_NPOT)),
|
||||
!(GUIEngine::getDriver()->queryFeature(video::EVDF_TEXTURE_NSQUARE)), true, 0);
|
||||
|
||||
if ((m_used_width + texture_size.Width > 512 && m_used_height + m_temp_height + texture_size.Height > 512)
|
||||
|| m_used_height + texture_size.Height > 512)
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
void GlyphPageCreator::clearNewCharHolder()
|
||||
{
|
||||
m_new_char_holder.clear();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
void GlyphPageCreator::clearGlyphPage()
|
||||
{
|
||||
m_used_width = 0;
|
||||
m_temp_height = 0;
|
||||
m_used_height = 0;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
void GlyphPageCreator::createNewGlyphPage()
|
||||
{
|
||||
//Clean the current glyph page by filling it with transparent content
|
||||
m_page->fill(video::SColor(0, 255, 255, 255));
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
video::IImage* GlyphPageCreator::getPage()
|
||||
{
|
||||
return m_page;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
core::stringw GlyphPageCreator::getNewChar()
|
||||
{
|
||||
core::stringw c;
|
||||
for (std::set<wchar_t>::iterator it = m_new_char_holder.begin(); it != m_new_char_holder.end(); ++it)
|
||||
c += *it;
|
||||
|
||||
return c;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
void GlyphPageCreator::insertChar(const wchar_t c)
|
||||
{
|
||||
m_new_char_holder.insert(c);
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
bool GlyphPageCreator::insertGlyph(FT_Bitmap bits, core::rect<s32>& rect)
|
||||
{
|
||||
core::dimension2du d(bits.width + 1, bits.rows + 1);
|
||||
core::dimension2du texture_size;
|
||||
|
||||
switch (bits.pixel_mode)
|
||||
{
|
||||
case FT_PIXEL_MODE_GRAY:
|
||||
{
|
||||
// Create our blank image.
|
||||
texture_size = d.getOptimalSize(!(GUIEngine::getDriver()->queryFeature(video::EVDF_TEXTURE_NPOT)),
|
||||
!(GUIEngine::getDriver()->queryFeature(video::EVDF_TEXTURE_NSQUARE)), true, 0);
|
||||
m_image = GUIEngine::getDriver()->createImage(video::ECF_A8R8G8B8, texture_size);
|
||||
m_image->fill(video::SColor(0, 255, 255, 255));
|
||||
|
||||
// Load the grayscale data in.
|
||||
const float gray_count = static_cast<float>(bits.num_grays);
|
||||
const u32 image_pitch = m_image->getPitch() / sizeof(u32);
|
||||
u32* image_data = (u32*)m_image->lock();
|
||||
u8* glyph_data = bits.buffer;
|
||||
for (u32 y = 0; y < (unsigned)bits.rows; ++y)
|
||||
{
|
||||
u8* row = glyph_data;
|
||||
for (u32 x = 0; x < (unsigned)bits.width; ++x)
|
||||
{
|
||||
image_data[y * image_pitch + x] |= static_cast<u32>(255.0f * (static_cast<float>(*row++) / gray_count)) << 24;
|
||||
//data[y * image_pitch + x] |= ((u32)(*bitsdata++) << 24);
|
||||
}
|
||||
glyph_data += bits.pitch;
|
||||
}
|
||||
m_image->unlock();
|
||||
break;
|
||||
}
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
if (!m_image)
|
||||
return false;
|
||||
|
||||
//Done creating a single glyph, now copy to the glyph page...
|
||||
//Determine the linebreak location
|
||||
if (m_used_width + texture_size.Width > 512)
|
||||
{
|
||||
m_used_width = 0;
|
||||
m_used_height += m_temp_height;
|
||||
m_temp_height = 0;
|
||||
}
|
||||
|
||||
//Copy now
|
||||
m_image->copyTo(m_page, core::position2di(m_used_width, m_used_height));
|
||||
|
||||
//Store the rectangle of current glyph
|
||||
rect = core::rect<s32> (m_used_width, m_used_height, m_used_width + bits.width, m_used_height + bits.rows);
|
||||
|
||||
m_image->drop();
|
||||
m_image = 0;
|
||||
|
||||
//Store used area
|
||||
m_used_width += texture_size.Width;
|
||||
if (m_temp_height < texture_size.Height)
|
||||
m_temp_height = texture_size.Height;
|
||||
return true;
|
||||
}
|
||||
|
||||
} // guiengine
|
109
src/guiengine/glyph_page_creator.hpp
Normal file
@ -0,0 +1,109 @@
|
||||
// SuperTuxKart - a fun racing game with go-kart
|
||||
// Copyright (C) 2015 Ben Au
|
||||
//
|
||||
// This 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; either version 3
|
||||
// of the License, or (at your option) any later version.
|
||||
//
|
||||
// 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 <IVideoDriver.h>
|
||||
#include <irrlicht.h>
|
||||
#include <ft2build.h>
|
||||
#include FT_FREETYPE_H
|
||||
#include <set>
|
||||
|
||||
#include "utils/leak_check.hpp"
|
||||
|
||||
using namespace irr;
|
||||
|
||||
/**
|
||||
* \ingroup guiengine
|
||||
*/
|
||||
namespace GUIEngine
|
||||
{
|
||||
/**
|
||||
* \brief Create glyph pages for different fonts.
|
||||
*/
|
||||
class GlyphPageCreator
|
||||
{
|
||||
public:
|
||||
|
||||
LEAK_CHECK()
|
||||
|
||||
GlyphPageCreator();
|
||||
~GlyphPageCreator();
|
||||
|
||||
/** Write the current glyph page into png on current running directory.
|
||||
* Mainly for debug use.
|
||||
* \param fn The file name.
|
||||
*/
|
||||
void dumpGlyphPage(const core::stringc fn);
|
||||
|
||||
/** Check whether it is ok the fit the inputted glyph into the current glyph page.
|
||||
* \param bits The Glyph bitmap inputted.
|
||||
* \return True if there is enough space.
|
||||
*/
|
||||
bool checkEnoughSpace(FT_Bitmap bits);
|
||||
|
||||
/** Reset position of glyph on the current glyph page.
|
||||
*/
|
||||
void clearGlyphPage();
|
||||
|
||||
/** Reset characters holder for lazy loading char.
|
||||
*/
|
||||
void clearNewCharHolder();
|
||||
|
||||
/** Clear (fill it with transparent content) the current glyph page.
|
||||
*/
|
||||
void createNewGlyphPage();
|
||||
|
||||
/** Used to get a glyph page which is loaded later for texture
|
||||
* \return Glyph page image.
|
||||
*/
|
||||
video::IImage* getPage();
|
||||
|
||||
/** Used to get the string of new characters inside set m_new_char_holder for lazy char loading.
|
||||
* \return string of wild-character.
|
||||
*/
|
||||
core::stringw getNewChar();
|
||||
|
||||
/** Used to insert a single new character into glyph page used for lazy char loading.
|
||||
* \param c A new character.
|
||||
*/
|
||||
void insertChar(const wchar_t c);
|
||||
|
||||
/** Used to insert a single glyph bitmap into the glyph page
|
||||
* \param bits The Glyph bitmap inputted.
|
||||
* \param rect Give the rectangle of the glyph on the page.
|
||||
* \return True if a glyph is loaded.
|
||||
*/
|
||||
bool insertGlyph(FT_Bitmap bits, core::rect<s32>& rect);
|
||||
|
||||
private:
|
||||
/** A temporary storage for a single glyph.
|
||||
*/
|
||||
video::IImage* m_image;
|
||||
|
||||
/** A temporary holder stored new char to be inserted.
|
||||
*/
|
||||
std::set<wchar_t> m_new_char_holder;
|
||||
|
||||
/** A full glyph page.
|
||||
*/
|
||||
video::IImage* m_page;
|
||||
|
||||
u32 m_temp_height;
|
||||
u32 m_used_width;
|
||||
u32 m_used_height;
|
||||
};
|
||||
|
||||
} // guiengine
|
@ -1,10 +1,25 @@
|
||||
// Copyright (C) 2002-2015 Nikolaus Gebhardt
|
||||
// This file is part of the "Irrlicht Engine".
|
||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||
// SuperTuxKart - a fun racing game with go-kart
|
||||
// Copyright (C) 2002-2012 Nikolaus Gebhardt
|
||||
// Copyright (C) 2015 SuperTuxKart-Team
|
||||
//
|
||||
// This 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; either version 3
|
||||
// of the License, or (at your option) any later version.
|
||||
//
|
||||
// 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 __C_GUI_FONT_H_INCLUDED__
|
||||
#define __C_GUI_FONT_H_INCLUDED__
|
||||
#ifndef HEADER_SCALABLE_FONT_HPP
|
||||
#define HEADER_SCALABLE_FONT_HPP
|
||||
|
||||
#include "guiengine/ft_environment.hpp"
|
||||
#include "utils/leak_check.hpp"
|
||||
|
||||
#include "IrrCompileConfig.h"
|
||||
@ -18,6 +33,7 @@
|
||||
|
||||
#include <map>
|
||||
#include <string>
|
||||
#include <set>
|
||||
|
||||
namespace irr
|
||||
{
|
||||
@ -51,24 +67,6 @@ class ScalableFont : public IGUIFontBitmap
|
||||
bool m_mono_space_digits;
|
||||
irr::video::SColor m_shadow_color;
|
||||
|
||||
struct TextureInfo
|
||||
{
|
||||
irr::core::stringc m_file_name;
|
||||
bool m_has_alpha;
|
||||
float m_scale;
|
||||
bool m_exclude_from_max_height_calculation;
|
||||
|
||||
TextureInfo()
|
||||
{
|
||||
m_has_alpha = false;
|
||||
m_scale = 1.0f;
|
||||
}
|
||||
};
|
||||
|
||||
std::map<int /* texture file ID */, TextureInfo> m_texture_files;
|
||||
|
||||
void doReadXmlFile(io::IXMLReader* xml);
|
||||
|
||||
bool m_is_hollow_copy;
|
||||
bool m_rtl;
|
||||
|
||||
@ -82,8 +80,8 @@ public:
|
||||
float m_fallback_font_scale;
|
||||
int m_fallback_kerning_width;
|
||||
|
||||
//! constructor
|
||||
ScalableFont(IGUIEnvironment* env, const std::string &filename);
|
||||
ScalableFont(IGUIEnvironment* env, GUIEngine::TTFLoadingType type);
|
||||
virtual ~ScalableFont();
|
||||
|
||||
/** Creates a hollow copy of this font; i.e. the underlying font data is the *same* for
|
||||
* both fonts. The advantage of doing this is that you can change "view" parameters
|
||||
@ -101,15 +99,13 @@ public:
|
||||
return out;
|
||||
}
|
||||
|
||||
//! destructor
|
||||
virtual ~ScalableFont();
|
||||
/** loads a font from a TTF file */
|
||||
bool loadTTF();
|
||||
|
||||
//! loads a font from an XML file
|
||||
bool load(io::IXMLReader* xml);
|
||||
/** lazy load new characters discovered in normal font */
|
||||
bool lazyLoadChar();
|
||||
|
||||
void lazyLoadTexture(int texID);
|
||||
|
||||
//! draws an text and clips it to the specified rectangle if wanted
|
||||
/** draws an text and clips it to the specified rectangle if wanted */
|
||||
virtual void draw(const core::stringw& text, const core::rect<s32>& position,
|
||||
video::SColor color, bool hcenter = false,
|
||||
bool vcenter = false, const core::rect<s32>* clip = 0);
|
||||
@ -123,20 +119,20 @@ public:
|
||||
bool vcenter, const core::rect<s32>* clip,
|
||||
FontCharCollector* charCollector = NULL);
|
||||
|
||||
//! returns the dimension of a text
|
||||
/** returns the dimension of a text */
|
||||
virtual core::dimension2d<u32> getDimension(const wchar_t* text) const;
|
||||
|
||||
//! Calculates the index of the character in the text which is on a specific position.
|
||||
/** Calculates the index of the character in the text which is on a specific position. */
|
||||
virtual s32 getCharacterFromPos(const wchar_t* text, s32 pixel_x) const;
|
||||
|
||||
//! Returns the type of this font
|
||||
/** Returns the type of this font */
|
||||
virtual EGUI_FONT_TYPE getType() const { return EGFT_BITMAP; }
|
||||
|
||||
//! set an Pixel Offset on Drawing ( scale position on width )
|
||||
/** set an Pixel Offset on Drawing ( scale position on width ) */
|
||||
virtual void setKerningWidth (s32 kerning);
|
||||
virtual void setKerningHeight (s32 kerning);
|
||||
|
||||
//! set an Pixel Offset on Drawing ( scale position on width )
|
||||
/** set an Pixel Offset on Drawing ( scale position on width ) */
|
||||
virtual s32 getKerningWidth(const wchar_t* thisLetter=0, const wchar_t* previousLetter=0) const;
|
||||
virtual s32 getKerningHeight() const;
|
||||
|
||||
@ -146,52 +142,69 @@ public:
|
||||
void setShadow(const irr::video::SColor &col);
|
||||
void disableShadow() {m_shadow = false;}
|
||||
|
||||
//! gets the sprite bank
|
||||
/** gets the sprite bank */
|
||||
virtual IGUISpriteBank* getSpriteBank() const;
|
||||
|
||||
//! returns the sprite number from a given character
|
||||
/** returns the sprite number from a given character */
|
||||
virtual u32 getSpriteNoFromChar(const wchar_t *c) const;
|
||||
|
||||
virtual void setInvisibleCharacters( const wchar_t *s );
|
||||
|
||||
/** test whether current font has this character regardless of fallback font */
|
||||
virtual bool hasThisChar(const wchar_t c) const;
|
||||
|
||||
void setScale(const float scale);
|
||||
float getScale() const { return m_scale; }
|
||||
|
||||
void updateRTL();
|
||||
|
||||
/** re-create fonts when language is changed */
|
||||
void recreateFromLanguage();
|
||||
|
||||
/** force create a new texture (glyph) page in a font */
|
||||
void forceNewPage();
|
||||
|
||||
private:
|
||||
|
||||
struct SFontArea
|
||||
{
|
||||
SFontArea() : underhang(0), overhang(0), width(0), spriteno(0) {}
|
||||
s32 underhang;
|
||||
s32 overhang;
|
||||
SFontArea() : width(0), spriteno(0), offsety(0), offsety_bt(0), bearingx(0) {}
|
||||
s32 width;
|
||||
u32 spriteno;
|
||||
s32 offsety;
|
||||
s32 offsety_bt;
|
||||
s32 bearingx;
|
||||
};
|
||||
|
||||
int getCharWidth(const SFontArea& area, const bool fallback) const;
|
||||
s32 getCharWidth(const SFontArea& area, const bool fallback) const;
|
||||
s32 getAreaIDFromCharacter(const wchar_t c, bool* fallback_font) const;
|
||||
const SFontArea &getAreaFromCharacter(const wchar_t c, bool* fallback_font) const;
|
||||
void setMaxHeight();
|
||||
/** get characters to be pre-loaded base on font type */
|
||||
std::set<wchar_t> getPreloadCharacters(const GUIEngine::TTFLoadingType);
|
||||
|
||||
core::array<SFontArea> Areas;
|
||||
GUIEngine::TTFLoadingType m_type;
|
||||
GUIEngine::FontUse m_font_use;
|
||||
video::IVideoDriver *m_video_driver;
|
||||
IGUISpriteBank *m_spritebank;
|
||||
IGUIEnvironment *m_gui_env;
|
||||
video::ITexture *m_last_normal_page;
|
||||
|
||||
core::array<SFontArea> m_areas;
|
||||
/** The maximum values of all digits, used in monospace_digits. */
|
||||
mutable SFontArea m_max_digit_area;
|
||||
std::map<wchar_t, s32> CharacterMap;
|
||||
video::IVideoDriver* Driver;
|
||||
IGUISpriteBank* SpriteBank;
|
||||
IGUIEnvironment* Environment;
|
||||
u32 WrongCharacter;
|
||||
s32 MaxHeight;
|
||||
s32 GlobalKerningWidth, GlobalKerningHeight;
|
||||
mutable SFontArea m_max_digit_area;
|
||||
std::map<wchar_t, s32> m_character_map;
|
||||
|
||||
core::stringw Invisible;
|
||||
s32 m_max_height;
|
||||
s32 m_global_kerning_width;
|
||||
s32 m_global_kerning_height;
|
||||
s32 m_glyph_max_height;
|
||||
|
||||
core::stringw m_invisible;
|
||||
};
|
||||
|
||||
} // end namespace gui
|
||||
} // end namespace irr
|
||||
|
||||
|
||||
#endif // __C_GUI_FONT_H_INCLUDED__
|
||||
#endif // HEADER_SCALABLE_FONT_HPP
|
||||
|
||||
|
@ -13,6 +13,7 @@
|
||||
#include "Keycodes.h"
|
||||
|
||||
#include "graphics/2dutils.hpp"
|
||||
#include "utils/string_utils.hpp"
|
||||
#include "utils/translation.hpp"
|
||||
#include "utils/time.hpp"
|
||||
|
||||
@ -279,9 +280,9 @@ bool CGUIEditBox::processKey(const SEvent& event)
|
||||
const s32 realmbgn = MarkBegin < MarkEnd ? MarkBegin : MarkEnd;
|
||||
const s32 realmend = MarkBegin < MarkEnd ? MarkEnd : MarkBegin;
|
||||
|
||||
core::stringc s;
|
||||
core::stringw s;
|
||||
s = Text.subString(realmbgn, realmend - realmbgn).c_str();
|
||||
Operator->copyToClipboard(s.c_str());
|
||||
Operator->copyToClipboard(StringUtils::wide_to_utf8(s.c_str()).c_str());
|
||||
}
|
||||
break;
|
||||
case KEY_KEY_X:
|
||||
@ -292,9 +293,9 @@ bool CGUIEditBox::processKey(const SEvent& event)
|
||||
const s32 realmend = MarkBegin < MarkEnd ? MarkEnd : MarkBegin;
|
||||
|
||||
// copy
|
||||
core::stringc sc;
|
||||
core::stringw sc;
|
||||
sc = Text.subString(realmbgn, realmend - realmbgn).c_str();
|
||||
Operator->copyToClipboard(sc.c_str());
|
||||
Operator->copyToClipboard(StringUtils::wide_to_utf8(sc.c_str()).c_str());
|
||||
|
||||
if (isEnabled())
|
||||
{
|
||||
@ -330,13 +331,13 @@ bool CGUIEditBox::processKey(const SEvent& event)
|
||||
{
|
||||
// insert text
|
||||
core::stringw s = Text.subString(0, CursorPos);
|
||||
s.append(p);
|
||||
s.append(StringUtils::utf8_to_wide(p));
|
||||
s.append( Text.subString(CursorPos, Text.size()-CursorPos) );
|
||||
|
||||
if (!Max || s.size()<=Max) // thx to Fish FH for fix
|
||||
{
|
||||
Text = s;
|
||||
s = p;
|
||||
s = StringUtils::utf8_to_wide(p);
|
||||
CursorPos += s.size();
|
||||
}
|
||||
}
|
||||
@ -345,13 +346,13 @@ bool CGUIEditBox::processKey(const SEvent& event)
|
||||
// replace text
|
||||
|
||||
core::stringw s = Text.subString(0, realmbgn);
|
||||
s.append(p);
|
||||
s.append(StringUtils::utf8_to_wide(p));
|
||||
s.append( Text.subString(realmend, Text.size()-realmend) );
|
||||
|
||||
if (!Max || s.size()<=Max) // thx to Fish FH for fix
|
||||
{
|
||||
Text = s;
|
||||
s = p;
|
||||
s = StringUtils::utf8_to_wide(p);
|
||||
CursorPos = realmbgn + s.size();
|
||||
}
|
||||
}
|
||||
|
@ -56,7 +56,6 @@ DynamicRibbonWidget::DynamicRibbonWidget(const bool combo, const bool multi_row)
|
||||
|
||||
m_item_count_hint = 0;
|
||||
|
||||
m_font = GUIEngine::getFont()->getHollowCopy();
|
||||
m_max_label_width = 0;
|
||||
}
|
||||
// -----------------------------------------------------------------------------
|
||||
@ -385,6 +384,8 @@ void DynamicRibbonWidget::buildInternalStructure()
|
||||
ribbon->m_properties[PROP_ID] = name.str();
|
||||
ribbon->m_event_handler = this;
|
||||
|
||||
m_font = GUIEngine::getFont()->getHollowCopy();
|
||||
|
||||
// calculate font size
|
||||
if (m_col_amount > 0)
|
||||
{
|
||||
|
@ -690,7 +690,8 @@ EventPropagation RibbonWidget::transmitEvent(Widget* w,
|
||||
// bring focus back to enclosing ribbon widget
|
||||
this->setFocusForPlayer( playerID );
|
||||
|
||||
if (m_selection[playerID] != -1)
|
||||
if (m_selection[playerID] > -1 &&
|
||||
m_selection[playerID] < (int)(m_active_children.size()))
|
||||
{
|
||||
if (m_active_children[m_selection[playerID]].m_deactivated)
|
||||
{
|
||||
|
@ -145,8 +145,8 @@ void SpinnerWidget::add()
|
||||
else
|
||||
{
|
||||
rect<s32> subsize_label = rect<s32>(m_h, 0, m_w - m_h, m_h);
|
||||
const wchar_t *text = stringw(m_value).c_str();
|
||||
IGUIStaticText* label = GUIEngine::getGUIEnv()->addStaticText(text, subsize_label,
|
||||
stringw text = stringw(m_value);
|
||||
IGUIStaticText* label = GUIEngine::getGUIEnv()->addStaticText(text.c_str(), subsize_label,
|
||||
false /* border */, true /* word wrap */,
|
||||
btn, getNewNoFocusID());
|
||||
m_children[1].m_element = label;
|
||||
|