Merge remote-tracking branch 'origin/master' into fix-ball-cannon
This commit is contained in:
commit
ab6fbd2609
5
.gitignore
vendored
5
.gitignore
vendored
@ -56,10 +56,13 @@ android/android-ndk*
|
||||
android/android-sdk*
|
||||
android/assets
|
||||
android/bin
|
||||
android/obj
|
||||
android/build
|
||||
android/libs
|
||||
android/obj
|
||||
android/.gradle
|
||||
android-*
|
||||
*.apk
|
||||
*.keystore
|
||||
|
||||
lib/curl
|
||||
lib/freetype
|
||||
|
15
CHANGELOG.md
15
CHANGELOG.md
@ -1,3 +1,18 @@
|
||||
## SuperTuxKart 0.9.3
|
||||
* Reduced RAM and VRAM usage, reducing load times by Auria and Benau
|
||||
* New kart Wilbert by Jymis
|
||||
* New kart Hexley by Jymis
|
||||
* New tracks Cornfield Crossing and Candela City by samuncle
|
||||
* Physics improvements and various physics bugfixes by hiker
|
||||
* Kart GFX improvements (exhaust and headlight)
|
||||
* In-game screen recording feature by Benau and Stragus
|
||||
* Bug fixes on the old render pipeline by Benau and Stragus
|
||||
* Hardware skinning
|
||||
* New smoother camera by Auria
|
||||
* New grand prix win scene
|
||||
* Gamepad configuration bugfixes
|
||||
* Various improvements (wall driving fixes, parachutes, GP points, cannon fixes, colorization shader)
|
||||
|
||||
## SuperTuxKart 0.9.2
|
||||
* Ghost replay races by Benau
|
||||
* Battle mode AI by Benau
|
||||
|
@ -1,6 +1,6 @@
|
||||
# root CMakeLists for the SuperTuxKart project
|
||||
project(SuperTuxKart)
|
||||
set(PROJECT_VERSION "0.9.1")
|
||||
set(PROJECT_VERSION "git")
|
||||
|
||||
cmake_minimum_required(VERSION 2.8.4)
|
||||
if(NOT (CMAKE_MAJOR_VERSION VERSION_LESS 3))
|
||||
@ -20,7 +20,7 @@ option(SERVER_ONLY "Create a server only (i.e. no graphics or sound)" OFF)
|
||||
option(USE_FRIBIDI "Support for right-to-left languages" ON)
|
||||
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)
|
||||
option(ENABLE_WAYLAND_DEVICE "Enable Wayland device for linux build" OFF)
|
||||
|
||||
CMAKE_DEPENDENT_OPTION(BUILD_RECORDER "Build opengl recorder" ON
|
||||
"NOT SERVER_ONLY;NOT USE_GLES2;NOT APPLE" OFF)
|
||||
@ -82,10 +82,6 @@ if(DISABLE_VPX)
|
||||
add_definitions(-DNO_VPX)
|
||||
endif()
|
||||
|
||||
if(BUILD_RECORDER)
|
||||
add_definitions(-DENABLE_RECORDER)
|
||||
endif()
|
||||
|
||||
# Build the Bullet physics library
|
||||
add_subdirectory("${PROJECT_SOURCE_DIR}/lib/bullet")
|
||||
include_directories("${PROJECT_SOURCE_DIR}/lib/bullet/src")
|
||||
@ -101,7 +97,7 @@ if(NOT USE_GLES2 AND NOT SERVER_ONLY)
|
||||
include_directories("${PROJECT_SOURCE_DIR}/lib/glew/include")
|
||||
endif()
|
||||
|
||||
if((WIN32 AND NOT MINGW) OR APPLE)
|
||||
if(MSVC OR APPLE)
|
||||
if (NOT APPLE)
|
||||
# Build zlib library
|
||||
add_subdirectory("${PROJECT_SOURCE_DIR}/lib/zlib")
|
||||
@ -112,15 +108,15 @@ if((WIN32 AND NOT MINGW) OR APPLE)
|
||||
endif()
|
||||
|
||||
# Build png library
|
||||
set (SKIP_INSTALL_ALL TRUE)
|
||||
set (PNG_STATIC TRUE)
|
||||
set (PNG_TESTS FALSE)
|
||||
set (PNG_SHARED FALSE)
|
||||
set(SKIP_INSTALL_ALL TRUE)
|
||||
set(PNG_STATIC TRUE CACHE BOOL "Build static lib")
|
||||
set(PNG_TESTS FALSE CACHE BOOL "Build libpng tests")
|
||||
set(PNG_SHARED FALSE CACHE BOOL "Build shared lib")
|
||||
add_subdirectory("${PROJECT_SOURCE_DIR}/lib/libpng")
|
||||
include_directories("${PROJECT_SOURCE_DIR}/lib/libpng")
|
||||
|
||||
set(PNG_PNG_INCLUDE_DIR "${PROJECT_SOURCE_DIR}/lib/libpng/")
|
||||
set(PNG_LIBRARY png15_static)
|
||||
set(PNG_LIBRARY png_static)
|
||||
endif()
|
||||
|
||||
# Add jpeg library
|
||||
@ -138,11 +134,21 @@ if (BUILD_RECORDER)
|
||||
find_library(OPENGLRECORDER_LIBRARY NAMES openglrecorder libopenglrecorder PATHS "${PROJECT_SOURCE_DIR}/dependencies/lib")
|
||||
find_path(OPENGLRECORDER_INCLUDEDIR NAMES openglrecorder.h PATHS "${PROJECT_SOURCE_DIR}/dependencies/include")
|
||||
if (NOT OPENGLRECORDER_LIBRARY OR NOT OPENGLRECORDER_INCLUDEDIR)
|
||||
message(FATAL_ERROR "libopenglrecorder not found. "
|
||||
"Either install libopenglrecorder or disable ingame recorder with -DBUILD_RECORDER=0")
|
||||
if(PROJECT_VERSION STREQUAL "git")
|
||||
message(WARNING "libopenglrecorder not found, disabling in-game recorder. "
|
||||
"To use recorder, install libopenglrecorder.")
|
||||
set(OPENGLRECORDER_LIBRARY CACHE INTERNAL "")
|
||||
set(OPENGLRECORDER_INCLUDEDIR CACHE INTERNAL "")
|
||||
set(BUILD_RECORDER OFF)
|
||||
else()
|
||||
message(FATAL_ERROR "libopenglrecorder not found. "
|
||||
"Either install libopenglrecorder or disable in-game recorder with -DBUILD_RECORDER=0")
|
||||
endif()
|
||||
else()
|
||||
include_directories(${OPENGLRECORDER_INCLUDEDIR})
|
||||
mark_as_advanced(OPENGLRECORDER_LIBRARY OPENGLRECORDER_INCLUDEDIR)
|
||||
add_definitions(-DENABLE_RECORDER)
|
||||
endif()
|
||||
include_directories(${OPENGLRECORDER_INCLUDEDIR})
|
||||
mark_as_advanced(OPENGLRECORDER_LIBRARY OPENGLRECORDER_INCLUDEDIR)
|
||||
endif()
|
||||
|
||||
if(NOT SERVER_ONLY AND NOT USE_GLES2)
|
||||
@ -276,11 +282,6 @@ if(MINGW AND CMAKE_BUILD_TYPE MATCHES Release)
|
||||
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--subsystem,windows")
|
||||
endif()
|
||||
|
||||
# Netwowk Multiplayer
|
||||
if(ENABLE_NETWORK_MULTIPLAYER)
|
||||
add_definitions(-DENABLE_NETWORK_MULTIPLAYER_SCREEN)
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
# By default windows.h has macros defined for min and max that screw up everything
|
||||
add_definitions(-DNOMINMAX)
|
||||
@ -413,7 +414,7 @@ if(NOT SERVER_ONLY)
|
||||
if(NOT USE_GLES2)
|
||||
target_link_libraries(supertuxkart ${OPENGL_gl_LIBRARY} glew graphics_utils)
|
||||
else()
|
||||
target_link_libraries(supertuxkart EGL GLESv2)
|
||||
target_link_libraries(supertuxkart GLESv2)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@ -532,9 +533,9 @@ if(STK_ASSETS_DIR AND CHECK_ASSETS)
|
||||
install(DIRECTORY ${STK_ASSETS_DIR} DESTINATION ${STK_INSTALL_DATA_DIR}/data PATTERN ".svn" EXCLUDE PATTERN ".git" EXCLUDE)
|
||||
endif()
|
||||
install(FILES ${STK_DATA_DIR}/supertuxkart.desktop DESTINATION share/applications)
|
||||
install(FILES data/supertuxkart_32.png DESTINATION share/icons/hicolor/32x32/apps RENAME supertuxkart.png)
|
||||
install(FILES data/supertuxkart_48.png DESTINATION share/icons/hicolor/48x48/apps RENAME supertuxkart.png)
|
||||
install(FILES data/supertuxkart_128.png DESTINATION share/icons/hicolor/128x128/apps RENAME supertuxkart.png)
|
||||
install(FILES data/supertuxkart_32.png data/supertuxkart_128.png DESTINATION share/pixmaps)
|
||||
install(FILES data/supertuxkart_48.png DESTINATION share/pixmaps RENAME supertuxkart.png)
|
||||
install(FILES data/supertuxkart.appdata.xml DESTINATION share/appdata)
|
||||
|
||||
if(MINGW)
|
||||
|
@ -65,9 +65,8 @@ mesa-common-dev pkg-config zlib1g-dev
|
||||
### In-game recorder
|
||||
|
||||
In order to build the in-game recorder for STK, you have to install
|
||||
libopenglrecorder from your distribution or compile it yourself, get it [here](https://github.com/Benau/libopenglrecorder).
|
||||
Compilation instruction is explained there, if you don't need such feature,
|
||||
pass `-DBUILD_RECORDER=off` to cmake.
|
||||
libopenglrecorder from your distribution, or compile it yourself from [here](https://github.com/Benau/libopenglrecorder).
|
||||
Compilation instruction is explained there. If you don't need this feature, pass `-DBUILD_RECORDER=off` to cmake.
|
||||
|
||||
### Compiling
|
||||
|
||||
|
@ -31,7 +31,8 @@ after some tweaks, but atm. only linux is supported.
|
||||
|
||||
Dependencies list (may be incomplete):
|
||||
|
||||
autoconf, automake, make, python, ant, imagemagick, cmake, vorbis-tools
|
||||
autoconf, automake, make, python, gradle, ant, imagemagick, cmake,
|
||||
vorbis-tools
|
||||
|
||||
Additionally some dependencies for optimize_data script:
|
||||
|
||||
@ -43,13 +44,12 @@ and extract it to stk-code/lib. It contains sources of libraries that are used
|
||||
in STK, but are not availiable in stk-code repository (curl, freetype, openal).
|
||||
|
||||
You need also Android SDK for android-19 platform (the API for Android 4.4) and
|
||||
Android NDK (versions r12b and r13b have been tested).
|
||||
Android NDK r12b.
|
||||
|
||||
You need to create proper "android-sdk" and "android-ndk" symlinks in the
|
||||
directory with Android project, so that the compilation script will have access
|
||||
to the SDK and NDK.
|
||||
|
||||
These paths can be also set in SDK_PATH and NDK_PATH environmental variables.
|
||||
to the SDK and NDK. These paths can be also set in SDK_PATH and NDK_PATH
|
||||
environmental variables.
|
||||
|
||||
Before running the compilation, run the generate_assets script, so that
|
||||
selected assets will be copied to "assets" directory, and then included in the
|
||||
@ -74,6 +74,14 @@ You can choose build type by setting BUILD_TYPE environment variable to "debug"
|
||||
or "release". The default is debug build. Note that if you choose release build,
|
||||
you have to manually sign the apk with your key and run zipalign.
|
||||
|
||||
Additionally you can choose the build tool by setting BUILD_TOOL environment
|
||||
variable to "gradle" or "ant". Note that ant has been already removed from
|
||||
Android SDK, so you have to use SDK <= 25.2.5 for building with ant. By default
|
||||
the BUILD_TOOL is set to "gradle".
|
||||
|
||||
You can override the SDK build-tools version by setting the BUILD_TOOLS_VER
|
||||
environment variable.
|
||||
|
||||
Basically if all dependencies are installed in the system, it should be enough
|
||||
to just run:
|
||||
|
||||
@ -158,18 +166,14 @@ and then:
|
||||
It seems to affect only Android 5.0. More information about the crash:
|
||||
https://code.google.com/p/android/issues/detail?id=160824
|
||||
|
||||
4. STK crashes on Qualcomm with Adreno 305 when trying to draw menu interface.
|
||||
Backtrace shows glDrawElements function, and internally crashed in vbo
|
||||
allocation.
|
||||
|
||||
5. STK crashes on startup on some devices when aarch64 build is made using
|
||||
4. STK crashes on startup on some devices when aarch64 build is made using
|
||||
Android r13 NDK. The r13 version has rather big modifications (it uses clang
|
||||
instead of gcc by default). This is probably a bug in NDK/compiler/OS, but
|
||||
for this reason using NDK r12 for 64-bit arm compilation is preferred.
|
||||
|
||||
6. Angelscript doesn't have full support for aarch64 builds, so that scripting
|
||||
5. Angelscript doesn't have full support for aarch64 builds, so that scripting
|
||||
won't work on this platform.
|
||||
|
||||
7. Turning left/right using accelerometer is available, but at this stage the
|
||||
6. Turning left/right using accelerometer is available, but at this stage the
|
||||
default screen orientation is not automatically detected and user must
|
||||
manually choose if he needs "phone" or "tablet" accelerometer.
|
||||
|
31
android/build.gradle
Normal file
31
android/build.gradle
Normal file
@ -0,0 +1,31 @@
|
||||
buildscript
|
||||
{
|
||||
repositories
|
||||
{
|
||||
jcenter()
|
||||
}
|
||||
|
||||
dependencies
|
||||
{
|
||||
classpath 'com.android.tools.build:gradle:2.2.3'
|
||||
}
|
||||
}
|
||||
|
||||
apply plugin: 'com.android.application'
|
||||
|
||||
android
|
||||
{
|
||||
compileSdkVersion sdk_version.toInteger()
|
||||
buildToolsVersion build_tools_ver
|
||||
|
||||
sourceSets
|
||||
{
|
||||
main
|
||||
{
|
||||
manifest.srcFile 'AndroidManifest.xml'
|
||||
jniLibs.srcDirs = ['libs']
|
||||
res.srcDirs = ['res']
|
||||
assets.srcDirs = ['assets']
|
||||
}
|
||||
}
|
||||
}
|
@ -5,22 +5,25 @@
|
||||
# A script that generates data files for Android apk
|
||||
|
||||
|
||||
# Below are simple configuration variables
|
||||
# Below you can find some simple configuration variables.
|
||||
# It's allowed to set "all" for KARTS and TRACKS if it's intended to create
|
||||
# package with full data.
|
||||
# The karts and tracks directories shouldn't exist in ASSETS_DIRS variable
|
||||
# because they are handled separately
|
||||
# because they are handled separately.
|
||||
# The TEXTURE_SIZE and SOUND_QUALITY take effect only if DECREASE_QUALITY has
|
||||
# value greater than 0
|
||||
# value greater than 0.
|
||||
# The CONVERT_TO_JPG variable enables converting all images that are safe to
|
||||
# convert and keeps other images untouched.
|
||||
# The script needs imagemagick and ogg utils installed to use DECREASE_QUALITY
|
||||
# feature
|
||||
|
||||
################################################################################
|
||||
|
||||
export KARTS="tux nolok xue"
|
||||
export KARTS="all"
|
||||
export TRACKS="battleisland cornfield_crossing featunlocked gplose gpwin \
|
||||
hacienda introcutscene introcutscene2 lighthouse olivermath \
|
||||
overworld snowmountain snowtuxpeak soccer_field tutorial"
|
||||
overworld sandtrack scotland snowmountain snowtuxpeak \
|
||||
soccer_field tutorial"
|
||||
|
||||
export ASSETS_PATHS="../data \
|
||||
../../stk-assets \
|
||||
@ -29,12 +32,19 @@ export ASSETS_PATHS="../data \
|
||||
export ASSETS_DIRS="library models music sfx textures"
|
||||
|
||||
export TEXTURE_SIZE=256
|
||||
export JPEG_QUALITY=85
|
||||
export PNG_QUALITY=95
|
||||
export SOUND_QUALITY=42
|
||||
export SOUND_MONO=1
|
||||
export SOUND_SAMPLE=32000
|
||||
|
||||
export RUN_OPTIMIZE_SCRIPT=0
|
||||
export DECREASE_QUALITY=1
|
||||
export CONVERT_TO_JPG=1
|
||||
|
||||
export CONVERT_TO_JPG_BLACKLIST="data/karts/hexley/hexley_kart_diffuse.png"
|
||||
|
||||
export BLACKLIST_FILES="data/music/cocoa_river_fast.ogg2"
|
||||
|
||||
################################################################################
|
||||
|
||||
@ -44,21 +54,21 @@ cd "`dirname "$0"`"
|
||||
|
||||
# Find assets path
|
||||
for ASSETS_PATH in $ASSETS_PATHS; do
|
||||
if [ -d $ASSETS_PATH ] && [ `ls $ASSETS_PATH | grep -c tracks` -gt 0 ]; then
|
||||
echo "Assets found in $ASSETS_PATH"
|
||||
ASSETS_PATH_FOUND=1
|
||||
break
|
||||
fi
|
||||
if [ -d $ASSETS_PATH ] && [ `ls $ASSETS_PATH | grep -c tracks` -gt 0 ]; then
|
||||
echo "Assets found in $ASSETS_PATH"
|
||||
ASSETS_PATH_FOUND=1
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
if [ -z $ASSETS_PATH_FOUND ]; then
|
||||
echo "Couldn't find assets path"
|
||||
exit 1
|
||||
echo "Couldn't find assets path"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! -d "../data" ]; then
|
||||
echo "Couldn't find data directory"
|
||||
exit 1
|
||||
echo "Couldn't find data directory"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
@ -73,27 +83,27 @@ echo "Copy all assets"
|
||||
mkdir -p assets/data
|
||||
|
||||
for DIR in `ls $ASSETS_PATH`; do
|
||||
CAN_BE_COPIED=0
|
||||
CAN_BE_COPIED=0
|
||||
|
||||
for ASSETS_DIR in $ASSETS_DIRS; do
|
||||
if [ $DIR = $ASSETS_DIR ]; then
|
||||
CAN_BE_COPIED=1
|
||||
break
|
||||
fi
|
||||
done;
|
||||
for ASSETS_DIR in $ASSETS_DIRS; do
|
||||
if [ $DIR = $ASSETS_DIR ]; then
|
||||
CAN_BE_COPIED=1
|
||||
break
|
||||
fi
|
||||
done;
|
||||
|
||||
# Don't copy karts and tracks. It will be handled later
|
||||
BLACKLIST_ASSETS="karts tracks"
|
||||
for ASSETS_DIR in $BLACKLIST_ASSETS; do
|
||||
if [ $DIR = $ASSETS_DIR ]; then
|
||||
CAN_BE_COPIED=0
|
||||
break
|
||||
fi
|
||||
done;
|
||||
# Don't copy karts and tracks. It will be handled later
|
||||
BLACKLIST_ASSETS="karts tracks"
|
||||
for ASSETS_DIR in $BLACKLIST_ASSETS; do
|
||||
if [ $DIR = $ASSETS_DIR ]; then
|
||||
CAN_BE_COPIED=0
|
||||
break
|
||||
fi
|
||||
done;
|
||||
|
||||
if [ $CAN_BE_COPIED -gt 0 ]; then
|
||||
cp -a "$ASSETS_PATH/$DIR" assets/data/
|
||||
fi
|
||||
if [ $CAN_BE_COPIED -gt 0 ]; then
|
||||
cp -a "$ASSETS_PATH/$DIR" assets/data/
|
||||
fi
|
||||
done;
|
||||
|
||||
|
||||
@ -103,22 +113,22 @@ echo "Copy selected tracks"
|
||||
mkdir -p assets/data/tracks
|
||||
|
||||
for DIR in `ls $ASSETS_PATH/tracks`; do
|
||||
CAN_BE_COPIED=0
|
||||
CAN_BE_COPIED=0
|
||||
|
||||
if [ "$TRACKS" != "all" ]; then
|
||||
for TRACK in $TRACKS; do
|
||||
if [ $DIR = $TRACK ]; then
|
||||
CAN_BE_COPIED=1
|
||||
break
|
||||
fi
|
||||
done;
|
||||
else
|
||||
CAN_BE_COPIED=1
|
||||
fi
|
||||
if [ "$TRACKS" != "all" ]; then
|
||||
for TRACK in $TRACKS; do
|
||||
if [ $DIR = $TRACK ]; then
|
||||
CAN_BE_COPIED=1
|
||||
break
|
||||
fi
|
||||
done;
|
||||
else
|
||||
CAN_BE_COPIED=1
|
||||
fi
|
||||
|
||||
if [ $CAN_BE_COPIED -gt 0 ]; then
|
||||
cp -a "$ASSETS_PATH/tracks/$DIR" assets/data/tracks/
|
||||
fi
|
||||
if [ $CAN_BE_COPIED -gt 0 ]; then
|
||||
cp -a "$ASSETS_PATH/tracks/$DIR" assets/data/tracks/
|
||||
fi
|
||||
done
|
||||
|
||||
|
||||
@ -128,22 +138,22 @@ echo "Copy selected karts"
|
||||
mkdir -p assets/data/karts
|
||||
|
||||
for DIR in `ls $ASSETS_PATH/karts`; do
|
||||
CAN_BE_COPIED=0
|
||||
CAN_BE_COPIED=0
|
||||
|
||||
if [ "$KARTS" != "all" ]; then
|
||||
for KART in $KARTS; do
|
||||
if [ $DIR = $KART ]; then
|
||||
CAN_BE_COPIED=1
|
||||
break
|
||||
fi
|
||||
done;
|
||||
else
|
||||
CAN_BE_COPIED=1
|
||||
fi
|
||||
if [ "$KARTS" != "all" ]; then
|
||||
for KART in $KARTS; do
|
||||
if [ $DIR = $KART ]; then
|
||||
CAN_BE_COPIED=1
|
||||
break
|
||||
fi
|
||||
done;
|
||||
else
|
||||
CAN_BE_COPIED=1
|
||||
fi
|
||||
|
||||
if [ $CAN_BE_COPIED -gt 0 ]; then
|
||||
cp -a "$ASSETS_PATH/karts/$DIR" assets/data/karts/
|
||||
fi
|
||||
if [ $CAN_BE_COPIED -gt 0 ]; then
|
||||
cp -a "$ASSETS_PATH/karts/$DIR" assets/data/karts/
|
||||
fi
|
||||
done
|
||||
|
||||
|
||||
@ -152,82 +162,405 @@ echo "Decrease assets quality"
|
||||
|
||||
convert_image()
|
||||
{
|
||||
if [ -z "$1" ]; then
|
||||
echo "No file to convert"
|
||||
return
|
||||
fi
|
||||
FILE="$1"
|
||||
FILE_TYPE="$2"
|
||||
echo "Convert file: $FILE"
|
||||
|
||||
FILE="$1"
|
||||
if [ ! -f "$FILE" ]; then
|
||||
echo " File doesn't exist."
|
||||
return
|
||||
fi
|
||||
|
||||
W=`identify -format "%[fx:w]" "$FILE"`
|
||||
H=`identify -format "%[fx:h]" "$FILE"`
|
||||
W=`identify -format "%[fx:w]" "$FILE"`
|
||||
H=`identify -format "%[fx:h]" "$FILE"`
|
||||
|
||||
if [ -z $W ] || [ -z $H ]; then
|
||||
echo "Couldn't convert $FILE file"
|
||||
return
|
||||
fi
|
||||
if [ -z $W ] || [ -z $H ]; then
|
||||
echo "Couldn't convert $FILE file"
|
||||
return
|
||||
fi
|
||||
|
||||
if [ $W -le $TEXTURE_SIZE ] && [ $H -le $TEXTURE_SIZE ]; then
|
||||
return
|
||||
fi
|
||||
if [ $W -gt $TEXTURE_SIZE ] || [ $H -gt $TEXTURE_SIZE ]; then
|
||||
if [ $W -gt $H ]; then
|
||||
SCALED_W=$TEXTURE_SIZE
|
||||
SCALED_H=$(($TEXTURE_SIZE * $H / $W))
|
||||
else
|
||||
SCALED_W=$(($TEXTURE_SIZE * $W / $H))
|
||||
SCALED_H=$TEXTURE_SIZE
|
||||
fi
|
||||
|
||||
if [ $W -gt $H ]; then
|
||||
SCALED_W=$TEXTURE_SIZE
|
||||
SCALED_H=$(($TEXTURE_SIZE * $H / $W))
|
||||
else
|
||||
SCALED_W=$(($TEXTURE_SIZE * $W / $H))
|
||||
SCALED_H=$TEXTURE_SIZE
|
||||
fi
|
||||
SCALE_CMD="-scale ${SCALED_W}x${SCALED_H}"
|
||||
fi
|
||||
|
||||
convert -scale $SCALED_WE\x$SCALED_H "$FILE" "$FILE"
|
||||
if [ "$FILE_TYPE" = "jpg" ]; then
|
||||
QUALITY_CMD="-quality $JPEG_QUALITY"
|
||||
elif [ "$FILE_TYPE" = "png" ]; then
|
||||
QUALITY_CMD="-quality $PNG_QUALITY"
|
||||
fi
|
||||
|
||||
convert $SCALE_CMD $QUALITY_CMD "$FILE" "tmp.$FILE_TYPE"
|
||||
|
||||
if [ -s "tmp.$FILE_TYPE" ]; then
|
||||
SIZE_OLD=`du -k "$FILE" | cut -f1`
|
||||
SIZE_NEW=`du -k "tmp.$FILE_TYPE" | cut -f1`
|
||||
|
||||
if [ $SIZE_NEW -lt $SIZE_OLD ]; then
|
||||
mv "tmp.$FILE_TYPE" "$FILE"
|
||||
fi
|
||||
fi
|
||||
|
||||
rm -f "tmp.$FILE_TYPE"
|
||||
}
|
||||
|
||||
convert_sound()
|
||||
{
|
||||
if [ -z "$1" ]; then
|
||||
echo "No file to convert"
|
||||
return
|
||||
fi
|
||||
FILE="$1"
|
||||
echo "Convert file: $FILE"
|
||||
|
||||
FILE="$1"
|
||||
if [ ! -f "$FILE" ]; then
|
||||
echo " File doesn't exist."
|
||||
return
|
||||
fi
|
||||
|
||||
oggdec "$FILE" -o tmp.wav
|
||||
oggdec "$FILE" -o tmp.wav
|
||||
|
||||
if [ -s tmp.wav ]; then
|
||||
OGGENC_CMD=""
|
||||
|
||||
if [ "$SOUND_MONO" -gt 0 ]; then
|
||||
OGGENC_CMD="$OGGENC_CMD --downmix"
|
||||
fi
|
||||
|
||||
OGG_RATE=`ogginfo "$FILE" | grep "Rate: " | cut -f 2 -d " " \
|
||||
| grep -o '[0-9]*'`
|
||||
|
||||
if [ ! -z "$OGG_RATE" ] && [ "$OGG_RATE" -gt "32000" ]; then
|
||||
OGGENC_CMD="$OGGENC_CMD --resample 32000"
|
||||
fi
|
||||
|
||||
OGGENC_CMD="$OGGENC_CMD -b $SOUND_QUALITY"
|
||||
|
||||
oggenc $OGGENC_CMD tmp.wav -o tmp.ogg
|
||||
fi
|
||||
if [ -s tmp.wav ]; then
|
||||
OGGENC_CMD=""
|
||||
|
||||
if [ -s tmp.ogg ]; then
|
||||
SIZE_OLD=`du -k "$FILE" | cut -f1`
|
||||
SIZE_NEW=`du -k "tmp.ogg" | cut -f1`
|
||||
if [ "$SOUND_MONO" -gt 0 ]; then
|
||||
OGGENC_CMD="$OGGENC_CMD --downmix"
|
||||
fi
|
||||
|
||||
if [ $SIZE_NEW -lt $SIZE_OLD ]; then
|
||||
mv tmp.ogg "$FILE"
|
||||
fi
|
||||
fi
|
||||
OGG_RATE=`ogginfo "$FILE" | grep "Rate: " | cut -f 2 -d " " \
|
||||
| grep -o '[0-9]*'`
|
||||
|
||||
rm -f tmp.wav tmp.ogg
|
||||
if [ ! -z "$OGG_RATE" ] && [ "$OGG_RATE" -gt "$SOUND_SAMPLE" ]; then
|
||||
OGGENC_CMD="$OGGENC_CMD --resample $SOUND_SAMPLE"
|
||||
fi
|
||||
|
||||
OGGENC_CMD="$OGGENC_CMD -b $SOUND_QUALITY"
|
||||
|
||||
oggenc $OGGENC_CMD tmp.wav -o tmp.ogg
|
||||
fi
|
||||
|
||||
if [ -s tmp.ogg ]; then
|
||||
SIZE_OLD=`du -k "$FILE" | cut -f1`
|
||||
SIZE_NEW=`du -k "tmp.ogg" | cut -f1`
|
||||
|
||||
if [ $SIZE_NEW -lt $SIZE_OLD ]; then
|
||||
mv tmp.ogg "$FILE"
|
||||
fi
|
||||
fi
|
||||
|
||||
rm -f tmp.wav tmp.ogg
|
||||
}
|
||||
|
||||
convert_to_jpg()
|
||||
{
|
||||
FILE="$1"
|
||||
echo "Convert file: $FILE"
|
||||
|
||||
if [ ! -f "$FILE" ]; then
|
||||
echo " File doesn't exist."
|
||||
return
|
||||
fi
|
||||
|
||||
ALREADY_CONVERTED=0
|
||||
|
||||
if [ -s "./converted_textures" ]; then
|
||||
while read -r CONVERTED_TEXTURE; do
|
||||
if [ "$FILE" = "$CONVERTED_TEXTURE" ]; then
|
||||
ALREADY_CONVERTED=1
|
||||
break
|
||||
fi
|
||||
done < "./converted_textures"
|
||||
fi
|
||||
|
||||
if [ $ALREADY_CONVERTED -eq 1 ]; then
|
||||
return
|
||||
fi
|
||||
|
||||
BLACKLISTED=0
|
||||
|
||||
for BLACKLIST_FILE in $CONVERT_TO_JPG_BLACKLIST; do
|
||||
if [ "$FILE" = "assets/$BLACKLIST_FILE" ]; then
|
||||
BLACKLISTED=1
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
if [ $BLACKLISTED -eq 1 ]; then
|
||||
#echo " File is blacklisted. Ignore..."
|
||||
continue
|
||||
fi
|
||||
|
||||
FILE_EXTENSION=`echo "$FILE" | tail -c 5`
|
||||
|
||||
if [ `echo "$FILE_EXTENSION" | head -c 1` != "." ]; then
|
||||
#echo " Unsupported file extension. Ignore..."
|
||||
continue
|
||||
fi
|
||||
|
||||
FILE_FORMAT=`identify -format %m "$FILE"`
|
||||
|
||||
if [ "$FILE_FORMAT" = "JPEG" ]; then
|
||||
#echo " File is already JPEG. Ignore..."
|
||||
continue
|
||||
fi
|
||||
|
||||
IS_OPAQUE=`identify -format '%[opaque]' "$FILE"`
|
||||
#HAS_ALPHA=`identify -format '%A' "$FILE"`
|
||||
|
||||
if [ "$IS_OPAQUE" = "False" ] || [ "$IS_OPAQUE" = "false" ]; then
|
||||
#echo " File has alpha channel. Ignore..."
|
||||
continue
|
||||
fi
|
||||
|
||||
DIRNAME="`dirname "$FILE"`"
|
||||
BASENAME="`basename "$FILE"`"
|
||||
IS_GLOSS_MAP=`find "$DIRNAME" -iname "*.xml" -exec cat {} \; \
|
||||
| grep -c "gloss-map=\"$BASENAME\""`
|
||||
|
||||
if [ $IS_GLOSS_MAP -gt 0 ]; then
|
||||
#echo " File is a gloss-map. Ignore..."
|
||||
continue
|
||||
fi
|
||||
|
||||
NEW_FILE="`echo $FILE | head -c -5`.jpg"
|
||||
|
||||
if [ -f "$NEW_FILE" ]; then
|
||||
#echo " There is already a file with .jpg extension. Ignore..."
|
||||
continue
|
||||
fi
|
||||
|
||||
# We can check if new file is smaller
|
||||
convert -quality $JPEG_QUALITY "$FILE" "$NEW_FILE"
|
||||
rm -f "$FILE"
|
||||
|
||||
echo "$FILE" >> "./converted_textures"
|
||||
}
|
||||
|
||||
convert_to_jpg_extract_b3dz()
|
||||
{
|
||||
FILE="$1"
|
||||
echo "Convert file: $FILE"
|
||||
|
||||
if [ ! -f "$FILE" ]; then
|
||||
echo " File doesn't exist."
|
||||
return
|
||||
fi
|
||||
|
||||
DIRNAME="`dirname "$FILE"`"
|
||||
|
||||
unzip "$FILE" -d "$DIRNAME"
|
||||
rm -f "$FILE"
|
||||
|
||||
TEXNAME="`basename "$FILE"`"
|
||||
NEWNAME="`echo $TEXNAME | head -c -6`.b3d"
|
||||
|
||||
sed -i "s/\"$TEXNAME\"/\"$NEWNAME\"/g" "$DIRNAME/kart.xml"
|
||||
}
|
||||
|
||||
convert_to_jpg_update_b3d()
|
||||
{
|
||||
FILE="$1"
|
||||
echo "Convert file: $FILE"
|
||||
|
||||
if [ ! -f "$1" ]; then
|
||||
echo " File doesn't exist."
|
||||
return
|
||||
fi
|
||||
|
||||
HEX_FILE=`hexdump -ve '1/1 "%.2x"' "$FILE"`
|
||||
|
||||
TEXS_CHUNK="54455853"
|
||||
TEXS_CHUNK_POS=24
|
||||
|
||||
FOUND_CHUNK=`echo $HEX_FILE | head -c $(($TEXS_CHUNK_POS + 8)) \
|
||||
| tail -c +$(($TEXS_CHUNK_POS + 1))`
|
||||
|
||||
if [ -z "$FOUND_CHUNK" ] || [ "$FOUND_CHUNK" != "$TEXS_CHUNK" ]; then
|
||||
echo " File has no textures."
|
||||
return
|
||||
fi
|
||||
|
||||
TEXS_SIZE=`echo $HEX_FILE | head -c $(($TEXS_CHUNK_POS + 16)) | tail -c 8`
|
||||
|
||||
TEXS_SIZE_CONVERTED=`echo $TEXS_SIZE | cut -c7-8`
|
||||
TEXS_SIZE_CONVERTED=$TEXS_SIZE_CONVERTED`echo $TEXS_SIZE | cut -c5-6`
|
||||
TEXS_SIZE_CONVERTED=$TEXS_SIZE_CONVERTED`echo $TEXS_SIZE | cut -c3-4`
|
||||
TEXS_SIZE_CONVERTED=$TEXS_SIZE_CONVERTED`echo $TEXS_SIZE | cut -c1-2`
|
||||
TEXS_SIZE_CONVERTED=`echo $((0x$TEXS_SIZE_CONVERTED))`
|
||||
|
||||
if [ $TEXS_SIZE_CONVERTED -le 0 ]; then
|
||||
echo " Invalid TEXS size value."
|
||||
return
|
||||
fi
|
||||
|
||||
TEXS_BEGIN=$(($TEXS_CHUNK_POS + 16))
|
||||
TEXS_END=$(($TEXS_BEGIN + $TEXS_SIZE_CONVERTED * 2))
|
||||
HEX_TEXS=`echo $HEX_FILE | head -c $TEXS_END | tail -c +$(($TEXS_BEGIN+1))`
|
||||
CURR_POS=0
|
||||
|
||||
while [ $CURR_POS -lt $TEXS_END ]; do
|
||||
NULL_POS=`echo $HEX_TEXS | tail -c +$(($CURR_POS+1)) | grep -b -o "00" \
|
||||
| head -n 1 | cut -f1 -d":"`
|
||||
|
||||
if [ -z $NULL_POS ]; then
|
||||
#echo " Done."
|
||||
break
|
||||
fi
|
||||
|
||||
if [ $NULL_POS -lt 4 ]; then
|
||||
echo " Something went wrong..."
|
||||
break
|
||||
fi
|
||||
|
||||
TEXNAME_BEGIN=$((($TEXS_BEGIN + $CURR_POS) / 2))
|
||||
TEXNAME_END=$((($TEXS_BEGIN + $CURR_POS + $NULL_POS) / 2))
|
||||
CURR_POS=$(($CURR_POS + $NULL_POS + 58))
|
||||
|
||||
TEXTURE_NAME=`dd if="$FILE" bs=1 skip=$TEXNAME_BEGIN \
|
||||
count=$(($TEXNAME_END - $TEXNAME_BEGIN)) 2> /dev/null`
|
||||
DIRNAME="`dirname "$FILE"`"
|
||||
TEXTURE_PATH="$DIRNAME/$TEXTURE_NAME"
|
||||
|
||||
IS_CONVERTED=0
|
||||
|
||||
while read -r CONVERTED_TEXTURE; do
|
||||
if [ "$TEXTURE_PATH" = "$CONVERTED_TEXTURE" ]; then
|
||||
IS_CONVERTED=1
|
||||
break
|
||||
fi
|
||||
done < "./converted_textures"
|
||||
|
||||
if [ $IS_CONVERTED -eq 1 ]; then
|
||||
echo -n ".jpg" | dd of="$FILE" bs=1 seek=$(($TEXNAME_END - 4)) \
|
||||
conv=notrunc 2> /dev/null
|
||||
fi;
|
||||
done
|
||||
}
|
||||
|
||||
convert_to_jpg_update_spm()
|
||||
{
|
||||
FILE="$1"
|
||||
echo "Convert file: $FILE"
|
||||
|
||||
if [ ! -f "$1" ]; then
|
||||
echo " File doesn't exist."
|
||||
return
|
||||
fi
|
||||
|
||||
HEX_FILE=`hexdump -ve '1/1 "%.2x"' "$FILE"`
|
||||
|
||||
SP_HEADER="5350"
|
||||
SP_FOUND=`echo $HEX_FILE | head -c 4`
|
||||
|
||||
if [ -z "$SP_FOUND" ] || [ "$SP_FOUND" != "$SP_HEADER" ]; then
|
||||
echo " Unsupported format."
|
||||
return
|
||||
fi
|
||||
|
||||
TEXS_BEGIN=60
|
||||
TEXS_COUNT=`echo $HEX_FILE | head -c $TEXS_BEGIN | tail -c 4`
|
||||
|
||||
TEXS_COUNT_CONVERTED=`echo $TEXS_COUNT | cut -c3-4`
|
||||
TEXS_COUNT_CONVERTED=$TEXS_COUNT_CONVERTED`echo $TEXS_COUNT | cut -c1-2`
|
||||
TEXS_COUNT_CONVERTED=`echo $((0x$TEXS_COUNT_CONVERTED))`
|
||||
TEXS_COUNT_CONVERTED=$(($TEXS_COUNT_CONVERTED * 2))
|
||||
|
||||
if [ $TEXS_COUNT_CONVERTED -le 0 ]; then
|
||||
echo " Invalid textures count value."
|
||||
return
|
||||
fi
|
||||
|
||||
CURR_POS=$(($TEXS_BEGIN + 2))
|
||||
|
||||
while [ $TEXS_COUNT_CONVERTED -gt 0 ]; do
|
||||
TEXS_COUNT_CONVERTED=$(($TEXS_COUNT_CONVERTED - 1))
|
||||
|
||||
TEX_LEN=`echo $HEX_FILE | head -c $(($CURR_POS)) | tail -c 2`
|
||||
TEX_LEN=`echo $((0x$TEX_LEN))`
|
||||
|
||||
TEXNAME_BEGIN=$(($CURR_POS / 2))
|
||||
TEXNAME_END=$(($CURR_POS / 2 + $TEX_LEN))
|
||||
CURR_POS=$(($CURR_POS + 2 + $TEX_LEN * 2))
|
||||
|
||||
if [ $TEX_LEN -eq 0 ]; then
|
||||
#echo " Empty texture name, ignore..."
|
||||
continue
|
||||
fi
|
||||
|
||||
TEXTURE_NAME=`dd if="$FILE" bs=1 skip=$TEXNAME_BEGIN \
|
||||
count=$(($TEXNAME_END - $TEXNAME_BEGIN)) 2> /dev/null`
|
||||
|
||||
DIRNAME="`dirname "$FILE"`"
|
||||
TEXTURE_PATH="$DIRNAME/$TEXTURE_NAME"
|
||||
|
||||
IS_CONVERTED=0
|
||||
|
||||
while read -r CONVERTED_TEXTURE; do
|
||||
if [ "$TEXTURE_PATH" = "$CONVERTED_TEXTURE" ]; then
|
||||
IS_CONVERTED=1
|
||||
break
|
||||
fi
|
||||
done < "./converted_textures"
|
||||
|
||||
if [ $IS_CONVERTED -eq 1 ]; then
|
||||
echo -n ".jpg" | dd of="$FILE" bs=1 seek=$(($TEXNAME_END - 4)) \
|
||||
conv=notrunc 2> /dev/null
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
convert_to_jpg_update_xml()
|
||||
{
|
||||
FILE="$1"
|
||||
echo "Convert file: $FILE"
|
||||
|
||||
if [ ! -f "$FILE" ]; then
|
||||
echo " File doesn't exist."
|
||||
return
|
||||
fi
|
||||
|
||||
DIRNAME="`dirname "$FILE"`"
|
||||
|
||||
while read -r CONVERTED_TEXTURE; do
|
||||
DIRNAME_TEX="`dirname "$CONVERTED_TEXTURE"`"
|
||||
|
||||
if [ "$DIRNAME_TEX" != "$DIRNAME" ]; then
|
||||
continue;
|
||||
fi
|
||||
|
||||
TEXNAME="`basename "$CONVERTED_TEXTURE" | head -c -5`"
|
||||
|
||||
sed -i "s/\"$TEXNAME.[pP][nN][gG]/\"$TEXNAME.jpg/g" "$FILE"
|
||||
sed -i "s/ $TEXNAME.[pP][nN][gG]/ $TEXNAME.jpg/g" "$FILE"
|
||||
done < "./converted_textures"
|
||||
}
|
||||
|
||||
|
||||
if [ $DECREASE_QUALITY -gt 0 ]; then
|
||||
find assets/data -iname "*.png" | while read f; do convert_image "$f"; done
|
||||
find assets/data -iname "*.jpg" | while read f; do convert_image "$f"; done
|
||||
find assets/data -iname "*.ogg" | while read f; do convert_sound "$f"; done
|
||||
find assets/data -iname "*.png" | while read f; do convert_image "$f" "png"; done
|
||||
find assets/data -iname "*.jpg" | while read f; do convert_image "$f" "jpg"; done
|
||||
find assets/data -iname "*.ogg" | while read f; do convert_sound "$f"; done
|
||||
fi
|
||||
|
||||
|
||||
if [ $CONVERT_TO_JPG -gt 0 ]; then
|
||||
rm -f "./converted_textures"
|
||||
|
||||
find assets/data -not -path "assets/data/textures/*" -iname "*.png" | while read f; do convert_to_jpg "$f"; done
|
||||
|
||||
find assets/data -iname "*.b3dz" | while read f; do convert_to_jpg_extract_b3dz "$f"; done
|
||||
find assets/data -iname "*.b3d" | while read f; do convert_to_jpg_update_b3d "$f"; done
|
||||
find assets/data -iname "*.spm" | while read f; do convert_to_jpg_update_spm "$f"; done
|
||||
find assets/data -iname "*.xml" | while read f; do convert_to_jpg_update_xml "$f"; done
|
||||
|
||||
if [ -s "./converted_textures" ]; then
|
||||
echo "Converted textures:"
|
||||
cat "./converted_textures"
|
||||
rm -f "./converted_textures"
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
@ -236,10 +569,16 @@ echo "Copy data directory"
|
||||
cp -a ../data/* assets/data/
|
||||
|
||||
|
||||
# Remove unused files
|
||||
for BLACKLIST_FILE in $BLACKLIST_FILES; do
|
||||
rm -f "assets/$BLACKLIST_FILE"
|
||||
done
|
||||
|
||||
|
||||
# Run optimize_data.sh script
|
||||
if [ $RUN_OPTIMIZE_SCRIPT -gt 0 ]; then
|
||||
echo "Run optimize_data.sh script"
|
||||
sh -c 'cd assets/data; ../../../data/optimize_data.sh'
|
||||
echo "Run optimize_data.sh script"
|
||||
sh -c 'cd assets/data; ../../../data/optimize_data.sh'
|
||||
fi
|
||||
|
||||
|
||||
|
@ -22,16 +22,19 @@ export NDK_ABI_ARMV7=armeabi-v7a
|
||||
export ARCH_ARMV7=arm
|
||||
export HOST_ARMV7=arm-linux-androideabi
|
||||
export NDK_PLATFORM_ARMV7=android-19
|
||||
export SDK_VERSION_ARMV7=19
|
||||
|
||||
export NDK_ABI_X86=x86
|
||||
export ARCH_X86=x86
|
||||
export HOST_X86=i686-linux-android
|
||||
export NDK_PLATFORM_X86=android-19
|
||||
export SDK_VERSION_X86=19
|
||||
|
||||
export NDK_ABI_AARCH64=arm64-v8a
|
||||
export ARCH_AARCH64=arm64
|
||||
export HOST_AARCH64=aarch64-linux-android
|
||||
export NDK_PLATFORM_AARCH64=android-21
|
||||
export SDK_VERSION_AARCH64=21
|
||||
|
||||
|
||||
# A helper function that checks if error ocurred
|
||||
@ -46,8 +49,10 @@ check_error()
|
||||
# Handle clean command
|
||||
if [ ! -z "$1" ] && [ "$1" = "clean" ]; then
|
||||
rm -rf bin
|
||||
rm -rf build
|
||||
rm -rf libs
|
||||
rm -rf obj
|
||||
rm -rf .gradle
|
||||
exit
|
||||
fi
|
||||
|
||||
@ -75,16 +80,19 @@ if [ "$COMPILE_ARCH" = "armv7" ]; then
|
||||
export NDK_ABI=$NDK_ABI_ARMV7
|
||||
export ARCH=$ARCH_ARMV7
|
||||
export HOST=$HOST_ARMV7
|
||||
export SDK_VERSION=$SDK_VERSION_ARMV7
|
||||
elif [ "$COMPILE_ARCH" = "x86" ]; then
|
||||
export NDK_PLATFORM=$NDK_PLATFORM_X86
|
||||
export NDK_ABI=$NDK_ABI_X86
|
||||
export ARCH=$ARCH_X86
|
||||
export HOST=$HOST_X86
|
||||
export SDK_VERSION=$SDK_VERSION_X86
|
||||
elif [ "$COMPILE_ARCH" = "aarch64" ]; then
|
||||
export NDK_PLATFORM=$NDK_PLATFORM_AARCH64
|
||||
export NDK_ABI=$NDK_ABI_AARCH64
|
||||
export ARCH=$ARCH_AARCH64
|
||||
export HOST=$HOST_AARCH64
|
||||
export SDK_VERSION=$SDK_VERSION_AARCH64
|
||||
else
|
||||
echo "Unknow COMPILE_ARCH: $COMPILE_ARCH. Possible values are: " \
|
||||
"armv7, aarch64, x86"
|
||||
@ -97,10 +105,12 @@ if [ -z "$BUILD_TYPE" ]; then
|
||||
fi
|
||||
|
||||
if [ "$BUILD_TYPE" = "debug" ] || [ "$BUILD_TYPE" = "Debug" ]; then
|
||||
export BUILD_TYPE="debug"
|
||||
export ANT_BUILD_TYPE="debug"
|
||||
export GRADLE_BUILD_TYPE="assembleDebug"
|
||||
export IS_DEBUG_BUILD=1
|
||||
elif [ "$BUILD_TYPE" = "release" ] || [ "$BUILD_TYPE" = "Release" ]; then
|
||||
export BUILD_TYPE="release"
|
||||
export ANT_BUILD_TYPE="release"
|
||||
export GRADLE_BUILD_TYPE="assembleRelease"
|
||||
export IS_DEBUG_BUILD=0
|
||||
else
|
||||
echo "Unsupported BUILD_TYPE: $BUILD_TYPE. Possible values are: " \
|
||||
@ -108,6 +118,17 @@ else
|
||||
exit
|
||||
fi
|
||||
|
||||
# Check selected build tool
|
||||
if [ -z "$BUILD_TOOL" ]; then
|
||||
BUILD_TOOL="gradle"
|
||||
fi
|
||||
|
||||
if [ "$BUILD_TOOL" != "gradle" ] && [ "$BUILD_TOOL" != "ant" ]; then
|
||||
echo "Unsupported BUILD_TOOL: $BUILD_TOOL. Possible values are: " \
|
||||
"gradle, ant"
|
||||
exit
|
||||
fi
|
||||
|
||||
# Check if we have access to the Android NDK and SDK
|
||||
if [ -z "$NDK_PATH" ]; then
|
||||
export NDK_PATH="$NDK_PATH_DEFAULT"
|
||||
@ -134,6 +155,24 @@ if [ ! -d "$SDK_PATH" ]; then
|
||||
exit
|
||||
fi
|
||||
|
||||
# Find newest build-tools version
|
||||
if [ -z "$BUILD_TOOLS_VER" ]; then
|
||||
BUILD_TOOLS_DIRS=`ls -1 "$SDK_PATH/build-tools" | sort -V -r`
|
||||
|
||||
for DIR in $BUILD_TOOLS_DIRS; do
|
||||
if [ "$DIR" = `echo $DIR | sed 's/[^0-9,.]//g'` ]; then
|
||||
BUILD_TOOLS_VER="$DIR"
|
||||
break
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
if [ -z "$BUILD_TOOLS_VER" ] || [ ! -d "$SDK_PATH/build-tools/$BUILD_TOOLS_VER" ]; then
|
||||
echo "Error: Couldn't detect build-tools version."
|
||||
exit
|
||||
fi
|
||||
|
||||
|
||||
# Standalone toolchain
|
||||
if [ ! -f "$DIRNAME/obj/make_standalone_toolchain.stamp" ]; then
|
||||
echo "Creating standalone toolchain"
|
||||
@ -302,5 +341,16 @@ check_error
|
||||
|
||||
# Build apk
|
||||
echo "Building APK"
|
||||
ant $BUILD_TYPE -Dsdk.dir="$SDK_PATH" -Dtarget=$NDK_PLATFORM
|
||||
|
||||
if [ "$BUILD_TOOL" = "gradle" ]; then
|
||||
export ANDROID_HOME="$SDK_PATH"
|
||||
gradle -Psdk_version=$SDK_VERSION \
|
||||
-Pbuild_tools_ver="$BUILD_TOOLS_VER" \
|
||||
$GRADLE_BUILD_TYPE
|
||||
elif [ "$BUILD_TOOL" = "ant" ]; then
|
||||
ant -Dsdk.dir="$SDK_PATH" \
|
||||
-Dtarget=$NDK_PLATFORM \
|
||||
$ANT_BUILD_TYPE
|
||||
fi
|
||||
|
||||
check_error
|
||||
|
@ -9,8 +9,11 @@ SET(CMAKE_C_COMPILER x86_64-w64-mingw32-gcc-posix)
|
||||
SET(CMAKE_CXX_COMPILER x86_64-w64-mingw32-g++-posix)
|
||||
SET(CMAKE_RC_COMPILER x86_64-w64-mingw32-windres)
|
||||
|
||||
# figure out folder to look in
|
||||
execute_process(COMMAND sh -c "ls /usr/lib/gcc/x86_64-w64-mingw32/ | grep posix | tr -d '\n'" OUTPUT_VARIABLE MINGW_DEPS_FOLDER)
|
||||
|
||||
# here is the target environment located
|
||||
SET(CMAKE_FIND_ROOT_PATH /usr/x86_64-w64-mingw32 /usr/lib/gcc/x86_64-w64-mingw32/4.9-posix ${PROJECT_SOURCE_DIR}/dependencies)
|
||||
SET(CMAKE_FIND_ROOT_PATH /usr/x86_64-w64-mingw32 /usr/lib/gcc/x86_64-w64-mingw32/${MINGW_DEPS_FOLDER}/ ${PROJECT_SOURCE_DIR}/dependencies)
|
||||
|
||||
# adjust the default behaviour of the FIND_XXX() commands:
|
||||
# search headers and libraries in the target environment, search
|
||||
|
@ -9,8 +9,11 @@ SET(CMAKE_C_COMPILER i686-w64-mingw32-gcc-posix)
|
||||
SET(CMAKE_CXX_COMPILER i686-w64-mingw32-g++-posix)
|
||||
SET(CMAKE_RC_COMPILER i686-w64-mingw32-windres)
|
||||
|
||||
# figure out folder to look in
|
||||
execute_process(COMMAND sh -c "ls /usr/lib/gcc/i686-w64-mingw32/ | grep posix | tr -d '\n'" OUTPUT_VARIABLE MINGW_DEPS_FOLDER)
|
||||
|
||||
# here is the target environment located
|
||||
SET(CMAKE_FIND_ROOT_PATH /usr/i686-w64-mingw32 /usr/lib/gcc/i686-w64-mingw32/4.9-posix ${PROJECT_SOURCE_DIR}/dependencies)
|
||||
SET(CMAKE_FIND_ROOT_PATH /usr/i686-w64-mingw32 /usr/lib/gcc/i686-w64-mingw32/${MINGW_DEPS_FOLDER}/ ${PROJECT_SOURCE_DIR}/dependencies)
|
||||
|
||||
# adjust the default behaviour of the FIND_XXX() commands:
|
||||
# search headers and libraries in the target environment, search
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0"?>
|
||||
<challenge version="2">
|
||||
<track id="city" laps="3"/>
|
||||
<track id="candela_city" laps="3"/>
|
||||
<mode major="single" minor="quickrace"/>
|
||||
<requirements trophies="70"/>
|
||||
|
||||
|
@ -37,5 +37,7 @@
|
||||
<card contains="ATI" os="windows" version="<=3.1.8787" disable="ForceLegacyDevice"/>
|
||||
<card os="android" disable="TextureFormatBGRA8888"/>
|
||||
<card os="android" disable="ColorBufferFloat"/>
|
||||
<card contains="Adreno" os="android" version="<=19" disable="VertexIdWorking"/>
|
||||
<card contains="Android Emulator" os="android" disable="ForceLegacyDevice"/>
|
||||
<card os="android" disable="UniformBufferObject"/>
|
||||
</graphical-restrictions>
|
||||
|
@ -20,7 +20,7 @@
|
||||
<box proportion="1" width="100%" layout="vertical-row">
|
||||
|
||||
<spacer width="5" height="15"/>
|
||||
<button id="startTutorial" text="Click here to play the tutorial" align="center"/>
|
||||
<button id="startTutorial" text="Start the tutorial" align="center"/>
|
||||
<spacer width="5" height="15"/>
|
||||
|
||||
<div width="100%" proportion="2" layout="horizontal-row">
|
||||
|
@ -15,6 +15,14 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div width="75%" layout="horizontal-row" proportion="1">
|
||||
<label proportion="1" align="center" text_align="right" I18N="In the multitouch settings screen" text="Inverted buttons"/>
|
||||
<div proportion="1" align="center" height="fit" layout="horizontal-row" >
|
||||
<spacer width="40" height="10" />
|
||||
<checkbox id="buttons_inverted"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div width="75%" layout="horizontal-row" proportion="1">
|
||||
<label proportion="1" align="center" text_align="right" I18N="In the multitouch settings screen" text="Buttons scale"/>
|
||||
<div proportion="1" align="center" height="fit" layout="horizontal-row" >
|
||||
@ -23,29 +31,11 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<label width="100%" I18N="In the multitouch settings screen" text="Accelerometer"/>
|
||||
|
||||
<div width="75%" layout="horizontal-row" proportion="1">
|
||||
<label proportion="1" align="center" text_align="right" I18N="In the multitouch settings screen" text="Disabled"/>
|
||||
<label proportion="1" align="center" text_align="right" I18N="In the multitouch settings screen" text="Accelerometer"/>
|
||||
<div proportion="1" align="center" height="fit" layout="horizontal-row" >
|
||||
<spacer width="40" height="10" />
|
||||
<checkbox id="accelerometer_disabled"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div width="75%" layout="horizontal-row" proportion="1">
|
||||
<label proportion="1" align="center" text_align="right" I18N="In the multitouch settings screen" text="Phone"/>
|
||||
<div proportion="1" align="center" height="fit" layout="horizontal-row" >
|
||||
<spacer width="40" height="10" />
|
||||
<checkbox id="accelerometer_phone"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div width="75%" layout="horizontal-row" proportion="1">
|
||||
<label proportion="1" align="center" text_align="right" I18N="In the multitouch settings screen" text="Tablet"/>
|
||||
<div proportion="1" align="center" height="fit" layout="horizontal-row" >
|
||||
<spacer width="40" height="10" />
|
||||
<checkbox id="accelerometer_tablet"/>
|
||||
<spinner id="accelerometer" proportion="1"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -1,15 +1,15 @@
|
||||
<?xml version="1.0"?>
|
||||
<items>
|
||||
<bonus-box model="gift-box.b3d" lowmodel="gift-box-low.b3d" glow="31 202 253"/>
|
||||
<banana model="banana.b3d" lowmodel="banana-low.b3d" glow="197 152 37"/>
|
||||
<nitro-big model="nitrotank-big.b3d" lowmodel="nitrotank-big-low.b3d" glow="0 70 158"/>
|
||||
<nitro-small model="nitrotank-small.b3d" lowmodel="nitrotank-small-low.b3d" glow="0 70 158"/>
|
||||
<bonus-box model="gift-box.spm" lowmodel="gift-box-low.spm" glow="31 202 253"/>
|
||||
<banana model="banana.spm" lowmodel="banana-low.spm" glow="197 152 37"/>
|
||||
<nitro-big model="nitrotank-big.spm" lowmodel="nitrotank-big-low.spm" glow="0 70 158"/>
|
||||
<nitro-small model="nitrotank-small.spm" lowmodel="nitrotank-small-low.spm" glow="0 70 158"/>
|
||||
<!-- While a bubble gum technically
|
||||
isn't an item, it is internally
|
||||
handled as one, so list it here -->
|
||||
<bubblegum model="bubblegum.b3d" lowmodel="bubblegum-low.b3d" glow="246 150 209"/>
|
||||
<bubblegum-nolok model="bubblegum-nolok.b3d" lowmodel="bubblegum-nolok-low.b3d"/>
|
||||
<!-- <easter-egg model="easter_egg.b3d" /> -->
|
||||
<easter-egg model="easter_egg.b3d" />
|
||||
<bubblegum model="bubblegum.spm" lowmodel="bubblegum-low.spm" glow="246 150 209"/>
|
||||
<bubblegum-nolok model="bubblegum-nolok.spm" lowmodel="bubblegum-nolok-low.spm"/>
|
||||
<!-- <easter-egg model="easter_egg.spm" /> -->
|
||||
<easter-egg model="easter_egg.spm" />
|
||||
</items>
|
||||
|
||||
|
@ -2,17 +2,17 @@
|
||||
<powerup>
|
||||
<item name="zipper" icon="zipper_collect.png" />
|
||||
<item name="bowling" icon="bowling-icon.png"
|
||||
model="bowling.b3d" speed="4.0"
|
||||
model="bowling.spm" speed="4.0"
|
||||
min-height="0.2" max-height="1.0"
|
||||
force-updown="1" force-to-target="40"
|
||||
max-distance="25" />
|
||||
<item name="bubblegum" icon="bubblegum-icon.png" />
|
||||
<item name="cake" icon="cake-icon.png"
|
||||
model="cake.b3d" speed="50"
|
||||
model="cake.spm" speed="50"
|
||||
min-height="0.2" max-height="1.0"
|
||||
force-updown="25" max-distance="90" />
|
||||
<item name="anchor" icon="anchor-icon.png"
|
||||
model="anchor.b3d" />
|
||||
model="anchor.spm" />
|
||||
<item name="switch" icon="swap-icon.png" />
|
||||
<item name="swatter" icon="swatter-icon.png" />
|
||||
<!-- interval: How long a single bounce takes.
|
||||
@ -56,7 +56,7 @@
|
||||
tunneling.
|
||||
-->
|
||||
<item name="rubber-ball" icon="rubber_ball-icon.png"
|
||||
model="rubber_ball.b3d" speed="35.0"
|
||||
model="rubber_ball.spm" speed="35.0"
|
||||
scale="1 1 1" interval="1"
|
||||
max-height="4.0" min-height="0"
|
||||
fast-ping-distance="50"
|
||||
@ -67,9 +67,9 @@
|
||||
squash-slowdown="0.5" squash-duration="2"
|
||||
delete-time="5.0" max-height-difference="10" />
|
||||
<item name="parachute" icon="parachute-icon.png"
|
||||
model="parachute.b3d" />
|
||||
model="parachute.spm" />
|
||||
<item name="plunger" icon="plunger-icon.png"
|
||||
model="plunger.b3d" speed="35"
|
||||
model="plunger.spm" speed="35"
|
||||
min-height="0.2" max-height="1.0"
|
||||
force-updown="35" force-to-target="15"
|
||||
max-distance="25" />
|
||||
|
@ -1,10 +1,12 @@
|
||||
uniform sampler2D tex;
|
||||
|
||||
in vec2 uv;
|
||||
in vec4 vertex_color;
|
||||
out vec4 FragColor;
|
||||
|
||||
void main(void)
|
||||
{
|
||||
vec4 color = texture(tex, uv);
|
||||
color *= vertex_color;
|
||||
FragColor = vec4(color.a * color.rgb, color.a);
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
uniform mat4 ModelViewMatrix;
|
||||
uniform mat4 color_matrix;
|
||||
uniform vec3 Position;
|
||||
uniform vec2 Size;
|
||||
|
||||
@ -11,10 +11,12 @@ in vec2 Texcoord;
|
||||
#endif
|
||||
|
||||
out vec2 uv;
|
||||
out vec4 vertex_color;
|
||||
|
||||
void main(void)
|
||||
{
|
||||
uv = Texcoord;
|
||||
vec4 Center = ModelViewMatrix * vec4(Position, 1.);
|
||||
vec4 Center = ViewMatrix * vec4(Position, 1.);
|
||||
gl_Position = ProjectionMatrix * (Center + vec4(Size * Corner, 0., 0.));
|
||||
vertex_color = color_matrix[gl_VertexID];
|
||||
}
|
||||
|
@ -6,11 +6,11 @@ uniform vec2 texsize;
|
||||
#ifdef Explicit_Attrib_Location_Usable
|
||||
layout(location=0) in vec2 Position;
|
||||
layout(location=3) in vec2 Texcoord;
|
||||
layout(location=2) in uvec4 Color;
|
||||
layout(location=2) in vec4 Color;
|
||||
#else
|
||||
in vec2 Position;
|
||||
in vec2 Texcoord;
|
||||
in uvec4 Color;
|
||||
in vec4 Color;
|
||||
#endif
|
||||
|
||||
out vec2 uv;
|
||||
@ -18,7 +18,7 @@ out vec4 col;
|
||||
|
||||
void main()
|
||||
{
|
||||
col = vec4(Color) / 255.;
|
||||
col = Color.zyxw;
|
||||
uv = Texcoord * texsize + texcenter;
|
||||
gl_Position = vec4(Position * size + center, 0., 1.);
|
||||
}
|
||||
|
@ -6,7 +6,6 @@ uniform vec2 dir;
|
||||
uniform vec2 dir2;
|
||||
|
||||
in vec2 uv;
|
||||
in vec2 uv_bis;
|
||||
in float camdist;
|
||||
|
||||
out vec4 FragColor;
|
||||
|
@ -1,22 +0,0 @@
|
||||
uniform mat4 ModelMatrix;
|
||||
|
||||
#ifdef Explicit_Attrib_Location_Usable
|
||||
layout(location = 0) in vec3 Position;
|
||||
layout(location = 3) in vec2 Texcoord;
|
||||
layout(location = 4) in vec2 SecondTexcoord;
|
||||
#else
|
||||
in vec3 Position;
|
||||
in vec2 Texcoord;
|
||||
in vec2 SecondTexcoord;
|
||||
#endif
|
||||
|
||||
out vec2 uv;
|
||||
out vec2 uv_bis;
|
||||
out float camdist;
|
||||
|
||||
void main() {
|
||||
gl_Position = ProjectionViewMatrix * ModelMatrix * vec4(Position, 1.);
|
||||
uv = Texcoord;
|
||||
uv_bis = SecondTexcoord;
|
||||
camdist = length(ViewMatrix * ModelMatrix * vec4(Position, 1.));
|
||||
}
|
@ -20,7 +20,7 @@ out vec2 uv;
|
||||
void main()
|
||||
{
|
||||
|
||||
vec3 test = sin(windDir * (Position.y* 0.5)) * 0.5;
|
||||
vec3 test = sin(windDir * (Position.y * 0.1)) * 1.;
|
||||
test += cos(windDir) * 0.7;
|
||||
|
||||
mat4 new_model_matrix = ModelMatrix;
|
||||
|
@ -1,11 +1,9 @@
|
||||
#ifdef Use_Bindless_Texture
|
||||
layout(bindless_sampler) uniform sampler2D Albedo;
|
||||
layout(bindless_sampler) uniform sampler2D dtex;
|
||||
layout(bindless_sampler) uniform sampler2D SpecMap;
|
||||
layout(bindless_sampler) uniform sampler2D colorization_mask;
|
||||
#else
|
||||
uniform sampler2D Albedo;
|
||||
uniform sampler2D dtex;
|
||||
uniform sampler2D SpecMap;
|
||||
uniform sampler2D colorization_mask;
|
||||
#endif
|
||||
@ -36,25 +34,8 @@ void main(void)
|
||||
vec2 new_xy = mix(vec2(old_hsv.x, old_hsv.y), vec2(color_change.x, max(old_hsv.y, color_change.y)), vec2(mask_step, mask_step));
|
||||
color.xyz = hsvToRgb(vec3(new_xy.x, new_xy.y, old_hsv.z));
|
||||
}
|
||||
|
||||
vec2 texc = gl_FragCoord.xy / screen;
|
||||
float z = texture(dtex, texc).x;
|
||||
|
||||
vec4 xpos = 2.0 * vec4(texc, z, 1.0) - 1.0f;
|
||||
xpos = InverseProjectionMatrix * xpos;
|
||||
xpos /= xpos.w;
|
||||
vec3 eyedir = normalize(xpos.xyz);
|
||||
|
||||
// Inspired from http://http.developer.nvidia.com/GPUGems3/gpugems3_ch16.html
|
||||
vec3 L = normalize((transpose(InverseViewMatrix) * vec4(sun_direction, 0.)).xyz);
|
||||
float fEdotL = clamp(dot(L, eyedir), 0., 1.);
|
||||
float fPowEdotL = pow(fEdotL, 4.);
|
||||
|
||||
float fLdotNBack = max(0., - dot(nor, L) * 0.6 + 0.4);
|
||||
float scattering = mix(fPowEdotL, fLdotNBack, .5);
|
||||
|
||||
float specmap = texture(SpecMap, uv).g;
|
||||
float emitmap = texture(SpecMap, uv).b;
|
||||
vec3 LightFactor = color.xyz * (scattering * 0.1) + getLightFactor(color.xyz, vec3(1.), specmap, emitmap);
|
||||
vec3 LightFactor = getLightFactor(color.xyz, vec3(1.), specmap, emitmap);
|
||||
FragColor = vec4(LightFactor, 1.);
|
||||
}
|
||||
|
@ -41,7 +41,7 @@ flat out sampler2D thirdhandle;
|
||||
|
||||
void main()
|
||||
{
|
||||
vec3 test = sin(windDir * (Position.y* 0.5)) * 0.5;
|
||||
vec3 test = sin(windDir * (Position.y * 0.1)) * 1.;
|
||||
test += cos(windDir) * 0.7;
|
||||
mat4 ModelMatrix = getWorldMatrix(Origin + test * Color.r, Orientation, Scale);
|
||||
mat4 TransposeInverseModelView = transpose(getInverseWorldMatrix(Origin + test * Color.r, Orientation, Scale) * InverseViewMatrix);
|
||||
|
@ -1,9 +1,6 @@
|
||||
#ifdef Use_Bindless_Texture
|
||||
layout(bindless_sampler) uniform sampler2D dtex;
|
||||
#else
|
||||
#ifndef Use_Bindless_Texture
|
||||
uniform sampler2D Albedo;
|
||||
uniform sampler2D SpecMap;
|
||||
uniform sampler2D dtex;
|
||||
uniform sampler2D colorization_mask;
|
||||
#endif
|
||||
|
||||
@ -45,24 +42,6 @@ void main(void)
|
||||
vec2 new_xy = mix(vec2(old_hsv.x, old_hsv.y), vec2(color_change.x, max(old_hsv.y, color_change.y)), vec2(mask_step, mask_step));
|
||||
color.xyz = hsvToRgb(vec3(new_xy.x, new_xy.y, old_hsv.z));
|
||||
}
|
||||
|
||||
vec2 texc = gl_FragCoord.xy / screen;
|
||||
float z = texture(dtex, texc).x;
|
||||
|
||||
vec4 xpos = 2.0 * vec4(texc, z, 1.0) - 1.0f;
|
||||
xpos = InverseProjectionMatrix * xpos;
|
||||
xpos /= xpos.w;
|
||||
vec3 eyedir = normalize(xpos.xyz);
|
||||
|
||||
// Inspired from http://http.developer.nvidia.com/GPUGems3/gpugems3_ch16.html
|
||||
vec3 L = normalize((transpose(InverseViewMatrix) * vec4(sun_direction, 0.)).xyz);
|
||||
float fEdotL = clamp(dot(L, eyedir), 0., 1.);
|
||||
float fPowEdotL = pow(fEdotL, 4.);
|
||||
|
||||
float fLdotNBack = max(0., - dot(nor, L) * 0.6 + 0.4);
|
||||
float scattering = mix(fPowEdotL, fLdotNBack, .5);
|
||||
|
||||
vec3 LightFactor = color.xyz * (scattering * 0.1) + getLightFactor(color.xyz, vec3(1.), specmap, emitmap);
|
||||
|
||||
vec3 LightFactor = getLightFactor(color.xyz, vec3(1.), specmap, emitmap);
|
||||
FragColor = vec4(LightFactor, 1.);
|
||||
}
|
||||
|
@ -41,7 +41,7 @@ out vec3 bitangent;
|
||||
out vec2 uv;
|
||||
out vec2 uv_bis;
|
||||
out vec4 color;
|
||||
|
||||
out float camdist;
|
||||
|
||||
void main(void)
|
||||
{
|
||||
@ -56,4 +56,5 @@ void main(void)
|
||||
bitangent = (ViewMatrix * ModelMatrix * vec4(Bitangent, 0.)).xyz;
|
||||
uv = vec2(Texcoord.x + texture_trans.x, Texcoord.y + texture_trans.y);
|
||||
uv_bis = SecondTexcoord;
|
||||
camdist = length(ViewMatrix * ModelMatrix * vec4(Position, 1.));
|
||||
}
|
||||
|
@ -14,6 +14,11 @@ layout (location = 0) in vec3 particle_position;
|
||||
layout (location = 1) in float lifetime;
|
||||
layout (location = 2) in vec3 particle_velocity;
|
||||
layout (location = 3) in float size;
|
||||
|
||||
#ifdef Needs_Vertex_Id_Workaround
|
||||
layout (location = 8) in int vertex_id;
|
||||
#endif
|
||||
|
||||
#else
|
||||
in vec3 particle_position_initial;
|
||||
in float lifetime_initial;
|
||||
@ -24,6 +29,11 @@ in vec3 particle_position;
|
||||
in float lifetime;
|
||||
in vec3 particle_velocity;
|
||||
in float size;
|
||||
|
||||
#ifdef Needs_Vertex_Id_Workaround
|
||||
in int vertex_id;
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
out vec3 new_particle_position;
|
||||
@ -36,7 +46,11 @@ void main(void)
|
||||
float updated_lifetime = lifetime + (float(dt)/lifetime_initial);
|
||||
if (updated_lifetime > 1.)
|
||||
{
|
||||
#ifdef Needs_Vertex_Id_Workaround
|
||||
if (vertex_id < level)
|
||||
#else
|
||||
if (gl_VertexID < level)
|
||||
#endif
|
||||
{
|
||||
float dt_from_last_frame = fract(updated_lifetime) * lifetime_initial;
|
||||
float coeff = dt_from_last_frame / float(dt);
|
||||
|
@ -10,6 +10,7 @@ uniform sampler2D SSAO;
|
||||
|
||||
vec3 getLightFactor(vec3 diffuseMatColor, vec3 specularMatColor, float specMapValue, float emitMapValue)
|
||||
{
|
||||
#if defined(Advanced_Lighting_Enabled)
|
||||
vec2 tc = gl_FragCoord.xy / screen;
|
||||
vec3 DiffuseComponent = texture(DiffuseMap, tc).xyz;
|
||||
vec3 SpecularComponent = texture(SpecularMap, tc).xyz;
|
||||
@ -17,4 +18,11 @@ vec3 getLightFactor(vec3 diffuseMatColor, vec3 specularMatColor, float specMapVa
|
||||
vec3 tmp = diffuseMatColor * DiffuseComponent * (1. - specMapValue) + specularMatColor * SpecularComponent * specMapValue;
|
||||
vec3 emitCol = diffuseMatColor.xyz * diffuseMatColor.xyz * diffuseMatColor.xyz * 15.;
|
||||
return tmp * ao + (emitMapValue * emitCol);
|
||||
#else
|
||||
#if defined(GL_ES)
|
||||
return diffuseMatColor * 0.73; // 0.5 ^ (1. / 2.2)
|
||||
#else
|
||||
return diffuseMatColor * 0.5;
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
@ -3,11 +3,11 @@
|
||||
<config>
|
||||
<!-- Minimum and maximum kart versions that can be used by this binary.
|
||||
Older version will be ignored. -->
|
||||
<kart-version min="2" max="2"/>
|
||||
<kart-version min="2" max="3"/>
|
||||
|
||||
<!-- Minimum and maxium track versions that be be read by this binary.
|
||||
Older versions will be ignored. -->
|
||||
<track-version min="6" max="6"/>
|
||||
<track-version min="6" max="7"/>
|
||||
|
||||
<!-- Maximum number of karts to be used at the same time. This limit
|
||||
can easily be increased, but some tracks might not have valid start
|
||||
|
@ -2,6 +2,7 @@
|
||||
Name=SuperTuxKart
|
||||
Icon=supertuxkart
|
||||
GenericName=A kart racing game
|
||||
GenericName[da]=Et kart racerspil
|
||||
GenericName[de]=Ein Kart-Rennspiel
|
||||
GenericName[fr]=Un jeu de karting
|
||||
GenericName[gl]=Xogo de carreiras con karts
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 1.8 KiB |
BIN
data/supertuxkart_48.png
Normal file
BIN
data/supertuxkart_48.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.6 KiB |
@ -18,6 +18,6 @@ add_library(glew STATIC
|
||||
src/glew.c src/glewinfo.c
|
||||
)
|
||||
|
||||
target_link_libraries(glew ${OPENGL_LIBRARIES})
|
||||
target_link_libraries(glew ${OPENGL_gl_LIBRARY})
|
||||
|
||||
endif()
|
||||
|
@ -14064,6 +14064,9 @@ GLenum glxewContextInit (GLXEW_CONTEXT_ARG_DEF_LIST)
|
||||
GLXEW_VERSION_1_2 = GL_TRUE;
|
||||
GLXEW_VERSION_1_3 = GL_TRUE;
|
||||
GLXEW_VERSION_1_4 = GL_TRUE;
|
||||
/* Check if GLX display is available */
|
||||
if (glXGetCurrentDisplay == NULL || glXGetCurrentDisplay() == NULL)
|
||||
return GLEW_OK;
|
||||
/* query GLX version */
|
||||
glXQueryVersion(glXGetCurrentDisplay(), &major, &minor);
|
||||
if (major == 1 && minor <= 3)
|
||||
|
@ -5,12 +5,17 @@ find_package(JPEG REQUIRED)
|
||||
include_directories("${CMAKE_CURRENT_SOURCE_DIR}/include/"
|
||||
"${JPEG_INCLUDE_DIR}"
|
||||
"${PNG_INCLUDE_DIRS}"
|
||||
"${ZLIB_INCLUDE_DIR}"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/../zlib/") # For zconf.h on WIN32
|
||||
"${ZLIB_INCLUDE_DIR}")
|
||||
|
||||
if(MSVC OR APPLE)
|
||||
include_directories("${CMAKE_CURRENT_BINARY_DIR}/../zlib/" # For zconf.h on WIN32
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/../libpng/")
|
||||
endif()
|
||||
|
||||
if (SERVER_ONLY)
|
||||
add_definitions(-DNO_IRR_COMPILE_WITH_OPENGL_)
|
||||
add_definitions(-DNO_IRR_COMPILE_WITH_X11_)
|
||||
add_definitions(-DNO_IRR_COMPILE_WITH_WAYLAND_DEVICE_)
|
||||
else()
|
||||
if(NOT USE_GLES2)
|
||||
find_package(OpenGL REQUIRED)
|
||||
@ -23,6 +28,10 @@ if (UNIX AND NOT APPLE)
|
||||
include_directories(${X11_INCLUDE_DIR})
|
||||
endif()
|
||||
|
||||
if(ENABLE_WAYLAND_DEVICE)
|
||||
add_definitions(-D_IRR_COMPILE_WITH_WAYLAND_DEVICE_)
|
||||
endif()
|
||||
|
||||
if(APPLE)
|
||||
include_directories("${CMAKE_CURRENT_SOURCE_DIR}/source/Irrlicht/MacOSX" "${CMAKE_CURRENT_SOURCE_DIR}/source/Irrlicht")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -arch x86_64")
|
||||
@ -53,7 +62,7 @@ else()
|
||||
endif()
|
||||
|
||||
if(USE_GLES2)
|
||||
add_definitions(-D_IRR_COMPILE_WITH_OGLES2_ -DNO_IRR_COMPILE_WITH_SOFTWARE_ -DNO_IRR_COMPILE_WITH_BURNINGSVIDEO_ -DNO_IRR_COMPILE_WITH_OGLES1_ -DNO_IRR_COMPILE_WITH_OPENGL_ -DNO_IRR_USE_NON_SYSTEM_JPEG_LIB_ -DNO_IRR_USE_NON_SYSTEM_LIB_PNG_ -DNO_IRR_USE_NON_SYSTEM_ZLIB_)
|
||||
add_definitions(-D_IRR_COMPILE_WITH_OGLES2_ -DNO_IRR_COMPILE_WITH_OPENGL_)
|
||||
endif()
|
||||
|
||||
if(CYGWIN)
|
||||
@ -119,6 +128,7 @@ source/Irrlicht/CIrrDeviceFB.cpp
|
||||
source/Irrlicht/CIrrDeviceLinux.cpp
|
||||
source/Irrlicht/CIrrDeviceSDL.cpp
|
||||
source/Irrlicht/CIrrDeviceStub.cpp
|
||||
source/Irrlicht/CIrrDeviceWayland.cpp
|
||||
source/Irrlicht/CIrrDeviceWin32.cpp
|
||||
source/Irrlicht/CLightSceneNode.cpp
|
||||
source/Irrlicht/CLimitReadFile.cpp
|
||||
@ -252,6 +262,7 @@ source/Irrlicht/CIrrDeviceFB.h
|
||||
source/Irrlicht/CIrrDeviceLinux.h
|
||||
source/Irrlicht/CIrrDeviceSDL.h
|
||||
source/Irrlicht/CIrrDeviceStub.h
|
||||
source/Irrlicht/CIrrDeviceWayland.h
|
||||
source/Irrlicht/CIrrDeviceWin32.h
|
||||
source/Irrlicht/CLightSceneNode.h
|
||||
source/Irrlicht/CLimitReadFile.h
|
||||
@ -550,6 +561,14 @@ endif()
|
||||
add_library(stkirrlicht STATIC ${IRRLICHT_SOURCES})
|
||||
target_link_libraries(stkirrlicht ${PNG_LIBRARY} ${JPEG_LIBRARY} ${ZLIB_LIBRARY})
|
||||
|
||||
if(WIN32)
|
||||
target_link_libraries(stkirrlicht imm32)
|
||||
if(USE_GLES2 OR ENABLE_WAYLAND_DEVICE)
|
||||
target_link_libraries(stkirrlicht EGL)
|
||||
endif()
|
||||
|
||||
if(ENABLE_WAYLAND_DEVICE)
|
||||
target_link_libraries(stkirrlicht wayland-client wayland-egl wayland-cursor xkbcommon)
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
target_link_libraries(stkirrlicht imm32 xinput9_1_0)
|
||||
endif()
|
||||
|
@ -20,6 +20,9 @@ namespace irr
|
||||
/** This device works on Windows Mobile, Pocket PC and Microsoft SmartPhone devices */
|
||||
EIDT_WINCE,
|
||||
|
||||
//! A device native to Linux
|
||||
EIDT_WAYLAND,
|
||||
|
||||
//! A device native to Unix style operating systems.
|
||||
/** This device uses the X11 windowing system and works in Linux, Solaris, FreeBSD, OSX and
|
||||
other operating systems which support X11. */
|
||||
|
@ -52,9 +52,6 @@ namespace video
|
||||
primitives. */
|
||||
EDT_OPENGL,
|
||||
|
||||
//! OpenGL-ES 1.x driver, for embedded and mobile systems
|
||||
EDT_OGLES1,
|
||||
|
||||
//! OpenGL-ES 2.x driver, for embedded and mobile systems
|
||||
/** Supports shaders etc. */
|
||||
EDT_OGLES2,
|
||||
|
@ -177,8 +177,9 @@ namespace scene
|
||||
\param newManager An optional new scene manager.
|
||||
\return The newly created clone of this node. */
|
||||
virtual ISceneNode* clone(ISceneNode* newParent=0, ISceneManager* newManager=0) = 0;
|
||||
|
||||
virtual void setFrameLoopOnce(s32 begin, s32 end) = 0;
|
||||
virtual u32 getAnimationSetNum() = 0;
|
||||
virtual s32 getAnimationSet() const = 0;
|
||||
virtual void addAnimationSet(u32 start, u32 end) = 0;
|
||||
virtual void useAnimationSet(u32 set_num) = 0;
|
||||
};
|
||||
|
@ -624,24 +624,24 @@ namespace scene
|
||||
\code
|
||||
SKeyMap keyMap[8];
|
||||
keyMap[0].Action = EKA_MOVE_FORWARD;
|
||||
keyMap[0].KeyCode = KEY_UP;
|
||||
keyMap[0].KeyCode = IRR_KEY_UP;
|
||||
keyMap[1].Action = EKA_MOVE_FORWARD;
|
||||
keyMap[1].KeyCode = KEY_KEY_W;
|
||||
keyMap[1].KeyCode = IRR_KEY_W;
|
||||
|
||||
keyMap[2].Action = EKA_MOVE_BACKWARD;
|
||||
keyMap[2].KeyCode = KEY_DOWN;
|
||||
keyMap[2].KeyCode = IRR_KEY_DOWN;
|
||||
keyMap[3].Action = EKA_MOVE_BACKWARD;
|
||||
keyMap[3].KeyCode = KEY_KEY_S;
|
||||
keyMap[3].KeyCode = IRR_KEY_S;
|
||||
|
||||
keyMap[4].Action = EKA_STRAFE_LEFT;
|
||||
keyMap[4].KeyCode = KEY_LEFT;
|
||||
keyMap[4].KeyCode = IRR_KEY_LEFT;
|
||||
keyMap[5].Action = EKA_STRAFE_LEFT;
|
||||
keyMap[5].KeyCode = KEY_KEY_A;
|
||||
keyMap[5].KeyCode = IRR_KEY_A;
|
||||
|
||||
keyMap[6].Action = EKA_STRAFE_RIGHT;
|
||||
keyMap[6].KeyCode = KEY_RIGHT;
|
||||
keyMap[6].KeyCode = IRR_KEY_RIGHT;
|
||||
keyMap[7].Action = EKA_STRAFE_RIGHT;
|
||||
keyMap[7].KeyCode = KEY_KEY_D;
|
||||
keyMap[7].KeyCode = IRR_KEY_D;
|
||||
|
||||
camera = sceneManager->addCameraSceneNodeFPS(0, 100, 500, -1, keyMap, 8);
|
||||
\endcode
|
||||
|
@ -127,8 +127,16 @@
|
||||
#endif
|
||||
#define _IRR_POSIX_API_
|
||||
#define _IRR_COMPILE_WITH_X11_DEVICE_
|
||||
//#define _IRR_COMPILE_WITH_WAYLAND_DEVICE_
|
||||
#endif
|
||||
|
||||
#ifdef NO_IRR_COMPILE_WITH_WAYLAND_DEVICE_
|
||||
#undef _IRR_COMPILE_WITH_WAYLAND_DEVICE_
|
||||
#endif
|
||||
|
||||
#ifdef _IRR_COMPILE_WITH_WAYLAND_DEVICE_
|
||||
#define _IRR_COMPILE_WITH_EGL_
|
||||
#endif
|
||||
|
||||
//! Define _IRR_COMPILE_WITH_JOYSTICK_SUPPORT_ if you want joystick events.
|
||||
#define _IRR_COMPILE_WITH_JOYSTICK_EVENTS_
|
||||
@ -160,7 +168,7 @@ headers, e.g. Summer 2004. This is a Microsoft issue, not an Irrlicht one.
|
||||
//! Define _IRR_COMPILE_WITH_DIRECTINPUT_JOYSTICK_ if you want to use DirectInput for joystick handling.
|
||||
/** This only applies to Windows devices, currently only supported under Win32 device.
|
||||
If not defined, Windows Multimedia library is used, which offers also broad support for joystick devices. */
|
||||
#undef _IRR_COMPILE_WITH_DIRECTINPUT_JOYSTICK_
|
||||
#define _IRR_COMPILE_WITH_DIRECTINPUT_JOYSTICK_
|
||||
#ifdef NO_IRR_COMPILE_WITH_DIRECTINPUT_JOYSTICK_
|
||||
#undef _IRR_COMPILE_WITH_DIRECTINPUT_JOYSTICK_
|
||||
#endif
|
||||
|
@ -152,6 +152,10 @@ namespace irr
|
||||
/** \param text: New text of the window caption. */
|
||||
virtual void setWindowCaption(const wchar_t* text) = 0;
|
||||
|
||||
//! Sets the class of the window.
|
||||
/** \param text: New text of the window class. */
|
||||
virtual void setWindowClass(const char* text) = 0;
|
||||
|
||||
//! Returns if the window is active.
|
||||
/** If the window is inactive,
|
||||
nothing needs to be drawn. So if you don't want to draw anything
|
||||
|
@ -10,176 +10,176 @@ namespace irr
|
||||
|
||||
enum EKEY_CODE
|
||||
{
|
||||
KEY_UNKNOWN = 0x0,
|
||||
KEY_LBUTTON = 0x01, // Left mouse button
|
||||
KEY_RBUTTON = 0x02, // Right mouse button
|
||||
KEY_CANCEL = 0x03, // Control-break processing
|
||||
KEY_MBUTTON = 0x04, // Middle mouse button (three-button mouse)
|
||||
KEY_XBUTTON1 = 0x05, // Windows 2000/XP: X1 mouse button
|
||||
KEY_XBUTTON2 = 0x06, // Windows 2000/XP: X2 mouse button
|
||||
KEY_BACK = 0x08, // BACKSPACE key
|
||||
KEY_TAB = 0x09, // TAB key
|
||||
KEY_CLEAR = 0x0C, // CLEAR key
|
||||
KEY_RETURN = 0x0D, // ENTER key
|
||||
KEY_SHIFT = 0x10, // SHIFT key
|
||||
KEY_CONTROL = 0x11, // CTRL key
|
||||
KEY_MENU = 0x12, // ALT key
|
||||
KEY_PAUSE = 0x13, // PAUSE key
|
||||
KEY_CAPITAL = 0x14, // CAPS LOCK key
|
||||
KEY_KANA = 0x15, // IME Kana mode
|
||||
KEY_HANGUEL = 0x15, // IME Hanguel mode (maintained for compatibility use KEY_HANGUL)
|
||||
KEY_HANGUL = 0x15, // IME Hangul mode
|
||||
KEY_JUNJA = 0x17, // IME Junja mode
|
||||
KEY_FINAL = 0x18, // IME final mode
|
||||
KEY_HANJA = 0x19, // IME Hanja mode
|
||||
KEY_KANJI = 0x19, // IME Kanji mode
|
||||
KEY_ESCAPE = 0x1B, // ESC key
|
||||
KEY_CONVERT = 0x1C, // IME convert
|
||||
KEY_NONCONVERT = 0x1D, // IME nonconvert
|
||||
KEY_ACCEPT = 0x1E, // IME accept
|
||||
KEY_MODECHANGE = 0x1F, // IME mode change request
|
||||
KEY_SPACE = 0x20, // SPACEBAR
|
||||
KEY_PRIOR = 0x21, // PAGE UP key
|
||||
KEY_NEXT = 0x22, // PAGE DOWN key
|
||||
KEY_END = 0x23, // END key
|
||||
KEY_HOME = 0x24, // HOME key
|
||||
KEY_LEFT = 0x25, // LEFT ARROW key
|
||||
KEY_UP = 0x26, // UP ARROW key
|
||||
KEY_RIGHT = 0x27, // RIGHT ARROW key
|
||||
KEY_DOWN = 0x28, // DOWN ARROW key
|
||||
KEY_SELECT = 0x29, // SELECT key
|
||||
KEY_PRINT = 0x2A, // PRINT key
|
||||
KEY_EXECUT = 0x2B, // EXECUTE key
|
||||
KEY_SNAPSHOT = 0x2C, // PRINT SCREEN key
|
||||
KEY_INSERT = 0x2D, // INS key
|
||||
KEY_DELETE = 0x2E, // DEL key
|
||||
KEY_HELP = 0x2F, // HELP key
|
||||
KEY_KEY_0 = 0x30, // 0 key
|
||||
KEY_KEY_1 = 0x31, // 1 key
|
||||
KEY_KEY_2 = 0x32, // 2 key
|
||||
KEY_KEY_3 = 0x33, // 3 key
|
||||
KEY_KEY_4 = 0x34, // 4 key
|
||||
KEY_KEY_5 = 0x35, // 5 key
|
||||
KEY_KEY_6 = 0x36, // 6 key
|
||||
KEY_KEY_7 = 0x37, // 7 key
|
||||
KEY_KEY_8 = 0x38, // 8 key
|
||||
KEY_KEY_9 = 0x39, // 9 key
|
||||
KEY_KEY_A = 0x41, // A key
|
||||
KEY_KEY_B = 0x42, // B key
|
||||
KEY_KEY_C = 0x43, // C key
|
||||
KEY_KEY_D = 0x44, // D key
|
||||
KEY_KEY_E = 0x45, // E key
|
||||
KEY_KEY_F = 0x46, // F key
|
||||
KEY_KEY_G = 0x47, // G key
|
||||
KEY_KEY_H = 0x48, // H key
|
||||
KEY_KEY_I = 0x49, // I key
|
||||
KEY_KEY_J = 0x4A, // J key
|
||||
KEY_KEY_K = 0x4B, // K key
|
||||
KEY_KEY_L = 0x4C, // L key
|
||||
KEY_KEY_M = 0x4D, // M key
|
||||
KEY_KEY_N = 0x4E, // N key
|
||||
KEY_KEY_O = 0x4F, // O key
|
||||
KEY_KEY_P = 0x50, // P key
|
||||
KEY_KEY_Q = 0x51, // Q key
|
||||
KEY_KEY_R = 0x52, // R key
|
||||
KEY_KEY_S = 0x53, // S key
|
||||
KEY_KEY_T = 0x54, // T key
|
||||
KEY_KEY_U = 0x55, // U key
|
||||
KEY_KEY_V = 0x56, // V key
|
||||
KEY_KEY_W = 0x57, // W key
|
||||
KEY_KEY_X = 0x58, // X key
|
||||
KEY_KEY_Y = 0x59, // Y key
|
||||
KEY_KEY_Z = 0x5A, // Z key
|
||||
KEY_LWIN = 0x5B, // Left Windows key (MicrosoftŽ NaturalŽ keyboard)
|
||||
KEY_RWIN = 0x5C, // Right Windows key (Natural keyboard)
|
||||
KEY_APPS = 0x5D, // Applications key (Natural keyboard)
|
||||
KEY_SLEEP = 0x5F, // Computer Sleep key
|
||||
KEY_NUMPAD0 = 0x60, // Numeric keypad 0 key
|
||||
KEY_NUMPAD1 = 0x61, // Numeric keypad 1 key
|
||||
KEY_NUMPAD2 = 0x62, // Numeric keypad 2 key
|
||||
KEY_NUMPAD3 = 0x63, // Numeric keypad 3 key
|
||||
KEY_NUMPAD4 = 0x64, // Numeric keypad 4 key
|
||||
KEY_NUMPAD5 = 0x65, // Numeric keypad 5 key
|
||||
KEY_NUMPAD6 = 0x66, // Numeric keypad 6 key
|
||||
KEY_NUMPAD7 = 0x67, // Numeric keypad 7 key
|
||||
KEY_NUMPAD8 = 0x68, // Numeric keypad 8 key
|
||||
KEY_NUMPAD9 = 0x69, // Numeric keypad 9 key
|
||||
KEY_MULTIPLY = 0x6A, // Multiply key
|
||||
KEY_ADD = 0x6B, // Add key
|
||||
KEY_SEPARATOR = 0x6C, // Separator key
|
||||
KEY_SUBTRACT = 0x6D, // Subtract key
|
||||
KEY_DECIMAL = 0x6E, // Decimal key
|
||||
KEY_DIVIDE = 0x6F, // Divide key
|
||||
KEY_F1 = 0x70, // F1 key
|
||||
KEY_F2 = 0x71, // F2 key
|
||||
KEY_F3 = 0x72, // F3 key
|
||||
KEY_F4 = 0x73, // F4 key
|
||||
KEY_F5 = 0x74, // F5 key
|
||||
KEY_F6 = 0x75, // F6 key
|
||||
KEY_F7 = 0x76, // F7 key
|
||||
KEY_F8 = 0x77, // F8 key
|
||||
KEY_F9 = 0x78, // F9 key
|
||||
KEY_F10 = 0x79, // F10 key
|
||||
KEY_F11 = 0x7A, // F11 key
|
||||
KEY_F12 = 0x7B, // F12 key
|
||||
KEY_F13 = 0x7C, // F13 key
|
||||
KEY_F14 = 0x7D, // F14 key
|
||||
KEY_F15 = 0x7E, // F15 key
|
||||
KEY_F16 = 0x7F, // F16 key
|
||||
KEY_F17 = 0x80, // F17 key
|
||||
KEY_F18 = 0x81, // F18 key
|
||||
KEY_F19 = 0x82, // F19 key
|
||||
KEY_F20 = 0x83, // F20 key
|
||||
KEY_F21 = 0x84, // F21 key
|
||||
KEY_F22 = 0x85, // F22 key
|
||||
KEY_F23 = 0x86, // F23 key
|
||||
KEY_F24 = 0x87, // F24 key
|
||||
KEY_NUMLOCK = 0x90, // NUM LOCK key
|
||||
KEY_SCROLL = 0x91, // SCROLL LOCK key
|
||||
KEY_LSHIFT = 0xA0, // Left SHIFT key
|
||||
KEY_RSHIFT = 0xA1, // Right SHIFT key
|
||||
KEY_LCONTROL = 0xA2, // Left CONTROL key
|
||||
KEY_RCONTROL = 0xA3, // Right CONTROL key
|
||||
KEY_LMENU = 0xA4, // Left MENU key
|
||||
KEY_RMENU = 0xA5, // Right MENU key
|
||||
KEY_BROWSER_BACK = 0xA6, // Browser Back key
|
||||
KEY_BROWSER_FORWARD = 0xA7, // Browser Forward key
|
||||
KEY_BROWSER_REFRESH = 0xA8, // Browser Refresh key
|
||||
KEY_BROWSER_STOP = 0xA9, // Browser Stop key
|
||||
KEY_BROWSER_SEARCH = 0xAA, // Browser Search key
|
||||
KEY_BROWSER_FAVORITES =0xAB, // Browser Favorites key
|
||||
KEY_BROWSER_HOME = 0xAC, // Browser Start and Home key
|
||||
KEY_VOLUME_MUTE = 0xAD, // Volume Mute key
|
||||
KEY_VOLUME_DOWN = 0xAE, // Volume Down key
|
||||
KEY_VOLUME_UP = 0xAF, // Volume Up key
|
||||
KEY_MEDIA_NEXT_TRACK = 0xB0, // Next Track key
|
||||
KEY_MEDIA_PREV_TRACK = 0xB1, // Previous Track key
|
||||
KEY_MEDIA_STOP = 0xB2, // Stop Media key
|
||||
KEY_MEDIA_PLAY_PAUSE = 0xB3, // Play/Pause Media key
|
||||
KEY_OEM_1 = 0xBA, // for US ";:"
|
||||
KEY_PLUS = 0xBB, // Plus Key "+"
|
||||
KEY_COMMA = 0xBC, // Comma Key ","
|
||||
KEY_MINUS = 0xBD, // Minus Key "-"
|
||||
KEY_PERIOD = 0xBE, // Period Key "."
|
||||
KEY_OEM_2 = 0xBF, // for US "/?"
|
||||
KEY_OEM_3 = 0xC0, // for US "`~"
|
||||
KEY_OEM_4 = 0xDB, // for US "[{"
|
||||
KEY_OEM_5 = 0xDC, // for US "\|"
|
||||
KEY_OEM_6 = 0xDD, // for US "]}"
|
||||
KEY_OEM_7 = 0xDE, // for US "'""
|
||||
KEY_OEM_8 = 0xDF, // None
|
||||
KEY_OEM_AX = 0xE1, // for Japan "AX"
|
||||
KEY_OEM_102 = 0xE2, // "<>" or "\|"
|
||||
KEY_ATTN = 0xF6, // Attn key
|
||||
KEY_CRSEL = 0xF7, // CrSel key
|
||||
KEY_EXSEL = 0xF8, // ExSel key
|
||||
KEY_EREOF = 0xF9, // Erase EOF key
|
||||
KEY_PLAY = 0xFA, // Play key
|
||||
KEY_ZOOM = 0xFB, // Zoom key
|
||||
KEY_PA1 = 0xFD, // PA1 key
|
||||
KEY_OEM_CLEAR = 0xFE, // Clear key
|
||||
IRR_KEY_UNKNOWN = 0x0,
|
||||
IRR_KEY_LBUTTON = 0x01, // Left mouse button
|
||||
IRR_KEY_RBUTTON = 0x02, // Right mouse button
|
||||
IRR_KEY_CANCEL = 0x03, // Control-break processing
|
||||
IRR_KEY_MBUTTON = 0x04, // Middle mouse button (three-button mouse)
|
||||
IRR_KEY_XBUTTON1 = 0x05, // Windows 2000/XP: X1 mouse button
|
||||
IRR_KEY_XBUTTON2 = 0x06, // Windows 2000/XP: X2 mouse button
|
||||
IRR_KEY_BACK = 0x08, // BACKSPACE key
|
||||
IRR_KEY_TAB = 0x09, // TAB key
|
||||
IRR_KEY_CLEAR = 0x0C, // CLEAR key
|
||||
IRR_KEY_RETURN = 0x0D, // ENTER key
|
||||
IRR_KEY_SHIFT = 0x10, // SHIFT key
|
||||
IRR_KEY_CONTROL = 0x11, // CTRL key
|
||||
IRR_KEY_MENU = 0x12, // ALT key
|
||||
IRR_KEY_PAUSE = 0x13, // PAUSE key
|
||||
IRR_KEY_CAPITAL = 0x14, // CAPS LOCK key
|
||||
IRR_KEY_KANA = 0x15, // IME Kana mode
|
||||
IRR_KEY_HANGUEL = 0x15, // IME Hanguel mode (maintained for compatibility use KEY_HANGUL)
|
||||
IRR_KEY_HANGUL = 0x15, // IME Hangul mode
|
||||
IRR_KEY_JUNJA = 0x17, // IME Junja mode
|
||||
IRR_KEY_FINAL = 0x18, // IME final mode
|
||||
IRR_KEY_HANJA = 0x19, // IME Hanja mode
|
||||
IRR_KEY_KANJI = 0x19, // IME Kanji mode
|
||||
IRR_KEY_ESCAPE = 0x1B, // ESC key
|
||||
IRR_KEY_CONVERT = 0x1C, // IME convert
|
||||
IRR_KEY_NONCONVERT = 0x1D, // IME nonconvert
|
||||
IRR_KEY_ACCEPT = 0x1E, // IME accept
|
||||
IRR_KEY_MODECHANGE = 0x1F, // IME mode change request
|
||||
IRR_KEY_SPACE = 0x20, // SPACEBAR
|
||||
IRR_KEY_PRIOR = 0x21, // PAGE UP key
|
||||
IRR_KEY_NEXT = 0x22, // PAGE DOWN key
|
||||
IRR_KEY_END = 0x23, // END key
|
||||
IRR_KEY_HOME = 0x24, // HOME key
|
||||
IRR_KEY_LEFT = 0x25, // LEFT ARROW key
|
||||
IRR_KEY_UP = 0x26, // UP ARROW key
|
||||
IRR_KEY_RIGHT = 0x27, // RIGHT ARROW key
|
||||
IRR_KEY_DOWN = 0x28, // DOWN ARROW key
|
||||
IRR_KEY_SELECT = 0x29, // SELECT key
|
||||
IRR_KEY_PRINT = 0x2A, // PRINT key
|
||||
IRR_KEY_EXECUT = 0x2B, // EXECUTE key
|
||||
IRR_KEY_SNAPSHOT = 0x2C, // PRINT SCREEN key
|
||||
IRR_KEY_INSERT = 0x2D, // INS key
|
||||
IRR_KEY_DELETE = 0x2E, // DEL key
|
||||
IRR_KEY_HELP = 0x2F, // HELP key
|
||||
IRR_KEY_0 = 0x30, // 0 key
|
||||
IRR_KEY_1 = 0x31, // 1 key
|
||||
IRR_KEY_2 = 0x32, // 2 key
|
||||
IRR_KEY_3 = 0x33, // 3 key
|
||||
IRR_KEY_4 = 0x34, // 4 key
|
||||
IRR_KEY_5 = 0x35, // 5 key
|
||||
IRR_KEY_6 = 0x36, // 6 key
|
||||
IRR_KEY_7 = 0x37, // 7 key
|
||||
IRR_KEY_8 = 0x38, // 8 key
|
||||
IRR_KEY_9 = 0x39, // 9 key
|
||||
IRR_KEY_A = 0x41, // A key
|
||||
IRR_KEY_B = 0x42, // B key
|
||||
IRR_KEY_C = 0x43, // C key
|
||||
IRR_KEY_D = 0x44, // D key
|
||||
IRR_KEY_E = 0x45, // E key
|
||||
IRR_KEY_F = 0x46, // F key
|
||||
IRR_KEY_G = 0x47, // G key
|
||||
IRR_KEY_H = 0x48, // H key
|
||||
IRR_KEY_I = 0x49, // I key
|
||||
IRR_KEY_J = 0x4A, // J key
|
||||
IRR_KEY_K = 0x4B, // K key
|
||||
IRR_KEY_L = 0x4C, // L key
|
||||
IRR_KEY_M = 0x4D, // M key
|
||||
IRR_KEY_N = 0x4E, // N key
|
||||
IRR_KEY_O = 0x4F, // O key
|
||||
IRR_KEY_P = 0x50, // P key
|
||||
IRR_KEY_Q = 0x51, // Q key
|
||||
IRR_KEY_R = 0x52, // R key
|
||||
IRR_KEY_S = 0x53, // S key
|
||||
IRR_KEY_T = 0x54, // T key
|
||||
IRR_KEY_U = 0x55, // U key
|
||||
IRR_KEY_V = 0x56, // V key
|
||||
IRR_KEY_W = 0x57, // W key
|
||||
IRR_KEY_X = 0x58, // X key
|
||||
IRR_KEY_Y = 0x59, // Y key
|
||||
IRR_KEY_Z = 0x5A, // Z key
|
||||
IRR_KEY_LWIN = 0x5B, // Left Windows key (MicrosoftŽ NaturalŽ keyboard)
|
||||
IRR_KEY_RWIN = 0x5C, // Right Windows key (Natural keyboard)
|
||||
IRR_KEY_APPS = 0x5D, // Applications key (Natural keyboard)
|
||||
IRR_KEY_SLEEP = 0x5F, // Computer Sleep key
|
||||
IRR_KEY_NUMPAD0 = 0x60, // Numeric keypad 0 key
|
||||
IRR_KEY_NUMPAD1 = 0x61, // Numeric keypad 1 key
|
||||
IRR_KEY_NUMPAD2 = 0x62, // Numeric keypad 2 key
|
||||
IRR_KEY_NUMPAD3 = 0x63, // Numeric keypad 3 key
|
||||
IRR_KEY_NUMPAD4 = 0x64, // Numeric keypad 4 key
|
||||
IRR_KEY_NUMPAD5 = 0x65, // Numeric keypad 5 key
|
||||
IRR_KEY_NUMPAD6 = 0x66, // Numeric keypad 6 key
|
||||
IRR_KEY_NUMPAD7 = 0x67, // Numeric keypad 7 key
|
||||
IRR_KEY_NUMPAD8 = 0x68, // Numeric keypad 8 key
|
||||
IRR_KEY_NUMPAD9 = 0x69, // Numeric keypad 9 key
|
||||
IRR_KEY_MULTIPLY = 0x6A, // Multiply key
|
||||
IRR_KEY_ADD = 0x6B, // Add key
|
||||
IRR_KEY_SEPARATOR = 0x6C, // Separator key
|
||||
IRR_KEY_SUBTRACT = 0x6D, // Subtract key
|
||||
IRR_KEY_DECIMAL = 0x6E, // Decimal key
|
||||
IRR_KEY_DIVIDE = 0x6F, // Divide key
|
||||
IRR_KEY_F1 = 0x70, // F1 key
|
||||
IRR_KEY_F2 = 0x71, // F2 key
|
||||
IRR_KEY_F3 = 0x72, // F3 key
|
||||
IRR_KEY_F4 = 0x73, // F4 key
|
||||
IRR_KEY_F5 = 0x74, // F5 key
|
||||
IRR_KEY_F6 = 0x75, // F6 key
|
||||
IRR_KEY_F7 = 0x76, // F7 key
|
||||
IRR_KEY_F8 = 0x77, // F8 key
|
||||
IRR_KEY_F9 = 0x78, // F9 key
|
||||
IRR_KEY_F10 = 0x79, // F10 key
|
||||
IRR_KEY_F11 = 0x7A, // F11 key
|
||||
IRR_KEY_F12 = 0x7B, // F12 key
|
||||
IRR_KEY_F13 = 0x7C, // F13 key
|
||||
IRR_KEY_F14 = 0x7D, // F14 key
|
||||
IRR_KEY_F15 = 0x7E, // F15 key
|
||||
IRR_KEY_F16 = 0x7F, // F16 key
|
||||
IRR_KEY_F17 = 0x80, // F17 key
|
||||
IRR_KEY_F18 = 0x81, // F18 key
|
||||
IRR_KEY_F19 = 0x82, // F19 key
|
||||
IRR_KEY_F20 = 0x83, // F20 key
|
||||
IRR_KEY_F21 = 0x84, // F21 key
|
||||
IRR_KEY_F22 = 0x85, // F22 key
|
||||
IRR_KEY_F23 = 0x86, // F23 key
|
||||
IRR_KEY_F24 = 0x87, // F24 key
|
||||
IRR_KEY_NUMLOCK = 0x90, // NUM LOCK key
|
||||
IRR_KEY_SCROLL = 0x91, // SCROLL LOCK key
|
||||
IRR_KEY_LSHIFT = 0xA0, // Left SHIFT key
|
||||
IRR_KEY_RSHIFT = 0xA1, // Right SHIFT key
|
||||
IRR_KEY_LCONTROL = 0xA2, // Left CONTROL key
|
||||
IRR_KEY_RCONTROL = 0xA3, // Right CONTROL key
|
||||
IRR_KEY_LMENU = 0xA4, // Left MENU key
|
||||
IRR_KEY_RMENU = 0xA5, // Right MENU key
|
||||
IRR_KEY_BROWSER_BACK = 0xA6, // Browser Back key
|
||||
IRR_KEY_BROWSER_FORWARD = 0xA7, // Browser Forward key
|
||||
IRR_KEY_BROWSER_REFRESH = 0xA8, // Browser Refresh key
|
||||
IRR_KEY_BROWSER_STOP = 0xA9, // Browser Stop key
|
||||
IRR_KEY_BROWSER_SEARCH = 0xAA, // Browser Search key
|
||||
IRR_KEY_BROWSER_FAVORITES =0xAB, // Browser Favorites key
|
||||
IRR_KEY_BROWSER_HOME = 0xAC, // Browser Start and Home key
|
||||
IRR_KEY_VOLUME_MUTE = 0xAD, // Volume Mute key
|
||||
IRR_KEY_VOLUME_DOWN = 0xAE, // Volume Down key
|
||||
IRR_KEY_VOLUME_UP = 0xAF, // Volume Up key
|
||||
IRR_KEY_MEDIA_NEXT_TRACK = 0xB0, // Next Track key
|
||||
IRR_KEY_MEDIA_PREV_TRACK = 0xB1, // Previous Track key
|
||||
IRR_KEY_MEDIA_STOP = 0xB2, // Stop Media key
|
||||
IRR_KEY_MEDIA_PLAY_PAUSE = 0xB3, // Play/Pause Media key
|
||||
IRR_KEY_OEM_1 = 0xBA, // for US ";:"
|
||||
IRR_KEY_PLUS = 0xBB, // Plus Key "+"
|
||||
IRR_KEY_COMMA = 0xBC, // Comma Key ","
|
||||
IRR_KEY_MINUS = 0xBD, // Minus Key "-"
|
||||
IRR_KEY_PERIOD = 0xBE, // Period Key "."
|
||||
IRR_KEY_OEM_2 = 0xBF, // for US "/?"
|
||||
IRR_KEY_OEM_3 = 0xC0, // for US "`~"
|
||||
IRR_KEY_OEM_4 = 0xDB, // for US "[{"
|
||||
IRR_KEY_OEM_5 = 0xDC, // for US "\|"
|
||||
IRR_KEY_OEM_6 = 0xDD, // for US "]}"
|
||||
IRR_KEY_OEM_7 = 0xDE, // for US "'""
|
||||
IRR_KEY_OEM_8 = 0xDF, // None
|
||||
IRR_KEY_OEM_AX = 0xE1, // for Japan "AX"
|
||||
IRR_KEY_OEM_102 = 0xE2, // "<>" or "\|"
|
||||
IRR_KEY_ATTN = 0xF6, // Attn key
|
||||
IRR_KEY_CRSEL = 0xF7, // CrSel key
|
||||
IRR_KEY_EXSEL = 0xF8, // ExSel key
|
||||
IRR_KEY_EREOF = 0xF9, // Erase EOF key
|
||||
IRR_KEY_PLAY = 0xFA, // Play key
|
||||
IRR_KEY_ZOOM = 0xFB, // Zoom key
|
||||
IRR_KEY_PA1 = 0xFD, // PA1 key
|
||||
IRR_KEY_OEM_CLEAR = 0xFE, // Clear key
|
||||
|
||||
KEY_KEY_CODES_COUNT = 0xFF // this is not a key, but the amount of keycodes there are.
|
||||
IRR_KEY_CODES_COUNT = 0xFF // this is not a key, but the amount of keycodes there are.
|
||||
};
|
||||
|
||||
} // end namespace irr
|
||||
|
@ -1,10 +0,0 @@
|
||||
; part of the Irrlicht Engine Shader example.
|
||||
; This simple Direct3D9 pixel shader will be loaded by the engine.
|
||||
; Please note that these example shaders don't do anything really useful.
|
||||
; They only demonstrate that shaders can be used in Irrlicht.
|
||||
|
||||
ps.1.1
|
||||
|
||||
tex t0 ; sample color map
|
||||
mul_x2 t0, t0, v0 ; mulitply with color
|
||||
add r0, t0, t0 ; make it brighter and store result
|
@ -1,37 +0,0 @@
|
||||
; part of the Irrlicht Engine Shader example.
|
||||
; This Direct3D9 vertex shader will be loaded by the engine.
|
||||
; Please note that these example shaders don't do anything really useful.
|
||||
; They only demonstrate that shaders can be used in Irrlicht.
|
||||
|
||||
vs.1.1
|
||||
|
||||
; transpose and transform position to clip space
|
||||
mul r0, v0.x, c4
|
||||
mad r0, v0.y, c5, r0
|
||||
mad r0, v0.z, c6, r0
|
||||
add oPos, c7, r0
|
||||
|
||||
; transform normal
|
||||
dp3 r1.x, v1, c0
|
||||
dp3 r1.y, v1, c1
|
||||
dp3 r1.z, v1, c2
|
||||
|
||||
; renormalize normal
|
||||
dp3 r1.w, r1, r1
|
||||
rsq r1.w, r1.w
|
||||
mul r1, r1, r1.w
|
||||
|
||||
; calculate light vector
|
||||
m4x4 r6, v0, c10 ; vertex into world position
|
||||
add r2, c8, -r6 ; vtxpos - lightpos
|
||||
|
||||
; normalize light vector
|
||||
dp3 r2.w, r2, r2
|
||||
rsq r2.w, r2.w
|
||||
mul r2, r2, r2.w
|
||||
|
||||
; calculate light color
|
||||
dp3 r3, r1, r2 ; dp3 with negative light vector
|
||||
lit r5, r3 ; clamp to zero if r3 < 0, r5 has diffuce component in r5.y
|
||||
mul oD0, r5.y, c9 ; ouput diffuse color
|
||||
mov oT0, v3 ; store texture coordinates
|
@ -1,84 +0,0 @@
|
||||
// part of the Irrlicht Engine Shader example.
|
||||
// These simple Direct3D9 pixel and vertex shaders will be loaded by the shaders
|
||||
// example. Please note that these example shaders don't do anything really useful.
|
||||
// They only demonstrate that shaders can be used in Irrlicht.
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Global variables
|
||||
//-----------------------------------------------------------------------------
|
||||
float4x4 mWorldViewProj; // World * View * Projection transformation
|
||||
float4x4 mInvWorld; // Inverted world matrix
|
||||
float4x4 mTransWorld; // Transposed world matrix
|
||||
float3 mLightPos; // Light position
|
||||
float4 mLightColor; // Light color
|
||||
|
||||
|
||||
// Vertex shader output structure
|
||||
struct VS_OUTPUT
|
||||
{
|
||||
float4 Position : POSITION; // vertex position
|
||||
float4 Diffuse : COLOR0; // vertex diffuse color
|
||||
float2 TexCoord : TEXCOORD0; // tex coords
|
||||
};
|
||||
|
||||
|
||||
VS_OUTPUT vertexMain(in float4 vPosition : POSITION,
|
||||
in float3 vNormal : NORMAL,
|
||||
float2 texCoord : TEXCOORD0 )
|
||||
{
|
||||
VS_OUTPUT Output;
|
||||
|
||||
// transform position to clip space
|
||||
Output.Position = mul(vPosition, mWorldViewProj);
|
||||
|
||||
// transform normal
|
||||
float3 normal = mul(float4(vNormal,0.0), mInvWorld);
|
||||
|
||||
// renormalize normal
|
||||
normal = normalize(normal);
|
||||
|
||||
// position in world coodinates
|
||||
float3 worldpos = mul(mTransWorld, vPosition);
|
||||
|
||||
// calculate light vector, vtxpos - lightpos
|
||||
float3 lightVector = worldpos - mLightPos;
|
||||
|
||||
// normalize light vector
|
||||
lightVector = normalize(lightVector);
|
||||
|
||||
// calculate light color
|
||||
float3 tmp = dot(-lightVector, normal);
|
||||
tmp = lit(tmp.x, tmp.y, 1.0);
|
||||
|
||||
tmp = mLightColor * tmp.y;
|
||||
Output.Diffuse = float4(tmp.x, tmp.y, tmp.z, 0);
|
||||
Output.TexCoord = texCoord;
|
||||
|
||||
return Output;
|
||||
}
|
||||
|
||||
|
||||
// Pixel shader output structure
|
||||
struct PS_OUTPUT
|
||||
{
|
||||
float4 RGBColor : COLOR0; // Pixel color
|
||||
};
|
||||
|
||||
|
||||
sampler2D myTexture;
|
||||
|
||||
PS_OUTPUT pixelMain(float2 TexCoord : TEXCOORD0,
|
||||
float4 Position : POSITION,
|
||||
float4 Diffuse : COLOR0 )
|
||||
{
|
||||
PS_OUTPUT Output;
|
||||
|
||||
float4 col = tex2D( myTexture, TexCoord ); // sample color map
|
||||
|
||||
// multiply with diffuse and do other senseless operations
|
||||
Output.RGBColor = Diffuse * col;
|
||||
Output.RGBColor *= 4.0;
|
||||
|
||||
return Output;
|
||||
}
|
||||
|
@ -1,11 +0,0 @@
|
||||
; part of the Irrlicht Engine Shader example.
|
||||
; This simple Direct3D9 pixel shader will be loaded by the engine.
|
||||
; Please note that these example shaders don't do anything really useful.
|
||||
; They only demonstrate that shaders can be used in Irrlicht.
|
||||
|
||||
ps.1.1
|
||||
|
||||
tex t0 ; sample color map
|
||||
add r0, v0, v0 ; mulitply with color
|
||||
mul t0, t0, r0 ; mulitply with color
|
||||
add r0, t0, t0 ; make it brighter and store result
|
@ -1,42 +0,0 @@
|
||||
; part of the Irrlicht Engine Shader example.
|
||||
; This Direct3D9 vertex shader will be loaded by the engine.
|
||||
; Please note that these example shaders don't do anything really useful.
|
||||
; They only demonstrate that shaders can be used in Irrlicht.
|
||||
|
||||
vs.1.1
|
||||
|
||||
dcl_position v0; ; declare position
|
||||
dcl_normal v1; ; declare normal
|
||||
dcl_color v2; ; declare color
|
||||
dcl_texcoord0 v3; ; declare texture coordinate
|
||||
|
||||
; transpose and transform position to clip space
|
||||
mul r0, v0.x, c4
|
||||
mad r0, v0.y, c5, r0
|
||||
mad r0, v0.z, c6, r0
|
||||
add oPos, c7, r0
|
||||
|
||||
; transform normal
|
||||
dp3 r1.x, v1, c0
|
||||
dp3 r1.y, v1, c1
|
||||
dp3 r1.z, v1, c2
|
||||
|
||||
; renormalize normal
|
||||
dp3 r1.w, r1, r1
|
||||
rsq r1.w, r1.w
|
||||
mul r1, r1, r1.w
|
||||
|
||||
; calculate light vector
|
||||
m4x4 r6, v0, c10 ; vertex into world position
|
||||
add r2, c8, -r6 ; vtxpos - lightpos
|
||||
|
||||
; normalize light vector
|
||||
dp3 r2.w, r2, r2
|
||||
rsq r2.w, r2.w
|
||||
mul r2, r2, r2.w
|
||||
|
||||
; calculate light color
|
||||
dp3 r3, r1, r2 ; dp3 with negative light vector
|
||||
lit r5, r3 ; clamp to zero if r3 < 0, r5 has diffuce component in r5.y
|
||||
mul oD0, r5.y, c9 ; ouput diffuse color
|
||||
mov oT0, v3 ; store texture coordinates
|
@ -1,9 +0,0 @@
|
||||
|
||||
uniform sampler2D myTexture;
|
||||
|
||||
void main (void)
|
||||
{
|
||||
vec4 col = texture2D(myTexture, vec2(gl_TexCoord[0]));
|
||||
col *= gl_Color;
|
||||
gl_FragColor = col * 4.0;
|
||||
}
|
@ -1,22 +0,0 @@
|
||||
!!ARBfp1.0
|
||||
# part of the Irrlicht Engine Shader example.
|
||||
# Please note that these example shaders don't do anything really useful.
|
||||
# They only demonstrate that shaders can be used in Irrlicht.
|
||||
|
||||
#Input
|
||||
ATTRIB inTexCoord = fragment.texcoord; # texture coordinates
|
||||
ATTRIB inColor = fragment.color.primary; # interpolated diffuse color
|
||||
|
||||
#Output
|
||||
OUTPUT outColor = result.color;
|
||||
|
||||
TEMP texelColor;
|
||||
TEMP tmp;
|
||||
TXP texelColor, inTexCoord, texture, 2D;
|
||||
|
||||
ADD tmp, inColor, inColor; # mulitply with color
|
||||
MUL texelColor, texelColor, tmp; # mulitply with color
|
||||
ADD outColor, texelColor, texelColor; # make it brighter and store result
|
||||
|
||||
END
|
||||
|
@ -1,27 +0,0 @@
|
||||
|
||||
uniform mat4 mWorldViewProj;
|
||||
uniform mat4 mInvWorld;
|
||||
uniform mat4 mTransWorld;
|
||||
uniform vec3 mLightPos;
|
||||
uniform vec4 mLightColor;
|
||||
|
||||
void main(void)
|
||||
{
|
||||
gl_Position = mWorldViewProj * gl_Vertex;
|
||||
|
||||
vec4 normal = vec4(gl_Normal, 0.0);
|
||||
normal = mInvWorld * normal;
|
||||
normal = normalize(normal);
|
||||
|
||||
vec4 worldpos = gl_Vertex * mTransWorld;
|
||||
|
||||
vec4 lightVector = worldpos - vec4(mLightPos,1.0);
|
||||
lightVector = normalize(lightVector);
|
||||
|
||||
float tmp2 = dot(-lightVector, normal);
|
||||
|
||||
vec4 tmp = mLightColor * tmp2;
|
||||
gl_FrontColor = gl_BackColor = vec4(tmp.x, tmp.y, tmp.z, 0.0);
|
||||
|
||||
gl_TexCoord[0] = gl_MultiTexCoord0;
|
||||
}
|
@ -1,60 +0,0 @@
|
||||
!!ARBvp1.0
|
||||
# part of the Irrlicht Engine Shader example.
|
||||
# Please note that these example shaders don't do anything really useful.
|
||||
# They only demonstrate that shaders can be used in Irrlicht.
|
||||
|
||||
#input
|
||||
ATTRIB InPos = vertex.position;
|
||||
ATTRIB InColor = vertex.color;
|
||||
ATTRIB InNormal = vertex.normal;
|
||||
ATTRIB InTexCoord = vertex.texcoord;
|
||||
|
||||
#output
|
||||
OUTPUT OutPos = result.position;
|
||||
OUTPUT OutColor = result.color;
|
||||
OUTPUT OutTexCoord = result.texcoord;
|
||||
|
||||
PARAM MVP[4] = { state.matrix.mvp }; # modelViewProjection matrix.
|
||||
TEMP Temp;
|
||||
TEMP TempColor;
|
||||
TEMP TempNormal;
|
||||
TEMP TempPos;
|
||||
|
||||
#transform position to clip space
|
||||
DP4 Temp.x, MVP[0], InPos;
|
||||
DP4 Temp.y, MVP[1], InPos;
|
||||
DP4 Temp.z, MVP[2], InPos;
|
||||
DP4 Temp.w, MVP[3], InPos;
|
||||
|
||||
#transform normal
|
||||
DP3 TempNormal.x, InNormal.x, program.local[0];
|
||||
DP3 TempNormal.y, InNormal.y, program.local[1];
|
||||
DP3 TempNormal.z, InNormal.z, program.local[2];
|
||||
|
||||
#renormalize normal
|
||||
DP3 TempNormal.w, TempNormal, TempNormal;
|
||||
RSQ TempNormal.w, TempNormal.w;
|
||||
MUL TempNormal, TempNormal, TempNormal.w;
|
||||
|
||||
# calculate light vector
|
||||
DP4 TempPos.x, InPos, program.local[10]; # vertex into world position
|
||||
DP4 TempPos.y, InPos, program.local[11];
|
||||
DP4 TempPos.z, InPos, program.local[12];
|
||||
DP4 TempPos.w, InPos, program.local[13];
|
||||
|
||||
ADD TempPos, program.local[8], -TempPos; # vtxpos - lightpos
|
||||
|
||||
# normalize light vector
|
||||
DP3 TempPos.w, TempPos, TempPos;
|
||||
RSQ TempPos.w, TempPos.w;
|
||||
MUL TempPos, TempPos, TempPos.w;
|
||||
|
||||
# calculate light color
|
||||
DP3 TempColor, TempNormal, TempPos; # dp3 with negative light vector
|
||||
LIT OutColor, TempColor; # clamp to zero if r3 < 0, r5 has diffuce component in r5.y
|
||||
MUL OutColor, TempColor.y, program.local[9]; # ouput diffuse color
|
||||
MOV OutColor.w, 1.0; # we want alpha to be always 1
|
||||
MOV OutTexCoord, InTexCoord; # store texture coordinate
|
||||
MOV OutPos, Temp;
|
||||
|
||||
END
|
@ -1002,5 +1002,60 @@ void CAnimatedMeshSceneNode::useAnimationSet(u32 set_num)
|
||||
setFrameLoop(m_animation_set[set_num * 2], m_animation_set[set_num * 2 + 1]);
|
||||
}
|
||||
|
||||
void CAnimatedMeshSceneNode::setFrameLoopOnce(s32 begin, s32 end)
|
||||
{
|
||||
if (LoopCallBack != NULL || !Looping)
|
||||
{
|
||||
return;
|
||||
}
|
||||
Looping = false;
|
||||
class MiniLoopSetter : public IAnimationEndCallBack
|
||||
{
|
||||
private:
|
||||
int m_old_start, m_old_end, m_new_start, m_new_end;
|
||||
|
||||
bool m_run_cb;
|
||||
public:
|
||||
MiniLoopSetter(int old_start, int old_end, int new_start, int new_end)
|
||||
: m_old_start(old_start), m_old_end(old_end),
|
||||
m_new_start(new_start), m_new_end(new_end), m_run_cb(false) {}
|
||||
virtual void OnAnimationEnd(IAnimatedMeshSceneNode* node)
|
||||
{
|
||||
if (!m_run_cb)
|
||||
{
|
||||
m_run_cb = true;
|
||||
node->setFrameLoop(m_new_start, m_new_end);
|
||||
return;
|
||||
}
|
||||
if (m_run_cb)
|
||||
{
|
||||
node->setFrameLoop(m_old_start, m_old_end);
|
||||
node->setLoopMode(true);
|
||||
node->setAnimationEndCallback(NULL);
|
||||
return;
|
||||
}
|
||||
}
|
||||
};
|
||||
MiniLoopSetter* mls = new MiniLoopSetter(StartFrame, EndFrame,
|
||||
begin, end);
|
||||
setAnimationEndCallback(mls);
|
||||
mls->drop();
|
||||
|
||||
}
|
||||
|
||||
s32 CAnimatedMeshSceneNode::getAnimationSet() const
|
||||
{
|
||||
for (u32 i = 0; i < m_animation_set.size(); i += 2)
|
||||
{
|
||||
if (m_animation_set[i] == (u32)StartFrame &&
|
||||
m_animation_set[i + 1] == (u32)EndFrame)
|
||||
{
|
||||
return (s32)(i >> 1);
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
} // end namespace scene
|
||||
} // end namespace irr
|
||||
|
@ -161,13 +161,14 @@ namespace scene
|
||||
virtual ISceneNode* clone(ISceneNode* newParent=0, ISceneManager* newManager=0);
|
||||
|
||||
virtual u32 getAnimationSetNum() { return m_animation_set.size() / 2; }
|
||||
virtual s32 getAnimationSet() const;
|
||||
virtual void addAnimationSet(u32 start, u32 end)
|
||||
{
|
||||
m_animation_set.push_back(start);
|
||||
m_animation_set.push_back(end);
|
||||
}
|
||||
virtual void useAnimationSet(u32 set_num);
|
||||
|
||||
virtual void setFrameLoopOnce(s32 begin, s32 end);
|
||||
protected:
|
||||
|
||||
//! Get a static mesh for the current frame of this animated mesh
|
||||
|
@ -1,10 +1,19 @@
|
||||
// Copyright (C) 2013 Patryk Nadrowski
|
||||
// Copyright (C) 2016-2017 Dawid Gan
|
||||
// Heavily based on the OpenGL driver implemented by Nikolaus Gebhardt
|
||||
// OpenGL ES driver implemented by Christian Stehno and first OpenGL ES 2.0
|
||||
// driver implemented by Amundis.
|
||||
// This file is part of the "Irrlicht Engine".
|
||||
// For conditions of distribution and use, see copyright notice in Irrlicht.h
|
||||
// SuperTuxKart - a fun racing game with go-kart
|
||||
// Copyright (C) 2016-2017 SuperTuxKart-Team
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU General Public License
|
||||
// as published by the Free Software Foundation; either version 3
|
||||
// of the License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
#include "IrrCompileConfig.h"
|
||||
|
||||
@ -182,10 +191,10 @@ bool ContextManagerEGL::chooseConfig()
|
||||
config_attribs.push_back(8);
|
||||
config_attribs.push_back(EGL_ALPHA_SIZE);
|
||||
config_attribs.push_back(m_creation_params.with_alpha_channel ? 8 : 0);
|
||||
// config_attribs.push_back(EGL_BUFFER_SIZE);
|
||||
// config_attribs.push_back(24);
|
||||
config_attribs.push_back(EGL_DEPTH_SIZE);
|
||||
config_attribs.push_back(16);
|
||||
// config_attribs.push_back(EGL_BUFFER_SIZE);
|
||||
// config_attribs.push_back(24);
|
||||
// config_attribs.push_back(EGL_STENCIL_SIZE);
|
||||
// config_attribs.push_back(stencil_buffer);
|
||||
// config_attribs.push_back(EGL_SAMPLE_BUFFERS);
|
||||
@ -223,7 +232,19 @@ bool ContextManagerEGL::chooseConfig()
|
||||
bool success = eglChooseConfig(m_egl_display, &config_attribs[0],
|
||||
&m_egl_config, 1, &num_configs);
|
||||
|
||||
if (!success || num_configs == 0)
|
||||
if (!success || m_egl_config == NULL || num_configs < 1)
|
||||
{
|
||||
config_attribs[1] = 5; //EGL_RED_SIZE
|
||||
config_attribs[3] = 6; //EGL_GREEN_SIZE
|
||||
config_attribs[5] = 5; //EGL_BLUE_SIZE
|
||||
config_attribs[7] = 0; //EGL_ALPHA_SIZE
|
||||
config_attribs[9] = 1; //EGL_DEPTH_SIZE
|
||||
|
||||
success = eglChooseConfig(m_egl_display, &config_attribs[0],
|
||||
&m_egl_config, 1, &num_configs);
|
||||
}
|
||||
|
||||
if (!success || m_egl_config == NULL || num_configs < 1)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@ -449,8 +470,20 @@ bool ContextManagerEGL::swapBuffers()
|
||||
}
|
||||
|
||||
|
||||
bool ContextManagerEGL::makeCurrent()
|
||||
{
|
||||
bool success = eglMakeCurrent(m_egl_display, m_egl_surface, m_egl_surface,
|
||||
m_egl_context);
|
||||
|
||||
return success;
|
||||
}
|
||||
|
||||
|
||||
void ContextManagerEGL::reloadEGLSurface(void* window)
|
||||
{
|
||||
if (!m_initialized)
|
||||
return;
|
||||
|
||||
#ifdef _IRR_COMPILE_WITH_ANDROID_DEVICE_
|
||||
m_egl_window = (ANativeWindow*)window;
|
||||
|
||||
|
@ -1,10 +1,19 @@
|
||||
// Copyright (C) 2013 Patryk Nadrowski
|
||||
// Copyright (C) 2016-2017 Dawid Gan
|
||||
// Heavily based on the OpenGL driver implemented by Nikolaus Gebhardt
|
||||
// OpenGL ES driver implemented by Christian Stehno and first OpenGL ES 2.0
|
||||
// driver implemented by Amundis.
|
||||
// This file is part of the "Irrlicht Engine".
|
||||
// For conditions of distribution and use, see copyright notice in Irrlicht.h
|
||||
// SuperTuxKart - a fun racing game with go-kart
|
||||
// Copyright (C) 2016-2017 SuperTuxKart-Team
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU General Public License
|
||||
// as published by the Free Software Foundation; either version 3
|
||||
// of the License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
#ifndef CONTEXT_EGL_HPP
|
||||
#define CONTEXT_EGL_HPP
|
||||
@ -78,6 +87,7 @@ public:
|
||||
|
||||
void reloadEGLSurface(void* window);
|
||||
bool swapBuffers();
|
||||
bool makeCurrent();
|
||||
bool isLegacyDevice() {return m_is_legacy_device;}
|
||||
bool getSurfaceDimensions(int* width, int* height);
|
||||
};
|
||||
|
@ -116,7 +116,8 @@ bool CGUIButton::OnEvent(const SEvent& event)
|
||||
{
|
||||
case EET_KEY_INPUT_EVENT:
|
||||
if (event.KeyInput.PressedDown &&
|
||||
(event.KeyInput.Key == KEY_RETURN || event.KeyInput.Key == KEY_SPACE))
|
||||
(event.KeyInput.Key == IRR_KEY_RETURN ||
|
||||
event.KeyInput.Key == IRR_KEY_SPACE))
|
||||
{
|
||||
if (!IsPushButton)
|
||||
setPressed(true);
|
||||
@ -125,14 +126,16 @@ bool CGUIButton::OnEvent(const SEvent& event)
|
||||
|
||||
return true;
|
||||
}
|
||||
if (Pressed && !IsPushButton && event.KeyInput.PressedDown && event.KeyInput.Key == KEY_ESCAPE)
|
||||
if (Pressed && !IsPushButton && event.KeyInput.PressedDown &&
|
||||
event.KeyInput.Key == IRR_KEY_ESCAPE)
|
||||
{
|
||||
setPressed(false);
|
||||
return true;
|
||||
}
|
||||
else
|
||||
if (!event.KeyInput.PressedDown && Pressed &&
|
||||
(event.KeyInput.Key == KEY_RETURN || event.KeyInput.Key == KEY_SPACE))
|
||||
(event.KeyInput.Key == IRR_KEY_RETURN ||
|
||||
event.KeyInput.Key == IRR_KEY_SPACE))
|
||||
{
|
||||
|
||||
if (!IsPushButton)
|
||||
|
@ -40,20 +40,23 @@ bool CGUICheckBox::OnEvent(const SEvent& event)
|
||||
{
|
||||
case EET_KEY_INPUT_EVENT:
|
||||
if (event.KeyInput.PressedDown &&
|
||||
(event.KeyInput.Key == KEY_RETURN || event.KeyInput.Key == KEY_SPACE))
|
||||
(event.KeyInput.Key == IRR_KEY_RETURN ||
|
||||
event.KeyInput.Key == IRR_KEY_SPACE))
|
||||
{
|
||||
Pressed = true;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
if (Pressed && event.KeyInput.PressedDown && event.KeyInput.Key == KEY_ESCAPE)
|
||||
if (Pressed && event.KeyInput.PressedDown &&
|
||||
event.KeyInput.Key == IRR_KEY_ESCAPE)
|
||||
{
|
||||
Pressed = false;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
if (!event.KeyInput.PressedDown && Pressed &&
|
||||
(event.KeyInput.Key == KEY_RETURN || event.KeyInput.Key == KEY_SPACE))
|
||||
(event.KeyInput.Key == IRR_KEY_RETURN ||
|
||||
event.KeyInput.Key == IRR_KEY_SPACE))
|
||||
{
|
||||
Pressed = false;
|
||||
if (Parent)
|
||||
|
@ -208,14 +208,16 @@ bool CGUIComboBox::OnEvent(const SEvent& event)
|
||||
{
|
||||
|
||||
case EET_KEY_INPUT_EVENT:
|
||||
if (ListBox && event.KeyInput.PressedDown && event.KeyInput.Key == KEY_ESCAPE)
|
||||
if (ListBox && event.KeyInput.PressedDown &&
|
||||
event.KeyInput.Key == IRR_KEY_ESCAPE)
|
||||
{
|
||||
// hide list box
|
||||
openCloseMenu();
|
||||
return true;
|
||||
}
|
||||
else
|
||||
if (event.KeyInput.Key == KEY_RETURN || event.KeyInput.Key == KEY_SPACE)
|
||||
if (event.KeyInput.Key == IRR_KEY_RETURN ||
|
||||
event.KeyInput.Key == IRR_KEY_SPACE)
|
||||
{
|
||||
if (!event.KeyInput.PressedDown)
|
||||
{
|
||||
@ -233,18 +235,18 @@ bool CGUIComboBox::OnEvent(const SEvent& event)
|
||||
bool absorb = true;
|
||||
switch (event.KeyInput.Key)
|
||||
{
|
||||
case KEY_DOWN:
|
||||
case IRR_KEY_DOWN:
|
||||
setSelected(Selected+1);
|
||||
break;
|
||||
case KEY_UP:
|
||||
case IRR_KEY_UP:
|
||||
setSelected(Selected-1);
|
||||
break;
|
||||
case KEY_HOME:
|
||||
case KEY_PRIOR:
|
||||
case IRR_KEY_HOME:
|
||||
case IRR_KEY_PRIOR:
|
||||
setSelected(0);
|
||||
break;
|
||||
case KEY_END:
|
||||
case KEY_NEXT:
|
||||
case IRR_KEY_END:
|
||||
case IRR_KEY_NEXT:
|
||||
setSelected((s32)Items.size()-1);
|
||||
break;
|
||||
default:
|
||||
|
@ -274,12 +274,12 @@ bool CGUIEditBox::processKey(const SEvent& event)
|
||||
|
||||
switch(event.KeyInput.Key)
|
||||
{
|
||||
case KEY_KEY_A:
|
||||
case IRR_KEY_A:
|
||||
// select all
|
||||
newMarkBegin = 0;
|
||||
newMarkEnd = Text.size();
|
||||
break;
|
||||
case KEY_KEY_C:
|
||||
case IRR_KEY_C:
|
||||
// copy to clipboard
|
||||
if (!PasswordBox && Operator && MarkBegin != MarkEnd)
|
||||
{
|
||||
@ -295,7 +295,7 @@ bool CGUIEditBox::processKey(const SEvent& event)
|
||||
Operator->copyToClipboard(s.c_str());
|
||||
}
|
||||
break;
|
||||
case KEY_KEY_X:
|
||||
case IRR_KEY_X:
|
||||
// cut to the clipboard
|
||||
if (!PasswordBox && Operator && MarkBegin != MarkEnd)
|
||||
{
|
||||
@ -326,7 +326,7 @@ bool CGUIEditBox::processKey(const SEvent& event)
|
||||
}
|
||||
}
|
||||
break;
|
||||
case KEY_KEY_V:
|
||||
case IRR_KEY_V:
|
||||
if ( !isEnabled() )
|
||||
break;
|
||||
|
||||
@ -380,7 +380,7 @@ bool CGUIEditBox::processKey(const SEvent& event)
|
||||
textChanged = true;
|
||||
}
|
||||
break;
|
||||
case KEY_HOME:
|
||||
case IRR_KEY_HOME:
|
||||
// move/highlight to start of text
|
||||
if (event.KeyInput.Shift)
|
||||
{
|
||||
@ -395,7 +395,7 @@ bool CGUIEditBox::processKey(const SEvent& event)
|
||||
newMarkEnd = 0;
|
||||
}
|
||||
break;
|
||||
case KEY_END:
|
||||
case IRR_KEY_END:
|
||||
// move/highlight to end of text
|
||||
if (event.KeyInput.Shift)
|
||||
{
|
||||
@ -418,7 +418,7 @@ bool CGUIEditBox::processKey(const SEvent& event)
|
||||
else
|
||||
switch(event.KeyInput.Key)
|
||||
{
|
||||
case KEY_END:
|
||||
case IRR_KEY_END:
|
||||
{
|
||||
s32 p = Text.size();
|
||||
if (WordWrap || MultiLine)
|
||||
@ -445,7 +445,7 @@ bool CGUIEditBox::processKey(const SEvent& event)
|
||||
BlinkStartTime = os::Timer::getTime();
|
||||
}
|
||||
break;
|
||||
case KEY_HOME:
|
||||
case IRR_KEY_HOME:
|
||||
{
|
||||
|
||||
s32 p = 0;
|
||||
@ -470,7 +470,7 @@ bool CGUIEditBox::processKey(const SEvent& event)
|
||||
BlinkStartTime = os::Timer::getTime();
|
||||
}
|
||||
break;
|
||||
case KEY_RETURN:
|
||||
case IRR_KEY_RETURN:
|
||||
if (MultiLine)
|
||||
{
|
||||
inputChar(L'\n');
|
||||
@ -481,7 +481,7 @@ bool CGUIEditBox::processKey(const SEvent& event)
|
||||
sendGuiEvent( EGET_EDITBOX_ENTER );
|
||||
}
|
||||
return true;
|
||||
case KEY_LEFT:
|
||||
case IRR_KEY_LEFT:
|
||||
|
||||
if (event.KeyInput.Shift)
|
||||
{
|
||||
@ -503,7 +503,7 @@ bool CGUIEditBox::processKey(const SEvent& event)
|
||||
BlinkStartTime = os::Timer::getTime();
|
||||
break;
|
||||
|
||||
case KEY_RIGHT:
|
||||
case IRR_KEY_RIGHT:
|
||||
if (event.KeyInput.Shift)
|
||||
{
|
||||
if (Text.size() > (u32)CursorPos)
|
||||
@ -523,7 +523,7 @@ bool CGUIEditBox::processKey(const SEvent& event)
|
||||
if (Text.size() > (u32)CursorPos) CursorPos++;
|
||||
BlinkStartTime = os::Timer::getTime();
|
||||
break;
|
||||
case KEY_UP:
|
||||
case IRR_KEY_UP:
|
||||
if (MultiLine || (WordWrap && BrokenText.size() > 1) )
|
||||
{
|
||||
s32 lineNo = getLineFromPos(CursorPos);
|
||||
@ -554,7 +554,7 @@ bool CGUIEditBox::processKey(const SEvent& event)
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case KEY_DOWN:
|
||||
case IRR_KEY_DOWN:
|
||||
if (MultiLine || (WordWrap && BrokenText.size() > 1) )
|
||||
{
|
||||
s32 lineNo = getLineFromPos(CursorPos);
|
||||
@ -586,7 +586,7 @@ bool CGUIEditBox::processKey(const SEvent& event)
|
||||
}
|
||||
break;
|
||||
|
||||
case KEY_BACK:
|
||||
case IRR_KEY_BACK:
|
||||
if ( !isEnabled() )
|
||||
break;
|
||||
|
||||
@ -626,7 +626,7 @@ bool CGUIEditBox::processKey(const SEvent& event)
|
||||
textChanged = true;
|
||||
}
|
||||
break;
|
||||
case KEY_DELETE:
|
||||
case IRR_KEY_DELETE:
|
||||
if ( !isEnabled() )
|
||||
break;
|
||||
|
||||
@ -664,33 +664,33 @@ bool CGUIEditBox::processKey(const SEvent& event)
|
||||
}
|
||||
break;
|
||||
|
||||
case KEY_ESCAPE:
|
||||
case KEY_TAB:
|
||||
case KEY_SHIFT:
|
||||
case KEY_F1:
|
||||
case KEY_F2:
|
||||
case KEY_F3:
|
||||
case KEY_F4:
|
||||
case KEY_F5:
|
||||
case KEY_F6:
|
||||
case KEY_F7:
|
||||
case KEY_F8:
|
||||
case KEY_F9:
|
||||
case KEY_F10:
|
||||
case KEY_F11:
|
||||
case KEY_F12:
|
||||
case KEY_F13:
|
||||
case KEY_F14:
|
||||
case KEY_F15:
|
||||
case KEY_F16:
|
||||
case KEY_F17:
|
||||
case KEY_F18:
|
||||
case KEY_F19:
|
||||
case KEY_F20:
|
||||
case KEY_F21:
|
||||
case KEY_F22:
|
||||
case KEY_F23:
|
||||
case KEY_F24:
|
||||
case IRR_KEY_ESCAPE:
|
||||
case IRR_KEY_TAB:
|
||||
case IRR_KEY_SHIFT:
|
||||
case IRR_KEY_F1:
|
||||
case IRR_KEY_F2:
|
||||
case IRR_KEY_F3:
|
||||
case IRR_KEY_F4:
|
||||
case IRR_KEY_F5:
|
||||
case IRR_KEY_F6:
|
||||
case IRR_KEY_F7:
|
||||
case IRR_KEY_F8:
|
||||
case IRR_KEY_F9:
|
||||
case IRR_KEY_F10:
|
||||
case IRR_KEY_F11:
|
||||
case IRR_KEY_F12:
|
||||
case IRR_KEY_F13:
|
||||
case IRR_KEY_F14:
|
||||
case IRR_KEY_F15:
|
||||
case IRR_KEY_F16:
|
||||
case IRR_KEY_F17:
|
||||
case IRR_KEY_F18:
|
||||
case IRR_KEY_F19:
|
||||
case IRR_KEY_F20:
|
||||
case IRR_KEY_F21:
|
||||
case IRR_KEY_F22:
|
||||
case IRR_KEY_F23:
|
||||
case IRR_KEY_F24:
|
||||
// ignore these keys
|
||||
return false;
|
||||
|
||||
|
@ -561,7 +561,7 @@ bool CGUIEnvironment::postEventFromUser(const SEvent& event)
|
||||
// Send focus changing event
|
||||
if (event.EventType == EET_KEY_INPUT_EVENT &&
|
||||
event.KeyInput.PressedDown &&
|
||||
event.KeyInput.Key == KEY_TAB)
|
||||
event.KeyInput.Key == IRR_KEY_TAB)
|
||||
{
|
||||
IGUIElement *next = getNextElement(event.KeyInput.Shift, event.KeyInput.Control);
|
||||
if (next && next != Focus)
|
||||
|
@ -236,32 +236,32 @@ bool CGUIListBox::OnEvent(const SEvent& event)
|
||||
{
|
||||
case EET_KEY_INPUT_EVENT:
|
||||
if (event.KeyInput.PressedDown &&
|
||||
(event.KeyInput.Key == KEY_DOWN ||
|
||||
event.KeyInput.Key == KEY_UP ||
|
||||
event.KeyInput.Key == KEY_HOME ||
|
||||
event.KeyInput.Key == KEY_END ||
|
||||
event.KeyInput.Key == KEY_NEXT ||
|
||||
event.KeyInput.Key == KEY_PRIOR ) )
|
||||
(event.KeyInput.Key == IRR_KEY_DOWN ||
|
||||
event.KeyInput.Key == IRR_KEY_UP ||
|
||||
event.KeyInput.Key == IRR_KEY_HOME ||
|
||||
event.KeyInput.Key == IRR_KEY_END ||
|
||||
event.KeyInput.Key == IRR_KEY_NEXT ||
|
||||
event.KeyInput.Key == IRR_KEY_PRIOR))
|
||||
{
|
||||
s32 oldSelected = Selected;
|
||||
switch (event.KeyInput.Key)
|
||||
{
|
||||
case KEY_DOWN:
|
||||
case IRR_KEY_DOWN:
|
||||
Selected += 1;
|
||||
break;
|
||||
case KEY_UP:
|
||||
case IRR_KEY_UP:
|
||||
Selected -= 1;
|
||||
break;
|
||||
case KEY_HOME:
|
||||
case IRR_KEY_HOME:
|
||||
Selected = 0;
|
||||
break;
|
||||
case KEY_END:
|
||||
case IRR_KEY_END:
|
||||
Selected = (s32)Items.size()-1;
|
||||
break;
|
||||
case KEY_NEXT:
|
||||
case IRR_KEY_NEXT:
|
||||
Selected += AbsoluteRect.getHeight() / ItemHeight;
|
||||
break;
|
||||
case KEY_PRIOR:
|
||||
case IRR_KEY_PRIOR:
|
||||
Selected -= AbsoluteRect.getHeight() / ItemHeight;
|
||||
break;
|
||||
default:
|
||||
@ -290,7 +290,9 @@ bool CGUIListBox::OnEvent(const SEvent& event)
|
||||
return true;
|
||||
}
|
||||
else
|
||||
if (!event.KeyInput.PressedDown && ( event.KeyInput.Key == KEY_RETURN || event.KeyInput.Key == KEY_SPACE ) )
|
||||
if (!event.KeyInput.PressedDown &&
|
||||
(event.KeyInput.Key == IRR_KEY_RETURN ||
|
||||
event.KeyInput.Key == IRR_KEY_SPACE))
|
||||
{
|
||||
if (Parent)
|
||||
{
|
||||
|
@ -269,28 +269,28 @@ bool CGUIMessageBox::OnEvent(const SEvent& event)
|
||||
{
|
||||
switch (event.KeyInput.Key)
|
||||
{
|
||||
case KEY_RETURN:
|
||||
case IRR_KEY_RETURN:
|
||||
if (OkButton)
|
||||
{
|
||||
OkButton->setPressed(true);
|
||||
Pressed = true;
|
||||
}
|
||||
break;
|
||||
case KEY_KEY_Y:
|
||||
case IRR_KEY_Y:
|
||||
if (YesButton)
|
||||
{
|
||||
YesButton->setPressed(true);
|
||||
Pressed = true;
|
||||
}
|
||||
break;
|
||||
case KEY_KEY_N:
|
||||
case IRR_KEY_N:
|
||||
if (NoButton)
|
||||
{
|
||||
NoButton->setPressed(true);
|
||||
Pressed = true;
|
||||
}
|
||||
break;
|
||||
case KEY_ESCAPE:
|
||||
case IRR_KEY_ESCAPE:
|
||||
if (Pressed)
|
||||
{
|
||||
// cancel press
|
||||
@ -319,7 +319,7 @@ bool CGUIMessageBox::OnEvent(const SEvent& event)
|
||||
else
|
||||
if (Pressed)
|
||||
{
|
||||
if (OkButton && event.KeyInput.Key == KEY_RETURN)
|
||||
if (OkButton && event.KeyInput.Key == IRR_KEY_RETURN)
|
||||
{
|
||||
setVisible(false); // this is a workaround to make sure it's no longer the hovered element, crashes on pressing 1-2 times ESC
|
||||
Environment->setFocus(0);
|
||||
@ -329,7 +329,7 @@ bool CGUIMessageBox::OnEvent(const SEvent& event)
|
||||
return true;
|
||||
}
|
||||
else
|
||||
if ((CancelButton || CloseButton) && event.KeyInput.Key == KEY_ESCAPE)
|
||||
if ((CancelButton || CloseButton) && event.KeyInput.Key == IRR_KEY_ESCAPE)
|
||||
{
|
||||
setVisible(false); // this is a workaround to make sure it's no longer the hovered element, crashes on pressing 1-2 times ESC
|
||||
Environment->setFocus(0);
|
||||
@ -339,7 +339,7 @@ bool CGUIMessageBox::OnEvent(const SEvent& event)
|
||||
return true;
|
||||
}
|
||||
else
|
||||
if (YesButton && event.KeyInput.Key == KEY_KEY_Y)
|
||||
if (YesButton && event.KeyInput.Key == IRR_KEY_Y)
|
||||
{
|
||||
setVisible(false); // this is a workaround to make sure it's no longer the hovered element, crashes on pressing 1-2 times ESC
|
||||
Environment->setFocus(0);
|
||||
@ -349,7 +349,7 @@ bool CGUIMessageBox::OnEvent(const SEvent& event)
|
||||
return true;
|
||||
}
|
||||
else
|
||||
if (NoButton && event.KeyInput.Key == KEY_KEY_N)
|
||||
if (NoButton && event.KeyInput.Key == IRR_KEY_N)
|
||||
{
|
||||
setVisible(false); // this is a workaround to make sure it's no longer the hovered element, crashes on pressing 1-2 times ESC
|
||||
Environment->setFocus(0);
|
||||
|
@ -71,24 +71,24 @@ bool CGUIScrollBar::OnEvent(const SEvent& event)
|
||||
bool absorb = true;
|
||||
switch (event.KeyInput.Key)
|
||||
{
|
||||
case KEY_LEFT:
|
||||
case KEY_UP:
|
||||
case IRR_KEY_LEFT:
|
||||
case IRR_KEY_UP:
|
||||
setPos(Pos-SmallStep);
|
||||
break;
|
||||
case KEY_RIGHT:
|
||||
case KEY_DOWN:
|
||||
case IRR_KEY_RIGHT:
|
||||
case IRR_KEY_DOWN:
|
||||
setPos(Pos+SmallStep);
|
||||
break;
|
||||
case KEY_HOME:
|
||||
case IRR_KEY_HOME:
|
||||
setPos(Min);
|
||||
break;
|
||||
case KEY_PRIOR:
|
||||
case IRR_KEY_PRIOR:
|
||||
setPos(Pos-LargeStep);
|
||||
break;
|
||||
case KEY_END:
|
||||
case IRR_KEY_END:
|
||||
setPos(Max);
|
||||
break;
|
||||
case KEY_NEXT:
|
||||
case IRR_KEY_NEXT:
|
||||
setPos(Pos+LargeStep);
|
||||
break;
|
||||
default:
|
||||
|
@ -18,9 +18,6 @@ namespace irr
|
||||
{
|
||||
namespace video
|
||||
{
|
||||
IVideoDriver* createOGLES1Driver(const SIrrlichtCreationParameters& params,
|
||||
video::SExposedVideoData& data, io::IFileSystem* io);
|
||||
|
||||
IVideoDriver* createOGLES2Driver(const SIrrlichtCreationParameters& params,
|
||||
video::SExposedVideoData& data, io::IFileSystem* io);
|
||||
}
|
||||
@ -35,7 +32,6 @@ namespace irr
|
||||
bool CIrrDeviceAndroid::IsPaused = true;
|
||||
bool CIrrDeviceAndroid::IsFocused = false;
|
||||
bool CIrrDeviceAndroid::IsStarted = false;
|
||||
bool CIrrDeviceAndroid::IsClosing = false;
|
||||
|
||||
//! constructor
|
||||
CIrrDeviceAndroid::CIrrDeviceAndroid(const SIrrlichtCreationParameters& param)
|
||||
@ -49,12 +45,21 @@ CIrrDeviceAndroid::CIrrDeviceAndroid(const SIrrlichtCreationParameters& param)
|
||||
#endif
|
||||
|
||||
Android = (android_app *)(param.PrivateData);
|
||||
|
||||
IsClosing = Android->destroyRequested;
|
||||
assert(Android != NULL);
|
||||
|
||||
Android->userData = this;
|
||||
Android->onAppCmd = handleAndroidCommand;
|
||||
Android->onInputEvent = handleInput;
|
||||
|
||||
createKeyMap();
|
||||
|
||||
CursorControl = new CCursorControl();
|
||||
|
||||
Close = Android->destroyRequested;
|
||||
|
||||
// It typically shouldn't happen, but just in case...
|
||||
if (Close)
|
||||
return;
|
||||
|
||||
SensorManager = ASensorManager_getInstance();
|
||||
SensorEventQueue = ASensorManager_createEventQueue(SensorManager,
|
||||
@ -63,15 +68,10 @@ CIrrDeviceAndroid::CIrrDeviceAndroid(const SIrrlichtCreationParameters& param)
|
||||
ANativeActivity_setWindowFlags(Android->activity,
|
||||
AWINDOW_FLAG_KEEP_SCREEN_ON |
|
||||
AWINDOW_FLAG_FULLSCREEN, 0);
|
||||
|
||||
createKeyMap();
|
||||
|
||||
// Create cursor control
|
||||
CursorControl = new CCursorControl();
|
||||
|
||||
os::Printer::log("Waiting for Android activity window to be created.", ELL_DEBUG);
|
||||
|
||||
while ((!IsStarted || !IsFocused || IsPaused) && !IsClosing)
|
||||
while (!IsStarted || !IsFocused || IsPaused)
|
||||
{
|
||||
s32 events = 0;
|
||||
android_poll_source* source = 0;
|
||||
@ -89,7 +89,7 @@ CIrrDeviceAndroid::CIrrDeviceAndroid(const SIrrlichtCreationParameters& param)
|
||||
|
||||
ExposedVideoData.OGLESAndroid.Window = Android->window;
|
||||
|
||||
getVideoModeList();
|
||||
createVideoModeList();
|
||||
|
||||
createDriver();
|
||||
|
||||
@ -101,27 +101,30 @@ CIrrDeviceAndroid::CIrrDeviceAndroid(const SIrrlichtCreationParameters& param)
|
||||
CIrrDeviceAndroid::~CIrrDeviceAndroid()
|
||||
{
|
||||
Android->userData = NULL;
|
||||
Android->onAppCmd = NULL;
|
||||
Android->onInputEvent = NULL;
|
||||
}
|
||||
|
||||
video::IVideoModeList* CIrrDeviceAndroid::getVideoModeList()
|
||||
void CIrrDeviceAndroid::createVideoModeList()
|
||||
{
|
||||
if (Android == NULL || Android->window == NULL)
|
||||
return NULL;
|
||||
|
||||
core::dimension2d<u32> size = core::dimension2d<u32>(
|
||||
ANativeWindow_getWidth(Android->window),
|
||||
ANativeWindow_getHeight(Android->window));
|
||||
|
||||
CreationParams.WindowSize.Width = size.Width;
|
||||
CreationParams.WindowSize.Height = size.Height;
|
||||
|
||||
if (!VideoModeList.getVideoModeCount())
|
||||
if (VideoModeList.getVideoModeCount() > 0)
|
||||
return;
|
||||
|
||||
int width = ANativeWindow_getWidth(Android->window);
|
||||
int height = ANativeWindow_getHeight(Android->window);
|
||||
|
||||
if (width > 0 && height > 0)
|
||||
{
|
||||
VideoModeList.addMode(size, 32);
|
||||
VideoModeList.setDesktop(32, size);
|
||||
CreationParams.WindowSize.Width = width;
|
||||
CreationParams.WindowSize.Height = height;
|
||||
}
|
||||
|
||||
return &VideoModeList;
|
||||
core::dimension2d<u32> size = core::dimension2d<u32>(
|
||||
CreationParams.WindowSize.Width,
|
||||
CreationParams.WindowSize.Height);
|
||||
|
||||
VideoModeList.addMode(size, 32);
|
||||
VideoModeList.setDesktop(32, size);
|
||||
}
|
||||
|
||||
void CIrrDeviceAndroid::createDriver()
|
||||
@ -129,14 +132,6 @@ void CIrrDeviceAndroid::createDriver()
|
||||
// Create the driver.
|
||||
switch(CreationParams.DriverType)
|
||||
{
|
||||
case video::EDT_OGLES1:
|
||||
#ifdef _IRR_COMPILE_WITH_OGLES1_
|
||||
VideoDriver = video::createOGLES1Driver(CreationParams, ExposedVideoData, FileSystem);
|
||||
#else
|
||||
os::Printer::log("No OpenGL ES 1.0 support compiled in.", ELL_ERROR);
|
||||
#endif
|
||||
break;
|
||||
|
||||
case video::EDT_OGLES2:
|
||||
#ifdef _IRR_COMPILE_WITH_OGLES2_
|
||||
VideoDriver = video::createOGLES2Driver(CreationParams, ExposedVideoData, FileSystem);
|
||||
@ -158,12 +153,12 @@ void CIrrDeviceAndroid::createDriver()
|
||||
bool CIrrDeviceAndroid::run()
|
||||
{
|
||||
os::Timer::tick();
|
||||
|
||||
while (!IsClosing)
|
||||
|
||||
while (!Close)
|
||||
{
|
||||
s32 Events = 0;
|
||||
android_poll_source* Source = 0;
|
||||
bool should_run = (IsStarted && IsFocused && !IsPaused) || IsClosing;
|
||||
bool should_run = (IsStarted && IsFocused && !IsPaused);
|
||||
s32 id = ALooper_pollAll(should_run ? 0 : -1, NULL, &Events,
|
||||
(void**)&Source);
|
||||
|
||||
@ -209,7 +204,7 @@ bool CIrrDeviceAndroid::run()
|
||||
}
|
||||
}
|
||||
|
||||
return !IsClosing;
|
||||
return !Close;
|
||||
}
|
||||
|
||||
void CIrrDeviceAndroid::yield()
|
||||
@ -262,6 +257,7 @@ bool CIrrDeviceAndroid::isWindowMinimized() const
|
||||
|
||||
void CIrrDeviceAndroid::closeDevice()
|
||||
{
|
||||
Close = true;
|
||||
}
|
||||
|
||||
void CIrrDeviceAndroid::setResizable(bool resize)
|
||||
@ -288,6 +284,7 @@ E_DEVICE_TYPE CIrrDeviceAndroid::getType() const
|
||||
void CIrrDeviceAndroid::handleAndroidCommand(android_app* app, int32_t cmd)
|
||||
{
|
||||
CIrrDeviceAndroid* device = (CIrrDeviceAndroid *)app->userData;
|
||||
assert(device != NULL);
|
||||
|
||||
switch (cmd)
|
||||
{
|
||||
@ -297,18 +294,15 @@ void CIrrDeviceAndroid::handleAndroidCommand(android_app* app, int32_t cmd)
|
||||
case APP_CMD_INIT_WINDOW:
|
||||
os::Printer::log("Android command APP_CMD_INIT_WINDOW", ELL_DEBUG);
|
||||
|
||||
if (device != NULL)
|
||||
device->getExposedVideoData().OGLESAndroid.Window = app->window;
|
||||
|
||||
// If the Android app is resumed, we need to re-create EGL surface
|
||||
// to allow to draw something on it again.
|
||||
if (device->VideoDriver != NULL &&
|
||||
device->CreationParams.DriverType == video::EDT_OGLES2)
|
||||
{
|
||||
device->getExposedVideoData().OGLESAndroid.Window = app->window;
|
||||
|
||||
// If the Android app is resumed, we need to re-create EGL surface
|
||||
// to allow to draw something on it again.
|
||||
if (device->VideoDriver != NULL &&
|
||||
device->CreationParams.DriverType == video::EDT_OGLES2)
|
||||
{
|
||||
video::COGLES2Driver* driver = (video::COGLES2Driver*)(device->VideoDriver);
|
||||
driver->getEGLContext()->reloadEGLSurface(app->window);
|
||||
}
|
||||
video::COGLES2Driver* driver = (video::COGLES2Driver*)(device->VideoDriver);
|
||||
driver->getEGLContext()->reloadEGLSurface(app->window);
|
||||
}
|
||||
|
||||
IsStarted = true;
|
||||
@ -327,7 +321,7 @@ void CIrrDeviceAndroid::handleAndroidCommand(android_app* app, int32_t cmd)
|
||||
break;
|
||||
case APP_CMD_DESTROY:
|
||||
os::Printer::log("Android command APP_CMD_DESTROY", ELL_DEBUG);
|
||||
IsClosing = true;
|
||||
device->Close = true;
|
||||
// Make sure that state variables are set to the default state
|
||||
// when the app is destroyed
|
||||
IsPaused = true;
|
||||
@ -361,25 +355,20 @@ void CIrrDeviceAndroid::handleAndroidCommand(android_app* app, int32_t cmd)
|
||||
break;
|
||||
}
|
||||
|
||||
if (device != NULL)
|
||||
{
|
||||
SEvent event;
|
||||
event.EventType = EET_SYSTEM_EVENT;
|
||||
event.SystemEvent.EventType = ESET_ANDROID_CMD;
|
||||
event.SystemEvent.AndroidCmd.Cmd = cmd;
|
||||
device->postEventFromUser(event);
|
||||
}
|
||||
SEvent event;
|
||||
event.EventType = EET_SYSTEM_EVENT;
|
||||
event.SystemEvent.EventType = ESET_ANDROID_CMD;
|
||||
event.SystemEvent.AndroidCmd.Cmd = cmd;
|
||||
device->postEventFromUser(event);
|
||||
}
|
||||
|
||||
s32 CIrrDeviceAndroid::handleInput(android_app* app, AInputEvent* androidEvent)
|
||||
{
|
||||
CIrrDeviceAndroid* device = (CIrrDeviceAndroid*)app->userData;
|
||||
assert(device != NULL);
|
||||
|
||||
s32 status = 0;
|
||||
|
||||
if (device == NULL)
|
||||
return status;
|
||||
|
||||
|
||||
switch (AInputEvent_getType(androidEvent))
|
||||
{
|
||||
case AINPUT_EVENT_TYPE_MOTION:
|
||||
@ -506,7 +495,7 @@ s32 CIrrDeviceAndroid::handleInput(android_app* app, AInputEvent* androidEvent)
|
||||
event.EventType = EET_KEY_INPUT_EVENT;
|
||||
event.KeyInput.Char = 0;
|
||||
event.KeyInput.PressedDown = false;
|
||||
event.KeyInput.Key = KEY_UNKNOWN;
|
||||
event.KeyInput.Key = IRR_KEY_UNKNOWN;
|
||||
|
||||
int32_t keyCode = AKeyEvent_getKeyCode(androidEvent);
|
||||
int32_t keyAction = AKeyEvent_getAction(androidEvent);
|
||||
@ -540,11 +529,7 @@ s32 CIrrDeviceAndroid::handleInput(android_app* app, AInputEvent* androidEvent)
|
||||
keyMetaState & AMETA_CTRL_RIGHT_ON);
|
||||
|
||||
event.KeyInput.SystemKeyCode = (u32)keyCode;
|
||||
|
||||
if (keyCode >= 0 && (u32)keyCode < device->KeyMap.size())
|
||||
{
|
||||
event.KeyInput.Key = device->KeyMap[keyCode];
|
||||
}
|
||||
event.KeyInput.Key = device->KeyMap[keyCode];
|
||||
|
||||
if (event.KeyInput.Key > 0)
|
||||
{
|
||||
@ -591,234 +576,232 @@ video::SExposedVideoData& CIrrDeviceAndroid::getExposedVideoData()
|
||||
|
||||
void CIrrDeviceAndroid::createKeyMap()
|
||||
{
|
||||
KeyMap.set_used(223);
|
||||
|
||||
KeyMap[0] = KEY_UNKNOWN; // AKEYCODE_UNKNOWN
|
||||
KeyMap[1] = KEY_LBUTTON; // AKEYCODE_SOFT_LEFT
|
||||
KeyMap[2] = KEY_RBUTTON; // AKEYCODE_SOFT_RIGHT
|
||||
KeyMap[3] = KEY_HOME; // AKEYCODE_HOME
|
||||
KeyMap[4] = KEY_ESCAPE; // AKEYCODE_BACK
|
||||
KeyMap[5] = KEY_UNKNOWN; // AKEYCODE_CALL
|
||||
KeyMap[6] = KEY_UNKNOWN; // AKEYCODE_ENDCALL
|
||||
KeyMap[7] = KEY_KEY_0; // AKEYCODE_0
|
||||
KeyMap[8] = KEY_KEY_1; // AKEYCODE_1
|
||||
KeyMap[9] = KEY_KEY_2; // AKEYCODE_2
|
||||
KeyMap[10] = KEY_KEY_3; // AKEYCODE_3
|
||||
KeyMap[11] = KEY_KEY_4; // AKEYCODE_4
|
||||
KeyMap[12] = KEY_KEY_5; // AKEYCODE_5
|
||||
KeyMap[13] = KEY_KEY_6; // AKEYCODE_6
|
||||
KeyMap[14] = KEY_KEY_7; // AKEYCODE_7
|
||||
KeyMap[15] = KEY_KEY_8; // AKEYCODE_8
|
||||
KeyMap[16] = KEY_KEY_9; // AKEYCODE_9
|
||||
KeyMap[17] = KEY_UNKNOWN; // AKEYCODE_STAR
|
||||
KeyMap[18] = KEY_UNKNOWN; // AKEYCODE_POUND
|
||||
KeyMap[19] = KEY_UP; // AKEYCODE_DPAD_UP
|
||||
KeyMap[20] = KEY_DOWN; // AKEYCODE_DPAD_DOWN
|
||||
KeyMap[21] = KEY_LEFT; // AKEYCODE_DPAD_LEFT
|
||||
KeyMap[22] = KEY_RIGHT; // AKEYCODE_DPAD_RIGHT
|
||||
KeyMap[23] = KEY_SELECT; // AKEYCODE_DPAD_CENTER
|
||||
KeyMap[24] = KEY_VOLUME_DOWN; // AKEYCODE_VOLUME_UP
|
||||
KeyMap[25] = KEY_VOLUME_UP; // AKEYCODE_VOLUME_DOWN
|
||||
KeyMap[26] = KEY_UNKNOWN; // AKEYCODE_POWER
|
||||
KeyMap[27] = KEY_UNKNOWN; // AKEYCODE_CAMERA
|
||||
KeyMap[28] = KEY_CLEAR; // AKEYCODE_CLEAR
|
||||
KeyMap[29] = KEY_KEY_A; // AKEYCODE_A
|
||||
KeyMap[30] = KEY_KEY_B; // AKEYCODE_B
|
||||
KeyMap[31] = KEY_KEY_C; // AKEYCODE_C
|
||||
KeyMap[32] = KEY_KEY_D; // AKEYCODE_D
|
||||
KeyMap[33] = KEY_KEY_E; // AKEYCODE_E
|
||||
KeyMap[34] = KEY_KEY_F; // AKEYCODE_F
|
||||
KeyMap[35] = KEY_KEY_G; // AKEYCODE_G
|
||||
KeyMap[36] = KEY_KEY_H; // AKEYCODE_H
|
||||
KeyMap[37] = KEY_KEY_I; // AKEYCODE_I
|
||||
KeyMap[38] = KEY_KEY_J; // AKEYCODE_J
|
||||
KeyMap[39] = KEY_KEY_K; // AKEYCODE_K
|
||||
KeyMap[40] = KEY_KEY_L; // AKEYCODE_L
|
||||
KeyMap[41] = KEY_KEY_M; // AKEYCODE_M
|
||||
KeyMap[42] = KEY_KEY_N; // AKEYCODE_N
|
||||
KeyMap[43] = KEY_KEY_O; // AKEYCODE_O
|
||||
KeyMap[44] = KEY_KEY_P; // AKEYCODE_P
|
||||
KeyMap[45] = KEY_KEY_Q; // AKEYCODE_Q
|
||||
KeyMap[46] = KEY_KEY_R; // AKEYCODE_R
|
||||
KeyMap[47] = KEY_KEY_S; // AKEYCODE_S
|
||||
KeyMap[48] = KEY_KEY_T; // AKEYCODE_T
|
||||
KeyMap[49] = KEY_KEY_U; // AKEYCODE_U
|
||||
KeyMap[50] = KEY_KEY_V; // AKEYCODE_V
|
||||
KeyMap[51] = KEY_KEY_W; // AKEYCODE_W
|
||||
KeyMap[52] = KEY_KEY_X; // AKEYCODE_X
|
||||
KeyMap[53] = KEY_KEY_Y; // AKEYCODE_Y
|
||||
KeyMap[54] = KEY_KEY_Z; // AKEYCODE_Z
|
||||
KeyMap[55] = KEY_COMMA; // AKEYCODE_COMMA
|
||||
KeyMap[56] = KEY_PERIOD; // AKEYCODE_PERIOD
|
||||
KeyMap[57] = KEY_MENU; // AKEYCODE_ALT_LEFT
|
||||
KeyMap[58] = KEY_MENU; // AKEYCODE_ALT_RIGHT
|
||||
KeyMap[59] = KEY_LSHIFT; // AKEYCODE_SHIFT_LEFT
|
||||
KeyMap[60] = KEY_RSHIFT; // AKEYCODE_SHIFT_RIGHT
|
||||
KeyMap[61] = KEY_TAB; // AKEYCODE_TAB
|
||||
KeyMap[62] = KEY_SPACE; // AKEYCODE_SPACE
|
||||
KeyMap[63] = KEY_UNKNOWN; // AKEYCODE_SYM
|
||||
KeyMap[64] = KEY_UNKNOWN; // AKEYCODE_EXPLORER
|
||||
KeyMap[65] = KEY_UNKNOWN; // AKEYCODE_ENVELOPE
|
||||
KeyMap[66] = KEY_RETURN; // AKEYCODE_ENTER
|
||||
KeyMap[67] = KEY_BACK; // AKEYCODE_DEL
|
||||
KeyMap[68] = KEY_OEM_3; // AKEYCODE_GRAVE
|
||||
KeyMap[69] = KEY_MINUS; // AKEYCODE_MINUS
|
||||
KeyMap[70] = KEY_UNKNOWN; // AKEYCODE_EQUALS
|
||||
KeyMap[71] = KEY_UNKNOWN; // AKEYCODE_LEFT_BRACKET
|
||||
KeyMap[72] = KEY_UNKNOWN; // AKEYCODE_RIGHT_BRACKET
|
||||
KeyMap[73] = KEY_UNKNOWN; // AKEYCODE_BACKSLASH
|
||||
KeyMap[74] = KEY_UNKNOWN; // AKEYCODE_SEMICOLON
|
||||
KeyMap[75] = KEY_UNKNOWN; // AKEYCODE_APOSTROPHE
|
||||
KeyMap[76] = KEY_UNKNOWN; // AKEYCODE_SLASH
|
||||
KeyMap[77] = KEY_UNKNOWN; // AKEYCODE_AT
|
||||
KeyMap[78] = KEY_UNKNOWN; // AKEYCODE_NUM
|
||||
KeyMap[79] = KEY_UNKNOWN; // AKEYCODE_HEADSETHOOK
|
||||
KeyMap[80] = KEY_UNKNOWN; // AKEYCODE_FOCUS (*Camera* focus)
|
||||
KeyMap[81] = KEY_PLUS; // AKEYCODE_PLUS
|
||||
KeyMap[82] = KEY_MENU; // AKEYCODE_MENU
|
||||
KeyMap[83] = KEY_UNKNOWN; // AKEYCODE_NOTIFICATION
|
||||
KeyMap[84] = KEY_UNKNOWN; // AKEYCODE_SEARCH
|
||||
KeyMap[85] = KEY_MEDIA_PLAY_PAUSE; // AKEYCODE_MEDIA_PLAY_PAUSE
|
||||
KeyMap[86] = KEY_MEDIA_STOP; // AKEYCODE_MEDIA_STOP
|
||||
KeyMap[87] = KEY_MEDIA_NEXT_TRACK; // AKEYCODE_MEDIA_NEXT
|
||||
KeyMap[88] = KEY_MEDIA_PREV_TRACK; // AKEYCODE_MEDIA_PREVIOUS
|
||||
KeyMap[89] = KEY_UNKNOWN; // AKEYCODE_MEDIA_REWIND
|
||||
KeyMap[90] = KEY_UNKNOWN; // AKEYCODE_MEDIA_FAST_FORWARD
|
||||
KeyMap[91] = KEY_VOLUME_MUTE; // AKEYCODE_MUTE
|
||||
KeyMap[92] = KEY_PRIOR; // AKEYCODE_PAGE_UP
|
||||
KeyMap[93] = KEY_NEXT; // AKEYCODE_PAGE_DOWN
|
||||
KeyMap[94] = KEY_UNKNOWN; // AKEYCODE_PICTSYMBOLS
|
||||
KeyMap[95] = KEY_UNKNOWN; // AKEYCODE_SWITCH_CHARSET
|
||||
KeyMap[AKEYCODE_UNKNOWN] = IRR_KEY_UNKNOWN;
|
||||
KeyMap[AKEYCODE_SOFT_LEFT] = IRR_KEY_LBUTTON;
|
||||
KeyMap[AKEYCODE_SOFT_RIGHT] = IRR_KEY_RBUTTON;
|
||||
KeyMap[AKEYCODE_HOME] = IRR_KEY_HOME;
|
||||
KeyMap[AKEYCODE_BACK] = IRR_KEY_ESCAPE;
|
||||
KeyMap[AKEYCODE_CALL] = IRR_KEY_UNKNOWN;
|
||||
KeyMap[AKEYCODE_ENDCALL] = IRR_KEY_UNKNOWN;
|
||||
KeyMap[AKEYCODE_0] = IRR_KEY_0;
|
||||
KeyMap[AKEYCODE_1] = IRR_KEY_1;
|
||||
KeyMap[AKEYCODE_2] = IRR_KEY_2;
|
||||
KeyMap[AKEYCODE_3] = IRR_KEY_3;
|
||||
KeyMap[AKEYCODE_4] = IRR_KEY_4;
|
||||
KeyMap[AKEYCODE_5] = IRR_KEY_5;
|
||||
KeyMap[AKEYCODE_6] = IRR_KEY_6;
|
||||
KeyMap[AKEYCODE_7] = IRR_KEY_7;
|
||||
KeyMap[AKEYCODE_8] = IRR_KEY_8;
|
||||
KeyMap[AKEYCODE_9] = IRR_KEY_9;
|
||||
KeyMap[AKEYCODE_STAR] = IRR_KEY_UNKNOWN;
|
||||
KeyMap[AKEYCODE_POUND] = IRR_KEY_UNKNOWN;
|
||||
KeyMap[AKEYCODE_DPAD_UP] = IRR_KEY_UP;
|
||||
KeyMap[AKEYCODE_DPAD_DOWN] = IRR_KEY_DOWN;
|
||||
KeyMap[AKEYCODE_DPAD_LEFT] = IRR_KEY_LEFT;
|
||||
KeyMap[AKEYCODE_DPAD_RIGHT] = IRR_KEY_RIGHT;
|
||||
KeyMap[AKEYCODE_DPAD_CENTER] = IRR_KEY_SELECT;
|
||||
KeyMap[AKEYCODE_VOLUME_UP] = IRR_KEY_VOLUME_DOWN;
|
||||
KeyMap[AKEYCODE_VOLUME_DOWN] = IRR_KEY_VOLUME_UP;
|
||||
KeyMap[AKEYCODE_POWER] = IRR_KEY_UNKNOWN;
|
||||
KeyMap[AKEYCODE_CAMERA] = IRR_KEY_UNKNOWN;
|
||||
KeyMap[AKEYCODE_CLEAR] = IRR_KEY_CLEAR;
|
||||
KeyMap[AKEYCODE_A] = IRR_KEY_A;
|
||||
KeyMap[AKEYCODE_B] = IRR_KEY_B;
|
||||
KeyMap[AKEYCODE_C] = IRR_KEY_C;
|
||||
KeyMap[AKEYCODE_D] = IRR_KEY_D;
|
||||
KeyMap[AKEYCODE_E] = IRR_KEY_E;
|
||||
KeyMap[AKEYCODE_F] = IRR_KEY_F;
|
||||
KeyMap[AKEYCODE_G] = IRR_KEY_G;
|
||||
KeyMap[AKEYCODE_H] = IRR_KEY_H;
|
||||
KeyMap[AKEYCODE_I] = IRR_KEY_I;
|
||||
KeyMap[AKEYCODE_J] = IRR_KEY_J;
|
||||
KeyMap[AKEYCODE_K] = IRR_KEY_K;
|
||||
KeyMap[AKEYCODE_L] = IRR_KEY_L;
|
||||
KeyMap[AKEYCODE_M] = IRR_KEY_M;
|
||||
KeyMap[AKEYCODE_N] = IRR_KEY_N;
|
||||
KeyMap[AKEYCODE_O] = IRR_KEY_O;
|
||||
KeyMap[AKEYCODE_P] = IRR_KEY_P;
|
||||
KeyMap[AKEYCODE_Q] = IRR_KEY_Q;
|
||||
KeyMap[AKEYCODE_R] = IRR_KEY_R;
|
||||
KeyMap[AKEYCODE_S] = IRR_KEY_S;
|
||||
KeyMap[AKEYCODE_T] = IRR_KEY_T;
|
||||
KeyMap[AKEYCODE_U] = IRR_KEY_U;
|
||||
KeyMap[AKEYCODE_V] = IRR_KEY_V;
|
||||
KeyMap[AKEYCODE_W] = IRR_KEY_W;
|
||||
KeyMap[AKEYCODE_X] = IRR_KEY_X;
|
||||
KeyMap[AKEYCODE_Y] = IRR_KEY_Y;
|
||||
KeyMap[AKEYCODE_Z] = IRR_KEY_Z;
|
||||
KeyMap[AKEYCODE_COMMA] = IRR_KEY_COMMA;
|
||||
KeyMap[AKEYCODE_PERIOD] = IRR_KEY_PERIOD;
|
||||
KeyMap[AKEYCODE_ALT_LEFT] = IRR_KEY_MENU;
|
||||
KeyMap[AKEYCODE_ALT_RIGHT] = IRR_KEY_MENU;
|
||||
KeyMap[AKEYCODE_SHIFT_LEFT] = IRR_KEY_LSHIFT;
|
||||
KeyMap[AKEYCODE_SHIFT_RIGHT] = IRR_KEY_RSHIFT;
|
||||
KeyMap[AKEYCODE_TAB] = IRR_KEY_TAB;
|
||||
KeyMap[AKEYCODE_SPACE] = IRR_KEY_SPACE;
|
||||
KeyMap[AKEYCODE_SYM] = IRR_KEY_UNKNOWN;
|
||||
KeyMap[AKEYCODE_EXPLORER] = IRR_KEY_UNKNOWN;
|
||||
KeyMap[AKEYCODE_ENVELOPE] = IRR_KEY_UNKNOWN;
|
||||
KeyMap[AKEYCODE_ENTER] = IRR_KEY_RETURN;
|
||||
KeyMap[AKEYCODE_DEL] = IRR_KEY_BACK;
|
||||
KeyMap[AKEYCODE_GRAVE] = IRR_KEY_OEM_3;
|
||||
KeyMap[AKEYCODE_MINUS] = IRR_KEY_MINUS;
|
||||
KeyMap[AKEYCODE_EQUALS] = IRR_KEY_UNKNOWN;
|
||||
KeyMap[AKEYCODE_LEFT_BRACKET] = IRR_KEY_UNKNOWN;
|
||||
KeyMap[AKEYCODE_RIGHT_BRACKET] = IRR_KEY_UNKNOWN;
|
||||
KeyMap[AKEYCODE_BACKSLASH] = IRR_KEY_UNKNOWN;
|
||||
KeyMap[AKEYCODE_SEMICOLON] = IRR_KEY_UNKNOWN;
|
||||
KeyMap[AKEYCODE_APOSTROPHE] = IRR_KEY_UNKNOWN;
|
||||
KeyMap[AKEYCODE_SLASH] = IRR_KEY_UNKNOWN;
|
||||
KeyMap[AKEYCODE_AT] = IRR_KEY_UNKNOWN;
|
||||
KeyMap[AKEYCODE_NUM] = IRR_KEY_UNKNOWN;
|
||||
KeyMap[AKEYCODE_HEADSETHOOK] = IRR_KEY_UNKNOWN;
|
||||
KeyMap[AKEYCODE_FOCUS] = IRR_KEY_UNKNOWN;
|
||||
KeyMap[AKEYCODE_PLUS] = IRR_KEY_PLUS;
|
||||
KeyMap[AKEYCODE_MENU] = IRR_KEY_MENU;
|
||||
KeyMap[AKEYCODE_NOTIFICATION] = IRR_KEY_UNKNOWN;
|
||||
KeyMap[AKEYCODE_SEARCH] = IRR_KEY_UNKNOWN;
|
||||
KeyMap[AKEYCODE_MEDIA_PLAY_PAUSE] = IRR_KEY_MEDIA_PLAY_PAUSE;
|
||||
KeyMap[AKEYCODE_MEDIA_STOP] = IRR_KEY_MEDIA_STOP;
|
||||
KeyMap[AKEYCODE_MEDIA_NEXT] = IRR_KEY_MEDIA_NEXT_TRACK;
|
||||
KeyMap[AKEYCODE_MEDIA_PREVIOUS] = IRR_KEY_MEDIA_PREV_TRACK;
|
||||
KeyMap[AKEYCODE_MEDIA_REWIND] = IRR_KEY_UNKNOWN;
|
||||
KeyMap[AKEYCODE_MEDIA_FAST_FORWARD] = IRR_KEY_UNKNOWN;
|
||||
KeyMap[AKEYCODE_MUTE] = IRR_KEY_VOLUME_MUTE;
|
||||
KeyMap[AKEYCODE_PAGE_UP] = IRR_KEY_PRIOR;
|
||||
KeyMap[AKEYCODE_PAGE_DOWN] = IRR_KEY_NEXT;
|
||||
KeyMap[AKEYCODE_PICTSYMBOLS] = IRR_KEY_UNKNOWN;
|
||||
KeyMap[AKEYCODE_SWITCH_CHARSET] = IRR_KEY_UNKNOWN;
|
||||
|
||||
// following look like controller inputs
|
||||
KeyMap[96] = KEY_UNKNOWN; // AKEYCODE_BUTTON_A
|
||||
KeyMap[97] = KEY_UNKNOWN; // AKEYCODE_BUTTON_B
|
||||
KeyMap[98] = KEY_UNKNOWN; // AKEYCODE_BUTTON_C
|
||||
KeyMap[99] = KEY_UNKNOWN; // AKEYCODE_BUTTON_X
|
||||
KeyMap[100] = KEY_UNKNOWN; // AKEYCODE_BUTTON_Y
|
||||
KeyMap[101] = KEY_UNKNOWN; // AKEYCODE_BUTTON_Z
|
||||
KeyMap[102] = KEY_UNKNOWN; // AKEYCODE_BUTTON_L1
|
||||
KeyMap[103] = KEY_UNKNOWN; // AKEYCODE_BUTTON_R1
|
||||
KeyMap[104] = KEY_UNKNOWN; // AKEYCODE_BUTTON_L2
|
||||
KeyMap[105] = KEY_UNKNOWN; // AKEYCODE_BUTTON_R2
|
||||
KeyMap[106] = KEY_UNKNOWN; // AKEYCODE_BUTTON_THUMBL
|
||||
KeyMap[107] = KEY_UNKNOWN; // AKEYCODE_BUTTON_THUMBR
|
||||
KeyMap[108] = KEY_UNKNOWN; // AKEYCODE_BUTTON_START
|
||||
KeyMap[109] = KEY_UNKNOWN; // AKEYCODE_BUTTON_SELECT
|
||||
KeyMap[110] = KEY_UNKNOWN; // AKEYCODE_BUTTON_MODE
|
||||
KeyMap[AKEYCODE_BUTTON_A] = IRR_KEY_UNKNOWN;
|
||||
KeyMap[AKEYCODE_BUTTON_B] = IRR_KEY_UNKNOWN;
|
||||
KeyMap[AKEYCODE_BUTTON_C] = IRR_KEY_UNKNOWN;
|
||||
KeyMap[AKEYCODE_BUTTON_X] = IRR_KEY_UNKNOWN;
|
||||
KeyMap[AKEYCODE_BUTTON_Y] = IRR_KEY_UNKNOWN;
|
||||
KeyMap[AKEYCODE_BUTTON_Z] = IRR_KEY_UNKNOWN;
|
||||
KeyMap[AKEYCODE_BUTTON_L1] = IRR_KEY_UNKNOWN;
|
||||
KeyMap[AKEYCODE_BUTTON_R1] = IRR_KEY_UNKNOWN;
|
||||
KeyMap[AKEYCODE_BUTTON_L2] = IRR_KEY_UNKNOWN;
|
||||
KeyMap[AKEYCODE_BUTTON_R2] = IRR_KEY_UNKNOWN;
|
||||
KeyMap[AKEYCODE_BUTTON_THUMBL] = IRR_KEY_UNKNOWN;
|
||||
KeyMap[AKEYCODE_BUTTON_THUMBR] = IRR_KEY_UNKNOWN;
|
||||
KeyMap[AKEYCODE_BUTTON_START] = IRR_KEY_UNKNOWN;
|
||||
KeyMap[AKEYCODE_BUTTON_SELECT] = IRR_KEY_UNKNOWN;
|
||||
KeyMap[AKEYCODE_BUTTON_MODE] = IRR_KEY_UNKNOWN;
|
||||
|
||||
KeyMap[111] = KEY_ESCAPE; // AKEYCODE_ESCAPE
|
||||
KeyMap[112] = KEY_DELETE; // AKEYCODE_FORWARD_DEL
|
||||
KeyMap[113] = KEY_CONTROL; // AKEYCODE_CTRL_LEFT
|
||||
KeyMap[114] = KEY_CONTROL; // AKEYCODE_CTRL_RIGHT
|
||||
KeyMap[115] = KEY_CAPITAL; // AKEYCODE_CAPS_LOCK
|
||||
KeyMap[116] = KEY_SCROLL; // AKEYCODE_SCROLL_LOCK
|
||||
KeyMap[117] = KEY_UNKNOWN; // AKEYCODE_META_LEFT
|
||||
KeyMap[118] = KEY_UNKNOWN; // AKEYCODE_META_RIGHT
|
||||
KeyMap[119] = KEY_UNKNOWN; // AKEYCODE_FUNCTION
|
||||
KeyMap[120] = KEY_SNAPSHOT; // AKEYCODE_SYSRQ
|
||||
KeyMap[121] = KEY_PAUSE; // AKEYCODE_BREAK
|
||||
KeyMap[122] = KEY_HOME; // AKEYCODE_MOVE_HOME
|
||||
KeyMap[123] = KEY_END; // AKEYCODE_MOVE_END
|
||||
KeyMap[124] = KEY_INSERT; // AKEYCODE_INSERT
|
||||
KeyMap[125] = KEY_UNKNOWN; // AKEYCODE_FORWARD
|
||||
KeyMap[126] = KEY_PLAY; // AKEYCODE_MEDIA_PLAY
|
||||
KeyMap[127] = KEY_MEDIA_PLAY_PAUSE; // AKEYCODE_MEDIA_PAUSE
|
||||
KeyMap[128] = KEY_UNKNOWN; // AKEYCODE_MEDIA_CLOSE
|
||||
KeyMap[129] = KEY_UNKNOWN; // AKEYCODE_MEDIA_EJECT
|
||||
KeyMap[130] = KEY_UNKNOWN; // AKEYCODE_MEDIA_RECORD
|
||||
KeyMap[131] = KEY_F1; // AKEYCODE_F1
|
||||
KeyMap[132] = KEY_F2; // AKEYCODE_F2
|
||||
KeyMap[133] = KEY_F3; // AKEYCODE_F3
|
||||
KeyMap[134] = KEY_F4; // AKEYCODE_F4
|
||||
KeyMap[135] = KEY_F5; // AKEYCODE_F5
|
||||
KeyMap[136] = KEY_F6; // AKEYCODE_F6
|
||||
KeyMap[137] = KEY_F7; // AKEYCODE_F7
|
||||
KeyMap[138] = KEY_F8; // AKEYCODE_F8
|
||||
KeyMap[139] = KEY_F9; // AKEYCODE_F9
|
||||
KeyMap[140] = KEY_F10; // AKEYCODE_F10
|
||||
KeyMap[141] = KEY_F11; // AKEYCODE_F11
|
||||
KeyMap[142] = KEY_F12; // AKEYCODE_F12
|
||||
KeyMap[143] = KEY_NUMLOCK; // AKEYCODE_NUM_LOCK
|
||||
KeyMap[144] = KEY_NUMPAD0; // AKEYCODE_NUMPAD_0
|
||||
KeyMap[145] = KEY_NUMPAD1; // AKEYCODE_NUMPAD_1
|
||||
KeyMap[146] = KEY_NUMPAD2; // AKEYCODE_NUMPAD_2
|
||||
KeyMap[147] = KEY_NUMPAD3; // AKEYCODE_NUMPAD_3
|
||||
KeyMap[148] = KEY_NUMPAD4; // AKEYCODE_NUMPAD_4
|
||||
KeyMap[149] = KEY_NUMPAD5; // AKEYCODE_NUMPAD_5
|
||||
KeyMap[150] = KEY_NUMPAD6; // AKEYCODE_NUMPAD_6
|
||||
KeyMap[151] = KEY_NUMPAD7; // AKEYCODE_NUMPAD_7
|
||||
KeyMap[152] = KEY_NUMPAD8; // AKEYCODE_NUMPAD_8
|
||||
KeyMap[153] = KEY_NUMPAD9; // AKEYCODE_NUMPAD_9
|
||||
KeyMap[154] = KEY_DIVIDE; // AKEYCODE_NUMPAD_DIVIDE
|
||||
KeyMap[155] = KEY_MULTIPLY; // AKEYCODE_NUMPAD_MULTIPLY
|
||||
KeyMap[156] = KEY_SUBTRACT; // AKEYCODE_NUMPAD_SUBTRACT
|
||||
KeyMap[157] = KEY_ADD; // AKEYCODE_NUMPAD_ADD
|
||||
KeyMap[158] = KEY_UNKNOWN; // AKEYCODE_NUMPAD_DOT
|
||||
KeyMap[159] = KEY_COMMA; // AKEYCODE_NUMPAD_COMMA
|
||||
KeyMap[160] = KEY_RETURN; // AKEYCODE_NUMPAD_ENTER
|
||||
KeyMap[161] = KEY_UNKNOWN; // AKEYCODE_NUMPAD_EQUALS
|
||||
KeyMap[162] = KEY_UNKNOWN; // AKEYCODE_NUMPAD_LEFT_PAREN
|
||||
KeyMap[163] = KEY_UNKNOWN; // AKEYCODE_NUMPAD_RIGHT_PAREN
|
||||
KeyMap[164] = KEY_VOLUME_MUTE; // AKEYCODE_VOLUME_MUTE
|
||||
KeyMap[165] = KEY_UNKNOWN; // AKEYCODE_INFO
|
||||
KeyMap[166] = KEY_UNKNOWN; // AKEYCODE_CHANNEL_UP
|
||||
KeyMap[167] = KEY_UNKNOWN; // AKEYCODE_CHANNEL_DOWN
|
||||
KeyMap[168] = KEY_ZOOM; // AKEYCODE_ZOOM_IN
|
||||
KeyMap[169] = KEY_UNKNOWN; // AKEYCODE_ZOOM_OUT
|
||||
KeyMap[170] = KEY_UNKNOWN; // AKEYCODE_TV
|
||||
KeyMap[171] = KEY_UNKNOWN; // AKEYCODE_WINDOW
|
||||
KeyMap[172] = KEY_UNKNOWN; // AKEYCODE_GUIDE
|
||||
KeyMap[173] = KEY_UNKNOWN; // AKEYCODE_DVR
|
||||
KeyMap[174] = KEY_UNKNOWN; // AKEYCODE_BOOKMARK
|
||||
KeyMap[175] = KEY_UNKNOWN; // AKEYCODE_CAPTIONS
|
||||
KeyMap[176] = KEY_UNKNOWN; // AKEYCODE_SETTINGS
|
||||
KeyMap[177] = KEY_UNKNOWN; // AKEYCODE_TV_POWER
|
||||
KeyMap[178] = KEY_UNKNOWN; // AKEYCODE_TV_INPUT
|
||||
KeyMap[179] = KEY_UNKNOWN; // AKEYCODE_STB_POWER
|
||||
KeyMap[180] = KEY_UNKNOWN; // AKEYCODE_STB_INPUT
|
||||
KeyMap[181] = KEY_UNKNOWN; // AKEYCODE_AVR_POWER
|
||||
KeyMap[182] = KEY_UNKNOWN; // AKEYCODE_AVR_INPUT
|
||||
KeyMap[183] = KEY_UNKNOWN; // AKEYCODE_PROG_RED
|
||||
KeyMap[184] = KEY_UNKNOWN; // AKEYCODE_PROG_GREEN
|
||||
KeyMap[185] = KEY_UNKNOWN; // AKEYCODE_PROG_YELLOW
|
||||
KeyMap[186] = KEY_UNKNOWN; // AKEYCODE_PROG_BLUE
|
||||
KeyMap[187] = KEY_UNKNOWN; // AKEYCODE_APP_SWITCH
|
||||
KeyMap[188] = KEY_UNKNOWN; // AKEYCODE_BUTTON_1
|
||||
KeyMap[189] = KEY_UNKNOWN; // AKEYCODE_BUTTON_2
|
||||
KeyMap[190] = KEY_UNKNOWN; // AKEYCODE_BUTTON_3
|
||||
KeyMap[191] = KEY_UNKNOWN; // AKEYCODE_BUTTON_4
|
||||
KeyMap[192] = KEY_UNKNOWN; // AKEYCODE_BUTTON_5
|
||||
KeyMap[193] = KEY_UNKNOWN; // AKEYCODE_BUTTON_6
|
||||
KeyMap[194] = KEY_UNKNOWN; // AKEYCODE_BUTTON_7
|
||||
KeyMap[195] = KEY_UNKNOWN; // AKEYCODE_BUTTON_8
|
||||
KeyMap[196] = KEY_UNKNOWN; // AKEYCODE_BUTTON_9
|
||||
KeyMap[197] = KEY_UNKNOWN; // AKEYCODE_BUTTON_10
|
||||
KeyMap[198] = KEY_UNKNOWN; // AKEYCODE_BUTTON_11
|
||||
KeyMap[199] = KEY_UNKNOWN; // AKEYCODE_BUTTON_12
|
||||
KeyMap[200] = KEY_UNKNOWN; // AKEYCODE_BUTTON_13
|
||||
KeyMap[201] = KEY_UNKNOWN; // AKEYCODE_BUTTON_14
|
||||
KeyMap[202] = KEY_UNKNOWN; // AKEYCODE_BUTTON_15
|
||||
KeyMap[203] = KEY_UNKNOWN; // AKEYCODE_BUTTON_16
|
||||
KeyMap[204] = KEY_UNKNOWN; // AKEYCODE_LANGUAGE_SWITCH
|
||||
KeyMap[205] = KEY_UNKNOWN; // AKEYCODE_MANNER_MODE
|
||||
KeyMap[206] = KEY_UNKNOWN; // AKEYCODE_3D_MODE
|
||||
KeyMap[207] = KEY_UNKNOWN; // AKEYCODE_CONTACTS
|
||||
KeyMap[208] = KEY_UNKNOWN; // AKEYCODE_CALENDAR
|
||||
KeyMap[209] = KEY_UNKNOWN; // AKEYCODE_MUSIC
|
||||
KeyMap[210] = KEY_UNKNOWN; // AKEYCODE_CALCULATOR
|
||||
KeyMap[211] = KEY_UNKNOWN; // AKEYCODE_ZENKAKU_HANKAKU
|
||||
KeyMap[212] = KEY_UNKNOWN; // AKEYCODE_EISU
|
||||
KeyMap[213] = KEY_UNKNOWN; // AKEYCODE_MUHENKAN
|
||||
KeyMap[214] = KEY_UNKNOWN; // AKEYCODE_HENKAN
|
||||
KeyMap[215] = KEY_UNKNOWN; // AKEYCODE_KATAKANA_HIRAGANA
|
||||
KeyMap[216] = KEY_UNKNOWN; // AKEYCODE_YEN
|
||||
KeyMap[217] = KEY_UNKNOWN; // AKEYCODE_RO
|
||||
KeyMap[218] = KEY_UNKNOWN; // AKEYCODE_KANA
|
||||
KeyMap[219] = KEY_UNKNOWN; // AKEYCODE_ASSIST
|
||||
KeyMap[220] = KEY_UNKNOWN; // AKEYCODE_BRIGHTNESS_DOWN
|
||||
KeyMap[221] = KEY_UNKNOWN; // AKEYCODE_BRIGHTNESS_UP ,
|
||||
KeyMap[222] = KEY_UNKNOWN; // AKEYCODE_MEDIA_AUDIO_TRACK
|
||||
KeyMap[AKEYCODE_ESCAPE] = IRR_KEY_ESCAPE;
|
||||
KeyMap[AKEYCODE_FORWARD_DEL] = IRR_KEY_DELETE;
|
||||
KeyMap[AKEYCODE_CTRL_LEFT] = IRR_KEY_CONTROL;
|
||||
KeyMap[AKEYCODE_CTRL_RIGHT] = IRR_KEY_CONTROL;
|
||||
KeyMap[AKEYCODE_CAPS_LOCK] = IRR_KEY_CAPITAL;
|
||||
KeyMap[AKEYCODE_SCROLL_LOCK] = IRR_KEY_SCROLL;
|
||||
KeyMap[AKEYCODE_META_LEFT] = IRR_KEY_UNKNOWN;
|
||||
KeyMap[AKEYCODE_META_RIGHT] = IRR_KEY_UNKNOWN;
|
||||
KeyMap[AKEYCODE_FUNCTION] = IRR_KEY_UNKNOWN;
|
||||
KeyMap[AKEYCODE_SYSRQ] = IRR_KEY_SNAPSHOT;
|
||||
KeyMap[AKEYCODE_BREAK] = IRR_KEY_PAUSE;
|
||||
KeyMap[AKEYCODE_MOVE_HOME] = IRR_KEY_HOME;
|
||||
KeyMap[AKEYCODE_MOVE_END] = IRR_KEY_END;
|
||||
KeyMap[AKEYCODE_INSERT] = IRR_KEY_INSERT;
|
||||
KeyMap[AKEYCODE_FORWARD] = IRR_KEY_UNKNOWN;
|
||||
KeyMap[AKEYCODE_MEDIA_PLAY] = IRR_KEY_PLAY;
|
||||
KeyMap[AKEYCODE_MEDIA_PAUSE] = IRR_KEY_MEDIA_PLAY_PAUSE;
|
||||
KeyMap[AKEYCODE_MEDIA_CLOSE] = IRR_KEY_UNKNOWN;
|
||||
KeyMap[AKEYCODE_MEDIA_EJECT] = IRR_KEY_UNKNOWN;
|
||||
KeyMap[AKEYCODE_MEDIA_RECORD] = IRR_KEY_UNKNOWN;
|
||||
KeyMap[AKEYCODE_F1] = IRR_KEY_F1;
|
||||
KeyMap[AKEYCODE_F2] = IRR_KEY_F2;
|
||||
KeyMap[AKEYCODE_F3] = IRR_KEY_F3;
|
||||
KeyMap[AKEYCODE_F4] = IRR_KEY_F4;
|
||||
KeyMap[AKEYCODE_F5] = IRR_KEY_F5;
|
||||
KeyMap[AKEYCODE_F6] = IRR_KEY_F6;
|
||||
KeyMap[AKEYCODE_F7] = IRR_KEY_F7;
|
||||
KeyMap[AKEYCODE_F8] = IRR_KEY_F8;
|
||||
KeyMap[AKEYCODE_F9] = IRR_KEY_F9;
|
||||
KeyMap[AKEYCODE_F10] = IRR_KEY_F10;
|
||||
KeyMap[AKEYCODE_F11] = IRR_KEY_F11;
|
||||
KeyMap[AKEYCODE_F12] = IRR_KEY_F12;
|
||||
KeyMap[AKEYCODE_NUM_LOCK] = IRR_KEY_NUMLOCK;
|
||||
KeyMap[AKEYCODE_NUMPAD_0] = IRR_KEY_NUMPAD0;
|
||||
KeyMap[AKEYCODE_NUMPAD_1] = IRR_KEY_NUMPAD1;
|
||||
KeyMap[AKEYCODE_NUMPAD_2] = IRR_KEY_NUMPAD2;
|
||||
KeyMap[AKEYCODE_NUMPAD_3] = IRR_KEY_NUMPAD3;
|
||||
KeyMap[AKEYCODE_NUMPAD_4] = IRR_KEY_NUMPAD4;
|
||||
KeyMap[AKEYCODE_NUMPAD_5] = IRR_KEY_NUMPAD5;
|
||||
KeyMap[AKEYCODE_NUMPAD_6] = IRR_KEY_NUMPAD6;
|
||||
KeyMap[AKEYCODE_NUMPAD_7] = IRR_KEY_NUMPAD7;
|
||||
KeyMap[AKEYCODE_NUMPAD_8] = IRR_KEY_NUMPAD8;
|
||||
KeyMap[AKEYCODE_NUMPAD_9] = IRR_KEY_NUMPAD9;
|
||||
KeyMap[AKEYCODE_NUMPAD_DIVIDE] = IRR_KEY_DIVIDE;
|
||||
KeyMap[AKEYCODE_NUMPAD_MULTIPLY] = IRR_KEY_MULTIPLY;
|
||||
KeyMap[AKEYCODE_NUMPAD_SUBTRACT] = IRR_KEY_SUBTRACT;
|
||||
KeyMap[AKEYCODE_NUMPAD_ADD] = IRR_KEY_ADD;
|
||||
KeyMap[AKEYCODE_NUMPAD_DOT] = IRR_KEY_UNKNOWN;
|
||||
KeyMap[AKEYCODE_NUMPAD_COMMA] = IRR_KEY_COMMA;
|
||||
KeyMap[AKEYCODE_NUMPAD_ENTER] = IRR_KEY_RETURN;
|
||||
KeyMap[AKEYCODE_NUMPAD_EQUALS] = IRR_KEY_UNKNOWN;
|
||||
KeyMap[AKEYCODE_NUMPAD_LEFT_PAREN] = IRR_KEY_UNKNOWN;
|
||||
KeyMap[AKEYCODE_NUMPAD_RIGHT_PAREN] = IRR_KEY_UNKNOWN;
|
||||
KeyMap[AKEYCODE_VOLUME_MUTE] = IRR_KEY_VOLUME_MUTE;
|
||||
KeyMap[AKEYCODE_INFO] = IRR_KEY_UNKNOWN;
|
||||
KeyMap[AKEYCODE_CHANNEL_UP] = IRR_KEY_UNKNOWN;
|
||||
KeyMap[AKEYCODE_CHANNEL_DOWN] = IRR_KEY_UNKNOWN;
|
||||
KeyMap[AKEYCODE_ZOOM_IN] = IRR_KEY_ZOOM;
|
||||
KeyMap[AKEYCODE_ZOOM_OUT] = IRR_KEY_UNKNOWN;
|
||||
KeyMap[AKEYCODE_TV] = IRR_KEY_UNKNOWN;
|
||||
KeyMap[AKEYCODE_WINDOW] = IRR_KEY_UNKNOWN;
|
||||
KeyMap[AKEYCODE_GUIDE] = IRR_KEY_UNKNOWN;
|
||||
KeyMap[AKEYCODE_DVR] = IRR_KEY_UNKNOWN;
|
||||
KeyMap[AKEYCODE_BOOKMARK] = IRR_KEY_UNKNOWN;
|
||||
KeyMap[AKEYCODE_CAPTIONS] = IRR_KEY_UNKNOWN;
|
||||
KeyMap[AKEYCODE_SETTINGS] = IRR_KEY_UNKNOWN;
|
||||
KeyMap[AKEYCODE_TV_POWER] = IRR_KEY_UNKNOWN;
|
||||
KeyMap[AKEYCODE_TV_INPUT] = IRR_KEY_UNKNOWN;
|
||||
KeyMap[AKEYCODE_STB_POWER] = IRR_KEY_UNKNOWN;
|
||||
KeyMap[AKEYCODE_STB_INPUT] = IRR_KEY_UNKNOWN;
|
||||
KeyMap[AKEYCODE_AVR_POWER] = IRR_KEY_UNKNOWN;
|
||||
KeyMap[AKEYCODE_AVR_INPUT] = IRR_KEY_UNKNOWN;
|
||||
KeyMap[AKEYCODE_PROG_RED] = IRR_KEY_UNKNOWN;
|
||||
KeyMap[AKEYCODE_PROG_GREEN] = IRR_KEY_UNKNOWN;
|
||||
KeyMap[AKEYCODE_PROG_YELLOW] = IRR_KEY_UNKNOWN;
|
||||
KeyMap[AKEYCODE_PROG_BLUE] = IRR_KEY_UNKNOWN;
|
||||
KeyMap[AKEYCODE_APP_SWITCH] = IRR_KEY_UNKNOWN;
|
||||
KeyMap[AKEYCODE_BUTTON_1] = IRR_KEY_UNKNOWN;
|
||||
KeyMap[AKEYCODE_BUTTON_2] = IRR_KEY_UNKNOWN;
|
||||
KeyMap[AKEYCODE_BUTTON_3] = IRR_KEY_UNKNOWN;
|
||||
KeyMap[AKEYCODE_BUTTON_4] = IRR_KEY_UNKNOWN;
|
||||
KeyMap[AKEYCODE_BUTTON_5] = IRR_KEY_UNKNOWN;
|
||||
KeyMap[AKEYCODE_BUTTON_6] = IRR_KEY_UNKNOWN;
|
||||
KeyMap[AKEYCODE_BUTTON_7] = IRR_KEY_UNKNOWN;
|
||||
KeyMap[AKEYCODE_BUTTON_8] = IRR_KEY_UNKNOWN;
|
||||
KeyMap[AKEYCODE_BUTTON_9] = IRR_KEY_UNKNOWN;
|
||||
KeyMap[AKEYCODE_BUTTON_10] = IRR_KEY_UNKNOWN;
|
||||
KeyMap[AKEYCODE_BUTTON_11] = IRR_KEY_UNKNOWN;
|
||||
KeyMap[AKEYCODE_BUTTON_12] = IRR_KEY_UNKNOWN;
|
||||
KeyMap[AKEYCODE_BUTTON_13] = IRR_KEY_UNKNOWN;
|
||||
KeyMap[AKEYCODE_BUTTON_14] = IRR_KEY_UNKNOWN;
|
||||
KeyMap[AKEYCODE_BUTTON_15] = IRR_KEY_UNKNOWN;
|
||||
KeyMap[AKEYCODE_BUTTON_16] = IRR_KEY_UNKNOWN;
|
||||
KeyMap[AKEYCODE_LANGUAGE_SWITCH] = IRR_KEY_UNKNOWN;
|
||||
KeyMap[AKEYCODE_MANNER_MODE] = IRR_KEY_UNKNOWN;
|
||||
KeyMap[AKEYCODE_3D_MODE] = IRR_KEY_UNKNOWN;
|
||||
KeyMap[AKEYCODE_CONTACTS] = IRR_KEY_UNKNOWN;
|
||||
KeyMap[AKEYCODE_CALENDAR] = IRR_KEY_UNKNOWN;
|
||||
KeyMap[AKEYCODE_MUSIC] = IRR_KEY_UNKNOWN;
|
||||
KeyMap[AKEYCODE_CALCULATOR] = IRR_KEY_UNKNOWN;
|
||||
KeyMap[AKEYCODE_ZENKAKU_HANKAKU] = IRR_KEY_UNKNOWN;
|
||||
KeyMap[AKEYCODE_EISU] = IRR_KEY_UNKNOWN;
|
||||
KeyMap[AKEYCODE_MUHENKAN] = IRR_KEY_UNKNOWN;
|
||||
KeyMap[AKEYCODE_HENKAN] = IRR_KEY_UNKNOWN;
|
||||
KeyMap[AKEYCODE_KATAKANA_HIRAGANA] = IRR_KEY_UNKNOWN;
|
||||
KeyMap[AKEYCODE_YEN] = IRR_KEY_UNKNOWN;
|
||||
KeyMap[AKEYCODE_RO] = IRR_KEY_UNKNOWN;
|
||||
KeyMap[AKEYCODE_KANA] = IRR_KEY_UNKNOWN;
|
||||
KeyMap[AKEYCODE_ASSIST] = IRR_KEY_UNKNOWN;
|
||||
KeyMap[AKEYCODE_BRIGHTNESS_DOWN] = IRR_KEY_UNKNOWN;
|
||||
KeyMap[AKEYCODE_BRIGHTNESS_UP] = IRR_KEY_UNKNOWN;
|
||||
KeyMap[AKEYCODE_MEDIA_AUDIO_TRACK] = IRR_KEY_UNKNOWN;
|
||||
}
|
||||
|
||||
void CIrrDeviceAndroid::getKeyChar(SEvent& event)
|
||||
|
@ -18,6 +18,8 @@
|
||||
#include "IImagePresenter.h"
|
||||
#include "ICursorControl.h"
|
||||
|
||||
#include <map>
|
||||
|
||||
|
||||
namespace irr
|
||||
{
|
||||
@ -35,6 +37,7 @@ namespace irr
|
||||
virtual void yield();
|
||||
virtual void sleep(u32 timeMs, bool pauseTimer=false);
|
||||
virtual void setWindowCaption(const wchar_t* text);
|
||||
virtual void setWindowClass(const char* text) {}
|
||||
virtual bool present(video::IImage* surface, void* windowId, core::rect<s32>* srcClip);
|
||||
virtual bool isWindowActive() const;
|
||||
virtual bool isWindowFocused() const;
|
||||
@ -53,7 +56,6 @@ namespace irr
|
||||
virtual bool deactivateGyroscope();
|
||||
virtual bool isGyroscopeActive();
|
||||
virtual bool isGyroscopeAvailable();
|
||||
video::IVideoModeList* getVideoModeList();
|
||||
|
||||
class CCursorControl : public gui::ICursorControl
|
||||
{
|
||||
@ -103,16 +105,16 @@ namespace irr
|
||||
static bool IsPaused;
|
||||
static bool IsFocused;
|
||||
static bool IsStarted;
|
||||
static bool IsClosing;
|
||||
|
||||
bool IsMousePressed;
|
||||
|
||||
video::SExposedVideoData ExposedVideoData;
|
||||
|
||||
core::array<EKEY_CODE> KeyMap;
|
||||
std::map<int, EKEY_CODE> KeyMap;
|
||||
|
||||
void createDriver();
|
||||
void createKeyMap();
|
||||
void createVideoModeList();
|
||||
void getKeyChar(SEvent& event);
|
||||
video::SExposedVideoData& getExposedVideoData();
|
||||
|
||||
|
@ -59,6 +59,9 @@ namespace irr
|
||||
//! sets the caption of the window
|
||||
virtual void setWindowCaption(const wchar_t* text);
|
||||
|
||||
//! sets the class of the window
|
||||
virtual void setWindowClass(const char* text) {}
|
||||
|
||||
//! returns if window is active. if not, nothing need to be drawn
|
||||
virtual bool isWindowActive() const;
|
||||
|
||||
|
@ -239,30 +239,30 @@ bool CIrrDeviceFB::run()
|
||||
|
||||
switch (ev.code)
|
||||
{
|
||||
case KEY_RIGHTCTRL:
|
||||
case KEY_LEFTCTRL:
|
||||
case IRR_KEY_RIGHTCTRL:
|
||||
case IRR_KEY_LEFTCTRL:
|
||||
irrevent.KeyInput.Control = true;
|
||||
break;
|
||||
case KEY_RIGHTSHIFT:
|
||||
case KEY_LEFTSHIFT:
|
||||
case IRR_KEY_RIGHTSHIFT:
|
||||
case IRR_KEY_LEFTSHIFT:
|
||||
irrevent.KeyInput.Shift = true;
|
||||
break;
|
||||
case KEY_ESC:
|
||||
case IRR_KEY_ESC:
|
||||
irrevent.KeyInput.Key = (EKEY_CODE)0x1B;
|
||||
break;
|
||||
case KEY_SPACE:
|
||||
case IRR_KEY_SPACE:
|
||||
irrevent.KeyInput.Key = (EKEY_CODE)0x20;
|
||||
break;
|
||||
case KEY_UP:
|
||||
case IRR_KEY_UP:
|
||||
irrevent.KeyInput.Key = (EKEY_CODE)0x26;
|
||||
break;
|
||||
case KEY_LEFT:
|
||||
case IRR_KEY_LEFT:
|
||||
irrevent.KeyInput.Key = (EKEY_CODE)0x25;
|
||||
break;
|
||||
case KEY_RIGHT:
|
||||
case IRR_KEY_RIGHT:
|
||||
irrevent.KeyInput.Key = (EKEY_CODE)0x27;
|
||||
break;
|
||||
case KEY_DOWN:
|
||||
case IRR_KEY_DOWN:
|
||||
irrevent.KeyInput.Key = (EKEY_CODE)0x28;
|
||||
break;
|
||||
default:
|
||||
|
@ -45,6 +45,9 @@ namespace irr
|
||||
//! sets the caption of the window
|
||||
virtual void setWindowCaption(const wchar_t* text);
|
||||
|
||||
//! sets the class of the window
|
||||
virtual void setWindowClass(const char* text) {}
|
||||
|
||||
//! returns if window is active. if not, nothing need to be drawn
|
||||
virtual bool isWindowActive() const;
|
||||
|
||||
|
@ -29,6 +29,14 @@ extern bool GLContextDebugBit;
|
||||
#include <X11/XKBlib.h>
|
||||
#include <X11/Xatom.h>
|
||||
|
||||
#ifdef _IRR_COMPILE_WITH_OPENGL_
|
||||
#include <GL/gl.h>
|
||||
#ifdef _IRR_OPENGL_USE_EXTPOINTER_
|
||||
#define GLX_GLXEXT_PROTOTYPES
|
||||
#include "glxext.h"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef _IRR_LINUX_XCURSOR_
|
||||
#include <X11/Xcursor/Xcursor.h>
|
||||
#endif
|
||||
@ -516,6 +524,7 @@ void IrrPrintXGrabError(int grabResult, const c8 * grabCommand )
|
||||
#endif
|
||||
|
||||
#ifdef _IRR_COMPILE_WITH_OPENGL_
|
||||
#ifdef _IRR_COMPILE_WITH_X11_
|
||||
static GLXContext getMeAGLContext(Display *display, GLXFBConfig glxFBConfig, bool force_legacy_context)
|
||||
{
|
||||
GLXContext Context;
|
||||
@ -600,7 +609,7 @@ static GLXContext getMeAGLContext(Display *display, GLXFBConfig glxFBConfig, boo
|
||||
Context = glXCreateNewContext(display, glxFBConfig, GLX_RGBA_TYPE, NULL, True);
|
||||
return Context;
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
bool CIrrDeviceLinux::createWindow()
|
||||
@ -664,11 +673,15 @@ bool CIrrDeviceLinux::createWindow()
|
||||
#elif defined(GLX_SGIS_multisample)
|
||||
GLX_SAMPLE_BUFFERS_SGIS, 1,
|
||||
GLX_SAMPLES_SGIS, CreationParams.AntiAlias, // 18,19
|
||||
#else
|
||||
#error
|
||||
#endif
|
||||
#ifdef GLX_ARB_framebuffer_sRGB
|
||||
GLX_FRAMEBUFFER_SRGB_CAPABLE_ARB, CreationParams.HandleSRGB,
|
||||
#elif defined(GLX_EXT_framebuffer_sRGB)
|
||||
GLX_FRAMEBUFFER_SRGB_CAPABLE_EXT, CreationParams.HandleSRGB,
|
||||
#else
|
||||
#error
|
||||
#endif
|
||||
GLX_STEREO, CreationParams.Stereobuffer?True:False,
|
||||
None
|
||||
@ -710,6 +723,39 @@ bool CIrrDeviceLinux::createWindow()
|
||||
}
|
||||
}
|
||||
}
|
||||
// Try to disable sRGB framebuffer
|
||||
if (!configList && CreationParams.HandleSRGB)
|
||||
{
|
||||
os::Printer::log("No sRGB framebuffer available.", ELL_WARNING);
|
||||
CreationParams.HandleSRGB=false;
|
||||
visualAttrBuffer[21] = GLX_DONT_CARE;
|
||||
configList=glxChooseFBConfig(display, screennr, visualAttrBuffer,&nitems);
|
||||
if (!configList && CreationParams.AntiAlias)
|
||||
{
|
||||
while (!configList && (visualAttrBuffer[19]>1))
|
||||
{
|
||||
visualAttrBuffer[19] -= 1;
|
||||
configList=glxChooseFBConfig(display, screennr, visualAttrBuffer,&nitems);
|
||||
}
|
||||
if (!configList)
|
||||
{
|
||||
visualAttrBuffer[17] = 0;
|
||||
visualAttrBuffer[19] = 0;
|
||||
configList=glxChooseFBConfig(display, screennr, visualAttrBuffer,&nitems);
|
||||
if (configList)
|
||||
{
|
||||
os::Printer::log("No FSAA available.", ELL_WARNING);
|
||||
CreationParams.AntiAlias=0;
|
||||
}
|
||||
else
|
||||
{
|
||||
//reenable multisampling
|
||||
visualAttrBuffer[17] = 1;
|
||||
visualAttrBuffer[19] = CreationParams.AntiAlias;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// Next try with flipped stencil buffer value
|
||||
// If the first round was with stencil flag it's now without
|
||||
// Other way round also makes sense because some configs
|
||||
@ -1209,6 +1255,9 @@ bool CIrrDeviceLinux::createInputContext()
|
||||
return false;
|
||||
}
|
||||
|
||||
// It's showed as memory leak, but we shouldn't delete it. From the xlib
|
||||
// documentation: "The returned modifiers string is owned by Xlib and
|
||||
// should not be modified or freed by the client."
|
||||
char* p = XSetLocaleModifiers("");
|
||||
if (p == NULL)
|
||||
{
|
||||
@ -1823,6 +1872,22 @@ void CIrrDeviceLinux::setWindowCaption(const wchar_t* text)
|
||||
#endif
|
||||
}
|
||||
|
||||
//! sets the class of the window
|
||||
void CIrrDeviceLinux::setWindowClass(const char* text)
|
||||
{
|
||||
#ifdef _IRR_COMPILE_WITH_X11_
|
||||
if (CreationParams.DriverType == video::EDT_NULL)
|
||||
return;
|
||||
|
||||
// Set class hints on Linux, used by Window Managers.
|
||||
XClassHint* classhint = XAllocClassHint();
|
||||
classhint->res_name = (char*)text;
|
||||
classhint->res_class = (char*)text;
|
||||
XSetClassHint(display, window, classhint);
|
||||
XFree(classhint);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
//! presents a surface in the client area
|
||||
bool CIrrDeviceLinux::present(video::IImage* image, void* windowId, core::rect<s32>* srcRect)
|
||||
@ -2138,194 +2203,194 @@ void CIrrDeviceLinux::createKeyMap()
|
||||
|
||||
#ifdef _IRR_COMPILE_WITH_X11_
|
||||
KeyMap.reallocate(190);
|
||||
KeyMap.push_back(SKeyMap(XK_BackSpace, KEY_BACK));
|
||||
KeyMap.push_back(SKeyMap(XK_Tab, KEY_TAB));
|
||||
KeyMap.push_back(SKeyMap(XK_ISO_Left_Tab, KEY_TAB));
|
||||
KeyMap.push_back(SKeyMap(XK_BackSpace, IRR_KEY_BACK));
|
||||
KeyMap.push_back(SKeyMap(XK_Tab, IRR_KEY_TAB));
|
||||
KeyMap.push_back(SKeyMap(XK_ISO_Left_Tab, IRR_KEY_TAB));
|
||||
KeyMap.push_back(SKeyMap(XK_Linefeed, 0)); // ???
|
||||
KeyMap.push_back(SKeyMap(XK_Clear, KEY_CLEAR));
|
||||
KeyMap.push_back(SKeyMap(XK_Return, KEY_RETURN));
|
||||
KeyMap.push_back(SKeyMap(XK_Pause, KEY_PAUSE));
|
||||
KeyMap.push_back(SKeyMap(XK_Scroll_Lock, KEY_SCROLL));
|
||||
KeyMap.push_back(SKeyMap(XK_Clear, IRR_KEY_CLEAR));
|
||||
KeyMap.push_back(SKeyMap(XK_Return, IRR_KEY_RETURN));
|
||||
KeyMap.push_back(SKeyMap(XK_Pause, IRR_KEY_PAUSE));
|
||||
KeyMap.push_back(SKeyMap(XK_Scroll_Lock, IRR_KEY_SCROLL));
|
||||
KeyMap.push_back(SKeyMap(XK_Sys_Req, 0)); // ???
|
||||
KeyMap.push_back(SKeyMap(XK_Escape, KEY_ESCAPE));
|
||||
KeyMap.push_back(SKeyMap(XK_Insert, KEY_INSERT));
|
||||
KeyMap.push_back(SKeyMap(XK_Delete, KEY_DELETE));
|
||||
KeyMap.push_back(SKeyMap(XK_Home, KEY_HOME));
|
||||
KeyMap.push_back(SKeyMap(XK_Left, KEY_LEFT));
|
||||
KeyMap.push_back(SKeyMap(XK_Up, KEY_UP));
|
||||
KeyMap.push_back(SKeyMap(XK_Right, KEY_RIGHT));
|
||||
KeyMap.push_back(SKeyMap(XK_Down, KEY_DOWN));
|
||||
KeyMap.push_back(SKeyMap(XK_Prior, KEY_PRIOR));
|
||||
KeyMap.push_back(SKeyMap(XK_Page_Up, KEY_PRIOR));
|
||||
KeyMap.push_back(SKeyMap(XK_Next, KEY_NEXT));
|
||||
KeyMap.push_back(SKeyMap(XK_Page_Down, KEY_NEXT));
|
||||
KeyMap.push_back(SKeyMap(XK_End, KEY_END));
|
||||
KeyMap.push_back(SKeyMap(XK_Begin, KEY_HOME));
|
||||
KeyMap.push_back(SKeyMap(XK_Num_Lock, KEY_NUMLOCK));
|
||||
KeyMap.push_back(SKeyMap(XK_KP_Space, KEY_SPACE));
|
||||
KeyMap.push_back(SKeyMap(XK_KP_Tab, KEY_TAB));
|
||||
KeyMap.push_back(SKeyMap(XK_KP_Enter, KEY_RETURN));
|
||||
KeyMap.push_back(SKeyMap(XK_KP_F1, KEY_F1));
|
||||
KeyMap.push_back(SKeyMap(XK_KP_F2, KEY_F2));
|
||||
KeyMap.push_back(SKeyMap(XK_KP_F3, KEY_F3));
|
||||
KeyMap.push_back(SKeyMap(XK_KP_F4, KEY_F4));
|
||||
KeyMap.push_back(SKeyMap(XK_KP_Home, KEY_HOME));
|
||||
KeyMap.push_back(SKeyMap(XK_KP_Left, KEY_LEFT));
|
||||
KeyMap.push_back(SKeyMap(XK_KP_Up, KEY_UP));
|
||||
KeyMap.push_back(SKeyMap(XK_KP_Right, KEY_RIGHT));
|
||||
KeyMap.push_back(SKeyMap(XK_KP_Down, KEY_DOWN));
|
||||
KeyMap.push_back(SKeyMap(XK_Print, KEY_PRINT));
|
||||
KeyMap.push_back(SKeyMap(XK_KP_Prior, KEY_PRIOR));
|
||||
KeyMap.push_back(SKeyMap(XK_KP_Page_Up, KEY_PRIOR));
|
||||
KeyMap.push_back(SKeyMap(XK_KP_Next, KEY_NEXT));
|
||||
KeyMap.push_back(SKeyMap(XK_KP_Page_Down, KEY_NEXT));
|
||||
KeyMap.push_back(SKeyMap(XK_KP_End, KEY_END));
|
||||
KeyMap.push_back(SKeyMap(XK_KP_Begin, KEY_HOME));
|
||||
KeyMap.push_back(SKeyMap(XK_KP_Insert, KEY_INSERT));
|
||||
KeyMap.push_back(SKeyMap(XK_KP_Delete, KEY_DELETE));
|
||||
KeyMap.push_back(SKeyMap(XK_Escape, IRR_KEY_ESCAPE));
|
||||
KeyMap.push_back(SKeyMap(XK_Insert, IRR_KEY_INSERT));
|
||||
KeyMap.push_back(SKeyMap(XK_Delete, IRR_KEY_DELETE));
|
||||
KeyMap.push_back(SKeyMap(XK_Home, IRR_KEY_HOME));
|
||||
KeyMap.push_back(SKeyMap(XK_Left, IRR_KEY_LEFT));
|
||||
KeyMap.push_back(SKeyMap(XK_Up, IRR_KEY_UP));
|
||||
KeyMap.push_back(SKeyMap(XK_Right, IRR_KEY_RIGHT));
|
||||
KeyMap.push_back(SKeyMap(XK_Down, IRR_KEY_DOWN));
|
||||
KeyMap.push_back(SKeyMap(XK_Prior, IRR_KEY_PRIOR));
|
||||
KeyMap.push_back(SKeyMap(XK_Page_Up, IRR_KEY_PRIOR));
|
||||
KeyMap.push_back(SKeyMap(XK_Next, IRR_KEY_NEXT));
|
||||
KeyMap.push_back(SKeyMap(XK_Page_Down, IRR_KEY_NEXT));
|
||||
KeyMap.push_back(SKeyMap(XK_End, IRR_KEY_END));
|
||||
KeyMap.push_back(SKeyMap(XK_Begin, IRR_KEY_HOME));
|
||||
KeyMap.push_back(SKeyMap(XK_Num_Lock, IRR_KEY_NUMLOCK));
|
||||
KeyMap.push_back(SKeyMap(XK_KP_Space, IRR_KEY_SPACE));
|
||||
KeyMap.push_back(SKeyMap(XK_KP_Tab, IRR_KEY_TAB));
|
||||
KeyMap.push_back(SKeyMap(XK_KP_Enter, IRR_KEY_RETURN));
|
||||
KeyMap.push_back(SKeyMap(XK_KP_F1, IRR_KEY_F1));
|
||||
KeyMap.push_back(SKeyMap(XK_KP_F2, IRR_KEY_F2));
|
||||
KeyMap.push_back(SKeyMap(XK_KP_F3, IRR_KEY_F3));
|
||||
KeyMap.push_back(SKeyMap(XK_KP_F4, IRR_KEY_F4));
|
||||
KeyMap.push_back(SKeyMap(XK_KP_Home, IRR_KEY_HOME));
|
||||
KeyMap.push_back(SKeyMap(XK_KP_Left, IRR_KEY_LEFT));
|
||||
KeyMap.push_back(SKeyMap(XK_KP_Up, IRR_KEY_UP));
|
||||
KeyMap.push_back(SKeyMap(XK_KP_Right, IRR_KEY_RIGHT));
|
||||
KeyMap.push_back(SKeyMap(XK_KP_Down, IRR_KEY_DOWN));
|
||||
KeyMap.push_back(SKeyMap(XK_Print, IRR_KEY_PRINT));
|
||||
KeyMap.push_back(SKeyMap(XK_KP_Prior, IRR_KEY_PRIOR));
|
||||
KeyMap.push_back(SKeyMap(XK_KP_Page_Up, IRR_KEY_PRIOR));
|
||||
KeyMap.push_back(SKeyMap(XK_KP_Next, IRR_KEY_NEXT));
|
||||
KeyMap.push_back(SKeyMap(XK_KP_Page_Down, IRR_KEY_NEXT));
|
||||
KeyMap.push_back(SKeyMap(XK_KP_End, IRR_KEY_END));
|
||||
KeyMap.push_back(SKeyMap(XK_KP_Begin, IRR_KEY_HOME));
|
||||
KeyMap.push_back(SKeyMap(XK_KP_Insert, IRR_KEY_INSERT));
|
||||
KeyMap.push_back(SKeyMap(XK_KP_Delete, IRR_KEY_DELETE));
|
||||
KeyMap.push_back(SKeyMap(XK_KP_Equal, 0)); // ???
|
||||
KeyMap.push_back(SKeyMap(XK_KP_Multiply, KEY_MULTIPLY));
|
||||
KeyMap.push_back(SKeyMap(XK_KP_Add, KEY_ADD));
|
||||
KeyMap.push_back(SKeyMap(XK_KP_Separator, KEY_SEPARATOR));
|
||||
KeyMap.push_back(SKeyMap(XK_KP_Subtract, KEY_SUBTRACT));
|
||||
KeyMap.push_back(SKeyMap(XK_KP_Decimal, KEY_DECIMAL));
|
||||
KeyMap.push_back(SKeyMap(XK_KP_Divide, KEY_DIVIDE));
|
||||
KeyMap.push_back(SKeyMap(XK_KP_0, KEY_NUMPAD0));
|
||||
KeyMap.push_back(SKeyMap(XK_KP_1, KEY_NUMPAD1));
|
||||
KeyMap.push_back(SKeyMap(XK_KP_2, KEY_NUMPAD2));
|
||||
KeyMap.push_back(SKeyMap(XK_KP_3, KEY_NUMPAD3));
|
||||
KeyMap.push_back(SKeyMap(XK_KP_4, KEY_NUMPAD4));
|
||||
KeyMap.push_back(SKeyMap(XK_KP_5, KEY_NUMPAD5));
|
||||
KeyMap.push_back(SKeyMap(XK_KP_6, KEY_NUMPAD6));
|
||||
KeyMap.push_back(SKeyMap(XK_KP_7, KEY_NUMPAD7));
|
||||
KeyMap.push_back(SKeyMap(XK_KP_8, KEY_NUMPAD8));
|
||||
KeyMap.push_back(SKeyMap(XK_KP_9, KEY_NUMPAD9));
|
||||
KeyMap.push_back(SKeyMap(XK_F1, KEY_F1));
|
||||
KeyMap.push_back(SKeyMap(XK_F2, KEY_F2));
|
||||
KeyMap.push_back(SKeyMap(XK_F3, KEY_F3));
|
||||
KeyMap.push_back(SKeyMap(XK_F4, KEY_F4));
|
||||
KeyMap.push_back(SKeyMap(XK_F5, KEY_F5));
|
||||
KeyMap.push_back(SKeyMap(XK_F6, KEY_F6));
|
||||
KeyMap.push_back(SKeyMap(XK_F7, KEY_F7));
|
||||
KeyMap.push_back(SKeyMap(XK_F8, KEY_F8));
|
||||
KeyMap.push_back(SKeyMap(XK_F9, KEY_F9));
|
||||
KeyMap.push_back(SKeyMap(XK_F10, KEY_F10));
|
||||
KeyMap.push_back(SKeyMap(XK_F11, KEY_F11));
|
||||
KeyMap.push_back(SKeyMap(XK_F12, KEY_F12));
|
||||
KeyMap.push_back(SKeyMap(XK_Shift_L, KEY_LSHIFT));
|
||||
KeyMap.push_back(SKeyMap(XK_Shift_R, KEY_RSHIFT));
|
||||
KeyMap.push_back(SKeyMap(XK_Control_L, KEY_LCONTROL));
|
||||
KeyMap.push_back(SKeyMap(XK_Control_R, KEY_RCONTROL));
|
||||
KeyMap.push_back(SKeyMap(XK_Caps_Lock, KEY_CAPITAL));
|
||||
KeyMap.push_back(SKeyMap(XK_Shift_Lock, KEY_CAPITAL));
|
||||
KeyMap.push_back(SKeyMap(XK_Meta_L, KEY_LWIN));
|
||||
KeyMap.push_back(SKeyMap(XK_Meta_R, KEY_RWIN));
|
||||
KeyMap.push_back(SKeyMap(XK_Alt_L, KEY_LMENU));
|
||||
KeyMap.push_back(SKeyMap(XK_Alt_R, KEY_RMENU));
|
||||
KeyMap.push_back(SKeyMap(XK_ISO_Level3_Shift, KEY_RMENU));
|
||||
KeyMap.push_back(SKeyMap(XK_Menu, KEY_MENU));
|
||||
KeyMap.push_back(SKeyMap(XK_space, KEY_SPACE));
|
||||
KeyMap.push_back(SKeyMap(XK_KP_Multiply, IRR_KEY_MULTIPLY));
|
||||
KeyMap.push_back(SKeyMap(XK_KP_Add, IRR_KEY_ADD));
|
||||
KeyMap.push_back(SKeyMap(XK_KP_Separator, IRR_KEY_SEPARATOR));
|
||||
KeyMap.push_back(SKeyMap(XK_KP_Subtract, IRR_KEY_SUBTRACT));
|
||||
KeyMap.push_back(SKeyMap(XK_KP_Decimal, IRR_KEY_DECIMAL));
|
||||
KeyMap.push_back(SKeyMap(XK_KP_Divide, IRR_KEY_DIVIDE));
|
||||
KeyMap.push_back(SKeyMap(XK_KP_0, IRR_KEY_NUMPAD0));
|
||||
KeyMap.push_back(SKeyMap(XK_KP_1, IRR_KEY_NUMPAD1));
|
||||
KeyMap.push_back(SKeyMap(XK_KP_2, IRR_KEY_NUMPAD2));
|
||||
KeyMap.push_back(SKeyMap(XK_KP_3, IRR_KEY_NUMPAD3));
|
||||
KeyMap.push_back(SKeyMap(XK_KP_4, IRR_KEY_NUMPAD4));
|
||||
KeyMap.push_back(SKeyMap(XK_KP_5, IRR_KEY_NUMPAD5));
|
||||
KeyMap.push_back(SKeyMap(XK_KP_6, IRR_KEY_NUMPAD6));
|
||||
KeyMap.push_back(SKeyMap(XK_KP_7, IRR_KEY_NUMPAD7));
|
||||
KeyMap.push_back(SKeyMap(XK_KP_8, IRR_KEY_NUMPAD8));
|
||||
KeyMap.push_back(SKeyMap(XK_KP_9, IRR_KEY_NUMPAD9));
|
||||
KeyMap.push_back(SKeyMap(XK_F1, IRR_KEY_F1));
|
||||
KeyMap.push_back(SKeyMap(XK_F2, IRR_KEY_F2));
|
||||
KeyMap.push_back(SKeyMap(XK_F3, IRR_KEY_F3));
|
||||
KeyMap.push_back(SKeyMap(XK_F4, IRR_KEY_F4));
|
||||
KeyMap.push_back(SKeyMap(XK_F5, IRR_KEY_F5));
|
||||
KeyMap.push_back(SKeyMap(XK_F6, IRR_KEY_F6));
|
||||
KeyMap.push_back(SKeyMap(XK_F7, IRR_KEY_F7));
|
||||
KeyMap.push_back(SKeyMap(XK_F8, IRR_KEY_F8));
|
||||
KeyMap.push_back(SKeyMap(XK_F9, IRR_KEY_F9));
|
||||
KeyMap.push_back(SKeyMap(XK_F10, IRR_KEY_F10));
|
||||
KeyMap.push_back(SKeyMap(XK_F11, IRR_KEY_F11));
|
||||
KeyMap.push_back(SKeyMap(XK_F12, IRR_KEY_F12));
|
||||
KeyMap.push_back(SKeyMap(XK_Shift_L, IRR_KEY_LSHIFT));
|
||||
KeyMap.push_back(SKeyMap(XK_Shift_R, IRR_KEY_RSHIFT));
|
||||
KeyMap.push_back(SKeyMap(XK_Control_L, IRR_KEY_LCONTROL));
|
||||
KeyMap.push_back(SKeyMap(XK_Control_R, IRR_KEY_RCONTROL));
|
||||
KeyMap.push_back(SKeyMap(XK_Caps_Lock, IRR_KEY_CAPITAL));
|
||||
KeyMap.push_back(SKeyMap(XK_Shift_Lock, IRR_KEY_CAPITAL));
|
||||
KeyMap.push_back(SKeyMap(XK_Meta_L, IRR_KEY_LWIN));
|
||||
KeyMap.push_back(SKeyMap(XK_Meta_R, IRR_KEY_RWIN));
|
||||
KeyMap.push_back(SKeyMap(XK_Alt_L, IRR_KEY_LMENU));
|
||||
KeyMap.push_back(SKeyMap(XK_Alt_R, IRR_KEY_RMENU));
|
||||
KeyMap.push_back(SKeyMap(XK_ISO_Level3_Shift, IRR_KEY_RMENU));
|
||||
KeyMap.push_back(SKeyMap(XK_Menu, IRR_KEY_MENU));
|
||||
KeyMap.push_back(SKeyMap(XK_space, IRR_KEY_SPACE));
|
||||
KeyMap.push_back(SKeyMap(XK_exclam, 0)); //?
|
||||
KeyMap.push_back(SKeyMap(XK_quotedbl, 0)); //?
|
||||
KeyMap.push_back(SKeyMap(XK_section, 0)); //?
|
||||
KeyMap.push_back(SKeyMap(XK_numbersign, KEY_OEM_2));
|
||||
KeyMap.push_back(SKeyMap(XK_numbersign, IRR_KEY_OEM_2));
|
||||
KeyMap.push_back(SKeyMap(XK_dollar, 0)); //?
|
||||
KeyMap.push_back(SKeyMap(XK_percent, 0)); //?
|
||||
KeyMap.push_back(SKeyMap(XK_ampersand, 0)); //?
|
||||
KeyMap.push_back(SKeyMap(XK_apostrophe, KEY_OEM_7));
|
||||
KeyMap.push_back(SKeyMap(XK_apostrophe, IRR_KEY_OEM_7));
|
||||
KeyMap.push_back(SKeyMap(XK_parenleft, 0)); //?
|
||||
KeyMap.push_back(SKeyMap(XK_parenright, 0)); //?
|
||||
KeyMap.push_back(SKeyMap(XK_asterisk, 0)); //?
|
||||
KeyMap.push_back(SKeyMap(XK_plus, KEY_PLUS)); //?
|
||||
KeyMap.push_back(SKeyMap(XK_comma, KEY_COMMA)); //?
|
||||
KeyMap.push_back(SKeyMap(XK_minus, KEY_MINUS)); //?
|
||||
KeyMap.push_back(SKeyMap(XK_period, KEY_PERIOD)); //?
|
||||
KeyMap.push_back(SKeyMap(XK_slash, KEY_OEM_2)); //?
|
||||
KeyMap.push_back(SKeyMap(XK_0, KEY_KEY_0));
|
||||
KeyMap.push_back(SKeyMap(XK_1, KEY_KEY_1));
|
||||
KeyMap.push_back(SKeyMap(XK_2, KEY_KEY_2));
|
||||
KeyMap.push_back(SKeyMap(XK_3, KEY_KEY_3));
|
||||
KeyMap.push_back(SKeyMap(XK_4, KEY_KEY_4));
|
||||
KeyMap.push_back(SKeyMap(XK_5, KEY_KEY_5));
|
||||
KeyMap.push_back(SKeyMap(XK_6, KEY_KEY_6));
|
||||
KeyMap.push_back(SKeyMap(XK_7, KEY_KEY_7));
|
||||
KeyMap.push_back(SKeyMap(XK_8, KEY_KEY_8));
|
||||
KeyMap.push_back(SKeyMap(XK_9, KEY_KEY_9));
|
||||
KeyMap.push_back(SKeyMap(XK_plus, IRR_KEY_PLUS)); //?
|
||||
KeyMap.push_back(SKeyMap(XK_comma, IRR_KEY_COMMA)); //?
|
||||
KeyMap.push_back(SKeyMap(XK_minus, IRR_KEY_MINUS)); //?
|
||||
KeyMap.push_back(SKeyMap(XK_period, IRR_KEY_PERIOD)); //?
|
||||
KeyMap.push_back(SKeyMap(XK_slash, IRR_KEY_OEM_2)); //?
|
||||
KeyMap.push_back(SKeyMap(XK_0, IRR_KEY_0));
|
||||
KeyMap.push_back(SKeyMap(XK_1, IRR_KEY_1));
|
||||
KeyMap.push_back(SKeyMap(XK_2, IRR_KEY_2));
|
||||
KeyMap.push_back(SKeyMap(XK_3, IRR_KEY_3));
|
||||
KeyMap.push_back(SKeyMap(XK_4, IRR_KEY_4));
|
||||
KeyMap.push_back(SKeyMap(XK_5, IRR_KEY_5));
|
||||
KeyMap.push_back(SKeyMap(XK_6, IRR_KEY_6));
|
||||
KeyMap.push_back(SKeyMap(XK_7, IRR_KEY_7));
|
||||
KeyMap.push_back(SKeyMap(XK_8, IRR_KEY_8));
|
||||
KeyMap.push_back(SKeyMap(XK_9, IRR_KEY_9));
|
||||
KeyMap.push_back(SKeyMap(XK_colon, 0)); //?
|
||||
KeyMap.push_back(SKeyMap(XK_semicolon, KEY_OEM_1));
|
||||
KeyMap.push_back(SKeyMap(XK_less, KEY_OEM_102));
|
||||
KeyMap.push_back(SKeyMap(XK_equal, KEY_PLUS));
|
||||
KeyMap.push_back(SKeyMap(XK_semicolon, IRR_KEY_OEM_1));
|
||||
KeyMap.push_back(SKeyMap(XK_less, IRR_KEY_OEM_102));
|
||||
KeyMap.push_back(SKeyMap(XK_equal, IRR_KEY_PLUS));
|
||||
KeyMap.push_back(SKeyMap(XK_greater, 0)); //?
|
||||
KeyMap.push_back(SKeyMap(XK_question, 0)); //?
|
||||
KeyMap.push_back(SKeyMap(XK_at, KEY_KEY_2)); //?
|
||||
KeyMap.push_back(SKeyMap(XK_at, IRR_KEY_2)); //?
|
||||
KeyMap.push_back(SKeyMap(XK_mu, 0)); //?
|
||||
KeyMap.push_back(SKeyMap(XK_EuroSign, 0)); //?
|
||||
KeyMap.push_back(SKeyMap(XK_A, KEY_KEY_A));
|
||||
KeyMap.push_back(SKeyMap(XK_B, KEY_KEY_B));
|
||||
KeyMap.push_back(SKeyMap(XK_C, KEY_KEY_C));
|
||||
KeyMap.push_back(SKeyMap(XK_D, KEY_KEY_D));
|
||||
KeyMap.push_back(SKeyMap(XK_E, KEY_KEY_E));
|
||||
KeyMap.push_back(SKeyMap(XK_F, KEY_KEY_F));
|
||||
KeyMap.push_back(SKeyMap(XK_G, KEY_KEY_G));
|
||||
KeyMap.push_back(SKeyMap(XK_H, KEY_KEY_H));
|
||||
KeyMap.push_back(SKeyMap(XK_I, KEY_KEY_I));
|
||||
KeyMap.push_back(SKeyMap(XK_J, KEY_KEY_J));
|
||||
KeyMap.push_back(SKeyMap(XK_K, KEY_KEY_K));
|
||||
KeyMap.push_back(SKeyMap(XK_L, KEY_KEY_L));
|
||||
KeyMap.push_back(SKeyMap(XK_M, KEY_KEY_M));
|
||||
KeyMap.push_back(SKeyMap(XK_N, KEY_KEY_N));
|
||||
KeyMap.push_back(SKeyMap(XK_O, KEY_KEY_O));
|
||||
KeyMap.push_back(SKeyMap(XK_P, KEY_KEY_P));
|
||||
KeyMap.push_back(SKeyMap(XK_Q, KEY_KEY_Q));
|
||||
KeyMap.push_back(SKeyMap(XK_R, KEY_KEY_R));
|
||||
KeyMap.push_back(SKeyMap(XK_S, KEY_KEY_S));
|
||||
KeyMap.push_back(SKeyMap(XK_T, KEY_KEY_T));
|
||||
KeyMap.push_back(SKeyMap(XK_U, KEY_KEY_U));
|
||||
KeyMap.push_back(SKeyMap(XK_V, KEY_KEY_V));
|
||||
KeyMap.push_back(SKeyMap(XK_W, KEY_KEY_W));
|
||||
KeyMap.push_back(SKeyMap(XK_X, KEY_KEY_X));
|
||||
KeyMap.push_back(SKeyMap(XK_Y, KEY_KEY_Y));
|
||||
KeyMap.push_back(SKeyMap(XK_Z, KEY_KEY_Z));
|
||||
KeyMap.push_back(SKeyMap(XK_bracketleft, KEY_OEM_4));
|
||||
KeyMap.push_back(SKeyMap(XK_backslash, KEY_OEM_5));
|
||||
KeyMap.push_back(SKeyMap(XK_bracketright, KEY_OEM_6));
|
||||
KeyMap.push_back(SKeyMap(XK_asciicircum, KEY_OEM_5));
|
||||
KeyMap.push_back(SKeyMap(XK_A, IRR_KEY_A));
|
||||
KeyMap.push_back(SKeyMap(XK_B, IRR_KEY_B));
|
||||
KeyMap.push_back(SKeyMap(XK_C, IRR_KEY_C));
|
||||
KeyMap.push_back(SKeyMap(XK_D, IRR_KEY_D));
|
||||
KeyMap.push_back(SKeyMap(XK_E, IRR_KEY_E));
|
||||
KeyMap.push_back(SKeyMap(XK_F, IRR_KEY_F));
|
||||
KeyMap.push_back(SKeyMap(XK_G, IRR_KEY_G));
|
||||
KeyMap.push_back(SKeyMap(XK_H, IRR_KEY_H));
|
||||
KeyMap.push_back(SKeyMap(XK_I, IRR_KEY_I));
|
||||
KeyMap.push_back(SKeyMap(XK_J, IRR_KEY_J));
|
||||
KeyMap.push_back(SKeyMap(XK_K, IRR_KEY_K));
|
||||
KeyMap.push_back(SKeyMap(XK_L, IRR_KEY_L));
|
||||
KeyMap.push_back(SKeyMap(XK_M, IRR_KEY_M));
|
||||
KeyMap.push_back(SKeyMap(XK_N, IRR_KEY_N));
|
||||
KeyMap.push_back(SKeyMap(XK_O, IRR_KEY_O));
|
||||
KeyMap.push_back(SKeyMap(XK_P, IRR_KEY_P));
|
||||
KeyMap.push_back(SKeyMap(XK_Q, IRR_KEY_Q));
|
||||
KeyMap.push_back(SKeyMap(XK_R, IRR_KEY_R));
|
||||
KeyMap.push_back(SKeyMap(XK_S, IRR_KEY_S));
|
||||
KeyMap.push_back(SKeyMap(XK_T, IRR_KEY_T));
|
||||
KeyMap.push_back(SKeyMap(XK_U, IRR_KEY_U));
|
||||
KeyMap.push_back(SKeyMap(XK_V, IRR_KEY_V));
|
||||
KeyMap.push_back(SKeyMap(XK_W, IRR_KEY_W));
|
||||
KeyMap.push_back(SKeyMap(XK_X, IRR_KEY_X));
|
||||
KeyMap.push_back(SKeyMap(XK_Y, IRR_KEY_Y));
|
||||
KeyMap.push_back(SKeyMap(XK_Z, IRR_KEY_Z));
|
||||
KeyMap.push_back(SKeyMap(XK_bracketleft, IRR_KEY_OEM_4));
|
||||
KeyMap.push_back(SKeyMap(XK_backslash, IRR_KEY_OEM_5));
|
||||
KeyMap.push_back(SKeyMap(XK_bracketright, IRR_KEY_OEM_6));
|
||||
KeyMap.push_back(SKeyMap(XK_asciicircum, IRR_KEY_OEM_5));
|
||||
KeyMap.push_back(SKeyMap(XK_degree, 0)); //?
|
||||
KeyMap.push_back(SKeyMap(XK_underscore, KEY_MINUS)); //?
|
||||
KeyMap.push_back(SKeyMap(XK_grave, KEY_OEM_3));
|
||||
KeyMap.push_back(SKeyMap(XK_acute, KEY_OEM_6));
|
||||
KeyMap.push_back(SKeyMap(XK_a, KEY_KEY_A));
|
||||
KeyMap.push_back(SKeyMap(XK_b, KEY_KEY_B));
|
||||
KeyMap.push_back(SKeyMap(XK_c, KEY_KEY_C));
|
||||
KeyMap.push_back(SKeyMap(XK_d, KEY_KEY_D));
|
||||
KeyMap.push_back(SKeyMap(XK_e, KEY_KEY_E));
|
||||
KeyMap.push_back(SKeyMap(XK_f, KEY_KEY_F));
|
||||
KeyMap.push_back(SKeyMap(XK_g, KEY_KEY_G));
|
||||
KeyMap.push_back(SKeyMap(XK_h, KEY_KEY_H));
|
||||
KeyMap.push_back(SKeyMap(XK_i, KEY_KEY_I));
|
||||
KeyMap.push_back(SKeyMap(XK_j, KEY_KEY_J));
|
||||
KeyMap.push_back(SKeyMap(XK_k, KEY_KEY_K));
|
||||
KeyMap.push_back(SKeyMap(XK_l, KEY_KEY_L));
|
||||
KeyMap.push_back(SKeyMap(XK_m, KEY_KEY_M));
|
||||
KeyMap.push_back(SKeyMap(XK_n, KEY_KEY_N));
|
||||
KeyMap.push_back(SKeyMap(XK_o, KEY_KEY_O));
|
||||
KeyMap.push_back(SKeyMap(XK_p, KEY_KEY_P));
|
||||
KeyMap.push_back(SKeyMap(XK_q, KEY_KEY_Q));
|
||||
KeyMap.push_back(SKeyMap(XK_r, KEY_KEY_R));
|
||||
KeyMap.push_back(SKeyMap(XK_s, KEY_KEY_S));
|
||||
KeyMap.push_back(SKeyMap(XK_t, KEY_KEY_T));
|
||||
KeyMap.push_back(SKeyMap(XK_u, KEY_KEY_U));
|
||||
KeyMap.push_back(SKeyMap(XK_v, KEY_KEY_V));
|
||||
KeyMap.push_back(SKeyMap(XK_w, KEY_KEY_W));
|
||||
KeyMap.push_back(SKeyMap(XK_x, KEY_KEY_X));
|
||||
KeyMap.push_back(SKeyMap(XK_y, KEY_KEY_Y));
|
||||
KeyMap.push_back(SKeyMap(XK_z, KEY_KEY_Z));
|
||||
KeyMap.push_back(SKeyMap(XK_ssharp, KEY_OEM_4));
|
||||
KeyMap.push_back(SKeyMap(XK_adiaeresis, KEY_OEM_7));
|
||||
KeyMap.push_back(SKeyMap(XK_odiaeresis, KEY_OEM_3));
|
||||
KeyMap.push_back(SKeyMap(XK_udiaeresis, KEY_OEM_1));
|
||||
KeyMap.push_back(SKeyMap(XK_Super_L, KEY_LWIN));
|
||||
KeyMap.push_back(SKeyMap(XK_Super_R, KEY_RWIN));
|
||||
KeyMap.push_back(SKeyMap(XK_underscore, IRR_KEY_MINUS)); //?
|
||||
KeyMap.push_back(SKeyMap(XK_grave, IRR_KEY_OEM_3));
|
||||
KeyMap.push_back(SKeyMap(XK_acute, IRR_KEY_OEM_6));
|
||||
KeyMap.push_back(SKeyMap(XK_a, IRR_KEY_A));
|
||||
KeyMap.push_back(SKeyMap(XK_b, IRR_KEY_B));
|
||||
KeyMap.push_back(SKeyMap(XK_c, IRR_KEY_C));
|
||||
KeyMap.push_back(SKeyMap(XK_d, IRR_KEY_D));
|
||||
KeyMap.push_back(SKeyMap(XK_e, IRR_KEY_E));
|
||||
KeyMap.push_back(SKeyMap(XK_f, IRR_KEY_F));
|
||||
KeyMap.push_back(SKeyMap(XK_g, IRR_KEY_G));
|
||||
KeyMap.push_back(SKeyMap(XK_h, IRR_KEY_H));
|
||||
KeyMap.push_back(SKeyMap(XK_i, IRR_KEY_I));
|
||||
KeyMap.push_back(SKeyMap(XK_j, IRR_KEY_J));
|
||||
KeyMap.push_back(SKeyMap(XK_k, IRR_KEY_K));
|
||||
KeyMap.push_back(SKeyMap(XK_l, IRR_KEY_L));
|
||||
KeyMap.push_back(SKeyMap(XK_m, IRR_KEY_M));
|
||||
KeyMap.push_back(SKeyMap(XK_n, IRR_KEY_N));
|
||||
KeyMap.push_back(SKeyMap(XK_o, IRR_KEY_O));
|
||||
KeyMap.push_back(SKeyMap(XK_p, IRR_KEY_P));
|
||||
KeyMap.push_back(SKeyMap(XK_q, IRR_KEY_Q));
|
||||
KeyMap.push_back(SKeyMap(XK_r, IRR_KEY_R));
|
||||
KeyMap.push_back(SKeyMap(XK_s, IRR_KEY_S));
|
||||
KeyMap.push_back(SKeyMap(XK_t, IRR_KEY_T));
|
||||
KeyMap.push_back(SKeyMap(XK_u, IRR_KEY_U));
|
||||
KeyMap.push_back(SKeyMap(XK_v, IRR_KEY_V));
|
||||
KeyMap.push_back(SKeyMap(XK_w, IRR_KEY_W));
|
||||
KeyMap.push_back(SKeyMap(XK_x, IRR_KEY_X));
|
||||
KeyMap.push_back(SKeyMap(XK_y, IRR_KEY_Y));
|
||||
KeyMap.push_back(SKeyMap(XK_z, IRR_KEY_Z));
|
||||
KeyMap.push_back(SKeyMap(XK_ssharp, IRR_KEY_OEM_4));
|
||||
KeyMap.push_back(SKeyMap(XK_adiaeresis, IRR_KEY_OEM_7));
|
||||
KeyMap.push_back(SKeyMap(XK_odiaeresis, IRR_KEY_OEM_3));
|
||||
KeyMap.push_back(SKeyMap(XK_udiaeresis, IRR_KEY_OEM_1));
|
||||
KeyMap.push_back(SKeyMap(XK_Super_L, IRR_KEY_LWIN));
|
||||
KeyMap.push_back(SKeyMap(XK_Super_R, IRR_KEY_RWIN));
|
||||
|
||||
KeyMap.sort();
|
||||
#endif
|
||||
|
@ -18,13 +18,8 @@
|
||||
#ifdef _IRR_COMPILE_WITH_X11_
|
||||
|
||||
#ifdef _IRR_COMPILE_WITH_OPENGL_
|
||||
#include <GL/gl.h>
|
||||
#define GLX_GLXEXT_LEGACY 1
|
||||
#include <GL/glx.h>
|
||||
#ifdef _IRR_OPENGL_USE_EXTPOINTER_
|
||||
#define GLX_GLXEXT_PROTOTYPES
|
||||
#include "glxext.h"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include <X11/Xlib.h>
|
||||
@ -68,6 +63,9 @@ namespace irr
|
||||
//! sets the caption of the window
|
||||
virtual void setWindowCaption(const wchar_t* text);
|
||||
|
||||
//! sets the class of the window
|
||||
virtual void setWindowClass(const char* text);
|
||||
|
||||
//! returns if window is active. if not, nothing need to be drawn
|
||||
virtual bool isWindowActive() const;
|
||||
|
||||
|
@ -402,7 +402,7 @@ bool CIrrDeviceSDL::run()
|
||||
|
||||
#ifdef _IRR_WINDOWS_API_
|
||||
// handle alt+f4 in Windows, because SDL seems not to
|
||||
if ( (SDL_event.key.keysym.mod & KMOD_LALT) && key == KEY_F4)
|
||||
if ( (SDL_event.key.keysym.mod & KMOD_LALT) && key == IRR_KEY_F4)
|
||||
{
|
||||
Close = true;
|
||||
break;
|
||||
@ -837,131 +837,131 @@ void CIrrDeviceSDL::createKeyMap()
|
||||
|
||||
// buttons missing
|
||||
|
||||
KeyMap.push_back(SKeyMap(SDLK_BACKSPACE, KEY_BACK));
|
||||
KeyMap.push_back(SKeyMap(SDLK_TAB, KEY_TAB));
|
||||
KeyMap.push_back(SKeyMap(SDLK_CLEAR, KEY_CLEAR));
|
||||
KeyMap.push_back(SKeyMap(SDLK_RETURN, KEY_RETURN));
|
||||
KeyMap.push_back(SKeyMap(SDLK_BACKSPACE, IRR_KEY_BACK));
|
||||
KeyMap.push_back(SKeyMap(SDLK_TAB, IRR_KEY_TAB));
|
||||
KeyMap.push_back(SKeyMap(SDLK_CLEAR, IRR_KEY_CLEAR));
|
||||
KeyMap.push_back(SKeyMap(SDLK_RETURN, IRR_KEY_RETURN));
|
||||
|
||||
// combined modifiers missing
|
||||
|
||||
KeyMap.push_back(SKeyMap(SDLK_PAUSE, KEY_PAUSE));
|
||||
KeyMap.push_back(SKeyMap(SDLK_CAPSLOCK, KEY_CAPITAL));
|
||||
KeyMap.push_back(SKeyMap(SDLK_PAUSE, IRR_KEY_PAUSE));
|
||||
KeyMap.push_back(SKeyMap(SDLK_CAPSLOCK, IRR_KEY_CAPITAL));
|
||||
|
||||
// asian letter keys missing
|
||||
|
||||
KeyMap.push_back(SKeyMap(SDLK_ESCAPE, KEY_ESCAPE));
|
||||
KeyMap.push_back(SKeyMap(SDLK_ESCAPE, IRR_KEY_ESCAPE));
|
||||
|
||||
// asian letter keys missing
|
||||
|
||||
KeyMap.push_back(SKeyMap(SDLK_SPACE, KEY_SPACE));
|
||||
KeyMap.push_back(SKeyMap(SDLK_PAGEUP, KEY_PRIOR));
|
||||
KeyMap.push_back(SKeyMap(SDLK_PAGEDOWN, KEY_NEXT));
|
||||
KeyMap.push_back(SKeyMap(SDLK_END, KEY_END));
|
||||
KeyMap.push_back(SKeyMap(SDLK_HOME, KEY_HOME));
|
||||
KeyMap.push_back(SKeyMap(SDLK_LEFT, KEY_LEFT));
|
||||
KeyMap.push_back(SKeyMap(SDLK_UP, KEY_UP));
|
||||
KeyMap.push_back(SKeyMap(SDLK_RIGHT, KEY_RIGHT));
|
||||
KeyMap.push_back(SKeyMap(SDLK_DOWN, KEY_DOWN));
|
||||
KeyMap.push_back(SKeyMap(SDLK_SPACE, IRR_KEY_SPACE));
|
||||
KeyMap.push_back(SKeyMap(SDLK_PAGEUP, IRR_KEY_PRIOR));
|
||||
KeyMap.push_back(SKeyMap(SDLK_PAGEDOWN, IRR_KEY_NEXT));
|
||||
KeyMap.push_back(SKeyMap(SDLK_END, IRR_KEY_END));
|
||||
KeyMap.push_back(SKeyMap(SDLK_HOME, IRR_KEY_HOME));
|
||||
KeyMap.push_back(SKeyMap(SDLK_LEFT, IRR_KEY_LEFT));
|
||||
KeyMap.push_back(SKeyMap(SDLK_UP, IRR_KEY_UP));
|
||||
KeyMap.push_back(SKeyMap(SDLK_RIGHT, IRR_KEY_RIGHT));
|
||||
KeyMap.push_back(SKeyMap(SDLK_DOWN, IRR_KEY_DOWN));
|
||||
|
||||
// select missing
|
||||
KeyMap.push_back(SKeyMap(SDLK_PRINT, KEY_PRINT));
|
||||
KeyMap.push_back(SKeyMap(SDLK_PRINT, IRR_KEY_PRINT));
|
||||
// execute missing
|
||||
KeyMap.push_back(SKeyMap(SDLK_PRINT, KEY_SNAPSHOT));
|
||||
KeyMap.push_back(SKeyMap(SDLK_PRINT, IRR_KEY_SNAPSHOT));
|
||||
|
||||
KeyMap.push_back(SKeyMap(SDLK_INSERT, KEY_INSERT));
|
||||
KeyMap.push_back(SKeyMap(SDLK_DELETE, KEY_DELETE));
|
||||
KeyMap.push_back(SKeyMap(SDLK_HELP, KEY_HELP));
|
||||
KeyMap.push_back(SKeyMap(SDLK_INSERT, IRR_KEY_INSERT));
|
||||
KeyMap.push_back(SKeyMap(SDLK_DELETE, IRR_KEY_DELETE));
|
||||
KeyMap.push_back(SKeyMap(SDLK_HELP, IRR_KEY_HELP));
|
||||
|
||||
KeyMap.push_back(SKeyMap(SDLK_0, KEY_KEY_0));
|
||||
KeyMap.push_back(SKeyMap(SDLK_1, KEY_KEY_1));
|
||||
KeyMap.push_back(SKeyMap(SDLK_2, KEY_KEY_2));
|
||||
KeyMap.push_back(SKeyMap(SDLK_3, KEY_KEY_3));
|
||||
KeyMap.push_back(SKeyMap(SDLK_4, KEY_KEY_4));
|
||||
KeyMap.push_back(SKeyMap(SDLK_5, KEY_KEY_5));
|
||||
KeyMap.push_back(SKeyMap(SDLK_6, KEY_KEY_6));
|
||||
KeyMap.push_back(SKeyMap(SDLK_7, KEY_KEY_7));
|
||||
KeyMap.push_back(SKeyMap(SDLK_8, KEY_KEY_8));
|
||||
KeyMap.push_back(SKeyMap(SDLK_9, KEY_KEY_9));
|
||||
KeyMap.push_back(SKeyMap(SDLK_0, IRR_KEY_IRR_KEY_0));
|
||||
KeyMap.push_back(SKeyMap(SDLK_1, IRR_KEY_IRR_KEY_1));
|
||||
KeyMap.push_back(SKeyMap(SDLK_2, IRR_KEY_IRR_KEY_2));
|
||||
KeyMap.push_back(SKeyMap(SDLK_3, IRR_KEY_IRR_KEY_3));
|
||||
KeyMap.push_back(SKeyMap(SDLK_4, IRR_KEY_IRR_KEY_4));
|
||||
KeyMap.push_back(SKeyMap(SDLK_5, IRR_KEY_IRR_KEY_5));
|
||||
KeyMap.push_back(SKeyMap(SDLK_6, IRR_KEY_IRR_KEY_6));
|
||||
KeyMap.push_back(SKeyMap(SDLK_7, IRR_KEY_IRR_KEY_7));
|
||||
KeyMap.push_back(SKeyMap(SDLK_8, IRR_KEY_IRR_KEY_8));
|
||||
KeyMap.push_back(SKeyMap(SDLK_9, IRR_KEY_IRR_KEY_9));
|
||||
|
||||
KeyMap.push_back(SKeyMap(SDLK_a, KEY_KEY_A));
|
||||
KeyMap.push_back(SKeyMap(SDLK_b, KEY_KEY_B));
|
||||
KeyMap.push_back(SKeyMap(SDLK_c, KEY_KEY_C));
|
||||
KeyMap.push_back(SKeyMap(SDLK_d, KEY_KEY_D));
|
||||
KeyMap.push_back(SKeyMap(SDLK_e, KEY_KEY_E));
|
||||
KeyMap.push_back(SKeyMap(SDLK_f, KEY_KEY_F));
|
||||
KeyMap.push_back(SKeyMap(SDLK_g, KEY_KEY_G));
|
||||
KeyMap.push_back(SKeyMap(SDLK_h, KEY_KEY_H));
|
||||
KeyMap.push_back(SKeyMap(SDLK_i, KEY_KEY_I));
|
||||
KeyMap.push_back(SKeyMap(SDLK_j, KEY_KEY_J));
|
||||
KeyMap.push_back(SKeyMap(SDLK_k, KEY_KEY_K));
|
||||
KeyMap.push_back(SKeyMap(SDLK_l, KEY_KEY_L));
|
||||
KeyMap.push_back(SKeyMap(SDLK_m, KEY_KEY_M));
|
||||
KeyMap.push_back(SKeyMap(SDLK_n, KEY_KEY_N));
|
||||
KeyMap.push_back(SKeyMap(SDLK_o, KEY_KEY_O));
|
||||
KeyMap.push_back(SKeyMap(SDLK_p, KEY_KEY_P));
|
||||
KeyMap.push_back(SKeyMap(SDLK_q, KEY_KEY_Q));
|
||||
KeyMap.push_back(SKeyMap(SDLK_r, KEY_KEY_R));
|
||||
KeyMap.push_back(SKeyMap(SDLK_s, KEY_KEY_S));
|
||||
KeyMap.push_back(SKeyMap(SDLK_t, KEY_KEY_T));
|
||||
KeyMap.push_back(SKeyMap(SDLK_u, KEY_KEY_U));
|
||||
KeyMap.push_back(SKeyMap(SDLK_v, KEY_KEY_V));
|
||||
KeyMap.push_back(SKeyMap(SDLK_w, KEY_KEY_W));
|
||||
KeyMap.push_back(SKeyMap(SDLK_x, KEY_KEY_X));
|
||||
KeyMap.push_back(SKeyMap(SDLK_y, KEY_KEY_Y));
|
||||
KeyMap.push_back(SKeyMap(SDLK_z, KEY_KEY_Z));
|
||||
KeyMap.push_back(SKeyMap(SDLK_a, IRR_KEY_IRR_KEY_A));
|
||||
KeyMap.push_back(SKeyMap(SDLK_b, IRR_KEY_IRR_KEY_B));
|
||||
KeyMap.push_back(SKeyMap(SDLK_c, IRR_KEY_IRR_KEY_C));
|
||||
KeyMap.push_back(SKeyMap(SDLK_d, IRR_KEY_IRR_KEY_D));
|
||||
KeyMap.push_back(SKeyMap(SDLK_e, IRR_KEY_IRR_KEY_E));
|
||||
KeyMap.push_back(SKeyMap(SDLK_f, IRR_KEY_IRR_KEY_F));
|
||||
KeyMap.push_back(SKeyMap(SDLK_g, IRR_KEY_IRR_KEY_G));
|
||||
KeyMap.push_back(SKeyMap(SDLK_h, IRR_KEY_IRR_KEY_H));
|
||||
KeyMap.push_back(SKeyMap(SDLK_i, IRR_KEY_IRR_KEY_I));
|
||||
KeyMap.push_back(SKeyMap(SDLK_j, IRR_KEY_IRR_KEY_J));
|
||||
KeyMap.push_back(SKeyMap(SDLK_k, IRR_KEY_IRR_KEY_K));
|
||||
KeyMap.push_back(SKeyMap(SDLK_l, IRR_KEY_IRR_KEY_L));
|
||||
KeyMap.push_back(SKeyMap(SDLK_m, IRR_KEY_IRR_KEY_M));
|
||||
KeyMap.push_back(SKeyMap(SDLK_n, IRR_KEY_IRR_KEY_N));
|
||||
KeyMap.push_back(SKeyMap(SDLK_o, IRR_KEY_IRR_KEY_O));
|
||||
KeyMap.push_back(SKeyMap(SDLK_p, IRR_KEY_IRR_KEY_P));
|
||||
KeyMap.push_back(SKeyMap(SDLK_q, IRR_KEY_IRR_KEY_Q));
|
||||
KeyMap.push_back(SKeyMap(SDLK_r, IRR_KEY_IRR_KEY_R));
|
||||
KeyMap.push_back(SKeyMap(SDLK_s, IRR_KEY_IRR_KEY_S));
|
||||
KeyMap.push_back(SKeyMap(SDLK_t, IRR_KEY_IRR_KEY_T));
|
||||
KeyMap.push_back(SKeyMap(SDLK_u, IRR_KEY_IRR_KEY_U));
|
||||
KeyMap.push_back(SKeyMap(SDLK_v, IRR_KEY_IRR_KEY_V));
|
||||
KeyMap.push_back(SKeyMap(SDLK_w, IRR_KEY_IRR_KEY_W));
|
||||
KeyMap.push_back(SKeyMap(SDLK_x, IRR_KEY_IRR_KEY_X));
|
||||
KeyMap.push_back(SKeyMap(SDLK_y, IRR_KEY_IRR_KEY_Y));
|
||||
KeyMap.push_back(SKeyMap(SDLK_z, IRR_KEY_IRR_KEY_Z));
|
||||
|
||||
KeyMap.push_back(SKeyMap(SDLK_LSUPER, KEY_LWIN));
|
||||
KeyMap.push_back(SKeyMap(SDLK_RSUPER, KEY_RWIN));
|
||||
KeyMap.push_back(SKeyMap(SDLK_LSUPER, IRR_KEY_LWIN));
|
||||
KeyMap.push_back(SKeyMap(SDLK_RSUPER, IRR_KEY_RWIN));
|
||||
// apps missing
|
||||
KeyMap.push_back(SKeyMap(SDLK_POWER, KEY_SLEEP)); //??
|
||||
KeyMap.push_back(SKeyMap(SDLK_POWER, IRR_KEY_SLEEP)); //??
|
||||
|
||||
KeyMap.push_back(SKeyMap(SDLK_KP0, KEY_NUMPAD0));
|
||||
KeyMap.push_back(SKeyMap(SDLK_KP1, KEY_NUMPAD1));
|
||||
KeyMap.push_back(SKeyMap(SDLK_KP2, KEY_NUMPAD2));
|
||||
KeyMap.push_back(SKeyMap(SDLK_KP3, KEY_NUMPAD3));
|
||||
KeyMap.push_back(SKeyMap(SDLK_KP4, KEY_NUMPAD4));
|
||||
KeyMap.push_back(SKeyMap(SDLK_KP5, KEY_NUMPAD5));
|
||||
KeyMap.push_back(SKeyMap(SDLK_KP6, KEY_NUMPAD6));
|
||||
KeyMap.push_back(SKeyMap(SDLK_KP7, KEY_NUMPAD7));
|
||||
KeyMap.push_back(SKeyMap(SDLK_KP8, KEY_NUMPAD8));
|
||||
KeyMap.push_back(SKeyMap(SDLK_KP9, KEY_NUMPAD9));
|
||||
KeyMap.push_back(SKeyMap(SDLK_KP_MULTIPLY, KEY_MULTIPLY));
|
||||
KeyMap.push_back(SKeyMap(SDLK_KP_PLUS, KEY_ADD));
|
||||
// KeyMap.push_back(SKeyMap(SDLK_KP_, KEY_SEPARATOR));
|
||||
KeyMap.push_back(SKeyMap(SDLK_KP_MINUS, KEY_SUBTRACT));
|
||||
KeyMap.push_back(SKeyMap(SDLK_KP_PERIOD, KEY_DECIMAL));
|
||||
KeyMap.push_back(SKeyMap(SDLK_KP_DIVIDE, KEY_DIVIDE));
|
||||
KeyMap.push_back(SKeyMap(SDLK_KP0, IRR_KEY_NUMPAD0));
|
||||
KeyMap.push_back(SKeyMap(SDLK_KP1, IRR_KEY_NUMPAD1));
|
||||
KeyMap.push_back(SKeyMap(SDLK_KP2, IRR_KEY_NUMPAD2));
|
||||
KeyMap.push_back(SKeyMap(SDLK_KP3, IRR_KEY_NUMPAD3));
|
||||
KeyMap.push_back(SKeyMap(SDLK_KP4, IRR_KEY_NUMPAD4));
|
||||
KeyMap.push_back(SKeyMap(SDLK_KP5, IRR_KEY_NUMPAD5));
|
||||
KeyMap.push_back(SKeyMap(SDLK_KP6, IRR_KEY_NUMPAD6));
|
||||
KeyMap.push_back(SKeyMap(SDLK_KP7, IRR_KEY_NUMPAD7));
|
||||
KeyMap.push_back(SKeyMap(SDLK_KP8, IRR_KEY_NUMPAD8));
|
||||
KeyMap.push_back(SKeyMap(SDLK_KP9, IRR_KEY_NUMPAD9));
|
||||
KeyMap.push_back(SKeyMap(SDLK_KP_MULTIPLY, IRR_KEY_MULTIPLY));
|
||||
KeyMap.push_back(SKeyMap(SDLK_KP_PLUS, IRR_KEY_ADD));
|
||||
// KeyMap.push_back(SKeyMap(SDLK_KP_, IRR_KEY_SEPARATOR));
|
||||
KeyMap.push_back(SKeyMap(SDLK_KP_MINUS, IRR_KEY_SUBTRACT));
|
||||
KeyMap.push_back(SKeyMap(SDLK_KP_PERIOD, IRR_KEY_DECIMAL));
|
||||
KeyMap.push_back(SKeyMap(SDLK_KP_DIVIDE, IRR_KEY_DIVIDE));
|
||||
|
||||
KeyMap.push_back(SKeyMap(SDLK_F1, KEY_F1));
|
||||
KeyMap.push_back(SKeyMap(SDLK_F2, KEY_F2));
|
||||
KeyMap.push_back(SKeyMap(SDLK_F3, KEY_F3));
|
||||
KeyMap.push_back(SKeyMap(SDLK_F4, KEY_F4));
|
||||
KeyMap.push_back(SKeyMap(SDLK_F5, KEY_F5));
|
||||
KeyMap.push_back(SKeyMap(SDLK_F6, KEY_F6));
|
||||
KeyMap.push_back(SKeyMap(SDLK_F7, KEY_F7));
|
||||
KeyMap.push_back(SKeyMap(SDLK_F8, KEY_F8));
|
||||
KeyMap.push_back(SKeyMap(SDLK_F9, KEY_F9));
|
||||
KeyMap.push_back(SKeyMap(SDLK_F10, KEY_F10));
|
||||
KeyMap.push_back(SKeyMap(SDLK_F11, KEY_F11));
|
||||
KeyMap.push_back(SKeyMap(SDLK_F12, KEY_F12));
|
||||
KeyMap.push_back(SKeyMap(SDLK_F13, KEY_F13));
|
||||
KeyMap.push_back(SKeyMap(SDLK_F14, KEY_F14));
|
||||
KeyMap.push_back(SKeyMap(SDLK_F15, KEY_F15));
|
||||
KeyMap.push_back(SKeyMap(SDLK_F1, IRR_KEY_F1));
|
||||
KeyMap.push_back(SKeyMap(SDLK_F2, IRR_KEY_F2));
|
||||
KeyMap.push_back(SKeyMap(SDLK_F3, IRR_KEY_F3));
|
||||
KeyMap.push_back(SKeyMap(SDLK_F4, IRR_KEY_F4));
|
||||
KeyMap.push_back(SKeyMap(SDLK_F5, IRR_KEY_F5));
|
||||
KeyMap.push_back(SKeyMap(SDLK_F6, IRR_KEY_F6));
|
||||
KeyMap.push_back(SKeyMap(SDLK_F7, IRR_KEY_F7));
|
||||
KeyMap.push_back(SKeyMap(SDLK_F8, IRR_KEY_F8));
|
||||
KeyMap.push_back(SKeyMap(SDLK_F9, IRR_KEY_F9));
|
||||
KeyMap.push_back(SKeyMap(SDLK_F10, IRR_KEY_F10));
|
||||
KeyMap.push_back(SKeyMap(SDLK_F11, IRR_KEY_F11));
|
||||
KeyMap.push_back(SKeyMap(SDLK_F12, IRR_KEY_F12));
|
||||
KeyMap.push_back(SKeyMap(SDLK_F13, IRR_KEY_F13));
|
||||
KeyMap.push_back(SKeyMap(SDLK_F14, IRR_KEY_F14));
|
||||
KeyMap.push_back(SKeyMap(SDLK_F15, IRR_KEY_F15));
|
||||
// no higher F-keys
|
||||
|
||||
KeyMap.push_back(SKeyMap(SDLK_NUMLOCK, KEY_NUMLOCK));
|
||||
KeyMap.push_back(SKeyMap(SDLK_SCROLLOCK, KEY_SCROLL));
|
||||
KeyMap.push_back(SKeyMap(SDLK_LSHIFT, KEY_LSHIFT));
|
||||
KeyMap.push_back(SKeyMap(SDLK_RSHIFT, KEY_RSHIFT));
|
||||
KeyMap.push_back(SKeyMap(SDLK_LCTRL, KEY_LCONTROL));
|
||||
KeyMap.push_back(SKeyMap(SDLK_RCTRL, KEY_RCONTROL));
|
||||
KeyMap.push_back(SKeyMap(SDLK_LALT, KEY_LMENU));
|
||||
KeyMap.push_back(SKeyMap(SDLK_RALT, KEY_RMENU));
|
||||
KeyMap.push_back(SKeyMap(SDLK_NUMLOCK, IRR_KEY_NUMLOCK));
|
||||
KeyMap.push_back(SKeyMap(SDLK_SCROLLOCK, IRR_KEY_SCROLL));
|
||||
KeyMap.push_back(SKeyMap(SDLK_LSHIFT, IRR_KEY_LSHIFT));
|
||||
KeyMap.push_back(SKeyMap(SDLK_RSHIFT, IRR_KEY_RSHIFT));
|
||||
KeyMap.push_back(SKeyMap(SDLK_LCTRL, IRR_KEY_LCONTROL));
|
||||
KeyMap.push_back(SKeyMap(SDLK_RCTRL, IRR_KEY_RCONTROL));
|
||||
KeyMap.push_back(SKeyMap(SDLK_LALT, IRR_KEY_LMENU));
|
||||
KeyMap.push_back(SKeyMap(SDLK_RALT, IRR_KEY_RMENU));
|
||||
|
||||
KeyMap.push_back(SKeyMap(SDLK_PLUS, KEY_PLUS));
|
||||
KeyMap.push_back(SKeyMap(SDLK_COMMA, KEY_COMMA));
|
||||
KeyMap.push_back(SKeyMap(SDLK_MINUS, KEY_MINUS));
|
||||
KeyMap.push_back(SKeyMap(SDLK_PERIOD, KEY_PERIOD));
|
||||
KeyMap.push_back(SKeyMap(SDLK_PLUS, IRR_KEY_PLUS));
|
||||
KeyMap.push_back(SKeyMap(SDLK_COMMA, IRR_KEY_COMMA));
|
||||
KeyMap.push_back(SKeyMap(SDLK_MINUS, IRR_KEY_MINUS));
|
||||
KeyMap.push_back(SKeyMap(SDLK_PERIOD, IRR_KEY_PERIOD));
|
||||
|
||||
// some special keys missing
|
||||
|
||||
|
@ -44,6 +44,9 @@ namespace irr
|
||||
//! sets the caption of the window
|
||||
virtual void setWindowCaption(const wchar_t* text);
|
||||
|
||||
//! sets the class of the window
|
||||
virtual void setWindowClass(const char* text) {}
|
||||
|
||||
//! returns if window is active. if not, nothing need to be drawn
|
||||
virtual bool isWindowActive() const;
|
||||
|
||||
|
1400
lib/irrlicht/source/Irrlicht/CIrrDeviceWayland.cpp
Normal file
1400
lib/irrlicht/source/Irrlicht/CIrrDeviceWayland.cpp
Normal file
File diff suppressed because it is too large
Load Diff
345
lib/irrlicht/source/Irrlicht/CIrrDeviceWayland.h
Normal file
345
lib/irrlicht/source/Irrlicht/CIrrDeviceWayland.h
Normal file
@ -0,0 +1,345 @@
|
||||
//
|
||||
// SuperTuxKart - a fun racing game with go-kart
|
||||
// Copyright (C) 2016-2017 Dawid Gan
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU General Public License
|
||||
// as published by the Free Software Foundation; either version 3
|
||||
// of the License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
#ifndef CIRRDEVICEWAYLAND_H
|
||||
#define CIRRDEVICEWAYLAND_H
|
||||
|
||||
#include "IrrCompileConfig.h"
|
||||
|
||||
#ifdef _IRR_COMPILE_WITH_WAYLAND_DEVICE_
|
||||
|
||||
#include "CIrrDeviceStub.h"
|
||||
#include "IImagePresenter.h"
|
||||
#include "ICursorControl.h"
|
||||
|
||||
#include <wayland-client.h>
|
||||
#include <wayland-cursor.h>
|
||||
#include <wayland-egl.h>
|
||||
#include <xkbcommon/xkbcommon.h>
|
||||
#include <xkbcommon/xkbcommon-compose.h>
|
||||
|
||||
#include <map>
|
||||
#include <vector>
|
||||
|
||||
class ContextManagerEGL;
|
||||
|
||||
namespace irr
|
||||
{
|
||||
class CIrrDeviceWayland : public CIrrDeviceStub,
|
||||
public video::IImagePresenter
|
||||
{
|
||||
public:
|
||||
friend class WaylandCallbacks;
|
||||
|
||||
//! constructor
|
||||
CIrrDeviceWayland(const SIrrlichtCreationParameters& param);
|
||||
|
||||
//! destructor
|
||||
virtual ~CIrrDeviceWayland();
|
||||
|
||||
//! runs the device. Returns false if device wants to be deleted
|
||||
virtual bool run();
|
||||
|
||||
//! Cause the device to temporarily pause execution and let other
|
||||
//! processes to run. This should bring down processor usage without
|
||||
//! major performance loss for Irrlicht
|
||||
virtual void yield();
|
||||
|
||||
//! Pause execution and let other processes to run for a specified
|
||||
//! amount of time.
|
||||
virtual void sleep(u32 timeMs, bool pauseTimer);
|
||||
|
||||
//! sets the caption of the window
|
||||
virtual void setWindowCaption(const wchar_t* text);
|
||||
|
||||
//! sets the class of the window
|
||||
virtual void setWindowClass(const char* text);
|
||||
|
||||
//! returns if window is active. if not, nothing need to be drawn
|
||||
virtual bool isWindowActive() const;
|
||||
|
||||
//! returns if window has focus.
|
||||
virtual bool isWindowFocused() const;
|
||||
|
||||
//! returns if window is minimized.
|
||||
virtual bool isWindowMinimized() const;
|
||||
|
||||
//! returns color format of the window.
|
||||
virtual video::ECOLOR_FORMAT getColorFormat() const;
|
||||
|
||||
//! presents a surface in the client area
|
||||
virtual bool present(video::IImage* surface, void* windowId=0,
|
||||
core::rect<s32>* src=0);
|
||||
|
||||
//! notifies the device that it should close itself
|
||||
virtual void closeDevice();
|
||||
|
||||
//! \return Returns a pointer to a list with all video modes
|
||||
//! supported by the gfx adapter.
|
||||
video::IVideoModeList* getVideoModeList();
|
||||
|
||||
//! Sets if the window should be resizable in windowed mode.
|
||||
virtual void setResizable(bool resize=false);
|
||||
|
||||
//! Minimizes the window.
|
||||
virtual void minimizeWindow();
|
||||
|
||||
//! Maximizes the window.
|
||||
virtual void maximizeWindow();
|
||||
|
||||
//! Restores the window size.
|
||||
virtual void restoreWindow();
|
||||
|
||||
//! Activate any joysticks, and generate events for them.
|
||||
virtual bool activateJoysticks(core::array<SJoystickInfo>& joystickInfo);
|
||||
|
||||
//! Set the current Gamma Value for the Display
|
||||
virtual bool setGammaRamp(f32 red, f32 green, f32 blue,
|
||||
f32 brightness, f32 contrast);
|
||||
|
||||
//! Get the current Gamma Value for the Display
|
||||
virtual bool getGammaRamp(f32 &red, f32 &green, f32 &blue,
|
||||
f32 &brightness, f32 &contrast);
|
||||
|
||||
//! gets text from the clipboard
|
||||
//! \return Returns 0 if no string is in there.
|
||||
virtual const c8* getTextFromClipboard() const;
|
||||
|
||||
//! copies text to the clipboard
|
||||
virtual void copyToClipboard(const c8* text) const;
|
||||
|
||||
//! Remove all messages pending in the system message loop
|
||||
virtual void clearSystemMessages();
|
||||
|
||||
//! Get the device type
|
||||
virtual E_DEVICE_TYPE getType() const
|
||||
{
|
||||
return EIDT_WAYLAND;
|
||||
}
|
||||
|
||||
static bool isWaylandDeviceWorking();
|
||||
|
||||
ContextManagerEGL* getEGLContext() {return m_egl_context;}
|
||||
void updateCursor();
|
||||
unsigned int getWidth() {return m_width;}
|
||||
unsigned int getHeight() {return m_height;}
|
||||
|
||||
private:
|
||||
|
||||
#if defined(_IRR_COMPILE_WITH_JOYSTICK_EVENTS_)
|
||||
struct JoystickInfo
|
||||
{
|
||||
int fd;
|
||||
int axes;
|
||||
int buttons;
|
||||
SEvent persistentData;
|
||||
|
||||
JoystickInfo() : fd(-1), axes(0), buttons(0) { }
|
||||
};
|
||||
|
||||
core::array<JoystickInfo> m_active_joysticks;
|
||||
#endif
|
||||
|
||||
wl_compositor* m_compositor;
|
||||
wl_cursor* m_cursor;
|
||||
wl_cursor_theme* m_cursor_theme;
|
||||
wl_display* m_display;
|
||||
wl_egl_window* m_egl_window;
|
||||
wl_keyboard* m_keyboard;
|
||||
wl_output* m_output;
|
||||
wl_pointer* m_pointer;
|
||||
wl_registry* m_registry;
|
||||
wl_seat* m_seat;
|
||||
wl_shell* m_shell;
|
||||
wl_shell_surface* m_shell_surface;
|
||||
wl_shm* m_shm;
|
||||
wl_surface* m_cursor_surface;
|
||||
wl_surface* m_surface;
|
||||
uint32_t m_enter_serial;
|
||||
|
||||
xkb_context* m_xkb_context;
|
||||
xkb_compose_table* m_xkb_compose_table;
|
||||
xkb_compose_state* m_xkb_compose_state;
|
||||
xkb_keymap* m_xkb_keymap;
|
||||
xkb_state* m_xkb_state;
|
||||
xkb_mod_mask_t m_xkb_alt_mask;
|
||||
xkb_mod_mask_t m_xkb_ctrl_mask;
|
||||
xkb_mod_mask_t m_xkb_shift_mask;
|
||||
bool m_xkb_alt_pressed;
|
||||
bool m_xkb_ctrl_pressed;
|
||||
bool m_xkb_shift_pressed;
|
||||
|
||||
bool m_repeat_enabled;
|
||||
SEvent m_repeat_event;
|
||||
uint32_t m_repeat_time;
|
||||
uint32_t m_repeat_rate;
|
||||
uint32_t m_repeat_delay;
|
||||
|
||||
uint32_t m_mouse_button_states;
|
||||
unsigned int m_width;
|
||||
unsigned int m_height;
|
||||
|
||||
bool m_window_has_focus;
|
||||
bool m_window_minimized;
|
||||
mutable core::stringc m_clipboard;
|
||||
std::map<int, EKEY_CODE> m_key_map;
|
||||
std::vector<SEvent> m_events;
|
||||
std::vector<core::dimension2du> m_modes;
|
||||
ContextManagerEGL* m_egl_context;
|
||||
|
||||
void createDriver();
|
||||
void createKeyMap();
|
||||
bool createWindow();
|
||||
bool initEGL();
|
||||
void signalEvent(const SEvent&);
|
||||
void pollJoysticks();
|
||||
void closeJoysticks();
|
||||
};
|
||||
|
||||
//! Implementation of the linux cursor control
|
||||
class CCursorControl : public gui::ICursorControl
|
||||
{
|
||||
public:
|
||||
CCursorControl(CIrrDeviceWayland* device) : m_device(device),
|
||||
m_is_visible(true), m_use_reference_rect(false) {};
|
||||
|
||||
~CCursorControl() {};
|
||||
|
||||
//! Changes the visible state of the mouse cursor.
|
||||
virtual void setVisible(bool visible)
|
||||
{
|
||||
if (visible == m_is_visible)
|
||||
return;
|
||||
|
||||
m_is_visible = visible;
|
||||
m_device->updateCursor();
|
||||
}
|
||||
|
||||
//! Returns if the cursor is currently visible.
|
||||
virtual bool isVisible() const
|
||||
{
|
||||
return m_is_visible;
|
||||
}
|
||||
|
||||
//! Sets the new position of the cursor.
|
||||
virtual void setPosition(const core::position2d<f32> &pos)
|
||||
{
|
||||
setPosition(pos.X, pos.Y);
|
||||
}
|
||||
|
||||
//! Sets the new position of the cursor.
|
||||
virtual void setPosition(f32 x, f32 y)
|
||||
{
|
||||
setPosition((s32)(x * m_device->getWidth()),
|
||||
(s32)(y * m_device->getHeight()));
|
||||
}
|
||||
|
||||
//! Sets the new position of the cursor.
|
||||
virtual void setPosition(const core::position2d<s32> &pos)
|
||||
{
|
||||
setPosition(pos.X, pos.Y);
|
||||
}
|
||||
|
||||
//! Sets the new position of the cursor.
|
||||
virtual void setPosition(s32 x, s32 y)
|
||||
{
|
||||
m_cursor_pos.X = x;
|
||||
m_cursor_pos.Y = y;
|
||||
}
|
||||
|
||||
//! Returns the current position of the mouse cursor.
|
||||
virtual const core::position2d<s32>& getPosition()
|
||||
{
|
||||
return m_cursor_pos;
|
||||
}
|
||||
|
||||
virtual core::position2d<f32> getRelativePosition()
|
||||
{
|
||||
if (!m_use_reference_rect)
|
||||
{
|
||||
return core::position2d<f32>(
|
||||
m_cursor_pos.X / (f32)m_device->getWidth(),
|
||||
m_cursor_pos.Y / (f32)m_device->getHeight());
|
||||
}
|
||||
|
||||
return core::position2d<f32>(
|
||||
m_cursor_pos.X / (f32)m_reference_rect.getWidth(),
|
||||
m_cursor_pos.Y / (f32)m_reference_rect.getHeight());
|
||||
}
|
||||
|
||||
virtual void setReferenceRect(core::rect<s32>* rect=0)
|
||||
{
|
||||
m_use_reference_rect = false;
|
||||
|
||||
if (rect)
|
||||
{
|
||||
m_reference_rect = *rect;
|
||||
m_use_reference_rect = true;
|
||||
|
||||
// prevent division through zero and uneven sizes
|
||||
if (m_reference_rect.getHeight() == 0 ||
|
||||
m_reference_rect.getHeight() % 2)
|
||||
m_reference_rect.LowerRightCorner.Y += 1;
|
||||
|
||||
if (m_reference_rect.getWidth() == 0 ||
|
||||
m_reference_rect.getWidth() % 2)
|
||||
m_reference_rect.LowerRightCorner.X += 1;
|
||||
}
|
||||
}
|
||||
|
||||
//! Sets the active cursor icon
|
||||
virtual void setActiveIcon(gui::ECURSOR_ICON iconId) {};
|
||||
|
||||
//! Gets the currently active icon
|
||||
virtual gui::ECURSOR_ICON getActiveIcon() const
|
||||
{
|
||||
return gui::ECI_NORMAL;
|
||||
}
|
||||
|
||||
//! Add a custom sprite as cursor icon.
|
||||
virtual gui::ECURSOR_ICON addIcon(const gui::SCursorSprite& icon)
|
||||
{
|
||||
return gui::ECI_NORMAL;
|
||||
}
|
||||
|
||||
//! replace the given cursor icon.
|
||||
virtual void changeIcon(gui::ECURSOR_ICON iconId,
|
||||
const gui::SCursorSprite& icon) {}
|
||||
|
||||
/** Return a system-specific size which is supported for cursors.
|
||||
Larger icons will fail, smaller icons might work. */
|
||||
virtual core::dimension2di getSupportedIconSize() const
|
||||
{
|
||||
return core::dimension2di(0, 0);
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
CIrrDeviceWayland* m_device;
|
||||
core::position2d<s32> m_cursor_pos;
|
||||
core::rect<s32> m_reference_rect;
|
||||
bool m_is_visible;
|
||||
bool m_use_reference_rect;
|
||||
};
|
||||
|
||||
} // end namespace irr
|
||||
|
||||
#endif
|
||||
|
||||
#endif // CIRRDEVICEWAYLAND_H
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -51,6 +51,9 @@ namespace irr
|
||||
//! sets the caption of the window
|
||||
virtual void setWindowCaption(const wchar_t* text);
|
||||
|
||||
//! sets the class of the window
|
||||
virtual void setWindowClass(const char* text) {}
|
||||
|
||||
//! returns if window is active. if not, nothing need to be drawn
|
||||
virtual bool isWindowActive() const;
|
||||
|
||||
|
@ -47,6 +47,7 @@ namespace video
|
||||
RenderTargetTexture(0), CurrentRendertargetSize(0, 0), ColorFormat(ECF_R8G8B8)
|
||||
#if defined(_IRR_COMPILE_WITH_EGL_)
|
||||
, EglContext(0)
|
||||
, EglContextExternal(false)
|
||||
#elif defined(_IRR_COMPILE_WITH_IPHONE_DEVICE_)
|
||||
, ViewFramebuffer(0)
|
||||
, ViewRenderbuffer(0)
|
||||
@ -77,7 +78,7 @@ namespace video
|
||||
HDc = GetDC(data.OpenGLWin32.HWnd);
|
||||
egl_params.display = (NativeDisplayType)(HDc);
|
||||
#elif defined(_IRR_COMPILE_WITH_X11_DEVICE_)
|
||||
egl_params.window = data.OpenGLLinux.X11Window;
|
||||
egl_params.window = (EGLNativeWindowType)(data.OpenGLLinux.X11Window);
|
||||
egl_params.display = (EGLNativeDisplayType)(data.OpenGLLinux.X11Display);
|
||||
#elif defined(_IRR_COMPILE_WITH_ANDROID_DEVICE_)
|
||||
egl_params.window = ((struct android_app *)(params.PrivateData))->window;
|
||||
@ -133,6 +134,22 @@ namespace video
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef _IRR_COMPILE_WITH_WAYLAND_DEVICE_
|
||||
COGLES2Driver::COGLES2Driver(const SIrrlichtCreationParameters& params,
|
||||
io::IFileSystem* io, CIrrDeviceWayland* device)
|
||||
: CNullDriver(io, params.WindowSize), COGLES2ExtensionHandler(),
|
||||
BridgeCalls(0), CurrentRenderMode(ERM_NONE), ResetRenderStates(true),
|
||||
Transformation3DChanged(true), AntiAlias(params.AntiAlias),
|
||||
RenderTargetTexture(0), CurrentRendertargetSize(0, 0),
|
||||
ColorFormat(ECF_R8G8B8), EglContext(0), EglContextExternal(false),
|
||||
Params(params)
|
||||
{
|
||||
EglContext = device->getEGLContext();
|
||||
EglContextExternal = true;
|
||||
genericDriverInit(params.WindowSize, params.Stencilbuffer);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
//! destructor
|
||||
COGLES2Driver::~COGLES2Driver()
|
||||
@ -145,7 +162,8 @@ namespace video
|
||||
delete BridgeCalls;
|
||||
|
||||
#if defined(_IRR_COMPILE_WITH_EGL_)
|
||||
delete EglContext;
|
||||
if (!EglContextExternal)
|
||||
delete EglContext;
|
||||
|
||||
#if defined(_IRR_COMPILE_WITH_WINDOWS_DEVICE_)
|
||||
if (HDc)
|
||||
@ -414,6 +432,13 @@ namespace video
|
||||
addAndDropMaterialRenderer(new COGLES2ParallaxMapRenderer(PMVSData, PMFSData, EMT_PARALLAX_MAP_TRANSPARENT_VERTEX_ALPHA, this));
|
||||
|
||||
addAndDropMaterialRenderer(new COGLES2FixedPipelineRenderer(FPVSData, FPFSData, EMT_ONETEXTURE_BLEND, this));
|
||||
|
||||
delete[] FPVSData;
|
||||
delete[] FPFSData;
|
||||
delete[] NMVSData;
|
||||
delete[] NMFSData;
|
||||
delete[] PMVSData;
|
||||
delete[] PMFSData;
|
||||
|
||||
// Create 2D material renderer.
|
||||
|
||||
@ -458,16 +483,18 @@ namespace video
|
||||
R2DFSFile->drop();
|
||||
|
||||
MaterialRenderer2D = new COGLES2Renderer2D(R2DVSData, R2DFSData, this);
|
||||
|
||||
delete[] R2DVSData;
|
||||
delete[] R2DFSData;
|
||||
}
|
||||
|
||||
|
||||
//! presents the rendered scene on the screen, returns false if failed
|
||||
bool COGLES2Driver::endScene()
|
||||
{
|
||||
CNullDriver::endScene();
|
||||
CNullDriver::endScene();
|
||||
|
||||
#if defined(_IRR_COMPILE_WITH_EGL_)
|
||||
|
||||
bool res = EglContext->swapBuffers();
|
||||
|
||||
if (!res)
|
||||
@ -475,11 +502,10 @@ namespace video
|
||||
os::Printer::log("Could not swap buffers for OpenGL-ES2 driver.");
|
||||
return false;
|
||||
}
|
||||
|
||||
#elif defined(_IRR_COMPILE_WITH_IPHONE_DEVICE_)
|
||||
glFlush();
|
||||
glBindRenderbuffer(GL_RENDERBUFFER, ViewRenderbuffer);
|
||||
Device->displayEnd();
|
||||
glFlush();
|
||||
glBindRenderbuffer(GL_RENDERBUFFER, ViewRenderbuffer);
|
||||
Device->displayEnd();
|
||||
#endif
|
||||
|
||||
return true;
|
||||
@ -2871,6 +2897,22 @@ namespace video
|
||||
}
|
||||
#endif
|
||||
|
||||
// -----------------------------------
|
||||
// WAYLAND VERSION
|
||||
// -----------------------------------
|
||||
#ifdef _IRR_COMPILE_WITH_WAYLAND_DEVICE_
|
||||
IVideoDriver* createOGLES2Driver(const SIrrlichtCreationParameters& params,
|
||||
io::IFileSystem* io, CIrrDeviceWayland* device)
|
||||
{
|
||||
#ifdef _IRR_COMPILE_WITH_OGLES2_
|
||||
return new COGLES2Driver(params, io, device);
|
||||
#else
|
||||
return 0;
|
||||
#endif // _IRR_COMPILE_WITH_OGLES2_
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
// -----------------------------------
|
||||
// MACOSX VERSION
|
||||
// -----------------------------------
|
||||
|
@ -14,6 +14,8 @@
|
||||
#include "MacOSX/CIrrDeviceMacOSX.h"
|
||||
#elif defined(_IRR_COMPILE_WITH_IPHONE_DEVICE_)
|
||||
#include "iOS/CIrrDeviceiOS.h"
|
||||
#elif _IRR_COMPILE_WITH_WAYLAND_DEVICE_
|
||||
#include "CIrrDeviceWayland.h"
|
||||
#endif
|
||||
|
||||
#include "SIrrCreationParameters.h"
|
||||
@ -63,6 +65,11 @@ namespace video
|
||||
io::IFileSystem* io);
|
||||
#endif
|
||||
|
||||
#ifdef _IRR_COMPILE_WITH_WAYLAND_DEVICE_
|
||||
COGLES2Driver(const SIrrlichtCreationParameters& params,
|
||||
io::IFileSystem* io, CIrrDeviceWayland* device);
|
||||
#endif
|
||||
|
||||
#ifdef _IRR_COMPILE_WITH_OSX_DEVICE_
|
||||
COGLES2Driver(const SIrrlichtCreationParameters& params,
|
||||
io::IFileSystem* io, CIrrDeviceMacOSX *device);
|
||||
@ -460,6 +467,7 @@ namespace video
|
||||
|
||||
#if defined(_IRR_COMPILE_WITH_EGL_)
|
||||
ContextManagerEGL* EglContext;
|
||||
bool EglContextExternal;
|
||||
#endif
|
||||
#if defined(_IRR_COMPILE_WITH_IPHONE_DEVICE_)
|
||||
CIrrDeviceIPhone* Device;
|
||||
|
@ -93,7 +93,7 @@ COGLES2MaterialRenderer::~COGLES2MaterialRenderer()
|
||||
if (Program)
|
||||
{
|
||||
GLuint shaders[8];
|
||||
GLint count;
|
||||
GLint count = 0;
|
||||
glGetAttachedShaders(Program, 8, &count, shaders);
|
||||
|
||||
count=core::min_(count,8);
|
||||
|
@ -22,9 +22,15 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include <cassert>
|
||||
|
||||
#include "IrrlichtDevice.h"
|
||||
#if defined(_IRR_COMPILE_WITH_X11_DEVICE_)
|
||||
#include "CIrrDeviceLinux.h"
|
||||
#endif
|
||||
#if defined(_IRR_COMPILE_WITH_WAYLAND_DEVICE_)
|
||||
#include "CIrrDeviceWayland.h"
|
||||
#endif
|
||||
#ifdef _IRR_COMPILE_WITH_OSX_DEVICE_
|
||||
#include "MacOSX/OSXClipboard.h"
|
||||
#endif
|
||||
@ -32,16 +38,16 @@
|
||||
namespace irr
|
||||
{
|
||||
|
||||
#if defined(_IRR_COMPILE_WITH_X11_DEVICE_)
|
||||
// constructor linux
|
||||
COSOperator::COSOperator(const core::stringc& osVersion, CIrrDeviceLinux* device)
|
||||
: OperatingSystem(osVersion), IrrDeviceLinux(device)
|
||||
COSOperator::COSOperator(const core::stringc& osVersion, IrrlichtDevice* device)
|
||||
: OperatingSystem(osVersion), IrrDevice(device)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
// constructor
|
||||
COSOperator::COSOperator(const core::stringc& osVersion) : OperatingSystem(osVersion)
|
||||
COSOperator::COSOperator(const core::stringc& osVersion)
|
||||
: OperatingSystem(osVersion), IrrDevice(NULL)
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
setDebugName("COSOperator");
|
||||
@ -117,10 +123,29 @@ void COSOperator::copyToClipboard(const c8* text) const
|
||||
#elif defined(_IRR_COMPILE_WITH_OSX_DEVICE_)
|
||||
|
||||
OSXCopyToClipboard(text);
|
||||
|
||||
#elif defined(_IRR_COMPILE_WITH_X11_DEVICE_)
|
||||
if ( IrrDeviceLinux )
|
||||
IrrDeviceLinux->copyToClipboard(text);
|
||||
|
||||
#elif defined(_IRR_COMPILE_WITH_X11_DEVICE_) || defined(_IRR_COMPILE_WITH_WAYLAND_DEVICE_)
|
||||
if (IrrDevice != NULL)
|
||||
{
|
||||
#if defined(_IRR_COMPILE_WITH_X11_DEVICE_)
|
||||
if (IrrDevice->getType() == EIDT_X11)
|
||||
{
|
||||
CIrrDeviceLinux* device = dynamic_cast<CIrrDeviceLinux*>(IrrDevice);
|
||||
assert(device);
|
||||
|
||||
device->copyToClipboard(text);
|
||||
}
|
||||
#endif
|
||||
#if defined(_IRR_COMPILE_WITH_WAYLAND_DEVICE_)
|
||||
if (IrrDevice->getType() == EIDT_WAYLAND)
|
||||
{
|
||||
CIrrDeviceWayland* device = dynamic_cast<CIrrDeviceWayland*>(IrrDevice);
|
||||
assert(device);
|
||||
|
||||
device->copyToClipboard(text);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#else
|
||||
|
||||
#endif
|
||||
@ -171,11 +196,32 @@ const c8* COSOperator::getTextFromClipboard() const
|
||||
|
||||
#elif defined(_IRR_COMPILE_WITH_OSX_DEVICE_)
|
||||
return (OSXCopyFromClipboard());
|
||||
|
||||
|
||||
|
||||
#elif defined(_IRR_COMPILE_WITH_X11_DEVICE_)
|
||||
if ( IrrDeviceLinux )
|
||||
return IrrDeviceLinux->getTextFromClipboard();
|
||||
return 0;
|
||||
#elif defined(_IRR_COMPILE_WITH_X11_DEVICE_) || defined(_IRR_COMPILE_WITH_WAYLAND_DEVICE_)
|
||||
if (IrrDevice != NULL)
|
||||
{
|
||||
#if defined(_IRR_COMPILE_WITH_X11_DEVICE_)
|
||||
if (IrrDevice->getType() == EIDT_X11)
|
||||
{
|
||||
CIrrDeviceLinux* device = dynamic_cast<CIrrDeviceLinux*>(IrrDevice);
|
||||
assert(device);
|
||||
|
||||
return device->getTextFromClipboard();
|
||||
}
|
||||
#endif
|
||||
#if defined(_IRR_COMPILE_WITH_WAYLAND_DEVICE_)
|
||||
if (IrrDevice->getType() == EIDT_WAYLAND)
|
||||
{
|
||||
CIrrDeviceWayland* device = dynamic_cast<CIrrDeviceWayland*>(IrrDevice);
|
||||
assert(device);
|
||||
|
||||
return device->getTextFromClipboard();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
return 0;
|
||||
|
||||
#else
|
||||
|
||||
|
@ -10,7 +10,7 @@
|
||||
namespace irr
|
||||
{
|
||||
|
||||
class CIrrDeviceLinux;
|
||||
class IrrlichtDevice;
|
||||
|
||||
//! The Operating system operator provides operation system specific methods and informations.
|
||||
class COSOperator : public IOSOperator
|
||||
@ -18,9 +18,7 @@ class COSOperator : public IOSOperator
|
||||
public:
|
||||
|
||||
// constructor
|
||||
#if defined(_IRR_COMPILE_WITH_X11_DEVICE_)
|
||||
COSOperator(const core::stringc& osversion, CIrrDeviceLinux* device);
|
||||
#endif
|
||||
COSOperator(const core::stringc& osversion, IrrlichtDevice* device);
|
||||
COSOperator(const core::stringc& osversion);
|
||||
|
||||
//! returns the current operation system version as string.
|
||||
@ -55,10 +53,7 @@ public:
|
||||
private:
|
||||
|
||||
core::stringc OperatingSystem;
|
||||
|
||||
#if defined(_IRR_COMPILE_WITH_X11_DEVICE_)
|
||||
CIrrDeviceLinux * IrrDeviceLinux;
|
||||
#endif
|
||||
IrrlichtDevice* IrrDevice;
|
||||
|
||||
};
|
||||
|
||||
|
@ -26,6 +26,11 @@ extern bool GLContextDebugBit;
|
||||
#include "MacOSX/CIrrDeviceMacOSX.h"
|
||||
#endif
|
||||
|
||||
#ifdef _IRR_COMPILE_WITH_WAYLAND_DEVICE_
|
||||
#include "CIrrDeviceWayland.h"
|
||||
#include "CContextEGL.h"
|
||||
#endif
|
||||
|
||||
namespace irr
|
||||
{
|
||||
namespace video
|
||||
@ -677,6 +682,51 @@ bool COpenGLDriver::initDriver(CIrrDeviceLinux* device)
|
||||
#endif // _IRR_COMPILE_WITH_X11_DEVICE_
|
||||
|
||||
|
||||
// -----------------------------------------------------------------------
|
||||
// Wayland CONSTRUCTOR
|
||||
// -----------------------------------------------------------------------
|
||||
#ifdef _IRR_COMPILE_WITH_WAYLAND_DEVICE_
|
||||
//! Linux constructor and init code
|
||||
COpenGLDriver::COpenGLDriver(const SIrrlichtCreationParameters& params,
|
||||
io::IFileSystem* io, CIrrDeviceWayland* device)
|
||||
: CNullDriver(io, params.WindowSize), COpenGLExtensionHandler(),
|
||||
CurrentRenderMode(ERM_NONE), ResetRenderStates(true),
|
||||
Transformation3DChanged(true), AntiAlias(params.AntiAlias),
|
||||
RenderTargetTexture(0), CurrentRendertargetSize(0, 0), ColorFormat(ECF_R8G8B8),
|
||||
CurrentTarget(ERT_FRAME_BUFFER), Params(params),
|
||||
wl_device(device), DeviceType(EIDT_WAYLAND)
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
setDebugName("COpenGLDriver");
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
bool COpenGLDriver::changeRenderContext(const SExposedVideoData& videoData,
|
||||
CIrrDeviceWayland* device)
|
||||
{
|
||||
if (!device->getEGLContext()->makeCurrent())
|
||||
{
|
||||
os::Printer::log("Render Context switch failed.");
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
//! inits the open gl driver
|
||||
bool COpenGLDriver::initDriver(CIrrDeviceWayland* device)
|
||||
{
|
||||
genericDriverInit();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
#endif // _IRR_COMPILE_WITH_WAYLAND_DEVICE
|
||||
|
||||
|
||||
|
||||
// -----------------------------------------------------------------------
|
||||
// SDL CONSTRUCTOR
|
||||
// -----------------------------------------------------------------------
|
||||
@ -929,6 +979,14 @@ bool COpenGLDriver::endScene()
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef _IRR_COMPILE_WITH_WAYLAND_DEVICE_
|
||||
if (DeviceType == EIDT_WAYLAND)
|
||||
{
|
||||
wl_device->getEGLContext()->swapBuffers();
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef _IRR_COMPILE_WITH_OSX_DEVICE_
|
||||
if (DeviceType == EIDT_OSX)
|
||||
{
|
||||
@ -996,6 +1054,11 @@ bool COpenGLDriver::beginScene(bool backBuffer, bool zBuffer, SColor color,
|
||||
case EIDT_X11:
|
||||
changeRenderContext(videoData, X11Device);
|
||||
break;
|
||||
#endif
|
||||
#ifdef _IRR_COMPILE_WITH_WAYLAND_DEVICE_
|
||||
case EIDT_WAYLAND:
|
||||
changeRenderContext(videoData, wl_device);
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
changeRenderContext(videoData, (void*)0);
|
||||
@ -4928,6 +4991,28 @@ IVideoDriver* createOpenGLDriver(const SIrrlichtCreationParameters& params,
|
||||
#endif // _IRR_COMPILE_WITH_X11_DEVICE_
|
||||
|
||||
|
||||
// -----------------------------------
|
||||
// Wayland VERSION
|
||||
// -----------------------------------
|
||||
#ifdef _IRR_COMPILE_WITH_WAYLAND_DEVICE_
|
||||
IVideoDriver* createOpenGLDriver(const SIrrlichtCreationParameters& params,
|
||||
io::IFileSystem* io, CIrrDeviceWayland* device)
|
||||
{
|
||||
#ifdef _IRR_COMPILE_WITH_OPENGL_
|
||||
COpenGLDriver* ogl = new COpenGLDriver(params, io, device);
|
||||
if (!ogl->initDriver(device))
|
||||
{
|
||||
ogl->drop();
|
||||
ogl = 0;
|
||||
}
|
||||
return ogl;
|
||||
#else
|
||||
return 0;
|
||||
#endif // _IRR_COMPILE_WITH_OPENGL_
|
||||
}
|
||||
#endif // _IRR_COMPILE_WITH_WAYLAND_DEVICE
|
||||
|
||||
|
||||
// -----------------------------------
|
||||
// SDL VERSION
|
||||
// -----------------------------------
|
||||
|
@ -13,6 +13,7 @@ namespace irr
|
||||
{
|
||||
class CIrrDeviceWin32;
|
||||
class CIrrDeviceLinux;
|
||||
class CIrrDeviceWayland;
|
||||
class CIrrDeviceSDL;
|
||||
class CIrrDeviceMacOSX;
|
||||
}
|
||||
@ -44,6 +45,13 @@ namespace video
|
||||
bool changeRenderContext(const SExposedVideoData& videoData, CIrrDeviceWin32* device);
|
||||
#endif
|
||||
|
||||
#ifdef _IRR_COMPILE_WITH_WAYLAND_DEVICE_
|
||||
COpenGLDriver(const SIrrlichtCreationParameters& params, io::IFileSystem* io, CIrrDeviceWayland* device);
|
||||
//! inits the EGL specific parts of the open gl driver
|
||||
bool initDriver(CIrrDeviceWayland* device);
|
||||
bool changeRenderContext(const SExposedVideoData& videoData, CIrrDeviceWayland* device);
|
||||
#endif
|
||||
|
||||
#ifdef _IRR_COMPILE_WITH_X11_DEVICE_
|
||||
COpenGLDriver(const SIrrlichtCreationParameters& params, io::IFileSystem* io, CIrrDeviceLinux* device);
|
||||
//! inits the GLX specific parts of the open gl driver
|
||||
@ -587,6 +595,9 @@ namespace video
|
||||
Display* X11Display;
|
||||
CIrrDeviceLinux *X11Device;
|
||||
#endif
|
||||
#ifdef _IRR_COMPILE_WITH_WAYLAND_DEVICE_
|
||||
CIrrDeviceWayland *wl_device;
|
||||
#endif
|
||||
#ifdef _IRR_COMPILE_WITH_OSX_DEVICE_
|
||||
CIrrDeviceMacOSX *OSXDevice;
|
||||
#endif
|
||||
|
@ -37,11 +37,11 @@ CSceneNodeAnimatorCameraFPS::CSceneNodeAnimatorCameraFPS(gui::ICursorControl* cu
|
||||
if (!keyMapArray || !keyMapSize)
|
||||
{
|
||||
// create default key map
|
||||
KeyMap.push_back(SKeyMap(EKA_MOVE_FORWARD, irr::KEY_UP));
|
||||
KeyMap.push_back(SKeyMap(EKA_MOVE_BACKWARD, irr::KEY_DOWN));
|
||||
KeyMap.push_back(SKeyMap(EKA_STRAFE_LEFT, irr::KEY_LEFT));
|
||||
KeyMap.push_back(SKeyMap(EKA_STRAFE_RIGHT, irr::KEY_RIGHT));
|
||||
KeyMap.push_back(SKeyMap(EKA_JUMP_UP, irr::KEY_KEY_J));
|
||||
KeyMap.push_back(SKeyMap(EKA_MOVE_FORWARD, irr::IRR_KEY_UP));
|
||||
KeyMap.push_back(SKeyMap(EKA_MOVE_BACKWARD, irr::IRR_KEY_DOWN));
|
||||
KeyMap.push_back(SKeyMap(EKA_STRAFE_LEFT, irr::IRR_KEY_LEFT));
|
||||
KeyMap.push_back(SKeyMap(EKA_STRAFE_RIGHT, irr::IRR_KEY_RIGHT));
|
||||
KeyMap.push_back(SKeyMap(EKA_JUMP_UP, irr::IRR_KEY_J));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
File diff suppressed because it is too large
Load Diff
Binary file not shown.
@ -26,6 +26,10 @@
|
||||
#include "CIrrDeviceWinCE.h"
|
||||
#endif
|
||||
|
||||
#ifdef _IRR_COMPILE_WITH_WAYLAND_DEVICE_
|
||||
#include "CIrrDeviceWayland.h"
|
||||
#endif
|
||||
|
||||
#ifdef _IRR_COMPILE_WITH_X11_DEVICE_
|
||||
#include "CIrrDeviceLinux.h"
|
||||
#endif
|
||||
@ -47,6 +51,8 @@
|
||||
#include <android/log.h>
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
namespace irr
|
||||
{
|
||||
//! stub for calling createDeviceEx
|
||||
@ -68,53 +74,129 @@ namespace irr
|
||||
|
||||
return createDeviceEx(p);
|
||||
}
|
||||
|
||||
static void overrideDeviceType(E_DEVICE_TYPE& device_type)
|
||||
{
|
||||
const char* irr_device_type = getenv("IRR_DEVICE_TYPE");
|
||||
|
||||
if (irr_device_type == NULL)
|
||||
return;
|
||||
|
||||
#ifdef _IRR_COMPILE_WITH_WINDOWS_DEVICE_
|
||||
if (strcmp(irr_device_type, "win32") == 0)
|
||||
{
|
||||
device_type = EIDT_WIN32;
|
||||
}
|
||||
#endif
|
||||
#ifdef _IRR_COMPILE_WITH_OSX_DEVICE_
|
||||
if (strcmp(irr_device_type, "osx") == 0)
|
||||
{
|
||||
device_type = EIDT_OSX;
|
||||
}
|
||||
#endif
|
||||
#ifdef _IRR_COMPILE_WITH_WINDOWS_CE_DEVICE_
|
||||
if (strcmp(irr_device_type, "wince") == 0)
|
||||
{
|
||||
device_type = EIDT_WINCE;
|
||||
}
|
||||
#endif
|
||||
#ifdef _IRR_COMPILE_WITH_WAYLAND_DEVICE_
|
||||
if (strcmp(irr_device_type, "wayland") == 0)
|
||||
{
|
||||
device_type = EIDT_WAYLAND;
|
||||
}
|
||||
#endif
|
||||
#ifdef _IRR_COMPILE_WITH_X11_DEVICE_
|
||||
if (strcmp(irr_device_type, "x11") == 0)
|
||||
{
|
||||
device_type = EIDT_X11;
|
||||
}
|
||||
#endif
|
||||
#ifdef _IRR_COMPILE_WITH_SDL_DEVICE_
|
||||
if (strcmp(irr_device_type, "sdl") == 0)
|
||||
{
|
||||
device_type = EIDT_SDL;
|
||||
}
|
||||
#endif
|
||||
#ifdef _IRR_COMPILE_WITH_FB_DEVICE_
|
||||
if (strcmp(irr_device_type, "framebuffer") == 0)
|
||||
{
|
||||
device_type = EIDT_FRAMEBUFFER;
|
||||
}
|
||||
#endif
|
||||
#ifdef _IRR_COMPILE_WITH_ANDROID_DEVICE_
|
||||
if (strcmp(irr_device_type, "android") == 0)
|
||||
{
|
||||
device_type = EIDT_ANDROID;
|
||||
}
|
||||
#endif
|
||||
#ifdef _IRR_COMPILE_WITH_CONSOLE_DEVICE_
|
||||
if (strcmp(irr_device_type, "console") == 0)
|
||||
{
|
||||
device_type = EIDT_CONSOLE;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
extern "C" IRRLICHT_API IrrlichtDevice* IRRCALLCONV createDeviceEx(const SIrrlichtCreationParameters& params)
|
||||
{
|
||||
|
||||
IrrlichtDevice* dev = 0;
|
||||
|
||||
SIrrlichtCreationParameters creation_params = params;
|
||||
overrideDeviceType(creation_params.DeviceType);
|
||||
|
||||
#ifdef _IRR_COMPILE_WITH_WINDOWS_DEVICE_
|
||||
if (params.DeviceType == EIDT_WIN32 || (!dev && params.DeviceType == EIDT_BEST))
|
||||
dev = new CIrrDeviceWin32(params);
|
||||
if (creation_params.DeviceType == EIDT_WIN32 || (!dev && creation_params.DeviceType == EIDT_BEST))
|
||||
dev = new CIrrDeviceWin32(creation_params);
|
||||
#endif
|
||||
|
||||
#ifdef _IRR_COMPILE_WITH_OSX_DEVICE_
|
||||
if (params.DeviceType == EIDT_OSX || (!dev && params.DeviceType == EIDT_BEST))
|
||||
dev = new CIrrDeviceMacOSX(params);
|
||||
if (creation_params.DeviceType == EIDT_OSX || (!dev && creation_params.DeviceType == EIDT_BEST))
|
||||
dev = new CIrrDeviceMacOSX(creation_params);
|
||||
#endif
|
||||
|
||||
#ifdef _IRR_COMPILE_WITH_WINDOWS_CE_DEVICE_
|
||||
if (params.DeviceType == EIDT_WINCE || (!dev && params.DeviceType == EIDT_BEST))
|
||||
dev = new CIrrDeviceWinCE(params);
|
||||
if (creation_params.DeviceType == EIDT_WINCE || (!dev && creation_params.DeviceType == EIDT_BEST))
|
||||
dev = new CIrrDeviceWinCE(creation_params);
|
||||
#endif
|
||||
|
||||
#ifdef _IRR_COMPILE_WITH_WAYLAND_DEVICE_
|
||||
if (creation_params.DeviceType == EIDT_WAYLAND || (!dev && creation_params.DeviceType == EIDT_BEST))
|
||||
{
|
||||
if (CIrrDeviceWayland::isWaylandDeviceWorking())
|
||||
{
|
||||
dev = new CIrrDeviceWayland(creation_params);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef _IRR_COMPILE_WITH_X11_DEVICE_
|
||||
if (params.DeviceType == EIDT_X11 || (!dev && params.DeviceType == EIDT_BEST))
|
||||
dev = new CIrrDeviceLinux(params);
|
||||
if (creation_params.DeviceType == EIDT_X11 || (!dev && creation_params.DeviceType == EIDT_BEST))
|
||||
dev = new CIrrDeviceLinux(creation_params);
|
||||
#endif
|
||||
|
||||
#ifdef _IRR_COMPILE_WITH_SDL_DEVICE_
|
||||
if (params.DeviceType == EIDT_SDL || (!dev && params.DeviceType == EIDT_BEST))
|
||||
dev = new CIrrDeviceSDL(params);
|
||||
if (creation_params.DeviceType == EIDT_SDL || (!dev && creation_params.DeviceType == EIDT_BEST))
|
||||
dev = new CIrrDeviceSDL(creation_params);
|
||||
#endif
|
||||
|
||||
#ifdef _IRR_COMPILE_WITH_FB_DEVICE_
|
||||
if (params.DeviceType == EIDT_FRAMEBUFFER || (!dev && params.DeviceType == EIDT_BEST))
|
||||
dev = new CIrrDeviceFB(params);
|
||||
if (creation_params.DeviceType == EIDT_FRAMEBUFFER || (!dev && creation_params.DeviceType == EIDT_BEST))
|
||||
dev = new CIrrDeviceFB(creation_params);
|
||||
#endif
|
||||
|
||||
#ifdef _IRR_COMPILE_WITH_ANDROID_DEVICE_
|
||||
if (params.DeviceType == EIDT_ANDROID || (!dev && params.DeviceType == EIDT_BEST))
|
||||
dev = new CIrrDeviceAndroid(params);
|
||||
if (creation_params.DeviceType == EIDT_ANDROID || (!dev && creation_params.DeviceType == EIDT_BEST))
|
||||
dev = new CIrrDeviceAndroid(creation_params);
|
||||
#endif
|
||||
|
||||
#ifdef _IRR_COMPILE_WITH_CONSOLE_DEVICE_
|
||||
if (params.DeviceType == EIDT_CONSOLE || (!dev && params.DeviceType == EIDT_BEST))
|
||||
dev = new CIrrDeviceConsole(params);
|
||||
if (creation_params.DeviceType == EIDT_CONSOLE || (!dev && creation_params.DeviceType == EIDT_BEST))
|
||||
dev = new CIrrDeviceConsole(creation_params);
|
||||
#endif
|
||||
|
||||
if (dev && !dev->getVideoDriver() && params.DriverType != video::EDT_NULL)
|
||||
if (dev && !dev->getVideoDriver() && creation_params.DriverType != video::EDT_NULL)
|
||||
{
|
||||
dev->closeDevice(); // destroy window
|
||||
dev->run(); // consume quit message
|
||||
|
File diff suppressed because it is too large
Load Diff
Binary file not shown.
@ -1,50 +0,0 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 11.00
|
||||
# Visual Studio 2010
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Irrlicht", "Irrlicht10.0.vcxproj", "{E08E042A-6C45-411B-92BE-3CC31331019F}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Win32 = Debug|Win32
|
||||
Debug|x64 = Debug|x64
|
||||
Release - Fast FPU|Win32 = Release - Fast FPU|Win32
|
||||
Release - Fast FPU|x64 = Release - Fast FPU|x64
|
||||
Release|Win32 = Release|Win32
|
||||
Release|x64 = Release|x64
|
||||
Static lib - Debug|Win32 = Static lib - Debug|Win32
|
||||
Static lib - Debug|x64 = Static lib - Debug|x64
|
||||
Static lib - Release - Fast FPU|Win32 = Static lib - Release - Fast FPU|Win32
|
||||
Static lib - Release - Fast FPU|x64 = Static lib - Release - Fast FPU|x64
|
||||
Static lib - Release|Win32 = Static lib - Release|Win32
|
||||
Static lib - Release|x64 = Static lib - Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{E08E042A-6C45-411B-92BE-3CC31331019F}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{E08E042A-6C45-411B-92BE-3CC31331019F}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{E08E042A-6C45-411B-92BE-3CC31331019F}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{E08E042A-6C45-411B-92BE-3CC31331019F}.Debug|x64.Build.0 = Debug|x64
|
||||
{E08E042A-6C45-411B-92BE-3CC31331019F}.Release - Fast FPU|Win32.ActiveCfg = Release - Fast FPU|Win32
|
||||
{E08E042A-6C45-411B-92BE-3CC31331019F}.Release - Fast FPU|Win32.Build.0 = Release - Fast FPU|Win32
|
||||
{E08E042A-6C45-411B-92BE-3CC31331019F}.Release - Fast FPU|x64.ActiveCfg = Release - Fast FPU|x64
|
||||
{E08E042A-6C45-411B-92BE-3CC31331019F}.Release - Fast FPU|x64.Build.0 = Release - Fast FPU|x64
|
||||
{E08E042A-6C45-411B-92BE-3CC31331019F}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{E08E042A-6C45-411B-92BE-3CC31331019F}.Release|Win32.Build.0 = Release|Win32
|
||||
{E08E042A-6C45-411B-92BE-3CC31331019F}.Release|x64.ActiveCfg = Release|x64
|
||||
{E08E042A-6C45-411B-92BE-3CC31331019F}.Release|x64.Build.0 = Release|x64
|
||||
{E08E042A-6C45-411B-92BE-3CC31331019F}.Static lib - Debug|Win32.ActiveCfg = Static lib - Debug|Win32
|
||||
{E08E042A-6C45-411B-92BE-3CC31331019F}.Static lib - Debug|Win32.Build.0 = Static lib - Debug|Win32
|
||||
{E08E042A-6C45-411B-92BE-3CC31331019F}.Static lib - Debug|x64.ActiveCfg = Static lib - Debug|x64
|
||||
{E08E042A-6C45-411B-92BE-3CC31331019F}.Static lib - Debug|x64.Build.0 = Static lib - Debug|x64
|
||||
{E08E042A-6C45-411B-92BE-3CC31331019F}.Static lib - Release - Fast FPU|Win32.ActiveCfg = Static lib - Release - Fast FPU|Win32
|
||||
{E08E042A-6C45-411B-92BE-3CC31331019F}.Static lib - Release - Fast FPU|Win32.Build.0 = Static lib - Release - Fast FPU|Win32
|
||||
{E08E042A-6C45-411B-92BE-3CC31331019F}.Static lib - Release - Fast FPU|x64.ActiveCfg = Static lib - Release - Fast FPU|x64
|
||||
{E08E042A-6C45-411B-92BE-3CC31331019F}.Static lib - Release - Fast FPU|x64.Build.0 = Static lib - Release - Fast FPU|x64
|
||||
{E08E042A-6C45-411B-92BE-3CC31331019F}.Static lib - Release|Win32.ActiveCfg = Static lib - Release|Win32
|
||||
{E08E042A-6C45-411B-92BE-3CC31331019F}.Static lib - Release|Win32.Build.0 = Static lib - Release|Win32
|
||||
{E08E042A-6C45-411B-92BE-3CC31331019F}.Static lib - Release|x64.ActiveCfg = Static lib - Release|x64
|
||||
{E08E042A-6C45-411B-92BE-3CC31331019F}.Static lib - Release|x64.Build.0 = Static lib - Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,50 +0,0 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 11.00
|
||||
# Visual Studio 2012
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Irrlicht", "Irrlicht11.0.vcxproj", "{E08E042A-6C45-411B-92BE-3CC31331019F}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Win32 = Debug|Win32
|
||||
Debug|x64 = Debug|x64
|
||||
Release - Fast FPU|Win32 = Release - Fast FPU|Win32
|
||||
Release - Fast FPU|x64 = Release - Fast FPU|x64
|
||||
Release|Win32 = Release|Win32
|
||||
Release|x64 = Release|x64
|
||||
Static lib - Debug|Win32 = Static lib - Debug|Win32
|
||||
Static lib - Debug|x64 = Static lib - Debug|x64
|
||||
Static lib - Release - Fast FPU|Win32 = Static lib - Release - Fast FPU|Win32
|
||||
Static lib - Release - Fast FPU|x64 = Static lib - Release - Fast FPU|x64
|
||||
Static lib - Release|Win32 = Static lib - Release|Win32
|
||||
Static lib - Release|x64 = Static lib - Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{E08E042A-6C45-411B-92BE-3CC31331019F}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{E08E042A-6C45-411B-92BE-3CC31331019F}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{E08E042A-6C45-411B-92BE-3CC31331019F}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{E08E042A-6C45-411B-92BE-3CC31331019F}.Debug|x64.Build.0 = Debug|x64
|
||||
{E08E042A-6C45-411B-92BE-3CC31331019F}.Release - Fast FPU|Win32.ActiveCfg = Release - Fast FPU|Win32
|
||||
{E08E042A-6C45-411B-92BE-3CC31331019F}.Release - Fast FPU|Win32.Build.0 = Release - Fast FPU|Win32
|
||||
{E08E042A-6C45-411B-92BE-3CC31331019F}.Release - Fast FPU|x64.ActiveCfg = Release - Fast FPU|x64
|
||||
{E08E042A-6C45-411B-92BE-3CC31331019F}.Release - Fast FPU|x64.Build.0 = Release - Fast FPU|x64
|
||||
{E08E042A-6C45-411B-92BE-3CC31331019F}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{E08E042A-6C45-411B-92BE-3CC31331019F}.Release|Win32.Build.0 = Release|Win32
|
||||
{E08E042A-6C45-411B-92BE-3CC31331019F}.Release|x64.ActiveCfg = Release|x64
|
||||
{E08E042A-6C45-411B-92BE-3CC31331019F}.Release|x64.Build.0 = Release|x64
|
||||
{E08E042A-6C45-411B-92BE-3CC31331019F}.Static lib - Debug|Win32.ActiveCfg = Static lib - Debug|Win32
|
||||
{E08E042A-6C45-411B-92BE-3CC31331019F}.Static lib - Debug|Win32.Build.0 = Static lib - Debug|Win32
|
||||
{E08E042A-6C45-411B-92BE-3CC31331019F}.Static lib - Debug|x64.ActiveCfg = Static lib - Debug|x64
|
||||
{E08E042A-6C45-411B-92BE-3CC31331019F}.Static lib - Debug|x64.Build.0 = Static lib - Debug|x64
|
||||
{E08E042A-6C45-411B-92BE-3CC31331019F}.Static lib - Release - Fast FPU|Win32.ActiveCfg = Static lib - Release - Fast FPU|Win32
|
||||
{E08E042A-6C45-411B-92BE-3CC31331019F}.Static lib - Release - Fast FPU|Win32.Build.0 = Static lib - Release - Fast FPU|Win32
|
||||
{E08E042A-6C45-411B-92BE-3CC31331019F}.Static lib - Release - Fast FPU|x64.ActiveCfg = Static lib - Release - Fast FPU|x64
|
||||
{E08E042A-6C45-411B-92BE-3CC31331019F}.Static lib - Release - Fast FPU|x64.Build.0 = Static lib - Release - Fast FPU|x64
|
||||
{E08E042A-6C45-411B-92BE-3CC31331019F}.Static lib - Release|Win32.ActiveCfg = Static lib - Release|Win32
|
||||
{E08E042A-6C45-411B-92BE-3CC31331019F}.Static lib - Release|Win32.Build.0 = Static lib - Release|Win32
|
||||
{E08E042A-6C45-411B-92BE-3CC31331019F}.Static lib - Release|x64.ActiveCfg = Static lib - Release|x64
|
||||
{E08E042A-6C45-411B-92BE-3CC31331019F}.Static lib - Release|x64.Build.0 = Static lib - Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,29 +0,0 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 9.00
|
||||
# Visual Studio 2005
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Irrlicht", "Irrlicht8.0.vcproj", "{E08E042A-6C45-411B-92BE-3CC31331019F}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Win32 = Debug|Win32
|
||||
Release|Win32 = Release|Win32
|
||||
Static lib - Debug|Win32 = Static lib - Debug|Win32
|
||||
Static lib - Release - Fast FPU|Win32 = Static lib - Release - Fast FPU|Win32
|
||||
Static lib - Release|Win32 = Static lib - Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{E08E042A-6C45-411B-92BE-3CC31331019F}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{E08E042A-6C45-411B-92BE-3CC31331019F}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{E08E042A-6C45-411B-92BE-3CC31331019F}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{E08E042A-6C45-411B-92BE-3CC31331019F}.Release|Win32.Build.0 = Release|Win32
|
||||
{E08E042A-6C45-411B-92BE-3CC31331019F}.Static lib - Debug|Win32.ActiveCfg = Static lib - Debug|Win32
|
||||
{E08E042A-6C45-411B-92BE-3CC31331019F}.Static lib - Debug|Win32.Build.0 = Static lib - Debug|Win32
|
||||
{E08E042A-6C45-411B-92BE-3CC31331019F}.Static lib - Release - Fast FPU|Win32.ActiveCfg = Static lib - Release - Fast FPU|Win32
|
||||
{E08E042A-6C45-411B-92BE-3CC31331019F}.Static lib - Release - Fast FPU|Win32.Build.0 = Static lib - Release - Fast FPU|Win32
|
||||
{E08E042A-6C45-411B-92BE-3CC31331019F}.Static lib - Release|Win32.ActiveCfg = Static lib - Release|Win32
|
||||
{E08E042A-6C45-411B-92BE-3CC31331019F}.Static lib - Release|Win32.Build.0 = Static lib - Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
File diff suppressed because it is too large
Load Diff
@ -1,32 +0,0 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 10.00
|
||||
# Visual C++ Express 2008
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Irrlicht", "Irrlicht9.0.vcproj", "{E08E042A-6C45-411B-92BE-3CC31331019F}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Win32 = Debug|Win32
|
||||
Release - Fast FPU|Win32 = Release - Fast FPU|Win32
|
||||
Release|Win32 = Release|Win32
|
||||
Static lib - Debug|Win32 = Static lib - Debug|Win32
|
||||
Static lib - Release - Fast FPU|Win32 = Static lib - Release - Fast FPU|Win32
|
||||
Static lib - Release|Win32 = Static lib - Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{E08E042A-6C45-411B-92BE-3CC31331019F}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{E08E042A-6C45-411B-92BE-3CC31331019F}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{E08E042A-6C45-411B-92BE-3CC31331019F}.Release - Fast FPU|Win32.ActiveCfg = Release - Fast FPU|Win32
|
||||
{E08E042A-6C45-411B-92BE-3CC31331019F}.Release - Fast FPU|Win32.Build.0 = Release - Fast FPU|Win32
|
||||
{E08E042A-6C45-411B-92BE-3CC31331019F}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{E08E042A-6C45-411B-92BE-3CC31331019F}.Release|Win32.Build.0 = Release|Win32
|
||||
{E08E042A-6C45-411B-92BE-3CC31331019F}.Static lib - Debug|Win32.ActiveCfg = Static lib - Debug|Win32
|
||||
{E08E042A-6C45-411B-92BE-3CC31331019F}.Static lib - Debug|Win32.Build.0 = Static lib - Debug|Win32
|
||||
{E08E042A-6C45-411B-92BE-3CC31331019F}.Static lib - Release - Fast FPU|Win32.ActiveCfg = Static lib - Release - Fast FPU|Win32
|
||||
{E08E042A-6C45-411B-92BE-3CC31331019F}.Static lib - Release - Fast FPU|Win32.Build.0 = Static lib - Release - Fast FPU|Win32
|
||||
{E08E042A-6C45-411B-92BE-3CC31331019F}.Static lib - Release|Win32.ActiveCfg = Static lib - Release|Win32
|
||||
{E08E042A-6C45-411B-92BE-3CC31331019F}.Static lib - Release|Win32.Build.0 = Static lib - Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
File diff suppressed because it is too large
Load Diff
@ -1,22 +0,0 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 9.00
|
||||
# Visual Studio 2005
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Irrlicht", "Irrlicht_mobile6.vcproj", "{E08E042A-6C45-411B-92BE-3CC31331019F}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Windows Mobile 6 Professional SDK (ARMV4I) = Debug|Windows Mobile 6 Professional SDK (ARMV4I)
|
||||
Release|Windows Mobile 6 Professional SDK (ARMV4I) = Release|Windows Mobile 6 Professional SDK (ARMV4I)
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{E08E042A-6C45-411B-92BE-3CC31331019F}.Debug|Windows Mobile 6 Professional SDK (ARMV4I).ActiveCfg = Debug|Windows Mobile 6 Professional SDK (ARMV4I)
|
||||
{E08E042A-6C45-411B-92BE-3CC31331019F}.Debug|Windows Mobile 6 Professional SDK (ARMV4I).Build.0 = Debug|Windows Mobile 6 Professional SDK (ARMV4I)
|
||||
{E08E042A-6C45-411B-92BE-3CC31331019F}.Debug|Windows Mobile 6 Professional SDK (ARMV4I).Deploy.0 = Debug|Windows Mobile 6 Professional SDK (ARMV4I)
|
||||
{E08E042A-6C45-411B-92BE-3CC31331019F}.Release|Windows Mobile 6 Professional SDK (ARMV4I).ActiveCfg = Release|Windows Mobile 6 Professional SDK (ARMV4I)
|
||||
{E08E042A-6C45-411B-92BE-3CC31331019F}.Release|Windows Mobile 6 Professional SDK (ARMV4I).Build.0 = Release|Windows Mobile 6 Professional SDK (ARMV4I)
|
||||
{E08E042A-6C45-411B-92BE-3CC31331019F}.Release|Windows Mobile 6 Professional SDK (ARMV4I).Deploy.0 = Release|Windows Mobile 6 Professional SDK (ARMV4I)
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user