diff --git a/.travis.yml b/.travis.yml index 5cdbe2ecc..ae4e22d25 100644 --- a/.travis.yml +++ b/.travis.yml @@ -21,17 +21,21 @@ addons: apt: packages: - build-essential - - libogg-dev - - libvorbis-dev - - libopenal-dev - - libxxf86vm-dev - - libcurl4-openssl-dev - - libfribidi-dev - - libbluetooth-dev - - libgl1-mesa-dev - - libglu1-mesa-dev - - libglew-dev - 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 before_script: - export THREADS=$((`nproc` + 1)) diff --git a/CHANGELOG.md b/CHANGELOG.md index ace19a2ff..2c14592f0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/CMakeLists.txt b/CMakeLists.txt index 0e989c3db..68ae9962b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -20,6 +20,10 @@ option(CHECK_ASSETS "Check if assets are installed in ../stk-assets" ON) option(USE_SYSTEM_ANGELSCRIPT "Use system angelscript instead of built-in angelscript. If you enable this option, make sure to use a compatible version." OFF) option(ENABLE_NETWORK_MULTIPLAYER "Enable network multiplayer. This will replace the online profile GUI in the main menu with the network multiplayer GUI" OFF) +if (UNIX AND NOT APPLE) + option(USE_GLES2 "Use OpenGL ES2 renderer" OFF) +endif() + if(MSVC AND (MSVC_VERSION LESS 1900)) # Normally hide the option to build wiiuse on VS, since it depends # on the installation of the Windows DDK (Driver Developer Kit), @@ -39,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") @@ -59,6 +64,10 @@ if(WIN32) add_definitions(-D_IRR_STATIC_LIB_) endif() +if(USE_GLES2) + add_definitions(-DUSE_GLES2) +endif() + # Build the Bullet physics library add_subdirectory("${PROJECT_SOURCE_DIR}/lib/bullet") include_directories("${PROJECT_SOURCE_DIR}/lib/bullet/src") @@ -68,8 +77,11 @@ add_subdirectory("${PROJECT_SOURCE_DIR}/lib/enet") include_directories("${PROJECT_SOURCE_DIR}/lib/enet/include") # Build glew library -add_subdirectory("${PROJECT_SOURCE_DIR}/lib/glew") -include_directories("${PROJECT_SOURCE_DIR}/lib/glew/include") +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() if((WIN32 AND NOT MINGW) OR APPLE) if (NOT APPLE) @@ -194,8 +206,10 @@ if (OPENMP_FOUND) endif() # OpenGL -find_package(OpenGL REQUIRED) -include_directories(${OPENGL_INCLUDE_DIR}) +if(NOT USE_GLES2) + find_package(OpenGL REQUIRED) + include_directories(${OPENGL_INCLUDE_DIR}) +endif() if(UNIX AND NOT APPLE) find_package(X11 REQUIRED) @@ -210,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 @@ -258,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) @@ -342,16 +367,20 @@ target_link_libraries(supertuxkart bulletcollision bulletmath enet - glew stkirrlicht ${Angelscript_LIBRARIES} ${CURL_LIBRARIES} ${OGGVORBIS_LIBRARIES} ${OPENAL_LIBRARY} - ${OPENGL_LIBRARIES} ${FREETYPE_LIBRARIES} ) +if(NOT USE_GLES2) + target_link_libraries(supertuxkart ${OPENGL_LIBRARIES} glew) +else() + target_link_libraries(supertuxkart EGL GLESv2) +endif() + if(UNIX AND NOT APPLE) target_link_libraries(supertuxkart ${X11_LIBRARIES}) if(USE_XRANDR) @@ -359,12 +388,20 @@ 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 : diff --git a/INSTALL.md b/INSTALL.md index 1ad394617..45997998f 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -1,11 +1,12 @@ # 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` Place the `stk-assets` folder next to the source root `stk-code` folder. -See for more information +See for more information ## Building STK on Linux @@ -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: @@ -71,8 +75,8 @@ location, specify `CMAKE_INSTALL_PREFIX` when running cmake, e.g.: ## Building STK on OS X -See +See ## Building STK on Windows -See +See diff --git a/README.md b/README.md index 3b5917a20..cec739a98 100644 --- a/README.md +++ b/README.md @@ -1,57 +1,47 @@ # 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: +The SuperTuxKart homepage can be found at: -The official SuperTuxKart forum is at . If you need support, -this would be the best place to start. +The official SuperTuxKart forum is at . 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](https://supertuxkart.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). +See for more information. + +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: - +The latest information about compilation on Mac are at our site: ### 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: @@ -60,6 +50,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). diff --git a/TODO.md b/TODO.md index 5ed25b4ce..ae6c1ac96 100644 --- a/TODO.md +++ b/TODO.md @@ -4,30 +4,27 @@ SuperTuxKart is looking for additional man power to make this one of the best free linux games out there :) We need (in no particular order): -1. Musicians/sound engineers - - Create additional background soundtrack + - Musicians/sound engineers + - Create additional background soundtracks - Create sound effects -2. Artists and track designer + - Artists and track designer - Create additional tracks - - Create additional art work for tracks, - background images -3. Developers + - Create additional artwork for tracks and background images + - Developers + - Work on network play support - Check our bug and enhancement request tracker on https://github.com/supertuxkart/stk-code/issues - - Extend the current web page, keep it up to date -4. Tester - - For just about everything - - Esp. different platforms and graphics cards -5. Writers - - Write documentation, ranging from man page, to - a description for the web, to a design document, ... + - Extend the current web page and keep it up to date + - Testers + - For just about everything, especially different platforms and graphics cards + - Writers + - Write documentation, ranging from man page, to a description for the web, to a design document, etc... -If you want to help the SuperTuxKart - Project, please -contact us on the email list: [supertuxkart-devel@lists.sourceforge.net](mailto:supertuxkart-devel@lists.sourceforge.net) +If you want to help the SuperTuxKart Project, please contact us on the email list: [supertuxkart-devel@lists.sourceforge.net](mailto:supertuxkart-devel@lists.sourceforge.net) Thanks in advance! --- The SuperTuxKart-Team +-- The SuperTuxKart Team -For details, see +For details, see diff --git a/cmake/FindLibbfd.cmake b/cmake/FindLibbfd.cmake new file mode 100644 index 000000000..1a610a474 --- /dev/null +++ b/cmake/FindLibbfd.cmake @@ -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 +# +# 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) diff --git a/data/CREDITS b/data/CREDITS index d36394892..96165c272 100755 Binary files a/data/CREDITS and b/data/CREDITS differ diff --git a/data/challenges/subsea.challenge b/data/challenges/abyss.challenge similarity index 66% rename from data/challenges/subsea.challenge rename to data/challenges/abyss.challenge index d64dfc45b..550b82e59 100644 --- a/data/challenges/subsea.challenge +++ b/data/challenges/abyss.challenge @@ -1,19 +1,19 @@ - + - + - + - + diff --git a/data/challenges/jungle.challenge b/data/challenges/jungle.challenge index 46ec0a924..b3e280633 100644 --- a/data/challenges/jungle.challenge +++ b/data/challenges/jungle.challenge @@ -2,7 +2,7 @@ - + diff --git a/data/challenges/volcano_island.challenge b/data/challenges/volcano_island.challenge new file mode 100644 index 000000000..10250c4f1 --- /dev/null +++ b/data/challenges/volcano_island.challenge @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + diff --git a/data/grandprix/1_penguinplayground.grandprix b/data/grandprix/1_penguinplayground.grandprix index 7da95f0c2..a0e7d2b23 100644 --- a/data/grandprix/1_penguinplayground.grandprix +++ b/data/grandprix/1_penguinplayground.grandprix @@ -4,7 +4,7 @@ - + diff --git a/data/grandprix/3_tothemoonandback.grandprix b/data/grandprix/3_tothemoonandback.grandprix index 2d0f4b104..f5535d00f 100644 --- a/data/grandprix/3_tothemoonandback.grandprix +++ b/data/grandprix/3_tothemoonandback.grandprix @@ -5,7 +5,7 @@ - + diff --git a/data/graphical_restrictions.xml b/data/graphical_restrictions.xml index e900c428b..baf96cbd0 100644 --- a/data/graphical_restrictions.xml +++ b/data/graphical_restrictions.xml @@ -4,24 +4,28 @@ - - - + + + + + + - - + + - - + + + diff --git a/data/gui/ghost_replay_selection.stkgui b/data/gui/ghost_replay_selection.stkgui index 98d587070..dec25c69b 100644 --- a/data/gui/ghost_replay_selection.stkgui +++ b/data/gui/ghost_replay_selection.stkgui @@ -12,7 +12,15 @@ - -