Merge branch 'master' into gles

This commit is contained in:
Deve 2016-07-11 23:23:02 +02:00
commit 0f7976e5f8
305 changed files with 39733 additions and 6036 deletions

View File

@ -47,7 +47,7 @@ script:
notifications:
irc:
channels:
- "irc.freenode.org#stk"
- "irc.freenode.org#supertuxkart"
skip_join: false
use_notice: true
template:

View File

@ -1,4 +1,19 @@
## SupertTuxKart 0.9.1
## SuperTuxKart 0.9.2
* Ghost replay races by Benau
* Battle mode AI by Benau
* Soccer mode AI by Benau
* New icy soccer field by samuncle and Benau
* New subsea track by samuncle
* New volcano track by Ponzino
* TTF font rendering by Benau
* Kart properties refactor by Flakebi
* Scripting work under the hood
* Work on the track editor by mhp
* Tweak to challenges
* New farm track song by 0zone0ne and Krobonil
* Bugfixes
## SuperTuxKart 0.9.1
* Many bug fixes
* Started to use scripting in tracks
* Significant audio performance improvements

View File

@ -43,6 +43,7 @@ endif()
if(UNIX AND NOT APPLE)
option(USE_XRANDR "Use xrandr instead of vidmode" ON)
option(USE_ASAN "Build with Leak/Address sanitizer" OFF)
option(USE_LIBBFD "Use libbfd for crash reporting and leak check" OFF)
endif()
set(STK_SOURCE_DIR "src")
@ -77,6 +78,7 @@ include_directories("${PROJECT_SOURCE_DIR}/lib/enet/include")
# Build glew library
if(NOT USE_GLES2)
add_definitions(-DGLEW_NO_GLU)
add_subdirectory("${PROJECT_SOURCE_DIR}/lib/glew")
include_directories("${PROJECT_SOURCE_DIR}/lib/glew/include")
endif()
@ -127,8 +129,8 @@ endif()
include_directories(${STK_SOURCE_DIR})
if(APPLE)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -arch i386")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -arch i386 -F/Library/Frameworks")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -arch x86_64")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -arch x86_64 -F/Library/Frameworks")
elseif(MSVC)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP") # Enable multi-processor compilation (faster)
endif()
@ -222,6 +224,17 @@ if(UNIX AND NOT APPLE)
find_library(IRRLICHT_XF86VM_LIBRARY Xxf86vm)
mark_as_advanced(IRRLICHT_XF86VM_LIBRARY)
endif()
if(USE_LIBBFD)
find_package(Libbfd)
if(LIBBFD_FOUND)
add_definitions(-DENABLE_LIBBFD)
include_directories(${LIBBFD_INCLUDE_DIRS})
else()
set(USE_LIBBFD OFF CACHE BOOL "Use libbfd for crash reporting and leak check" FORCE)
message(WARNING "Libbfd not found, disable integrated stack trace.")
endif()
endif()
endif()
# Set some compiler options
@ -270,7 +283,7 @@ endif()
add_definitions(-DHAVE_OGGVORBIS)
if(WIN32)
configure_file("${STK_SOURCE_DIR}/windows_installer/icon_rc.template" "${PROJECT_BINARY_DIR}/tmp/icon.rc")
configure_file("${STK_SOURCE_DIR}/../tools/windows_installer/icon_rc.template" "${PROJECT_BINARY_DIR}/tmp/icon.rc")
endif()
# Provides list of source and header files (STK_SOURCES and STK_HEADERS)
@ -375,18 +388,26 @@ if(UNIX AND NOT APPLE)
else()
target_link_libraries(supertuxkart ${IRRLICHT_XF86VM_LIBRARY})
endif()
if(USE_LIBBFD)
target_link_libraries(supertuxkart ${LIBBFD_LIBRARIES})
endif()
if(USE_ASAN)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address -fno-omit-frame-pointer")
target_link_libraries(supertuxkart "-fsanitize=address")
endif()
endif()
# FreeBSD does not search in /usr/local/lib, but at least Freetype is installed there :(
if(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -L/usr/local/lib")
endif()
if(APPLE)
# In theory it would be cleaner to let CMake detect the right dependencies. In practice, this means that if a OSX user has
# unix-style installs of Vorbis/Ogg/OpenAL/etc. they will be picked up over our frameworks. This is blocking when I make releases :
# the mac I use to make STK releases does have other installs of vorbis/ogg/etc. which aren't compatible with STK, so letting
# CMake pick the library it wants essentially means I can't build.
set_target_properties(supertuxkart PROPERTIES LINK_FLAGS "-arch i386 -F/Library/Frameworks -framework OpenAL -framework Ogg -framework Vorbis")
set_target_properties(supertuxkart PROPERTIES LINK_FLAGS "-arch x86_64 -F/Library/Frameworks -framework OpenAL -framework Ogg -framework Vorbis")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -I/Library/Frameworks/OpenAL.framework/Versions/A/Headers")
endif()

View File

@ -1,6 +1,7 @@
# SuperTuxKart Installation Instructions
Note: If you obtained this source code from Github, you also need to download the game assets from Sourceforge using SVN.
Note: If you obtained this source code from Github, you also need to download
the game assets from Sourceforge using SVN.
`svn checkout https://svn.code.sf.net/p/supertuxkart/code/stk-assets stk-assets`
@ -16,6 +17,7 @@ First, make sure that you have the following packages installed:
* OpenAL (recommended: openal-soft-devel)
* Ogg (libogg-dev)
* Vorbis (libvorbis-dev)
* Freetype (libfreetype6-dev)
* libcurl (libcurl-devel)
* libbluetooth (bluez-devel)
* libpng (libpng-devel)
@ -25,8 +27,10 @@ First, make sure that you have the following packages installed:
Ubuntu command:
```
sudo apt-get install autoconf automake build-essential cmake libogg-dev libvorbis-dev libopenal-dev libxxf86vm-dev \
libgl1-mesa-dev libglu1-mesa-dev libcurl4-openssl-dev libfribidi-dev libbluetooth-dev libxrandr-dev
sudo apt-get install build-essential cmake libbluetooth-dev \
libcurl4-gnutls-dev libfreetype6-dev libfribidi-dev libgl1-mesa-dev \
libjpeg-dev libogg-dev libopenal-dev libpng-dev libvorbis-dev libxrandr-dev \
mesa-common-dev pkg-config zlib1g-dev
```
Unpack the files from the tarball like this:

View File

@ -1,59 +1,45 @@
# SuperTuxKart
[![Build Status](https://travis-ci.org/supertuxkart/stk-code.png?branch=master)](https://travis-ci.org/supertuxkart/stk-code)
SuperTuxKart is a free kart racing game. It is focusing on fun and
not on realistic kart physics. Instruction can be found on the
in-game help page.
SuperTuxKart is a free kart racing game. It focuses on fun and not on realistic kart physics. Instructions can be found on the in-game help page.
The SuperTuxKart homepage can be found at: <http://supertuxkart.sourceforge.net>
The official SuperTuxKart forum is at <http://supertuxkart.sourceforge.net/forum>. If you need support,
this would be the best place to start.
The official SuperTuxKart forum is at <http://supertuxkart.sourceforge.net/forum>. If you need support, this would be the best place to start.
Hope you enjoy the game.
-- The SuperTuxKart development team.
## Hardware Requirements
* You need a 3D graphics card. (NVIDIA GeForce 8xxx and higher, ATI Radeon HD 4xxx and higher or Intel HD 3000 and higher)
* You need a 3D graphics card. (NVIDIA GeForce 8xxx and higher, ATI Radeon HD 4xxx and higher or Intel HD 3000 and higher.)
* You should have a CPU that's running at 1GHz or better.
* You'll need at least 512 MB of free VRAM (video memory).
* Disk space: 400MB
* Ideally, you want a joystick with at least 6 buttons.
## Compiling SuperTuxKart
### Windows
1. Install VS 2013 (or later). The free express versions work fine.
2. Download and install a source package - either a released package or from our [git/svn repositories](http://supertuxkart.sourceforge.net/Source_control)
3. Download the latest dependency package depdendencies_for_0.8.2.zip from [here](https://sourceforge.net/projects/supertuxkart/files/SuperTuxKart%20Dependencies/Windows/). Unzip it in the root directory, so that the dependencies directory is next to the src and data directory (if you are updating from a previous dependency package, you can delete the .dll files in the root directory, they are not needed anymore).
4. Download cmake and install it. Then start cmake-gui and select the STK root directory as 'Where is the source code', and a new directory in the root directory (next to src, data etc) as build directory (for now I assume that this directory is called bld).
5. Click on configure. You will be asked to create the directory (yes), then for your VS version. Make sure to select the right version (be aware of the easy to confuse version numbers: VS 2013 = version 12). Click on configure, then generate. This will create the directory 'bld', and a VS solution in that directory.
6. In Visual Studio open the project file generated in the 'bld' folder
2. Download and install a source package - either a released package or from our [git/svn repositories](http://supertuxkart.sourceforge.net/Source_control).
3. Download the latest dependency package from [here](https://sourceforge.net/projects/supertuxkart/files/SuperTuxKart%20Dependencies/Windows/). Unzip it in the root directory, so that the dependencies directory is next to the src and data directories (if you are updating from a previous dependency package, you can delete the .dll files in the root directory, they are not needed anymore).
4. Download cmake and install it. Then start cmake-gui and select the STK root directory as 'Where is the source code', and a new directory in the root directory (next to src, data etc) as the build directory (for now I assume that this directory is called bld).
5. Click on configure. You will be asked to create the directory (yes), then for your VS version. Make sure you select the right version (be aware of the easy to confuse version numbers: VS 2013 = version 12). Click on configure, then generate. This will create the directory 'bld', and a VS solution in that directory.
6. In Visual Studio open the project file generated in the 'bld' folder.
7. Right click on the supertuxkart project in the solution explorer, and select "Set as StartUp Project".
8. Select Build->Build Solution (or press F7) to compile.
Compilation with cygwin is not officially supported, but
this has been done (check with the forum for details).
Compilation with cygwin is not officially supported, but this has been done (check with the forum for details).
### Mac OS X
The latest information about compilation on Mac are on our wiki:
<http://supertuxkart.sourceforge.net/Building_and_packaging_on_OSX>
The Xcode project file is in `/src/ide/Xcode/`, but it still
requires that all dependencies are installed as explained on the wiki.
The latest information about compilation on Mac are on our wiki: <http://supertuxkart.sourceforge.net/Building_and_packaging_on_OSX>
### UNIX
See [`INSTALL.md`](INSTALL.md) for details.
## License
This software is released under the GNU General Public License (GPL) which
can be found in the file [`COPYING`](/COPYING) in the same directory as this file.
Information about the licenses for artwork are contained in
`data/licenses`.
This software is released under the GNU General Public License (GPL) which can be found in the file [`COPYING`](/COPYING) in the same directory as this file. Information about the licenses for artwork are contained in `data/licenses`.
## 3D coordinates
A reminder for those looking at the code and 3d models:
@ -62,6 +48,4 @@ STK : X right, Y up, Z forwards
Blender: X right, Y forwards, Z up
The exporters perform the needed transform, so in Blender you just work
with XY plane as ground, and things will appear fine in STK (using XZ
as ground in the code, obviously).
The exporters perform the needed transform, so in Blender you just work with XY plane as ground, and things will appear fine in STK (using XZ as ground in the code, obviously).

89
cmake/FindLibbfd.cmake Normal file
View File

@ -0,0 +1,89 @@
# - Try to find libbfd
# Once done this will define
#
# LIBBFD_FOUND - system has libbfd
# LIBBFD_INCLUDE_DIRS - the libbfd include directory
# LIBBFD_LIBRARIES - Link these to use libbfd
# LIBBFD_DEFINITIONS - Compiler switches required for using libbfd
#
# Based on:
#
# Copyright (c) 2008 Bernhard Walle <bernhard.walle@gmx.de>
#
# Redistribution and use is allowed according to the terms of the New
# BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
#
if (LIBBFD_LIBRARIES AND LIBBFD_INCLUDE_DIRS)
set (LIBBFD_FIND_QUIETLY TRUE)
endif ()
find_path (LIBBFD_INCLUDE_DIRS
NAMES
bfd.h
dis-asm.h
PATHS
/usr/include
/usr/local/include
/opt/local/include
/opt/include
ENV CPATH)
# Ugly, yes ugly...
find_library (LIBBFD_BFD_LIBRARY
NAMES
bfd
PATHS
/usr/lib
/usr/lib64
/usr/local/lib
/usr/local/lib64
/usr/include
/opt/local/lib
/opt/usr/lib64
ENV LIBRARY_PATH
ENV LD_LIBRARY_PATH)
#find_library (LIBBFD_IBERTY_LIBRARY
# NAMES
# iberty
# PATHS
# /usr/lib
# /usr/lib64
# /usr/local/lib
# /usr/local/lib64
# /usr/include
# /opt/local/lib
# /opt/usr/lib64
# ENV LIBRARY_PATH
# ENV LD_LIBRARY_PATH)
#find_library (LIBBFD_OPCODES_LIBRARY
# NAMES
# opcodes
# PATHS
# /usr/lib
# /usr/lib64
# /usr/local/lib
# /usr/local/lib64
# /usr/include
# /opt/local/lib
# /opt/usr/lib64
# ENV LIBRARY_PATH
# ENV LD_LIBRARY_PATH)
include (FindPackageHandleStandardArgs)
# handle the QUIETLY and REQUIRED arguments and set LIBBFD_FOUND to TRUE if all listed variables are TRUE
FIND_PACKAGE_HANDLE_STANDARD_ARGS(LIBBFD DEFAULT_MSG
LIBBFD_BFD_LIBRARY
# LIBBFD_IBERTY_LIBRARY
# LIBBFD_OPCODES_LIBRARY
LIBBFD_INCLUDE_DIRS)
set(LIBBFD_LIBRARIES "${LIBBFD_BFD_LIBRARY}")
mark_as_advanced(LIBBFD_INCLUDE_DIRS LIBBFD_LIBRARIES LIBBFD_BFD_LIBRARY)

Binary file not shown.

View File

@ -1,19 +1,19 @@
<?xml version="1.0"?>
<challenge version="2">
<track id="subsea" laps="2"/>
<track id="abyss" laps="3"/>
<mode major="single" minor="quickrace"/>
<requirements trophies="0"/>
<hard>
<karts number="5"/>
<requirements position="1" time="205"/>
<requirements position="1" time="160"/>
</hard>
<medium>
<karts number="4"/>
<requirements time="225"/>
<requirements time="185"/>
</medium>
<easy>
<karts number="4"/>
<requirements time="290"/>
<requirements time="270"/>
</easy>
</challenge>

View File

@ -2,7 +2,7 @@
<challenge version="2">
<track id="cocoa_temple" laps="3"/>
<mode major="single" minor="quickrace"/>
<requirements trophies="15"/>
<requirements trophies="5"/>
<hard>
<karts number="5"/>

View File

@ -0,0 +1,19 @@
<?xml version="1.0"?>
<challenge version="2">
<track id="volcano_island" laps="2"/>
<mode major="single" minor="quickrace"/>
<requirements trophies="15"/>
<hard>
<karts number="5"/>
<requirements position="1"/>
</hard>
<medium>
<karts number="4"/>
<requirements position="1"/>
</medium>
<easy>
<karts number="4"/>
<requirements position="1"/>
</easy>
</challenge>

View File

@ -4,7 +4,7 @@
<track id="sandtrack" laps="3" reverse="false" />
<track id="farm" laps="3" reverse="false" />
<track id="olivermath" laps="4" reverse="false" />
<track id="subsea" laps="2" reverse="false" />
<track id="abyss" laps="3" reverse="false" />
<track id="scotland" laps="3" reverse="false" />
</supertuxkart_grand_prix>

View File

@ -5,7 +5,7 @@
<track id="greenvalley" laps="2" reverse="false" />
<track id="mansion" laps="3" reverse="false" />
<track id="stk_enterprise" laps="3" reverse="false" />
<track id="city" laps="2" reverse="false" />
<track id="volcano_island" laps="2" reverse="false" />
</supertuxkart_grand_prix>

View File

@ -4,24 +4,28 @@
<card is="Intel(R) HD Graphics 3000" os="windows" disable="AdvancedPipeline"/>
<card is="Intel(R) HD Graphics 3000" os="windows" disable="FramebufferSRGBWorking"/>
<card contains="Intel" os="osx" disable="GI"/>
<card contains="Intel" os="linux" version="<12.0" disable="ComputeShader"/>
<card contains="Intel" os="linux" version="<12.0" disable="FramebufferSRGBCapable"/>
<card contains="Intel" disable="TextureCompressionS3TC"/>
<card contains="Intel" os="linux" version="<11.2" disable="ComputeShader"/>
<card contains="Intel" os="linux" version="<11.2" disable="GeometryShader"/>
<card contains="Intel" os="linux" version="<16.0" disable="FramebufferSRGBCapable"/>
<card contains="Intel" os="linux" version="<11.2" disable="TextureCompressionS3TC"/>
<card contains="Intel" os="windows" disable="TextureCompressionS3TC"/>
<card contains="Intel" os="osx" disable="TextureCompressionS3TC"/>
<card contains="Intel" os="windows" disable="HighDefinitionTextures"/>
<card contains="NVIDIA" os="windows" version="<344.65" disable="BufferStorage"/>
<card contains="NVIDIA" os="linux" version="<343.22" disable="BufferStorage"/>
<card contains="NVIDIA" disable="ShaderAtomicCounters"/>
<card contains="Mesa" os="linux" version="<10.3" disable="BufferStorage"/>
<card contains="Mesa" os="linux" version="<10.3" disable="DriverRecentEnough"/>
<card contains="Mesa" os="linux" version="<10.6" disable="GeometryShader4"/>
<card contains="Mesa" os="linux" disable="TextureCompressionS3TC"/>
<card contains="Mesa" os="linux" version="<11.2" disable="GeometryShader"/>
<card contains="Mesa" os="linux" version="<11.2" disable="TextureCompressionS3TC"/>
<card contains="Gallium" os="linux" version="<10.3" disable="BufferStorage"/>
<card contains="Gallium" os="linux" version="<10.3" disable="DriverRecentEnough"/>
<card contains="Gallium" os="linux" version="<10.6" disable="GeometryShader4"/>
<card contains="Gallium" os="linux" disable="TextureCompressionS3TC"/>
<card contains="Gallium" os="linux" version="<11.2" disable="GeometryShader"/>
<card contains="Gallium" os="linux" version="<11.2" disable="TextureCompressionS3TC"/>
<!-- On osx radeon appears to have different version numbers, e.g.
1.32.20 -->
<card contains="Radeon" os="linux" version="<14.300" disable="DriverRecentEnough"/>
<card contains="Radeon" os="windows" version="<14.300" disable="DriverRecentEnough"/>
<card contains="ATI" os="windows" version="<14.300" disable="DriverRecentEnough"/>
</graphical-restrictions>

View File

@ -0,0 +1,40 @@
<?xml version="1.0" encoding="UTF-8"?>
<stkgui>
<div x="5%" y="5%" width="90%" height="90%" layout="vertical-row">
<div x="5%" y="0%" width="90%" proportion="6" layout="horizontal-row">
<div width="40%" height="100%" layout="vertical-row">
<icon id="icon" align="center" width="100%" icon="gui/loading.png" />
</div>
<div width="60%" height="50%" layout="vertical-row">
<label id="name" width="100%" text_align="left"/>
</div>
</div>
<div width="90%" align="center" layout="vertical-row" height="fit">
<div width="100%" height="fit" layout="horizontal-row" >
<checkbox width="fit" id="record-race" I18N="Ghost replay info action" text_align="left"/>
<spacer width="10"/>
<label proportion="1" id="record-race-text" height="100%" text_align="left" I18N="Ghost replay info action" text="Record the race for ghost replay"/>
</div>
<div width="100%" height="fit" layout="horizontal-row" >
<checkbox width="fit" id="watch-only" I18N="Ghost replay info action" text_align="left"/>
<spacer width="10"/>
<label proportion="1" id="watch-only-text" height="100%" text_align="left" I18N="Ghost replay info action" text="Watch replay only"/>
</div>
</div>
<div width="80%" proportion="5" align="center">
<buttonbar id="actions" x="0" y="0" height="100%" width="100%" align="center">
<icon-button id="start" width="128" height="128"
icon="gui/green_check.png"
I18N="Ghost replay info screen action" text="Start Race" />
<icon-button id="remove" width="128" height="128"
icon="gui/remove.png"
I18N="Ghost replay info action" text="Remove" />
<icon-button id="back" width="128" height="128"
icon="gui/back.png"
I18N="Ghost replay info action" text="Back" />
</buttonbar>
</div>
</div>
</stkgui>

View File

@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<stkgui>
<div x="0%" y="1%" width="100%" height="98%" layout="vertical-row" >
<div x="0" y="0" width="100%" layout="horizontal-row" height="8%">
<icon-button id="back" height="100%" icon="gui/back.png"/>
<header text_align="center" proportion="1" I18N="In the ghost replay selection screen" text="Ghost Replay Selection" align="center"/>
<icon-button id="reload" height="90%" icon="gui/restart.png"/>
</div>
<box proportion="1" width="98%" align="center" layout="vertical-row" padding="6">
<list id="replay_list" x="0" y="0" width="100%" height="100%"/>
</box>
<div width="99%" align="center" layout="vertical-row" height="fit">
<div width="100%" height="fit" layout="horizontal-row" >
<checkbox width="fit" id="replay_difficulty_toggle" text_align="left"/>
<spacer width="10"/>
<label proportion="1" height="100%" text_align="left" I18N="In the ghost replay selection screen" text="Only show replays matching the current difficulty"/>
</div>
</div>
<spacer width="100%" height="1%" />
<button x="1%" id="record-ghost" I18N="In the ghost replay selection screen" text="Record ghost replay"/>
</div>
</stkgui>

View File

@ -1,8 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<stkgui>
<div x="2%" y="2%" width="96%" height="96%" layout="horizontal-row">
<button id="continue" width="250" align="bottom" text="Continue"/>
<spacer width="20"/>
<button id="save" width="250" align="bottom" text="Save Grand Prix"/>
<div x="2%" y="2%" width="96%" height="96%" layout="vertical-row">
<spacer proportion="1"/>
<button id="save" width="450" align="center" text="Save Grand Prix"/>
<spacer height="20"/>
<button id="continue" width="450" align="center" text="Continue"/>
</div>
</stkgui>

View File

@ -1,9 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<stkgui>
<div x="2%" y="2%" width="96%" height="96%" layout="horizontal-row">
<button id="continue" width="250" align="bottom" text="Continue"/>
<spacer width="20"/>
<button id="save" width="250" align="bottom" text="Save Grand Prix"/>
<div x="2%" y="2%" width="96%" height="96%" layout="vertical-row">
<spacer proportion="1"/>
<button id="save" width="450" align="center" text="Save Grand Prix"/>
<spacer height="20"/>
<button id="continue" width="450" align="center" text="Continue"/>
</div>
</stkgui>

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
data/gui/mode_ghost.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

View File

@ -17,6 +17,42 @@
<label proportion="1" text_align="left" I18N="In the server creation screen" text="Max. number of players"/>
<gauge id="max_players" proportion="1" min_value="2" max_value="12"/>
</div>
<spacer height="20" width="20"/>
<div width="100%" height="fit" layout="horizontal-row" >
<label proportion="1" text_align="left" I18N="In the server creation screen" text="Password (optional)"/>
<textbox proportion="1" id="password" I18N="In the server creation screen"/>
</div>
<spacer height="20" width="20"/>
<label width="100%" height="fit" text_align="left" I18N="In the server creation screen" text="Difficulty"/>
<!--<gauge id="difficulty" proportion="1" min_value="1" max_value="4"/>-->
<ribbon id="difficulty" height="135" width="90%" align="center">
<icon-button id="novice" width="128" height="128" icon="gui/difficulty_easy.png"
I18N="Difficulty" text="Novice"/>
<icon-button id="intermediate" width="128" height="128" icon="gui/difficulty_medium.png"
I18N="Difficulty" text="Intermediate"/>
<icon-button id="expert" width="128" height="128" icon="gui/difficulty_hard.png"
I18N="Difficulty" text="Expert"/>
<icon-button id="best" width="128" height="128" icon="gui/difficulty_best.png"
I18N="Difficulty" text="SuperTux"/>
</ribbon>
<spacer height="20" width="20"/>
<label width="100%" height="fit" text_align="left" I18N="In the server creation screen" text="Game mode"/>
<ribbon id="gamemode" height="135" width="50%" align="center">
<icon-button id="normal" width="128" height="128" icon="gui/mode_normal.png"
I18N="Multiplayer game mode" text="Normal Race"/>
<icon-button id="timetrial" width="128" height="128" icon="gui/mode_tt.png"
I18N="Multiplayer game mode" text="Time Trial"/>
</ribbon>
<!--
<scrollable_toolbar id="gamemode" height="135" width="90%" label_location="bottom" align="center"
child_width="135" child_height="135" />
-->
</div>
<label id="info" proportion="1" width="100%" align="center" text_align="center" word_wrap="true" text=""/>

View File

@ -10,6 +10,14 @@
<label proportion="1" text_align="left" I18N="In the networking lobby" text="Server name:"/>
<label proportion="2" text_align="left" id="server_name" text=""/>
</div>
<div width="100%" height="fit" layout="horizontal-row" >
<label proportion="1" text_align="left" I18N="In the networking lobby" text="Difficulty:"/>
<label proportion="2" text_align="left" id="server_difficulty" text=""/>
</div>
<div width="100%" height="fit" layout="horizontal-row" >
<label proportion="1" text_align="left" I18N="In the networking lobby" text="Game mode:"/>
<label proportion="2" text_align="left" id="server_game_mode" text=""/>
</div>
</box>
<spacer width="20" height="20"/>
<box proportion="1" height="100%" layout="vertical-row">
@ -27,7 +35,7 @@
<box id="actions" proportion="1" height="100%" layout="vertical-row">
<!-- <label I18N="In networking lobby" word_wrap="true" text="actions" align="center" text-align="center"/>
-->
<icon-button id="start" width="64" height="64" icon="gui/green_check.png"
<icon-button id="start" width="64" height="64" icon="gui/green_check.png" align="center"
I18N="In the network lobby" text="Start Race"/>
</box>

View File

@ -8,10 +8,24 @@
<spacer height="20" width="50"/>
<div width="80%" align="center" layout="vertical-row" height="fit" >
<!--
<div width="100%" height="fit" layout="horizontal-row" >
<label proportion="1" text_align="left" I18N="In the server info dialog" text="Name"/>
<label id="name" proportion="2" text_align="left" text=""/>
</div>
-->
<div width="100%" height="fit" layout="horizontal-row" >
<label proportion="1" text_align="left" I18N="In the networking lobby" text="Server name:"/>
<label proportion="2" text_align="left" id="server_name" text=""/>
</div>
<div width="100%" height="fit" layout="horizontal-row" >
<label proportion="1" text_align="left" I18N="In the networking lobby" text="Difficulty:"/>
<label proportion="2" text_align="left" id="server_difficulty" text=""/>
</div>
<div width="100%" height="fit" layout="horizontal-row" >
<label proportion="1" text_align="left" I18N="In the networking lobby" text="Game mode:"/>
<label proportion="2" text_align="left" id="server_game_mode" text=""/>
</div>
</div>
<spacer height="20" width="50"/>

View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<stkgui>
<div x="2%" y="5%" width="96%" height="90%" layout="vertical-row" >
<header id="title" width="96%" height="fit" text_align="center" I18N="Networking screen" text="Waiting for the others..."/>
<spacer height="40" width="50"/>
<label proportion="1" width="100%" text_align="left" id="lblDetails"/>
</div>
</stkgui>

View File

@ -3,9 +3,9 @@
<icon-button id="back" x="0" y="0" height="8%" icon="gui/back.png"/>
<div x="2%" y="2%" width="96%" height="96%" layout="vertical-row">
<header id="name" height="5%" width="80%" align="center" text_align="center"/>
<header id="name" height="7%" width="80%" align="center" text_align="center"/>
<spacer width="1" height="5%"/>
<spacer width="1" height="1%"/>
<box width="100%" height="40%" padding="10" layout="horizontal-row">
<!-- Left pane -->
@ -49,8 +49,8 @@
</div>
</box>
<spacer width="1" height="5%"/>
<box width="100%" height="25%" padding="15" layout="vertical-row">
<spacer width="1" height="1%"/>
<box width="100%" height="33%" padding="15" layout="vertical-row">
<div width="100%" height="fit" layout="horizontal-row" >
<label id="lap-text" proportion="1" I18N="In the track info screen" text="Number of laps" text_align="right"/>
<spacer width="40"/>
@ -70,17 +70,26 @@
</div>
<spacer height="10"/>
<div width="100%" height="fit" layout="horizontal-row" >
<label id="reverse-text" proportion="1" I18N="In the track info screen" text="Drive in reverse" text_align="right"/>
<label id="option-text" proportion="1" I18N="In the track info screen" text_align="right"/>
<spacer width="40"/>
<div proportion="1" height="fit" layout="horizontal-row">
<div width="50%" height="fit" text-align="center" layout="vertical-row" >
<checkbox id="reverse" align="center"/>
<checkbox id="option" align="center"/>
</div>
</div>
</div>
<spacer width="1" height="2%"/>
<div width="100%" height="fit" layout="horizontal-row" >
<label id="record-race-text" proportion="1" I18N="In the track info screen" text="Record the race for ghost replay" text_align="right"/>
<spacer width="40"/>
<div proportion="1" height="fit" layout="horizontal-row">
<div width="50%" height="fit" text-align="center" layout="vertical-row" >
<checkbox id="record" align="center"/>
</div>
</div>
</div>
<spacer width="1" height="1%"/>
</box>
<spacer width="1" height="5%"/>
<spacer width="1" height="1%"/>
<buttonbar id="buttons" height="15%" width="100%" align="center">
<icon-button id="start" width="64" height="64" icon="gui/green_check.png"
I18N="In the track info screen" text="Start Race"/>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.9 KiB

After

Width:  |  Height:  |  Size: 23 KiB

View File

@ -3,16 +3,7 @@
<icon-button id="back" x="0" y="0" height="8%" icon="gui/back.png"/>
<div x="1%" y="1%" width="98%" height="96%" layout="vertical-row" >
<header width="80%" I18N="In the track selection screen" text="Grand Prix"
align="center" text_align="center" />
<box width="100%" height="195" padding="0">
<scrollable_toolbar id="gps" height="175" y="10" x="10" width="98%" align="center" label_location="each"
square_items="true" child_width="175" child_height="120" />
</box>
<header width="100%" I18N="In the track selection screen" text="All Tracks"
<header width="80%" I18N="In the track selection screen" text="All Tracks"
align="center" text_align="center" />
<box proportion="1" width="100%" layout="vertical-row" padding="1">

View File

@ -0,0 +1,30 @@
<?xml version="1.0" encoding="UTF-8"?>
<stkgui>
<icon-button id="back" x="0" y="0" height="8%" icon="gui/back.png"/>
<div x="1%" y="1%" width="98%" height="96%" layout="vertical-row" >
<header width="80%" I18N="In the track and grand prix selection screen" text="Grand Prix"
align="center" text_align="center" />
<box width="100%" height="195" padding="0">
<scrollable_toolbar id="gps" height="175" y="10" x="10" width="98%" align="center" label_location="each"
square_items="true" child_width="175" child_height="120" />
</box>
<header width="100%" I18N="In the track and grand prix selection screen" text="All Tracks"
align="center" text_align="center" />
<box proportion="1" width="100%" layout="vertical-row" padding="1">
<ribbon_grid id="tracks" proportion="1" width="100%" square_items="true"
label_location="bottom" align="center" max_rows="4"
child_width="160" child_height="120" />
<spacer width="20" height="13" />
</box>
<!-- Populated dynamically at runtime -->
<tabs width="100%" height="25" id="trackgroups"> </tabs>
<spacer width="100%" height="2%" />
</div>
</stkgui>

View File

@ -13,7 +13,7 @@
square_items="true" child_width="128" child_height="128" />
<spacer height="15" width="10"/>
<div width="90%" align="center" layout="vertical-row" height="fit">
<div width="90%" align="center" layout="vertical-row" proportion="1">
<div width="100%" height="fit" layout="horizontal-row" >
<checkbox width="fit" id="online" I18N="In the user screen" text_align="left"/>
<spacer width="10"/>
@ -44,23 +44,29 @@
I18N="In the user screen" text="Password"/>
<textbox id="password" proportion="2" height="fit" I18N="In the user screen"/>
</div>
<spacer height="20" width="20"/>
<label id="message" width="100%" text_align="center"/>
</div>
<div width="80%" align="center" layout="vertical-row" height="fit">
<label id="message" width="80%" align="center" text_align="left"/>
</div>
<spacer width="20" height="25"/>
<buttonbar id="options" width="90%" height="13%" align="bottom">
<icon-button id="ok" width="64" height="64" icon="gui/green_check.png"
I18N="In the user screen" text="OK" label_location="bottom"/>
<icon-button id="new_user" width="64" height="64" icon="gui/blue_plus.png"
I18N="In the user screen" text="Add user" label_location="bottom"/>
<icon-button id="delete" width="64" height="64" icon="gui/remove.png"
I18N="In the user screen" text="Delete" label_location="bottom"/>
<icon-button id="rename" width="64" height="64" icon="gui/rename.png"
I18N="In the user screen" text="Rename" label_location="bottom"/>
<icon-button id="cancel" width="64" height="64" icon="gui/main_quit.png"
I18N="In the user screen" text="Cancel" label_location="bottom"/>
</buttonbar>
<spacer width="20" proportion="1"/>
<div width="90%" align="center" layout="vertical-row" height="fit">
<buttonbar id="options" width="100%" height="80" align="center">
<icon-button id="ok" width="64" height="64" icon="gui/green_check.png"
I18N="In the user screen" text="OK" label_location="bottom"/>
<icon-button id="new_user" width="64" height="64" icon="gui/blue_plus.png"
I18N="In the user screen" text="Add user" label_location="bottom"/>
<icon-button id="delete" width="64" height="64" icon="gui/remove.png"
I18N="In the user screen" text="Delete" label_location="bottom"/>
<icon-button id="rename" width="64" height="64" icon="gui/rename.png"
I18N="In the user screen" text="Rename" label_location="bottom"/>
<icon-button id="cancel" width="64" height="64" icon="gui/main_quit.png"
I18N="In the user screen" text="Cancel" label_location="bottom"/>
</buttonbar>
</div>
<spacer width="20" height="25"/>
</box>
<spacer width="20" height="15"/>
</div>

View File

@ -187,7 +187,7 @@
max: maximum leaning (i.e. when steering as much as possible at highest
speed), in degrees.
speed: Speed with which the leaning changes (in degree/second). -->
<lean max="8.6" speed="5.0" />
<lean max="6.6" speed="15.0" />
<!-- ********** Items ********** -->

231
data/localized_name.txt Normal file
View File

@ -0,0 +1,231 @@
aa=ʿAfár af
af=Afrikaans
af_ZA=0
am=ኣማርኛ
ar=العربية
ar_AR=0
ar_OM=0
ar_SA=0
ar_SY=0
ar_TN=0
as=অসমীয়া
ast=Asturianu
ay=aymar aru
az=Azərbaycanca
az_IR=0
be=Беларуская мова
bg=български
bg_BG=0
bn=বাংলা
bn_BD=0
bn_IN=0
bo=བོད་སྐད་
br=brezhoneg
bs=Bosanski
bs_BA=0
bs_BS=0
ca_ES=0
ca=0
cmn=0
co=corsu
cs=Čeština
cs_CZ=Čeština (Česká Republika)
cy=Welsh
cy_GB=Welsh (Great Britain)
cz=Unknown language
da=Dansk
da_DK=Dansk (Danmark)
de=Deutsch
de_AT=Deutsch (Österreich)
de_CH=Deutsch (Schweiz)
de_DE=Deutsch (Deutschland)
dk=Unknown language
dz=རྫོང་ཁ
el=ελληνικά
el_GR=0
en=English
en_AU=English (Australia)
en_CA=English (Canada)
en_GB=English (Great Britain)
en_US=English (United States)
en_ZA=English (South Africa)
en_US=English
eo=Esperanto
es=Español
es_AR=0
es_CL=0
es_CO=0
es_CR=0
es_DO=0
es_EC=0
es_ES=0
es_GT=0
es_HN=0
es_LA=0
es_MX=0
es_NI=0
es_PA=0
es_PE=0
es_PR=0
es_SV=0
es_UY=0
es_VE=0
et=eesti keel
et_EE=0
et_ET=0
eu=euskara
eu_ES=0
fa=فارسى
fa_AF=0
fa_IR=0
fi=suomi
fi_FI=0
fo=Føroyskt
fo_FO=0
fr=Français
fr_CA=Français (Canada)
fr_CH=Français (Suisse)
fr_FR=Français (France)
fr_LU=Français (Luxembourg)
fy=Frysk
ga=Gaeilge
gd=Gàidhlig
gl=Galego
gl_ES=0
gn=Avañe'ẽ
gu=ગુજરાતી
gv=Gaelg
ha=حَوْسَ
he=עברית
he_IL=0
hi=हिन्दी
hr=Hrvatski
hr_HR=0
hu=magyar
hu_HU=0
hy=Հայերեն
ia=Interlingua
id=Bahasa Indonesia
id_ID=0
is=Íslenska
is_IS=0
it=Italiano
it_CH=0
it_IT=0
iu=ᐃᓄᒃᑎᑐᑦ/inuktitut
ja=日本語
ja_JP=0
ka=ქართული
kk=Қазақша
kl=Kalaallisut
km=ភាសាខ្មែរ
km_KH=0
kn=ಕನ್ನಡ
ko=한국어
ko_KR=0
ku=Kurdî
kw=Kernowek
ky=кыргызча
la=Latina
lo=ລາວ
lt=Lietuvių
lt=0
lv=Latviešu
lv_LV=0
jbo=La .lojban.
mg=Malagasy
mi=Māori
mk=Македонски
mk_MK=0
ml=മലയാളം
mn=Монгол
mr=मराठी
ms=Bahasa Melayu
ms_MY=0
mt=Malti
my=မြန်မာဘာသာ
my_MM=0
nb=0
nb_NO=0
ne=0
nl=Nederlands
nl_BE=0
nl_NL=0
nn=Norsk nynorsk
nn_NO=0
no=Norsk bokmål
no_NO=0
no_NY=0
nr=0
oc=Occitan
om=Oromoo
or=ଓଡ଼ିଆ
os=0
pa=ਪੰਜਾਬੀ
pl=Polski
pl_PL=0
ps=پښتو
pt=Português
pt_BR=0
pt_PT=0
qu=Runa Simi
rm=Rumantsch
ro=Română
ro_RO=0
ru=Русский
ru_RU=0
rw=Kinyarwanda
sa=0
sd=0
se=Sámegiella
se_NO=0
si=0
sk=Slovenčina
sk_SK=0
sl=Slovenščina
sl_SI=0
sl_SL=0
sm=0
so=0
sp=0
sq=Shqip
sq_AL=0
sr=Српски
sr_YU=0
ss=0
st=0
sv=Svenska
sv_SE=0
sv_SV=0
sw=0
ta=தமிழ்
te=0
tg=0
th=ไทย
th_TH=0
ti=0
tk=0
tl=0
to=0
tr=Türkçe
tr_TR=0
ts=0
tt=Татарча
ug=0
uk=Українська
uk_UA=0
ur=اردو
ur_PK=0
uz=0
vi=Tiếng Việt
vi_VN=0
wa=0
wo=0
xh=0
yi=ייִדיש
yo=0
zh=中文
zh_CN=中文(简体)
zh_HK=中文(香港)
zh_TW=中文(繁體)
zu=0

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,5 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# A simple script that adds all authors from transifex, which are
# listed in comments at the beginning of the file, to the
# 'translator-credits' translations - where launchpad added them
@ -19,75 +19,79 @@ import re
import sys
if __name__ == "__main__":
if len(sys.argv)!=2:
if len(sys.argv) < 2:
print "Usage: getpo_authors.py PATH_TO_PO_FILE"
sys.exit(-1)
f = open(sys.argv[1], "r")
if not f:
print "Can not find", sys.argv[1]
exit
lines = f.readlines()
for filename in sys.argv[1:]:
print("Processing file ", filename)
f = open(filename, "r")
if not f:
print "Can not find", filename
exit
lines = f.readlines()
f.close()
f.close()
new_authors = []
found = 0
new_authors = []
found = 0
# Find all authors with a simple finite state machine:
contributions = -1
line_count = 0
for i in lines:
line = i[:-1] # remove \n
if line=="# Translators:":
found = 1
elif found and line[:2]=="# " and line [:14]!="# FIRST AUTHOR":
new_authors.append(line[2:])
elif line[:5]=="msgid":
found = 0
elif line[:31]== "msgstr \"Launchpad Contributions":
contributions = line_count
line_count = line_count + 1
# Find all authors with a simple finite state machine:
contributions = -1
line_count = 0
for i in lines:
line = i[:-1] # remove \n
if line=="# Translators:":
found = 1
elif found and line[:2]=="# " and line [:14]!="# FIRST AUTHOR":
new_authors.append(line[2:])
elif line[:5]=="msgid":
found = 0
elif line[:31]== "msgstr \"Launchpad Contributions":
contributions = line_count
line_count = line_count + 1
# Delete all email addresses - not sure if the authors
# would want them to be published
email=re.compile(" *<.*@.*\..*> *") # one @ and one dot at least
for i in range(len(new_authors)):
g = email.search(new_authors[i])
if g:
new_authors[i] = new_authors[i][:g.start()] \
+ new_authors[i][g.end():]
# Delete all email addresses - not sure if the authors
# would want them to be published
email=re.compile(" *<.*@.*\..*> *") # one @ and one dot at least
for i in range(len(new_authors)):
g = email.search(new_authors[i])
if g:
new_authors[i] = new_authors[i][:g.start()] \
+ new_authors[i][g.end():]
# Get the old authors from the translator-credits string:
if contributions>0:
# Ignore the first entry, which is "msgstr ...", and the
# last two characters, which are the '"\n'.
old_authors = lines[contributions][:-2].split("\\n")[1:]
for i in range(len(old_authors)):
old_authors[i] = old_authors[i].strip()
else:
old_authors=[]
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, "")
# Get the old authors from the translator-credits string:
if contributions>0:
# Ignore the first entry, which is "msgstr ...", and the
# last two characters, which are the '"\n'.
old_authors = lines[contributions][:-2].split("\\n")[1:]
for i in range(len(old_authors)):
old_authors[i] = old_authors[i].strip()
else:
old_authors=[]
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 replace the old contribution string
lines[contributions] = credits_line
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 replace the old contribution string
lines[contributions] = credits_line
# Overwrite old file
f = open(sys.argv[1], "w")
for i in lines:
f.write(i)
f.close()
# Overwrite old file
f = open(filename, "w")
for i in lines:
f.write(i)
f.close()
print("Done with ", filename)

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -3,7 +3,7 @@
uniform sampler2D source;
uniform sampler2D depth;
uniform vec2 pixel;
uniform layout(r16f) volatile restrict writeonly image2D dest;
layout(r16f) volatile restrict writeonly uniform image2D dest;
uniform float sigma = 5.;
layout (local_size_x = 8, local_size_y = 8) in;

View File

@ -3,7 +3,7 @@
uniform sampler2D source;
uniform sampler2D depth;
uniform vec2 pixel;
uniform layout(r16f) volatile restrict writeonly image2D dest;
layout(r16f) volatile restrict writeonly uniform image2D dest;
uniform float sigma = 5.;
layout (local_size_x = 8, local_size_y = 8) in;

View File

@ -1,5 +1,5 @@
uniform sampler2D source;
uniform layout(r32f) restrict writeonly image2D dest;
layout(r32f) restrict writeonly uniform image2D dest;
uniform vec2 pixel;
uniform float weights[7];

View File

@ -1,5 +1,5 @@
uniform sampler2D source;
uniform layout(r32f) restrict writeonly image2D dest;
layout(r32f) restrict writeonly uniform image2D dest;
uniform vec2 pixel;
uniform float weights[7];

View File

@ -1,5 +1,5 @@
uniform sampler2D source;
uniform layout(rgba16f) restrict writeonly image2D dest;
layout(rgba16f) restrict writeonly uniform image2D dest;
uniform vec2 pixel;
uniform float weights[7];

View File

@ -1,5 +1,5 @@
uniform sampler2D source;
uniform layout(rgba16f) restrict writeonly image2D dest;
layout(rgba16f) restrict writeonly uniform image2D dest;
uniform vec2 pixel;
uniform float weights[7];

View File

@ -4,7 +4,7 @@ out vec4 FragColor;
void main(void)
{
vec3 eyedir = vec3(gl_FragCoord.xy / screen, 1.);
vec3 eyedir = vec3(mod(gl_FragCoord.xy, screen) / screen, 1.);
eyedir = 2.0 * eyedir - 1.0;
vec4 tmp = (InverseProjectionMatrix * vec4(eyedir, 1.));
tmp /= tmp.w;

View File

@ -81,6 +81,10 @@ when the border that intersect at this corner are enabled.
left_border="128" right_border="13" top_border="13" bottom_border="13"
preserve_h_aspect_ratios="true" hborder_out_portion="0" vborder_out_portion="0"/>
<element type="generic-message" image="forest/generic.png"
left_border="128" right_border="13" top_border="13" bottom_border="13"
preserve_h_aspect_ratios="true" hborder_out_portion="0" vborder_out_portion="0"/>
<element type="button" state="neutral" image="forest/glassbutton.png"
left_border="13" right_border="13" top_border="13" bottom_border="13"
preserve_h_aspect_ratios="true" hborder_out_portion="0" vborder_out_portion="0"/>

View File

@ -80,6 +80,10 @@ when the border that intersect at this corner are enabled.
left_border="128" right_border="13" top_border="13" bottom_border="13"
preserve_h_aspect_ratios="true" hborder_out_portion="0" vborder_out_portion="0"/>
<element type="generic-message" image="ocean/generic.png"
left_border="128" right_border="13" top_border="13" bottom_border="13"
preserve_h_aspect_ratios="true" hborder_out_portion="0" vborder_out_portion="0"/>
<element type="button" state="neutral" image="ocean/glassbutton.png"
left_border="13" right_border="13" top_border="13" bottom_border="13"
preserve_h_aspect_ratios="true" hborder_out_portion="0" vborder_out_portion="0"/>

View File

@ -80,6 +80,10 @@ when the border that intersect at this corner are enabled.
left_border="128" right_border="13" top_border="13" bottom_border="13"
preserve_h_aspect_ratios="true" hborder_out_portion="0" vborder_out_portion="0"/>
<element type="generic-message" image="peach/generic.png"
left_border="128" right_border="13" top_border="13" bottom_border="13"
preserve_h_aspect_ratios="true" hborder_out_portion="0" vborder_out_portion="0"/>
<element type="button" state="neutral" image="peach/glassbutton.png"
left_border="13" right_border="13" top_border="13" bottom_border="13"
preserve_h_aspect_ratios="true" hborder_out_portion="0" vborder_out_portion="0"/>

View File

@ -81,6 +81,10 @@ when the border that intersect at this corner are enabled.
left_border="128" right_border="13" top_border="13" bottom_border="13"
preserve_h_aspect_ratios="true" hborder_out_portion="0" vborder_out_portion="0"/>
<element type="generic-message" image="ruby/generic.png"
left_border="128" right_border="13" top_border="13" bottom_border="13"
preserve_h_aspect_ratios="true" hborder_out_portion="0" vborder_out_portion="0"/>
<element type="button" state="neutral" image="ruby/glassbutton.png"
left_border="13" right_border="13" top_border="13" bottom_border="13"
preserve_h_aspect_ratios="true" hborder_out_portion="0" vborder_out_portion="0"/>

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

BIN
data/skins/ruby/generic.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

View File

@ -118,7 +118,7 @@
<!-- The field od views for 1-4 player split screen. fov-3 is
actually not used (since 3 player split screen uses the
same layout as 4 player split screen) -->
<camera fov-1="80" fov-2="65" fov-3="50" fov-4="75" />
<camera fov-1="80" fov-2="65" fov-3="50" fov-4="75" cutscene-fov="0.61" />
<!-- disable-while-unskid: Disable steering when stop skidding during
the time it takes to adjust the physical body with the graphics.
@ -396,13 +396,6 @@
post-skid-rotate-factor="1"
reduce-turn-min="0.2" reduce-turn-max="0.8"/>
<!-- Leaning related parameters, i.e. slightly leaning the karts when
driving a fast curve.
max: maximum leaning (i.e. when steering as much as possible at highest
speed), in degrees.
sped: Speed with which the leaning changes (in degree/second). -->
<lean max="8.6" speed="5.0" />
<kart-type>
<light />
<medium />

View File

@ -8,28 +8,28 @@
<summary>A racing game</summary>
<description>
<p>
SuperTuxKart is a fun 3D kart racing game.
You can play with up to 4 friends on one PC, racing against each other or
just try to beat the computer.
Supertuxkart is a free 3D kart racing game, with a focus on having fun over
realism. You can play with up to 4 friends on one PC, racing against each
other, or try to beat the computer in single-player mode.
</p>
<p>
See the great lighthouse or drive through the sand and visit the pyramids.
Race underground or in space, watching the stars passing by.
Have some rest under the palms on the beach (watching the other karts
overtaking you :) ).
But don't eat the bananas! Watch for bowling balls, plungers, bubble gum
and cakes thrown by opponents.
Race underground or in space, watching the stars pass by. Or rest under the
palm trees on the beach, watching the other karts overtake you. But don't eat
the bananas! Watch for bowling balls, plungers, bubble gum and cakes thrown by
your opponents.
</p>
<p>
You can do a single race against other karts, compete in one of several
Grand Prix, try to beat the high score in time trials on your own, play
battle mode against your friends, and more!
You can do a single race against other karts, compete in one of several Grand
Prix, try to beat the high score in time trials on your own, play battle mode
against the computer or your friends, and more!
</p>
</description>
<url type="homepage">http://supertuxkart.sourceforge.net/</url>
<screenshots>
<screenshot type="default">http://supertuxkart.sourceforge.net/persistent/images/4/4d/SuperTuxKart_0.8_screenshot.jpg</screenshot>
<screenshot>http://supertuxkart.sourceforge.net/persistent/images/1/1f/SuperTuxKart_0.8_screenshot4.jpg</screenshot>
<screenshot type="default">http://supertuxkart.sourceforge.net/persistent/images/4/4e/Supertuxkart-0.9-screenshot-2.jpg</screenshot>
<screenshot>http://supertuxkart.sourceforge.net/persistent/images/a/a9/Supertuxkart-0.9-screenshot-1.jpg</screenshot>
<screenshot>http://supertuxkart.sourceforge.net/persistent/images/6/63/Supertuxkart-0.9-screenshot-3.jpg</screenshot>
</screenshots>
<updatecontact>supertuxkart-devel@lists.sourceforge.net</updatecontact>
</application>

View File

@ -3,8 +3,8 @@
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/src/)
if(APPLE)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -arch i386")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -arch i386 -F/Library/Frameworks")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -arch x86_64")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -arch x86_64 -F/Library/Frameworks")
endif()
# libbulletmath

View File

@ -17,6 +17,9 @@ subject to the following restrictions:
#include "SphereTriangleDetector.h"
#include "BulletCollision/CollisionShapes/btTriangleShape.h"
#include "BulletCollision/CollisionShapes/btSphereShape.h"
#include "BulletCollision/CollisionDispatch/btCollisionObject.h"
#include "BulletCollision/CollisionDispatch/btManifoldResult.h"
#include "BulletCollision/CollisionShapes/btTriangleShape.h"
SphereTriangleDetector::SphereTriangleDetector(btSphereShape* sphere,btTriangleShape* triangle,btScalar contactBreakingThreshold)
@ -43,6 +46,35 @@ void SphereTriangleDetector::getClosestPoints(const ClosestPointInput& input,Res
if (collide(sphereInTr.getOrigin(),point,normal,depth,timeOfImpact,m_contactBreakingThreshold))
{
// In some cases the normalInB is incorrect with a static triangle
// mesh (i.e. it's the connection point between puck and triangle, not
// the normal from the triangle - which is fine if the triangle mesh
// is a dynamic rigid body (i.e. can be pushed away), but appears to
// be wrong in case of a static body - it causes #2522 (puck suddenly
// pushed in air). So in case of a static triangle mesh, recompute
// the normal just based on the triangle mesh:
const btManifoldResult *mani = dynamic_cast<btManifoldResult*>(&output);
if(mani)
{
// Find the triangle:
const btCollisionObject *co = mani->getBody0Internal();
const btTriangleShape *tri = dynamic_cast<const btTriangleShape*>(co->getCollisionShape());
if(!tri)
{
co = mani->getBody1Internal();
tri = dynamic_cast<const btTriangleShape*>(co->getCollisionShape());
}
// If we have a triangle and it is static, recompute the normal
if(tri && co->isStaticOrKinematicObject())
{
normal = (tri->m_vertices1[1]-tri->m_vertices1[0])
.cross(tri->m_vertices1[2]-tri->m_vertices1[0]);
normal.normalize();;
}
}
if (swapResults)
{
btVector3 normalOnB = transformB.getBasis()*normal;

View File

@ -17,6 +17,9 @@ subject to the following restrictions:
#include "BulletCollision/CollisionShapes/btConvexShape.h"
#include "BulletCollision/NarrowPhaseCollision/btSimplexSolverInterface.h"
#include "BulletCollision/NarrowPhaseCollision/btConvexPenetrationDepthSolver.h"
#include "BulletCollision/CollisionDispatch/btManifoldResult.h"
#include "BulletCollision/CollisionDispatch/btCollisionObject.h"
#include "BulletCollision/CollisionShapes/btTriangleShape.h"
@ -441,6 +444,32 @@ void btGjkPairDetector::getClosestPointsNonVirtual(const ClosestPointInput& inpu
m_cachedSeparatingAxis = normalInB;
m_cachedSeparatingDistance = distance;
// In some cases the normalInB is incorrect with a static triangle
// mesh (i.e. it's the connection point between puck and triangle, not
// the normal from the triangle - which is fine if the triangle mesh
// is a dynamic rigid body (i.e. can be pushed away), but appears to
// be wrong in case of a static body - it causes #2522 (puck suddenly
// pushed in air). So in case of a static triangle mesh, recompute
// the normal just based on the triangle mesh:
const btManifoldResult *mani = dynamic_cast<btManifoldResult*>(&output);
if(mani)
{
// Find the triangle:
const btCollisionObject *co = mani->getBody0Internal();
const btTriangleShape *tri = dynamic_cast<const btTriangleShape*>(co->getCollisionShape());
if(!tri)
{
co = mani->getBody1Internal();
tri = dynamic_cast<const btTriangleShape*>(co->getCollisionShape());
}
// If we have a triangle and it is static, recompute the normal
if(tri && co->isStaticOrKinematicObject())
{
normalInB = (tri->m_vertices1[1]-tri->m_vertices1[0])
.cross(tri->m_vertices1[2]-tri->m_vertices1[0]);
normalInB.normalize();;
}
}
output.addContactPoint(
normalInB,
pointOnB+positionOffset,

View File

@ -305,12 +305,12 @@ unsigned char sBulletDNAstr[]= {
97,116,97,0,98,116,83,111,102,116,66,111,100,121,70,108,111,97,116,68,
97,116,97,0,84,76,69,78,1,0,1,0,2,0,2,0,4,0,4,0,
4,0,4,0,8,0,0,0,12,0,36,0,8,0,16,0,32,0,48,0,
96,0,64,0,-128,0,20,0,48,0,80,0,16,0,84,0,-124,0,12,0,
96,0,64,0,128,0,20,0,48,0,80,0,16,0,84,0,132,0,12,0,
52,0,52,0,20,0,64,0,4,0,4,0,8,0,4,0,32,0,28,0,
60,0,56,0,76,0,76,0,24,0,60,0,60,0,16,0,64,0,68,0,
-56,1,-8,0,-32,1,-104,3,8,0,44,0,0,0,76,0,108,0,84,1,
-44,0,-52,0,-12,0,84,1,-60,0,16,0,100,0,20,0,36,0,100,0,
92,0,104,0,-64,0,92,1,104,0,-92,1,83,84,82,67,61,0,0,0,
200,1,248,0,224,1,152,3,8,0,44,0,0,0,76,0,108,0,84,1,
212,0,204,0,244,0,84,1,196,0,16,0,100,0,20,0,36,0,100,0,
92,0,104,0,192,0,92,1,104,0,164,1,83,84,82,67,61,0,0,0,
10,0,3,0,4,0,0,0,4,0,1,0,9,0,2,0,11,0,3,0,
10,0,3,0,10,0,4,0,10,0,5,0,12,0,2,0,9,0,6,0,
9,0,7,0,13,0,1,0,7,0,8,0,14,0,1,0,8,0,8,0,
@ -359,51 +359,51 @@ unsigned char sBulletDNAstr[]= {
7,0,114,0,4,0,115,0,4,0,116,0,4,0,117,0,4,0,118,0,
4,0,119,0,4,0,120,0,4,0,121,0,48,0,21,0,47,0,122,0,
15,0,123,0,13,0,124,0,13,0,125,0,13,0,126,0,13,0,127,0,
13,0,-128,0,13,0,-127,0,13,0,-126,0,13,0,-125,0,13,0,-124,0,
7,0,-123,0,7,0,-122,0,7,0,-121,0,7,0,-120,0,7,0,-119,0,
7,0,-118,0,7,0,-117,0,7,0,-116,0,7,0,-115,0,4,0,-114,0,
13,0,128,0,13,0,129,0,13,0,130,0,13,0,131,0,13,0,132,0,
7,0,133,0,7,0,134,0,7,0,135,0,7,0,136,0,7,0,137,0,
7,0,138,0,7,0,139,0,7,0,140,0,7,0,141,0,4,0,142,0,
49,0,22,0,46,0,122,0,16,0,123,0,14,0,124,0,14,0,125,0,
14,0,126,0,14,0,127,0,14,0,-128,0,14,0,-127,0,14,0,-126,0,
14,0,-125,0,14,0,-124,0,8,0,-123,0,8,0,-122,0,8,0,-121,0,
8,0,-120,0,8,0,-119,0,8,0,-118,0,8,0,-117,0,8,0,-116,0,
8,0,-115,0,4,0,-114,0,0,0,37,0,50,0,2,0,4,0,-113,0,
4,0,-112,0,51,0,11,0,52,0,-111,0,52,0,-110,0,0,0,35,0,
4,0,-109,0,4,0,-108,0,4,0,-107,0,4,0,-106,0,7,0,-105,0,
7,0,-104,0,4,0,-103,0,0,0,-102,0,53,0,3,0,51,0,-101,0,
13,0,-100,0,13,0,-99,0,54,0,3,0,51,0,-101,0,14,0,-100,0,
14,0,-99,0,55,0,13,0,51,0,-101,0,18,0,-98,0,18,0,-97,0,
4,0,-96,0,4,0,-95,0,4,0,-94,0,7,0,-93,0,7,0,-92,0,
7,0,-91,0,7,0,-90,0,7,0,-89,0,7,0,-88,0,7,0,-87,0,
56,0,13,0,51,0,-101,0,17,0,-98,0,17,0,-97,0,4,0,-96,0,
4,0,-95,0,4,0,-94,0,7,0,-93,0,7,0,-92,0,7,0,-91,0,
7,0,-90,0,7,0,-89,0,7,0,-88,0,7,0,-87,0,57,0,11,0,
51,0,-101,0,17,0,-98,0,17,0,-97,0,7,0,-86,0,7,0,-85,0,
7,0,-84,0,7,0,-89,0,7,0,-88,0,7,0,-87,0,7,0,-83,0,
0,0,21,0,58,0,9,0,51,0,-101,0,17,0,-98,0,17,0,-97,0,
13,0,-82,0,13,0,-81,0,13,0,-80,0,13,0,-79,0,4,0,-78,0,
4,0,-77,0,59,0,5,0,58,0,-76,0,4,0,-75,0,7,0,-74,0,
7,0,-73,0,7,0,-72,0,60,0,9,0,51,0,-101,0,17,0,-98,0,
17,0,-97,0,7,0,-82,0,7,0,-81,0,7,0,-80,0,7,0,-79,0,
4,0,-78,0,4,0,-77,0,61,0,4,0,7,0,-71,0,7,0,-70,0,
7,0,-69,0,4,0,78,0,62,0,10,0,61,0,-68,0,13,0,-67,0,
13,0,-66,0,13,0,-65,0,13,0,-64,0,13,0,-63,0,7,0,-123,0,
7,0,-62,0,4,0,-61,0,4,0,53,0,63,0,4,0,61,0,-68,0,
4,0,-60,0,7,0,-59,0,4,0,-58,0,64,0,4,0,13,0,-63,0,
61,0,-68,0,4,0,-57,0,7,0,-56,0,65,0,7,0,13,0,-55,0,
61,0,-68,0,4,0,-54,0,7,0,-53,0,7,0,-52,0,7,0,-51,0,
4,0,53,0,66,0,6,0,15,0,-50,0,13,0,-52,0,13,0,-49,0,
52,0,-48,0,4,0,-47,0,7,0,-51,0,67,0,26,0,4,0,-46,0,
7,0,-45,0,7,0,-83,0,7,0,-44,0,7,0,-43,0,7,0,-42,0,
7,0,-41,0,7,0,-40,0,7,0,-39,0,7,0,-38,0,7,0,-37,0,
7,0,-36,0,7,0,-35,0,7,0,-34,0,7,0,-33,0,7,0,-32,0,
7,0,-31,0,7,0,-30,0,7,0,-29,0,7,0,-28,0,7,0,-27,0,
4,0,-26,0,4,0,-25,0,4,0,-24,0,4,0,-23,0,4,0,116,0,
68,0,12,0,15,0,-22,0,15,0,-21,0,15,0,-20,0,13,0,-19,0,
13,0,-18,0,7,0,-17,0,4,0,-16,0,4,0,-15,0,4,0,-14,0,
4,0,-13,0,7,0,-53,0,4,0,53,0,69,0,27,0,17,0,-12,0,
15,0,-11,0,15,0,-10,0,13,0,-19,0,13,0,-9,0,13,0,-8,0,
13,0,-7,0,13,0,-6,0,13,0,-5,0,4,0,-4,0,7,0,-3,0,
4,0,-2,0,4,0,-1,0,4,0,0,1,7,0,1,1,7,0,2,1,
14,0,126,0,14,0,127,0,14,0,128,0,14,0,129,0,14,0,130,0,
14,0,131,0,14,0,132,0,8,0,133,0,8,0,134,0,8,0,135,0,
8,0,136,0,8,0,137,0,8,0,138,0,8,0,139,0,8,0,140,0,
8,0,141,0,4,0,142,0,0,0,37,0,50,0,2,0,4,0,143,0,
4,0,144,0,51,0,11,0,52,0,145,0,52,0,146,0,0,0,35,0,
4,0,147,0,4,0,148,0,4,0,149,0,4,0,150,0,7,0,151,0,
7,0,152,0,4,0,153,0,0,0,154,0,53,0,3,0,51,0,155,0,
13,0,156,0,13,0,157,0,54,0,3,0,51,0,155,0,14,0,156,0,
14,0,157,0,55,0,13,0,51,0,155,0,18,0,158,0,18,0,159,0,
4,0,160,0,4,0,161,0,4,0,162,0,7,0,163,0,7,0,164,0,
7,0,165,0,7,0,166,0,7,0,167,0,7,0,168,0,7,0,169,0,
56,0,13,0,51,0,155,0,17,0,158,0,17,0,159,0,4,0,160,0,
4,0,161,0,4,0,162,0,7,0,163,0,7,0,164,0,7,0,165,0,
7,0,166,0,7,0,167,0,7,0,168,0,7,0,169,0,57,0,11,0,
51,0,155,0,17,0,158,0,17,0,159,0,7,0,170,0,7,0,171,0,
7,0,172,0,7,0,167,0,7,0,168,0,7,0,169,0,7,0,173,0,
0,0,21,0,58,0,9,0,51,0,155,0,17,0,158,0,17,0,159,0,
13,0,174,0,13,0,175,0,13,0,176,0,13,0,177,0,4,0,178,0,
4,0,179,0,59,0,5,0,58,0,180,0,4,0,181,0,7,0,182,0,
7,0,183,0,7,0,184,0,60,0,9,0,51,0,155,0,17,0,158,0,
17,0,159,0,7,0,174,0,7,0,175,0,7,0,176,0,7,0,177,0,
4,0,178,0,4,0,179,0,61,0,4,0,7,0,185,0,7,0,186,0,
7,0,187,0,4,0,78,0,62,0,10,0,61,0,188,0,13,0,189,0,
13,0,190,0,13,0,191,0,13,0,192,0,13,0,193,0,7,0,133,0,
7,0,194,0,4,0,195,0,4,0,53,0,63,0,4,0,61,0,188,0,
4,0,196,0,7,0,197,0,4,0,198,0,64,0,4,0,13,0,193,0,
61,0,188,0,4,0,199,0,7,0,200,0,65,0,7,0,13,0,201,0,
61,0,188,0,4,0,202,0,7,0,203,0,7,0,204,0,7,0,205,0,
4,0,53,0,66,0,6,0,15,0,206,0,13,0,204,0,13,0,207,0,
52,0,208,0,4,0,209,0,7,0,205,0,67,0,26,0,4,0,210,0,
7,0,211,0,7,0,173,0,7,0,212,0,7,0,213,0,7,0,214,0,
7,0,215,0,7,0,216,0,7,0,217,0,7,0,218,0,7,0,219,0,
7,0,220,0,7,0,221,0,7,0,222,0,7,0,223,0,7,0,224,0,
7,0,225,0,7,0,226,0,7,0,227,0,7,0,228,0,7,0,229,0,
4,0,230,0,4,0,231,0,4,0,232,0,4,0,233,0,4,0,116,0,
68,0,12,0,15,0,234,0,15,0,235,0,15,0,236,0,13,0,237,0,
13,0,238,0,7,0,239,0,4,0,240,0,4,0,241,0,4,0,242,0,
4,0,243,0,7,0,203,0,4,0,53,0,69,0,27,0,17,0,244,0,
15,0,245,0,15,0,246,0,13,0,237,0,13,0,247,0,13,0,248,0,
13,0,249,0,13,0,250,0,13,0,251,0,4,0,252,0,7,0,253,0,
4,0,254,0,4,0,255,0,4,0,0,1,7,0,1,1,7,0,2,1,
4,0,3,1,4,0,4,1,7,0,5,1,7,0,6,1,7,0,7,1,
7,0,8,1,7,0,9,1,7,0,10,1,4,0,11,1,4,0,12,1,
4,0,13,1,70,0,12,0,9,0,14,1,9,0,15,1,13,0,16,1,
@ -411,8 +411,9 @@ unsigned char sBulletDNAstr[]= {
4,0,22,1,4,0,23,1,4,0,24,1,4,0,53,0,71,0,19,0,
47,0,122,0,68,0,25,1,61,0,26,1,62,0,27,1,63,0,28,1,
64,0,29,1,65,0,30,1,66,0,31,1,69,0,32,1,70,0,33,1,
4,0,34,1,4,0,-1,0,4,0,35,1,4,0,36,1,4,0,37,1,
4,0,34,1,4,0,255,0,4,0,35,1,4,0,36,1,4,0,37,1,
4,0,38,1,4,0,39,1,4,0,40,1,67,0,41,1,};
int sBulletDNAlen= sizeof(sBulletDNAstr);
unsigned char sBulletDNAstr64[]= {
83,68,78,65,78,65,77,69,42,1,0,0,109,95,115,105,122,101,0,109,
@ -721,12 +722,12 @@ unsigned char sBulletDNAstr64[]= {
97,116,97,0,98,116,83,111,102,116,66,111,100,121,70,108,111,97,116,68,
97,116,97,0,84,76,69,78,1,0,1,0,2,0,2,0,4,0,4,0,
4,0,4,0,8,0,0,0,16,0,48,0,16,0,16,0,32,0,48,0,
96,0,64,0,-128,0,20,0,48,0,80,0,16,0,96,0,-112,0,16,0,
96,0,64,0,128,0,20,0,48,0,80,0,16,0,96,0,144,0,16,0,
56,0,56,0,20,0,72,0,4,0,4,0,8,0,4,0,56,0,32,0,
80,0,72,0,96,0,80,0,32,0,64,0,64,0,16,0,72,0,80,0,
-40,1,8,1,-16,1,-88,3,8,0,56,0,0,0,88,0,120,0,96,1,
-32,0,-40,0,0,1,96,1,-48,0,16,0,104,0,24,0,40,0,104,0,
96,0,104,0,-56,0,104,1,112,0,-40,1,83,84,82,67,61,0,0,0,
216,1,8,1,240,1,168,3,8,0,56,0,0,0,88,0,120,0,96,1,
224,0,216,0,0,1,96,1,208,0,16,0,104,0,24,0,40,0,104,0,
96,0,104,0,200,0,104,1,112,0,216,1,83,84,82,67,61,0,0,0,
10,0,3,0,4,0,0,0,4,0,1,0,9,0,2,0,11,0,3,0,
10,0,3,0,10,0,4,0,10,0,5,0,12,0,2,0,9,0,6,0,
9,0,7,0,13,0,1,0,7,0,8,0,14,0,1,0,8,0,8,0,
@ -775,51 +776,51 @@ unsigned char sBulletDNAstr64[]= {
7,0,114,0,4,0,115,0,4,0,116,0,4,0,117,0,4,0,118,0,
4,0,119,0,4,0,120,0,4,0,121,0,48,0,21,0,47,0,122,0,
15,0,123,0,13,0,124,0,13,0,125,0,13,0,126,0,13,0,127,0,
13,0,-128,0,13,0,-127,0,13,0,-126,0,13,0,-125,0,13,0,-124,0,
7,0,-123,0,7,0,-122,0,7,0,-121,0,7,0,-120,0,7,0,-119,0,
7,0,-118,0,7,0,-117,0,7,0,-116,0,7,0,-115,0,4,0,-114,0,
13,0,128,0,13,0,129,0,13,0,130,0,13,0,131,0,13,0,132,0,
7,0,133,0,7,0,134,0,7,0,135,0,7,0,136,0,7,0,137,0,
7,0,138,0,7,0,139,0,7,0,140,0,7,0,141,0,4,0,142,0,
49,0,22,0,46,0,122,0,16,0,123,0,14,0,124,0,14,0,125,0,
14,0,126,0,14,0,127,0,14,0,-128,0,14,0,-127,0,14,0,-126,0,
14,0,-125,0,14,0,-124,0,8,0,-123,0,8,0,-122,0,8,0,-121,0,
8,0,-120,0,8,0,-119,0,8,0,-118,0,8,0,-117,0,8,0,-116,0,
8,0,-115,0,4,0,-114,0,0,0,37,0,50,0,2,0,4,0,-113,0,
4,0,-112,0,51,0,11,0,52,0,-111,0,52,0,-110,0,0,0,35,0,
4,0,-109,0,4,0,-108,0,4,0,-107,0,4,0,-106,0,7,0,-105,0,
7,0,-104,0,4,0,-103,0,0,0,-102,0,53,0,3,0,51,0,-101,0,
13,0,-100,0,13,0,-99,0,54,0,3,0,51,0,-101,0,14,0,-100,0,
14,0,-99,0,55,0,13,0,51,0,-101,0,18,0,-98,0,18,0,-97,0,
4,0,-96,0,4,0,-95,0,4,0,-94,0,7,0,-93,0,7,0,-92,0,
7,0,-91,0,7,0,-90,0,7,0,-89,0,7,0,-88,0,7,0,-87,0,
56,0,13,0,51,0,-101,0,17,0,-98,0,17,0,-97,0,4,0,-96,0,
4,0,-95,0,4,0,-94,0,7,0,-93,0,7,0,-92,0,7,0,-91,0,
7,0,-90,0,7,0,-89,0,7,0,-88,0,7,0,-87,0,57,0,11,0,
51,0,-101,0,17,0,-98,0,17,0,-97,0,7,0,-86,0,7,0,-85,0,
7,0,-84,0,7,0,-89,0,7,0,-88,0,7,0,-87,0,7,0,-83,0,
0,0,21,0,58,0,9,0,51,0,-101,0,17,0,-98,0,17,0,-97,0,
13,0,-82,0,13,0,-81,0,13,0,-80,0,13,0,-79,0,4,0,-78,0,
4,0,-77,0,59,0,5,0,58,0,-76,0,4,0,-75,0,7,0,-74,0,
7,0,-73,0,7,0,-72,0,60,0,9,0,51,0,-101,0,17,0,-98,0,
17,0,-97,0,7,0,-82,0,7,0,-81,0,7,0,-80,0,7,0,-79,0,
4,0,-78,0,4,0,-77,0,61,0,4,0,7,0,-71,0,7,0,-70,0,
7,0,-69,0,4,0,78,0,62,0,10,0,61,0,-68,0,13,0,-67,0,
13,0,-66,0,13,0,-65,0,13,0,-64,0,13,0,-63,0,7,0,-123,0,
7,0,-62,0,4,0,-61,0,4,0,53,0,63,0,4,0,61,0,-68,0,
4,0,-60,0,7,0,-59,0,4,0,-58,0,64,0,4,0,13,0,-63,0,
61,0,-68,0,4,0,-57,0,7,0,-56,0,65,0,7,0,13,0,-55,0,
61,0,-68,0,4,0,-54,0,7,0,-53,0,7,0,-52,0,7,0,-51,0,
4,0,53,0,66,0,6,0,15,0,-50,0,13,0,-52,0,13,0,-49,0,
52,0,-48,0,4,0,-47,0,7,0,-51,0,67,0,26,0,4,0,-46,0,
7,0,-45,0,7,0,-83,0,7,0,-44,0,7,0,-43,0,7,0,-42,0,
7,0,-41,0,7,0,-40,0,7,0,-39,0,7,0,-38,0,7,0,-37,0,
7,0,-36,0,7,0,-35,0,7,0,-34,0,7,0,-33,0,7,0,-32,0,
7,0,-31,0,7,0,-30,0,7,0,-29,0,7,0,-28,0,7,0,-27,0,
4,0,-26,0,4,0,-25,0,4,0,-24,0,4,0,-23,0,4,0,116,0,
68,0,12,0,15,0,-22,0,15,0,-21,0,15,0,-20,0,13,0,-19,0,
13,0,-18,0,7,0,-17,0,4,0,-16,0,4,0,-15,0,4,0,-14,0,
4,0,-13,0,7,0,-53,0,4,0,53,0,69,0,27,0,17,0,-12,0,
15,0,-11,0,15,0,-10,0,13,0,-19,0,13,0,-9,0,13,0,-8,0,
13,0,-7,0,13,0,-6,0,13,0,-5,0,4,0,-4,0,7,0,-3,0,
4,0,-2,0,4,0,-1,0,4,0,0,1,7,0,1,1,7,0,2,1,
14,0,126,0,14,0,127,0,14,0,128,0,14,0,129,0,14,0,130,0,
14,0,131,0,14,0,132,0,8,0,133,0,8,0,134,0,8,0,135,0,
8,0,136,0,8,0,137,0,8,0,138,0,8,0,139,0,8,0,140,0,
8,0,141,0,4,0,142,0,0,0,37,0,50,0,2,0,4,0,143,0,
4,0,144,0,51,0,11,0,52,0,145,0,52,0,146,0,0,0,35,0,
4,0,147,0,4,0,148,0,4,0,149,0,4,0,150,0,7,0,151,0,
7,0,152,0,4,0,153,0,0,0,154,0,53,0,3,0,51,0,155,0,
13,0,156,0,13,0,157,0,54,0,3,0,51,0,155,0,14,0,156,0,
14,0,157,0,55,0,13,0,51,0,155,0,18,0,158,0,18,0,159,0,
4,0,160,0,4,0,161,0,4,0,162,0,7,0,163,0,7,0,164,0,
7,0,165,0,7,0,166,0,7,0,167,0,7,0,168,0,7,0,169,0,
56,0,13,0,51,0,155,0,17,0,158,0,17,0,159,0,4,0,160,0,
4,0,161,0,4,0,162,0,7,0,163,0,7,0,164,0,7,0,165,0,
7,0,166,0,7,0,167,0,7,0,168,0,7,0,169,0,57,0,11,0,
51,0,155,0,17,0,158,0,17,0,159,0,7,0,170,0,7,0,171,0,
7,0,172,0,7,0,167,0,7,0,168,0,7,0,169,0,7,0,173,0,
0,0,21,0,58,0,9,0,51,0,155,0,17,0,158,0,17,0,159,0,
13,0,174,0,13,0,175,0,13,0,176,0,13,0,177,0,4,0,178,0,
4,0,179,0,59,0,5,0,58,0,180,0,4,0,181,0,7,0,182,0,
7,0,183,0,7,0,184,0,60,0,9,0,51,0,155,0,17,0,158,0,
17,0,159,0,7,0,174,0,7,0,175,0,7,0,176,0,7,0,177,0,
4,0,178,0,4,0,179,0,61,0,4,0,7,0,185,0,7,0,186,0,
7,0,187,0,4,0,78,0,62,0,10,0,61,0,188,0,13,0,189,0,
13,0,190,0,13,0,191,0,13,0,192,0,13,0,193,0,7,0,133,0,
7,0,194,0,4,0,195,0,4,0,53,0,63,0,4,0,61,0,188,0,
4,0,196,0,7,0,197,0,4,0,198,0,64,0,4,0,13,0,193,0,
61,0,188,0,4,0,199,0,7,0,200,0,65,0,7,0,13,0,201,0,
61,0,188,0,4,0,202,0,7,0,203,0,7,0,204,0,7,0,205,0,
4,0,53,0,66,0,6,0,15,0,206,0,13,0,204,0,13,0,207,0,
52,0,208,0,4,0,209,0,7,0,205,0,67,0,26,0,4,0,210,0,
7,0,211,0,7,0,173,0,7,0,212,0,7,0,213,0,7,0,214,0,
7,0,215,0,7,0,216,0,7,0,217,0,7,0,218,0,7,0,219,0,
7,0,220,0,7,0,221,0,7,0,222,0,7,0,223,0,7,0,224,0,
7,0,225,0,7,0,226,0,7,0,227,0,7,0,228,0,7,0,229,0,
4,0,230,0,4,0,231,0,4,0,232,0,4,0,233,0,4,0,116,0,
68,0,12,0,15,0,234,0,15,0,235,0,15,0,236,0,13,0,237,0,
13,0,238,0,7,0,239,0,4,0,240,0,4,0,241,0,4,0,242,0,
4,0,243,0,7,0,203,0,4,0,53,0,69,0,27,0,17,0,244,0,
15,0,245,0,15,0,246,0,13,0,237,0,13,0,247,0,13,0,248,0,
13,0,249,0,13,0,250,0,13,0,251,0,4,0,252,0,7,0,253,0,
4,0,254,0,4,0,255,0,4,0,0,1,7,0,1,1,7,0,2,1,
4,0,3,1,4,0,4,1,7,0,5,1,7,0,6,1,7,0,7,1,
7,0,8,1,7,0,9,1,7,0,10,1,4,0,11,1,4,0,12,1,
4,0,13,1,70,0,12,0,9,0,14,1,9,0,15,1,13,0,16,1,
@ -827,6 +828,6 @@ unsigned char sBulletDNAstr64[]= {
4,0,22,1,4,0,23,1,4,0,24,1,4,0,53,0,71,0,19,0,
47,0,122,0,68,0,25,1,61,0,26,1,62,0,27,1,63,0,28,1,
64,0,29,1,65,0,30,1,66,0,31,1,69,0,32,1,70,0,33,1,
4,0,34,1,4,0,-1,0,4,0,35,1,4,0,36,1,4,0,37,1,
4,0,34,1,4,0,255,0,4,0,35,1,4,0,36,1,4,0,37,1,
4,0,38,1,4,0,39,1,4,0,40,1,67,0,41,1,};
int sBulletDNAlen64= sizeof(sBulletDNAstr64);

View File

@ -3,8 +3,8 @@
include_directories("include")
if(APPLE)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -arch i386")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -arch i386 -F/Library/Frameworks")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -arch x86_64")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -arch x86_64 -F/Library/Frameworks")
endif()
add_definitions(-DHAS_SOCKLEN_T)

View File

@ -3,16 +3,16 @@
include_directories("include")
if(APPLE)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -arch i386")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -arch i386 -F/Library/Frameworks")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -arch x86_64")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -arch x86_64 -F/Library/Frameworks")
endif()
find_package(OpenGL REQUIRED)
include_directories(${OPENGL_INCLUDE_DIR})
add_definitions(-DGLEW_STATIC)
add_library(glew STATIC
include/GL/glew.h include/GL/glxew.h include/GL/wglew.h
src/glew.c src/glewinfo.c
)
add_definitions(-DGLEW_STATIC)

View File

@ -1,8 +1,8 @@
cmake_minimum_required(VERSION 2.4.4)
if(APPLE)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -arch i386")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -arch i386 -F/Library/Frameworks")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -arch x86_64")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -arch x86_64 -F/Library/Frameworks")
endif()
SET(JPEG_SRCS

View File

@ -39,8 +39,8 @@ set(PNGLIB_NAME libpng${PNGLIB_MAJOR}${PNGLIB_MINOR})
set(PNGLIB_VERSION ${PNGLIB_MAJOR}.${PNGLIB_MINOR}.${PNGLIB_RELEASE})
if(APPLE)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -arch i386")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -arch i386 -F/Library/Frameworks")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -arch x86_64")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -arch x86_64 -F/Library/Frameworks")
endif()
# Needed packages. Since WIN32 (except mingw) uses the included zlib

View File

@ -3,7 +3,7 @@
cmake_minimum_required(VERSION 2.8.1)
# libbluetooth is required on Unix platforms
if(UNIX)
if(UNIX AND (NOT APPLE))
include(FindPkgConfig)
pkg_check_modules(BLUETOOTH bluez)
if(NOT BLUETOOTH_FOUND)
@ -29,8 +29,8 @@ set(WIIUSE_SOURCES
)
if(APPLE)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -arch i386")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -arch i386 -F/Library/Frameworks")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -arch x86_64")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -arch x86_64 -F/Library/Frameworks")
set(WIIUSE_SOURCES ${WIIUSE_SOURCES}
os_mac/os_mac_find.m
os_mac/os_mac_interface.m
@ -83,4 +83,4 @@ if(MSVC)
endif()
elseif(MINGW)
target_link_libraries(wiiuse hid setupapi)
endif()
endif()

View File

@ -127,7 +127,6 @@ private:
static SortOrder m_sort_order;
public:
Addon() {};
/** Initialises the object from an XML node. */
Addon(const XMLNode &xml);

View File

@ -55,6 +55,11 @@ AddonsManager* addons_manager = 0;
AddonsManager::AddonsManager() : m_addons_list(std::vector<Addon>() ),
m_state(STATE_INIT)
{
// Clean .part file which may be left behind
std::string addons_part = file_manager->getAddonsFile("addons.xml.part");
if (file_manager->fileExists(addons_part))
file_manager->removeFile(addons_part);
m_file_installed = file_manager->getAddonsFile("addons_installed.xml");
// Load the addons list (even if internet is disabled)
@ -90,6 +95,8 @@ void AddonsManager::init(const XMLNode *xml,
StkTime::TimeType mtime(0);
const XMLNode *include = xml->getNode("include");
std::string filename=file_manager->getAddonsFile("addons.xml");
// Prevent downloading when .part file created, which is already downloaded
std::string filename_part=file_manager->getAddonsFile("addons.xml.part");
if(!include)
{
file_manager->removeFile(filename);
@ -110,7 +117,8 @@ void AddonsManager::init(const XMLNode *xml,
( mtime > UserConfigParams::m_addons_last_updated +frequency ||
force_refresh ||
!file_manager->fileExists(filename) )
&& UserConfigParams::m_internet_status == RequestManager::IPERM_ALLOWED;
&& UserConfigParams::m_internet_status == RequestManager::IPERM_ALLOWED
&& !file_manager->fileExists(filename_part);
if (download)
{

View File

@ -40,6 +40,12 @@ NewsManager::NewsManager() : m_news(std::vector<NewsMessage>())
m_current_news_message = -1;
m_error_message.setAtomic("");
m_force_refresh = false;
// Clean .part file which may be left behind
std::string news_part = file_manager->getAddonsFile("news.xml.part");
if (file_manager->fileExists(news_part))
file_manager->removeFile(news_part);
init(false);
} // NewsManage
@ -101,6 +107,8 @@ void* NewsManager::downloadNews(void *obj)
me->clearErrorMessage();
std::string xml_file = file_manager->getAddonsFile("news.xml");
// Prevent downloading when .part file created, which is already downloaded
std::string xml_file_part = file_manager->getAddonsFile("news.xml.part");
bool news_exists = file_manager->fileExists(xml_file);
// The news message must be updated if either it has never been updated,
@ -113,8 +121,8 @@ void* NewsManager::downloadNews(void *obj)
< StkTime::getTimeSinceEpoch() ||
me->m_force_refresh ||
!news_exists )
&& UserConfigParams::m_internet_status==RequestManager::IPERM_ALLOWED;
&& UserConfigParams::m_internet_status==RequestManager::IPERM_ALLOWED
&& !file_manager->fileExists(xml_file_part);
const XMLNode *xml = NULL;
if(!download && news_exists)

View File

@ -421,6 +421,7 @@ void* SFXManager::mainLoop(void *obj)
delete me->m_sfx_commands.getData().front();
me->m_sfx_commands.getData().erase(me->m_sfx_commands.getData().begin());
}
me->m_sfx_commands.unlock();
#endif
return NULL;
} // mainLoop

View File

@ -21,6 +21,7 @@
#include <sstream>
#include "challenges/unlock_manager.hpp"
#include "io/file_manager.hpp"
#include "karts/abstract_kart.hpp"
#include "karts/kart_properties.hpp"
#include "karts/kart_properties_manager.hpp"
@ -28,6 +29,7 @@
#include "race/grand_prix_data.hpp"
#include "race/grand_prix_manager.hpp"
#include "race/race_manager.hpp"
#include "replay/replay_play.hpp"
#include "tracks/track.hpp"
#include "tracks/track_manager.hpp"
@ -41,6 +43,7 @@ ChallengeData::ChallengeData(const std::string& filename)
m_gp_id = "";
m_version = 0;
m_num_trophies = 0;
m_is_ghost_replay = false;
for (int d=0; d<RaceManager::DIFFICULTY_COUNT; d++)
{
@ -175,6 +178,13 @@ ChallengeData::ChallengeData(const std::string& filename)
if (!karts_node->get("number", &num_karts)) error("karts");
m_num_karts[d] = num_karts;
std::string replay_file;
if (karts_node->get("replay_file", &replay_file))
{
m_is_ghost_replay = true;
m_replay_files[d] = replay_file;
}
std::string ai_kart_ident;
if (karts_node->get("aiIdent", &ai_kart_ident))
m_ai_kart_ident[d] = ai_kart_ident;
@ -387,6 +397,16 @@ void ChallengeData::setRace(RaceManager::Difficulty d) const
race_manager->setNumPlayers(1);
}
if (m_is_ghost_replay)
{
const bool result = ReplayPlay::get()->addReplayFile(file_manager
->getAsset(FileManager::CHALLENGE, m_replay_files[d]),
true/*custom_replay*/);
if (!result)
Log::fatal("ChallengeData", "Can't open replay for challenge!");
race_manager->setRaceGhostKarts(true);
}
if (m_ai_kart_ident[d] != "")
{
race_manager->setAIKartOverride(m_ai_kart_ident[d]);

View File

@ -86,6 +86,7 @@ private:
int m_position[RaceManager::DIFFICULTY_COUNT];
int m_num_karts[RaceManager::DIFFICULTY_COUNT];
std::string m_ai_kart_ident[RaceManager::DIFFICULTY_COUNT];
std::string m_replay_files[RaceManager::DIFFICULTY_COUNT];
float m_time[RaceManager::DIFFICULTY_COUNT];
int m_energy[RaceManager::DIFFICULTY_COUNT];
RaceManager::AISuperPower m_ai_superpower[RaceManager::DIFFICULTY_COUNT];
@ -94,6 +95,7 @@ private:
std::string m_filename;
/** Version number of the challenge. */
int m_version;
bool m_is_ghost_replay;
void setUnlocks(const std::string &id,
ChallengeData::RewardType reward);
@ -182,6 +184,9 @@ public:
/** Returns if this challenge is a grand prix. */
bool isSingleRace() const { return m_mode == CM_SINGLE_RACE; }
// ------------------------------------------------------------------------
/** Returns if this challenge is using ghost replay. */
bool isGhostReplay() const { return m_is_ghost_replay; }
// ------------------------------------------------------------------------
/** Returns the challenge mode of this challenge. */
ChallengeModeType getMode() const { return m_mode; }
// ------------------------------------------------------------------------

View File

@ -99,6 +99,8 @@ PlayerProfile::PlayerProfile(const XMLNode* node)
//------------------------------------------------------------------------------
PlayerProfile::~PlayerProfile()
{
delete m_story_mode_status;
delete m_achievements_status;
#ifdef DEBUG
m_magic_number = 0xDEADBEEF;
#endif

View File

@ -177,6 +177,7 @@ void STKConfig::init_defaults()
m_ai_acceleration = 1.0f;
m_disable_steer_while_unskid = false;
m_camera_follow_skid = false;
m_cutscene_fov = 0.61f;
m_score_increase.clear();
m_leader_intervals.clear();
@ -264,6 +265,7 @@ void STKConfig::getAllData(const XMLNode * root)
camera->get("fov-2", &m_camera_fov[1]);
camera->get("fov-3", &m_camera_fov[2]);
camera->get("fov-4", &m_camera_fov[3]);
camera->get("cutscene-fov", &m_cutscene_fov);
}
if (const XMLNode *music_node = root->getNode("music"))

View File

@ -143,6 +143,8 @@ public:
/** The field of view for 1, 2, 3, 4 player split screen. */
float m_camera_fov[4];
float m_cutscene_fov;
/** File names of the default fonts in STK. */
std::string m_font_default;
std::string m_font_default_fallback;

View File

@ -515,20 +515,21 @@ namespace UserConfigParams
/** If track debugging is enabled. */
PARAM_PREFIX int m_track_debug PARAM_DEFAULT( false );
/** If random number of items is used in an arena. */
PARAM_PREFIX bool m_random_arena_item PARAM_DEFAULT( false );
/** True if check structures should be debugged. */
PARAM_PREFIX bool m_check_debug PARAM_DEFAULT( false );
/** Special debug camera: 0: normal camera; 1: being high over the kart;
2: on ground level; 3: free first person camera;
4: straight behind kart */
PARAM_PREFIX int m_camera_debug PARAM_DEFAULT( false );
/** True if physics debugging should be enabled. */
PARAM_PREFIX bool m_physics_debug PARAM_DEFAULT( false );
/** True if fps should be printed each frame. */
PARAM_PREFIX bool m_fps_debug PARAM_DEFAULT(false);
/** True if arena (battle/soccer) ai profiling. */
PARAM_PREFIX bool m_arena_ai_stats PARAM_DEFAULT(false);
/** True if slipstream debugging is activated. */
PARAM_PREFIX bool m_slipstream_debug PARAM_DEFAULT( false );
@ -593,9 +594,9 @@ namespace UserConfigParams
"stun.voxgratia.org",
"stun.xten.com") );
PARAM_PREFIX StringUserConfigParam m_packets_log_filename
PARAM_DEFAULT( StringUserConfigParam("packets_log.txt", "packets_log_filename",
"Where to log received and sent packets.") );
PARAM_PREFIX BoolUserConfigParam m_log_packets
PARAM_DEFAULT( BoolUserConfigParam(false, "log-network-packets",
"If all network packets should be logged") );
// ---- Graphic Quality
PARAM_PREFIX GroupUserConfigParam m_graphics_quality

View File

@ -392,7 +392,8 @@ void draw2DImage(const video::ITexture* texture,
const core::rect<s32>& sourceRect,
const core::rect<s32>* clip_rect,
const video::SColor* const colors,
bool use_alpha_channel_of_texture)
bool use_alpha_channel_of_texture,
bool draw_translucently)
{
if (!CVS->isGLSL())
{
@ -410,7 +411,12 @@ void draw2DImage(const video::ITexture* texture,
center_pos_x, center_pos_y, tex_width, tex_height,
tex_center_pos_x, tex_center_pos_y);
if (use_alpha_channel_of_texture)
if (draw_translucently)
{
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE);
}
else if (use_alpha_channel_of_texture)
{
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);

View File

@ -47,7 +47,7 @@ void draw2DImage(const irr::video::ITexture* texture,
const irr::core::rect<irr::s32>& sourceRect,
const irr::core::rect<irr::s32>* clipRect,
const irr::video::SColor* const colors,
bool useAlphaChannelOfTexture);
bool useAlphaChannelOfTexture, bool draw_translucently = false);
void draw2DVertexPrimitiveList(irr::video::ITexture *t, const void* vertices,
irr::u32 vertexCount, const void* indexList,

View File

@ -45,6 +45,7 @@ AlignedArray<Camera::EndCameraInformation> Camera::m_end_cameras;
std::vector<Camera*> Camera::m_all_cameras;
Camera* Camera::s_active_camera = NULL;
Camera::DebugMode Camera::m_debug_mode = Camera::CM_DEBUG_NONE;
// ============================================================================
Camera::Camera(int camera_index, AbstractKart* kart) : m_kart(NULL)
@ -57,23 +58,9 @@ Camera::Camera(int camera_index, AbstractKart* kart) : m_kart(NULL)
m_camera = irr_driver->addCameraSceneNode();
m_previous_pv_matrix = core::matrix4();
#ifdef DEBUG
if (kart != NULL)
m_camera->setName(core::stringc("Camera for ") + kart->getKartProperties()->getName());
else
m_camera->setName("Camera");
#endif
setupCamera();
if (kart != NULL)
{
m_distance = kart->getKartProperties()->getCameraDistance();
setKart(kart);
}
else
{
m_distance = 1000.0f;
}
setKart(kart);
m_distance = kart ? kart->getKartProperties()->getCameraDistance() : 1000.0f;
m_ambient_light = World::getWorld()->getTrack()->getDefaultAmbientColor();
// TODO: Put these values into a config file
@ -167,11 +154,9 @@ void Camera::setKart(AbstractKart *new_kart)
{
m_kart = new_kart;
#ifdef DEBUG
if(new_kart)
{
std::string name = new_kart->getIdent()+"'s camera";
getCameraSceneNode()->setName(name.c_str() );
}
std::string name = new_kart ? new_kart->getIdent()+"'s camera"
: "Unattached camera";
getCameraSceneNode()->setName(name.c_str());
#endif
} // setKart
@ -453,13 +438,13 @@ void Camera::getCameraSettings(float *above_kart, float *cam_angle,
case CM_NORMAL:
case CM_FALLING:
{
if(UserConfigParams::m_camera_debug==2)
if(m_debug_mode==CM_DEBUG_GROUND)
{
*above_kart = 0;
*cam_angle = 0;
*distance = -m_kart->getKartModel()->getLength()-1.0f;
}
else if(UserConfigParams::m_camera_debug==4)
else if(m_debug_mode==CM_DEBUG_BEHIND_KART)
{
*above_kart = 0;
*cam_angle = 0;
@ -548,20 +533,20 @@ void Camera::update(float dt)
float above_kart, cam_angle, side_way, distance;
bool smoothing;
// To view inside tunnels in top mode, increase near value
m_camera->setNearValue(m_debug_mode==CM_DEBUG_TOP_OF_KART ? 27.0f : 1.0f);
// The following settings give a debug camera which shows the track from
// high above the kart straight down.
if (UserConfigParams::m_camera_debug==1)
if (m_debug_mode==CM_DEBUG_TOP_OF_KART)
{
core::vector3df xyz = m_kart->getXYZ().toIrrVector();
m_camera->setTarget(xyz);
xyz.Y = xyz.Y+55;
xyz.Z -= 5.0f;
m_camera->setPosition(xyz);
// To view inside tunnels (FIXME 27>15 why??? makes no sense
// - the kart should not be visible, but it works)
m_camera->setNearValue(27.0);
}
else if (UserConfigParams::m_camera_debug==5)
else if (m_debug_mode==CM_DEBUG_SIDE_OF_KART)
{
core::vector3df xyz = m_kart->getXYZ().toIrrVector();
Vec3 offset(3, 0, 0);
@ -570,7 +555,7 @@ void Camera::update(float dt)
m_camera->setPosition(offset.toIrrVector());
}
// Update the first person camera
else if (UserConfigParams::m_camera_debug == 3)
else if (m_debug_mode == CM_DEBUG_FPS)
{
vector3df direction(m_camera->getTarget() - m_camera->getPosition());
vector3df up(m_camera->getUpVector());
@ -729,7 +714,7 @@ void Camera::positionCamera(float dt, float above_kart, float cam_angle,
{
Vec3 wanted_position;
Vec3 wanted_target = m_kart->getXYZ();
if(UserConfigParams::m_camera_debug==2)
if(m_debug_mode==CM_DEBUG_GROUND)
{
const btWheelInfo &w = m_kart->getVehicle()->getWheelInfo(2);
wanted_target.setY(w.m_raycastInfo.m_contactPointWS.getY());
@ -749,7 +734,7 @@ void Camera::positionCamera(float dt, float above_kart, float cam_angle,
btQuaternion q(m_kart->getSkidding()->getVisualSkidRotation(), 0, 0);
t.setBasis(t.getBasis() * btMatrix3x3(q));
}
if (UserConfigParams::m_camera_debug == 2)
if (m_debug_mode == CM_DEBUG_GROUND)
{
wanted_position = t(relative_position);
// Make sure that the Y position is a the same height as the wheel.
@ -758,7 +743,7 @@ void Camera::positionCamera(float dt, float above_kart, float cam_angle,
else
wanted_position = t(relative_position);
if (smoothing && UserConfigParams::m_camera_debug==0)
if (smoothing && !isDebug())
{
smoothMoveCamera(dt);
}

View File

@ -51,18 +51,33 @@ class Camera : public NoCopy
{
public:
enum Mode {
CM_NORMAL, //!< Normal camera mode
CM_CLOSEUP, //!< Closer to kart
CM_REVERSE, //!< Looking backwards
CM_LEADER_MODE, //!< for deleted player karts in follow the leader
CM_FINAL, //!< Final camera
CM_NORMAL, //!< Normal camera mode
CM_CLOSEUP, //!< Closer to kart
CM_REVERSE, //!< Looking backwards
CM_LEADER_MODE, //!< for deleted player karts in follow the leader
CM_FINAL, //!< Final camera
CM_SIMPLE_REPLAY,
CM_FALLING
};
}; // Mode
enum DebugMode {
CM_DEBUG_NONE,
CM_DEBUG_TOP_OF_KART, //!< Camera hovering over kart
CM_DEBUG_GROUND, //!< Camera at ground level, wheel debugging
CM_DEBUG_FPS, //!< FPS Camera
CM_DEBUG_BEHIND_KART, //!< Camera straight behind kart
CM_DEBUG_SIDE_OF_KART,//!< Camera to the right of the kart
}; // DebugMode
private:
static Camera* s_active_camera;
/** Special debug camera: 0: normal camera; 1: being high over the kart;
2: on ground level; 3: free first person camera;
4: straight behind kart */
static DebugMode m_debug_mode;
/** The camera scene node. */
scene::ICameraSceneNode *m_camera;
/** The project-view matrix of the previous frame, used for the blur shader. */
@ -267,16 +282,25 @@ public:
static void readEndCamera(const XMLNode &root);
static void clearEndCameras();
void setMode (Mode mode_); /** Set the camera to the given mode */
// ------------------------------------------------------------------------
static void setDebugMode(DebugMode debug_mode) { m_debug_mode = debug_mode;}
// ------------------------------------------------------------------------
static bool isDebug() { return m_debug_mode != CM_DEBUG_NONE; }
// ------------------------------------------------------------------------
static bool isFPS() { return m_debug_mode == CM_DEBUG_FPS; }
// ------------------------------------------------------------------------
void setMode(Mode mode); /** Set the camera to the given mode */
Mode getMode();
/** Returns the camera index (or player kart index, which is the same). */
int getIndex() const {return m_index;}
void reset ();
void reset();
void setInitialTransform();
void activate(bool alsoActivateInIrrlicht=true);
void update (float dt);
void update(float dt);
void setKart(AbstractKart *new_kart);
// ------------------------------------------------------------------------
/** Returns the camera index (or player kart index, which is the same). */
int getIndex() const {return m_index;}
// ------------------------------------------------------------------------
/** Returns the project-view matrix of the previous frame. */
core::matrix4 getPreviousPVMatrix() const { return m_previous_pv_matrix; }

View File

@ -47,6 +47,7 @@ void CentralVideoSettings::init()
hasMultiDrawIndirect = false;
hasTextureCompression = false;
hasUBO = false;
hasExplicitAttribLocation = false;
hasGS = false;
m_GI_has_artifact = false;
@ -159,10 +160,15 @@ void CentralVideoSettings::init()
hasUBO = true;
Log::info("GLDriver", "ARB Uniform Buffer Object Present");
}
if (!GraphicsRestrictions::isDisabled(GraphicsRestrictions::GR_GEOMETRY_SHADER4) &&
hasGLExtension("GL_ARB_geometry_shader4")) {
if (!GraphicsRestrictions::isDisabled(GraphicsRestrictions::GR_EXPLICIT_ATTRIB_LOCATION) &&
hasGLExtension("GL_ARB_explicit_attrib_location")) {
hasExplicitAttribLocation = true;
Log::info("GLDriver", "ARB Explicit Attrib Location Present");
}
if (!GraphicsRestrictions::isDisabled(GraphicsRestrictions::GR_GEOMETRY_SHADER) &&
(m_gl_major_version > 3 || (m_gl_major_version == 3 && m_gl_minor_version >= 2))) {
hasGS = true;
Log::info("GLDriver", "ARB Geometry Shader 4 Present");
Log::info("GLDriver", "Geometry Shaders Present");
}
// Only unset the high def textures if they are set as default. If the
@ -246,7 +252,7 @@ bool CentralVideoSettings::needsSRGBCapableVisualWorkaround() const
return m_need_srgb_visual_workaround;
}
bool CentralVideoSettings::isARBGeometryShader4Usable() const
bool CentralVideoSettings::isARBGeometryShadersUsable() const
{
return hasGS;
}
@ -256,6 +262,11 @@ bool CentralVideoSettings::isARBUniformBufferObjectUsable() const
return hasUBO;
}
bool CentralVideoSettings::isARBExplicitAttribLocationUsable() const
{
return hasExplicitAttribLocation;
}
bool CentralVideoSettings::isEXTTextureCompressionS3TCUsable() const
{
return hasTextureCompression;
@ -328,12 +339,12 @@ bool CentralVideoSettings::isARBMultiDrawIndirectUsable() const
bool CentralVideoSettings::supportsShadows() const
{
return isARBGeometryShader4Usable() && isARBUniformBufferObjectUsable();
return isARBGeometryShadersUsable() && isARBUniformBufferObjectUsable() && isARBExplicitAttribLocationUsable();
}
bool CentralVideoSettings::supportsGlobalIllumination() const
{
return isARBGeometryShader4Usable() && isARBUniformBufferObjectUsable() && !m_GI_has_artifact;
return isARBGeometryShadersUsable() && isARBUniformBufferObjectUsable() && isARBExplicitAttribLocationUsable() && !m_GI_has_artifact;
}
bool CentralVideoSettings::supportsIndirectInstancingRendering() const

View File

@ -35,6 +35,7 @@ private:
bool hasTextureView;
bool hasBindlessTexture;
bool hasUBO;
bool hasExplicitAttribLocation;
bool hasGS;
bool hasTextureCompression;
bool hasAtomics;
@ -60,7 +61,7 @@ public:
bool isARBUniformBufferObjectUsable() const;
bool isEXTTextureCompressionS3TCUsable() const;
bool isARBTextureViewUsable() const;
bool isARBGeometryShader4Usable() const;
bool isARBGeometryShadersUsable() const;
bool isARBTextureStorageUsable() const;
bool isAMDVertexShaderLayerUsable() const;
bool isARBComputeShaderUsable() const;
@ -73,6 +74,7 @@ public:
bool isARBShaderStorageBufferObjectUsable() const;
bool isARBImageLoadStoreUsable() const;
bool isARBMultiDrawIndirectUsable() const;
bool isARBExplicitAttribLocationUsable() const;
// Are all required extensions available for feature support

View File

@ -41,7 +41,7 @@ namespace GraphicsRestrictions
const char *m_names_of_restrictions[] = {
"UniformBufferObject",
"GeometryShader4",
"GeometryShader",
"DrawIndirect",
"TextureView",
"TextureStorage",
@ -56,6 +56,7 @@ namespace GraphicsRestrictions
"BindlessTexture",
"TextureCompressionS3TC",
"AMDVertexShaderLayer",
"ExplicitAttribLocation",
"DriverRecentEnough",
"HighDefinitionTextures",
"AdvancedPipeline",

View File

@ -35,7 +35,7 @@ namespace GraphicsRestrictions
enum GraphicsRestrictionsType
{
GR_UNIFORM_BUFFER_OBJECT,
GR_GEOMETRY_SHADER4,
GR_GEOMETRY_SHADER,
GR_DRAW_INDIRECT,
GR_TEXTURE_VIEW,
GR_TEXTURE_STORAGE,
@ -50,6 +50,7 @@ namespace GraphicsRestrictions
GR_BINDLESS_TEXTURE,
GR_EXT_TEXTURE_COMPRESSION_S3TC,
GR_AMD_VERTEX_SHADER_LAYER,
GR_EXPLICIT_ATTRIB_LOCATION,
GR_DRIVER_RECENT_ENOUGH,
GR_HIGHDEFINITION_TEXTURES,
GR_ADVANCED_PIPELINE,

View File

@ -147,7 +147,8 @@ IrrDriver::IrrDriver()
m_lightviz = m_shadowviz = m_distortviz = m_rsm = m_rh = m_gi = false;
m_boundingboxesviz = false;
m_last_light_bucket_distance = 0;
memset(object_count, 0, sizeof(object_count));
memset(m_object_count, 0, sizeof(m_object_count));
memset(m_poly_count, 0, sizeof(m_poly_count));
} // IrrDriver
// ----------------------------------------------------------------------------
@ -204,12 +205,12 @@ STKRenderingPass IrrDriver::getPhase() const
void IrrDriver::IncreaseObjectCount()
{
object_count[m_phase]++;
m_object_count[m_phase]++;
}
void IrrDriver::IncreasePolyCount(unsigned Polys)
{
poly_count[m_phase] += Polys;
m_poly_count[m_phase] += Polys;
}
core::array<video::IRenderTarget> &IrrDriver::getMainSetup()
@ -1046,7 +1047,8 @@ scene::IMesh *IrrDriver::getMesh(const std::string &filename)
* \return Newly created skinned mesh. You should call drop() when you don't
* need it anymore.
*/
scene::IAnimatedMesh *IrrDriver::copyAnimatedMesh(scene::IAnimatedMesh *orig)
scene::IAnimatedMesh *IrrDriver::copyAnimatedMesh(scene::IAnimatedMesh *orig,
video::E_RENDER_TYPE rt)
{
using namespace scene;
CSkinnedMesh *mesh = dynamic_cast<CSkinnedMesh*>(orig);
@ -1055,7 +1057,10 @@ scene::IAnimatedMesh *IrrDriver::copyAnimatedMesh(scene::IAnimatedMesh *orig)
Log::error("copyAnimatedMesh", "Given mesh was not a skinned mesh.");
return NULL;
}
return mesh->clone();
scene::IAnimatedMesh* out = mesh->clone();
out->setRenderType(rt);
return out;
} // copyAnimatedMesh
// ----------------------------------------------------------------------------
@ -1168,7 +1173,8 @@ scene::IMeshSceneNode *IrrDriver::addSphere(float radius,
m.EmissiveColor = color;
m.BackfaceCulling = false;
m.MaterialType = video::EMT_SOLID;
m.setTexture(0, getUnicolorTexture(video::SColor(128, 255, 105, 180)));
//m.setTexture(0, getUnicolorTexture(video::SColor(128, 255, 105, 180)));
m.setTexture(0, getUnicolorTexture(color));
m.setTexture(1, getUnicolorTexture(video::SColor(0, 0, 0, 0)));
if (CVS->isGLSL())
@ -1923,13 +1929,13 @@ void IrrDriver::displayFPS()
{
fpsString = _("FPS: %d/%d/%d - PolyCount: %d Solid, "
"%d Shadows - LightDist : %d",
min, fps, max, poly_count[SOLID_NORMAL_AND_DEPTH_PASS],
poly_count[SHADOW_PASS], m_last_light_bucket_distance);
poly_count[SOLID_NORMAL_AND_DEPTH_PASS] = 0;
poly_count[SHADOW_PASS] = 0;
object_count[SOLID_NORMAL_AND_DEPTH_PASS] = 0;
object_count[SOLID_NORMAL_AND_DEPTH_PASS] = 0;
object_count[TRANSPARENT_PASS] = 0;
min, fps, max, m_poly_count[SOLID_NORMAL_AND_DEPTH_PASS],
m_poly_count[SHADOW_PASS], m_last_light_bucket_distance);
m_poly_count[SOLID_NORMAL_AND_DEPTH_PASS] = 0;
m_poly_count[SHADOW_PASS] = 0;
m_object_count[SOLID_NORMAL_AND_DEPTH_PASS] = 0;
m_object_count[SOLID_NORMAL_AND_DEPTH_PASS] = 0;
m_object_count[TRANSPARENT_PASS] = 0;
}
else
fpsString = _("FPS: %d/%d/%d - %d KTris", min, fps, max, (int)roundf(kilotris));

View File

@ -286,8 +286,8 @@ private:
bool m_boundingboxesviz;
/** Performance stats */
unsigned m_last_light_bucket_distance;
unsigned object_count[PASS_COUNT];
unsigned poly_count[PASS_COUNT];
unsigned m_object_count[PASS_COUNT];
unsigned m_poly_count[PASS_COUNT];
u32 m_renderpass;
class STKMeshSceneNode *m_sun_interposer;
core::vector3df m_sun_direction;
@ -353,7 +353,8 @@ public:
void setAllMaterialFlags(scene::IMesh *mesh) const;
scene::IAnimatedMesh *getAnimatedMesh(const std::string &name);
scene::IMesh *getMesh(const std::string &name);
scene::IAnimatedMesh *copyAnimatedMesh(scene::IAnimatedMesh *orig);
scene::IAnimatedMesh *copyAnimatedMesh(scene::IAnimatedMesh *orig,
video::E_RENDER_TYPE rt);
video::ITexture *applyMask(video::ITexture* texture,
const std::string& mask_path);
void displayFPS();

View File

@ -966,6 +966,21 @@ void Material::setMaterialProperties(video::SMaterial *m, scene::IMeshBuffer* m
}
#endif
if (race_manager->getReverseTrack() &&
m_mirror_axis_when_reverse != ' ')
{
irr::video::S3DVertex* mbVertices = (video::S3DVertex*)mb->getVertices();
for (unsigned int i = 0; i < mb->getVertexCount(); i++)
{
core::vector2df &tc = mb->getTCoords(i);
if (m_mirror_axis_when_reverse == 'V')
tc.Y = 1 - tc.Y;
else
tc.X = 1 - tc.X;
}
} // reverse track and texture needs mirroring
} // setMaterialProperties
//-----------------------------------------------------------------------------

View File

@ -60,6 +60,13 @@ MaterialManager::~MaterialManager()
delete m_materials[i];
}
m_materials.clear();
for (std::map<video::E_MATERIAL_TYPE, Material*> ::iterator it =
m_default_materials.begin(); it != m_default_materials.end(); it++)
{
delete it->second;
}
m_default_materials.clear();
} // ~MaterialManager
//-----------------------------------------------------------------------------

View File

@ -673,7 +673,7 @@ void IrrDriver::renderGlow(std::vector<GlowData>& glows)
node->render();
}
if (CVS->supportsIndirectInstancingRendering())
if (CVS->supportsIndirectInstancingRendering() && CVS->isARBExplicitAttribLocationUsable())
{
#if !defined(USE_GLES2)
glBindBuffer(GL_DRAW_INDIRECT_BUFFER, GlowPassCmd::getInstance()->drawindirectcmd);

View File

@ -90,6 +90,9 @@ GLuint ShaderBase::loadShader(const std::string &file, unsigned type)
if (CVS->isAMDVertexShaderLayerUsable())
code << "#extension GL_AMD_vertex_shader_layer : enable\n";
if (CVS->isARBExplicitAttribLocationUsable())
code << "#extension GL_ARB_explicit_attrib_location : enable\n";
if (CVS->isAZDOEnabled())
{

View File

@ -18,7 +18,6 @@
#ifndef HEADER_SHADERS_HPP
#define HEADER_SHADERS_HPP
#include "config/user_config.hpp"
#include "graphics/shader.hpp"
#include "graphics/shared_gpu_objects.hpp"
#include "graphics/texture_shader.hpp"

View File

@ -17,6 +17,7 @@
#include "graphics/shadow_matrices.hpp"
#include "config/user_config.hpp"
#include "graphics/central_settings.hpp"
#include "graphics/glwrap.hpp"
#include "graphics/irr_driver.hpp"

View File

@ -302,6 +302,7 @@ void Skybox::generateSpecularCubemap()
}
glBindFramebuffer(GL_FRAMEBUFFER, 0);
glDeleteFramebuffers(1, &fbo);
glActiveTexture(GL_TEXTURE0);
#endif
} // generateSpecularCubemap

View File

@ -126,6 +126,10 @@ void STKAnimatedMesh::updateNoGL()
TransparentMaterial TranspMat = getTransparentMaterialFromType(type, MaterialTypeParam, material);
TransparentMesh[TranspMat].push_back(&mesh);
}
else if (m->getRenderType() == video::ERT_TRANSPARENT)
{
TransparentMesh[TM_ADDITIVE].push_back(&mesh);
}
else
{
Material::ShaderType MatType = material->getShaderType();// getMeshMaterialFromType(type, mb->getVertexType(), material);

View File

@ -421,8 +421,7 @@ void initTexturesTransparent(GLMesh &mesh)
{
if (!mesh.textures[0])
{
Log::fatal("STKMesh", "Missing texture for material transparent");
return;
mesh.textures[0] = getUnicolorTexture(video::SColor(255, 255, 255, 255));
}
compressTexture(mesh.textures[0], true);
#if !defined(USE_GLES2)

Some files were not shown because too many files have changed in this diff Show More