mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-25 22:01:01 +00:00
Merge branch 'next' into lua-gfx-2
This commit is contained in:
commit
122b1c7091
1022 changed files with 109579 additions and 70686 deletions
|
@ -5,13 +5,8 @@ jobs:
|
|||
docker:
|
||||
- image: cimg/base:current
|
||||
environment:
|
||||
CC: ccache gcc -m32
|
||||
PKG_CONFIG_LIBDIR: /usr/lib/i386-linux-gnu/pkgconfig
|
||||
LIBGME_CFLAGS: -I/usr/include
|
||||
LIBGME_LDFLAGS: -lgme
|
||||
CC: ccache gcc
|
||||
CCACHE_COMPRESS: true
|
||||
WFLAGS: -Wno-unsuffixed-float-constants
|
||||
GCC81: true
|
||||
#- image: ubuntu:trusty
|
||||
# environment:
|
||||
# CC: ccache gcc -m32
|
||||
|
@ -23,16 +18,11 @@ jobs:
|
|||
# GCC48: true
|
||||
resource_class: large
|
||||
steps:
|
||||
- run:
|
||||
name: Add i386 arch
|
||||
command: sudo dpkg --add-architecture i386
|
||||
- run:
|
||||
name: Add STJr PPA
|
||||
command: |
|
||||
sudo apt-get -qq update
|
||||
sudo apt-get -qq -y install dirmngr
|
||||
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 0B1702D71499D9C25F986507F240F4449D3B0EC6
|
||||
echo "deb http://ppa.launchpad.net/stjr/srb2/ubuntu trusty main" | sudo tee -a /etc/apt/sources.list
|
||||
sudo apt-get -qq install apt-utils
|
||||
- run:
|
||||
name: Make APT cache folder
|
||||
command: mkdir -p /home/circleci/.cache/apt/archives/partial
|
||||
|
@ -49,11 +39,8 @@ jobs:
|
|||
keys:
|
||||
- v1-SRB2-APT
|
||||
- run:
|
||||
name: Uninstall amd64 SDK
|
||||
command: sudo apt-get -o Dir::Cache="/home/circleci/.cache/apt" -qq -y --no-install-recommends remove libcurl4-openssl-dev:amd64
|
||||
- run:
|
||||
name: Install i386 SDK
|
||||
command: sudo apt-get -o Dir::Cache="/home/circleci/.cache/apt" -qq -y --no-install-recommends install git build-essential libpng-dev:i386 libsdl2-mixer-dev:i386 libgme-dev:i386 libcurl4-openssl-dev:i386 libopenmpt-dev:i386 gettext ccache wget gcc-multilib upx openssh-client
|
||||
name: Install SDK
|
||||
command: sudo apt-get -o Dir::Cache="/home/circleci/.cache/apt" -qq -y --no-install-recommends install git build-essential libpng-dev libsdl2-mixer-dev libgme-dev libcurl4-openssl-dev libopenmpt-dev libminiupnpc-dev gettext ccache wget gcc-multilib upx openssh-client
|
||||
- run:
|
||||
name: make md5sum
|
||||
command: sudo find /home/circleci/.cache/apt/archives -type f -print0 | sort -z | sudo xargs -r0 md5sum > /home/circleci/.cache/apt_archives.md5
|
||||
|
@ -62,28 +49,19 @@ jobs:
|
|||
paths:
|
||||
- /home/circleci/.cache/apt
|
||||
- checkout
|
||||
- run:
|
||||
name: Compile without network support
|
||||
command: make -C src LINUX=1 ERRORMODE=1 -k NONET=1 -j4
|
||||
- run:
|
||||
name: wipe build
|
||||
command: make -C src LINUX=1 cleandep
|
||||
- run:
|
||||
name: rebuild depend
|
||||
command: make -C src LINUX=1 clean
|
||||
- run:
|
||||
name: make master depend file
|
||||
command: find make/linux/SDL/deps/ -type f -print0 | sort -z | xargs -r0 cat > make/linux/SDL.deps
|
||||
command: find make/linux64/SDL/deps/ -type f -print0 | sort -z | xargs -r0 cat > make/linux64/SDL.deps
|
||||
- restore_cache:
|
||||
keys:
|
||||
- v1-SRB2-{{ .Branch }}-{{ checksum "make/linux/SDL.deps" }}
|
||||
- v1-SRB2-{{ .Branch }}-{{ checksum "make/linux64/SDL.deps" }}
|
||||
- run:
|
||||
name: Compile
|
||||
command: make -C src LINUX=1 ERRORMODE=1 -k -j4
|
||||
command: make -C src LINUX64=1 ERRORMODE=1 -k -j4
|
||||
- store_artifacts:
|
||||
path: /home/circleci/SRB2/bin/
|
||||
destination: bin
|
||||
- save_cache:
|
||||
key: v1-SRB2-{{ .Branch }}-{{ checksum "make/linux/SDL.deps" }}
|
||||
key: v1-SRB2-{{ .Branch }}-{{ checksum "make/linux64/SDL.deps" }}
|
||||
paths:
|
||||
- /home/circleci/.ccache
|
||||
|
|
1
.gitattributes
vendored
1
.gitattributes
vendored
|
@ -10,6 +10,7 @@
|
|||
/src/Make*.cfg text=auto
|
||||
/src/CMakeLists.txt text=auto
|
||||
*.mk -whitespace text=auto
|
||||
/comptime.sh text eol=lf
|
||||
# Windows EOL
|
||||
*.cs -crlf -whitespace
|
||||
*.bat -crlf -whitespace
|
||||
|
|
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -24,3 +24,6 @@ Win32_LIB_ASM_Release
|
|||
/build
|
||||
/build/*
|
||||
/CMakeUserPresets.json
|
||||
/out
|
||||
/objs/VC10
|
||||
/thirdparty/vcpkg-overlays
|
||||
|
|
463
.gitlab-ci.yml
463
.gitlab-ci.yml
|
@ -3,7 +3,7 @@ variables:
|
|||
GIT_CLONE_PATH: $CI_BUILDS_DIR/$CI_CONCURRENT_ID/$CI_PROJECT_PATH
|
||||
|
||||
default:
|
||||
image: debian:stable-slim
|
||||
image: git.do.srb2.org:5050/stjr/srb2ci/srb2ci:stable
|
||||
|
||||
cache:
|
||||
- key: ccache-$CI_PROJECT_PATH_SLUG-$CI_JOB_NAME_SLUG
|
||||
|
@ -19,6 +19,11 @@ default:
|
|||
- apt-cache
|
||||
unprotect: true
|
||||
|
||||
- key: apk-$CI_JOB_IMAGE
|
||||
paths:
|
||||
- apk-cache
|
||||
unprotect: true
|
||||
|
||||
before_script:
|
||||
- - |
|
||||
# debconf
|
||||
|
@ -89,7 +94,7 @@ default:
|
|||
- - |
|
||||
# apt_common
|
||||
echo -e "\e[0Ksection_start:`date +%s`:apt_common[collapsed=true]\r\e[0KInstalling common packages"
|
||||
- apt-get install make git ccache nasm
|
||||
- apt-get install make git ccache nasm cmake ca-certificates
|
||||
- |
|
||||
# apt_common
|
||||
echo -e "\e[0Ksection_end:`date +%s`:apt_common\r\e[0K"
|
||||
|
@ -148,8 +153,8 @@ default:
|
|||
- - |
|
||||
# ccache_stats
|
||||
echo -e "\e[0Ksection_start:`date +%s`:ccache_stats[collapsed=true]\r\e[0Kccache statistics:"
|
||||
- ccache --show-stats --verbose
|
||||
- ccache --show-log-stats --verbose
|
||||
- ccache --show-stats
|
||||
- ccache --show-log-stats || true
|
||||
- |
|
||||
# ccahe_stats
|
||||
echo -e "\e[0Ksection_end:`date +%s`:ccache_stats\r\e[0K"
|
||||
|
@ -167,6 +172,10 @@ Debian testing GCC:
|
|||
allow_failure: true
|
||||
|
||||
artifacts:
|
||||
paths:
|
||||
- "bin/"
|
||||
- "src/comptime.h"
|
||||
expose_as: "testing-gcc"
|
||||
name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-testing-gcc"
|
||||
|
||||
variables:
|
||||
|
@ -185,7 +194,7 @@ Debian testing GCC:
|
|||
- - |
|
||||
# apt_development
|
||||
echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0KInstalling development packages"
|
||||
- apt-get install libsdl2-mixer-dev libpng-dev libcurl4-openssl-dev libgme-dev libopenmpt-dev
|
||||
- apt-get install libsdl2-mixer-dev libpng-dev libcurl4-openssl-dev libgme-dev libopenmpt-dev libminiupnpc-dev
|
||||
- |
|
||||
# apt_development
|
||||
echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K"
|
||||
|
@ -261,7 +270,7 @@ Debian stable:amd64:
|
|||
- - |
|
||||
# apt_development
|
||||
echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0KInstalling development packages"
|
||||
- apt-get install libsdl2-mixer-dev:amd64 libpng-dev:amd64 libcurl4-openssl-dev:amd64 libgme-dev:amd64 libopenmpt-dev:amd64
|
||||
- apt-get install libsdl2-mixer-dev:amd64 libpng-dev:amd64 libcurl4-openssl-dev:amd64 libgme-dev:amd64 libopenmpt-dev:amd64 libminiupnpc-dev:amd64
|
||||
- |
|
||||
# apt_development
|
||||
echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K"
|
||||
|
@ -274,6 +283,47 @@ Debian stable:amd64:
|
|||
# make
|
||||
echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K"
|
||||
|
||||
Debian oldstable:amd64:
|
||||
extends: Debian stable:amd64
|
||||
|
||||
when: manual
|
||||
|
||||
image: git.do.srb2.org:5050/stjr/srb2ci/srb2ci:oldstable
|
||||
|
||||
allow_failure: true
|
||||
|
||||
artifacts:
|
||||
paths:
|
||||
- "bin/"
|
||||
- "src/comptime.h"
|
||||
expose_as: "Debian old amd64"
|
||||
name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-old-x86-64"
|
||||
|
||||
script:
|
||||
- - |
|
||||
# apt_toolchain
|
||||
echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages"
|
||||
- apt-get install gcc-x86-64-linux-gnu || apt-get install gcc
|
||||
- |
|
||||
# apt_toolchain
|
||||
echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K"
|
||||
|
||||
- - |
|
||||
# apt_development
|
||||
echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0KInstalling development packages"
|
||||
- apt-get install libsdl2-mixer-dev:amd64 libpng-dev:amd64 libcurl4-openssl-dev:amd64 libopenmpt-dev:amd64 libminiupnpc-dev:amd64
|
||||
- |
|
||||
# apt_development
|
||||
echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K"
|
||||
|
||||
- - |
|
||||
# make
|
||||
echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2"
|
||||
- make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX64=1 NOGME=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX64=1 NOGME=1
|
||||
- |
|
||||
# make
|
||||
echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K"
|
||||
|
||||
Debian stable:i386:
|
||||
stage: build
|
||||
|
||||
|
@ -304,7 +354,7 @@ Debian stable:i386:
|
|||
- - |
|
||||
# apt_development
|
||||
echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0KInstalling development packages"
|
||||
- apt-get install libsdl2-mixer-dev:i386 libpng-dev:i386 libcurl4-openssl-dev:i386 libgme-dev:i386 libopenmpt-dev:i386
|
||||
- apt-get install libsdl2-mixer-dev:i386 libpng-dev:i386 libcurl4-openssl-dev:i386 libgme-dev:i386 libopenmpt-dev:i386 libminiupnpc-dev:i386
|
||||
- |
|
||||
# apt_development
|
||||
echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K"
|
||||
|
@ -348,7 +398,7 @@ Debian stable:arm64:
|
|||
- - |
|
||||
# apt_development
|
||||
echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0KInstalling development packages"
|
||||
- apt-get install libsdl2-mixer-dev:arm64 libpng-dev:arm64 libcurl4-openssl-dev:arm64 libgme-dev:arm64 libopenmpt-dev:arm64
|
||||
- apt-get install libsdl2-mixer-dev:arm64 libpng-dev:arm64 libcurl4-openssl-dev:arm64 libgme-dev:arm64 libopenmpt-dev:arm64 libminiupnpc-dev:arm64
|
||||
- |
|
||||
# apt_development
|
||||
echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K"
|
||||
|
@ -356,7 +406,87 @@ Debian stable:arm64:
|
|||
- - |
|
||||
# make
|
||||
echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2"
|
||||
- make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX64=1 ERRORMODE=1 NONX86=1C || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX64=1 NONX86=1 ARM64=1
|
||||
- make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX64=1 ERRORMODE=1 NONX86=1 ARM64=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX64=1 NONX86=1 ARM64=1
|
||||
- |
|
||||
# make
|
||||
echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K"
|
||||
|
||||
Debian oldstable:arm64:
|
||||
extends: Debian stable:arm64
|
||||
|
||||
when: manual
|
||||
|
||||
image: git.do.srb2.org:5050/stjr/srb2ci/srb2ci:oldstable
|
||||
|
||||
allow_failure: true
|
||||
|
||||
artifacts:
|
||||
paths:
|
||||
- "bin/"
|
||||
- "src/comptime.h"
|
||||
expose_as: "Debian old arm64"
|
||||
name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-old-aarch64"
|
||||
|
||||
script:
|
||||
- - |
|
||||
# apt_toolchain
|
||||
echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages"
|
||||
- apt-get install gcc-aarch64-linux-gnu || apt-get install gcc
|
||||
- |
|
||||
# apt_toolchain
|
||||
echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K"
|
||||
|
||||
- - |
|
||||
# apt_development
|
||||
echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0KInstalling development packages"
|
||||
- apt-get install libsdl2-mixer-dev:arm64 libpng-dev:arm64 libcurl4-openssl-dev:arm64 libopenmpt-dev:arm64 libminiupnpc-dev:arm64
|
||||
- |
|
||||
# apt_development
|
||||
echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K"
|
||||
|
||||
- - |
|
||||
# make
|
||||
echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2"
|
||||
- make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX64=1 ERRORMODE=1 NONX86=1 ARM64=1 NOGME=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX64=1 NONX86=1 ARM64=1 NOGME=1
|
||||
- |
|
||||
# make
|
||||
echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K"
|
||||
|
||||
batocera:arm64:
|
||||
extends: Debian stable:arm64
|
||||
|
||||
when: manual
|
||||
|
||||
allow_failure: true
|
||||
|
||||
artifacts:
|
||||
paths:
|
||||
- "bin/"
|
||||
- "src/comptime.h"
|
||||
expose_as: "Debian old arm64"
|
||||
name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-batocera-aarch64"
|
||||
|
||||
script:
|
||||
- - |
|
||||
# apt_toolchain
|
||||
echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages"
|
||||
- apt-get install gcc-aarch64-linux-gnu || apt-get install gcc
|
||||
- |
|
||||
# apt_toolchain
|
||||
echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K"
|
||||
|
||||
- - |
|
||||
# apt_development
|
||||
echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0KInstalling development packages"
|
||||
- apt-get install libsdl2-mixer-dev:arm64 libpng-dev:arm64 libcurl4-openssl-dev:arm64 libopenmpt-dev:arm64 libminiupnpc-dev:arm64
|
||||
- |
|
||||
# apt_development
|
||||
echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K"
|
||||
|
||||
- - |
|
||||
# make
|
||||
echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2"
|
||||
- make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX64=1 ERRORMODE=1 NONX86=1 ARM64=1 NOGME=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX64=1 NONX86=1 ARM64=1 NOGME=1
|
||||
- |
|
||||
# make
|
||||
echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K"
|
||||
|
@ -396,17 +526,22 @@ Windows x64:
|
|||
Debian stable Clang:
|
||||
stage: build
|
||||
|
||||
when: manual
|
||||
when: on_success
|
||||
|
||||
allow_failure: true
|
||||
allow_failure: false
|
||||
|
||||
artifacts:
|
||||
paths:
|
||||
- "build.clang/bin/"
|
||||
- "build.clang/src/config.h"
|
||||
expose_as: "clang"
|
||||
name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-clang"
|
||||
|
||||
variables:
|
||||
CC: clang
|
||||
WFLAGS: -Wno-cast-align
|
||||
CFLAGS: -Wno-cast-align
|
||||
CXX: clang
|
||||
WFLAGS: -Wno-cast-align -Wno-implicit-const-int-float-conversion -Werror
|
||||
CFLAGS: -Wno-cast-align -Wno-implicit-const-int-float-conversion -Werror
|
||||
LDFLAGS: -Wl,-fuse-ld=gold
|
||||
|
||||
script:
|
||||
|
@ -421,54 +556,23 @@ Debian stable Clang:
|
|||
- - |
|
||||
# apt_development
|
||||
echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0KInstalling development packages"
|
||||
- apt-get install libsdl2-mixer-dev libpng-dev libcurl4-openssl-dev libgme-dev libopenmpt-dev
|
||||
- apt-get install libsdl2-mixer-dev libpng-dev libcurl4-openssl-dev libgme-dev libopenmpt-dev libminiupnpc-dev
|
||||
- |
|
||||
# apt_development
|
||||
echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K"
|
||||
|
||||
- - |
|
||||
# make
|
||||
echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2"
|
||||
- make --directory=src --keep-going CCACHE=1 ERRORMODE=1 NONX86=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 NONX86=1
|
||||
# cmake
|
||||
echo -e "\e[0Ksection_start:`date +%s`:cmake[collapsed=false]\r\e[0KBuilding Makefiles"
|
||||
- cmake -B build.clang -DCPM_USE_LOCAL_PACKAGES:BOOL=ON -DSRB2_CONFIG_ENABLE_TESTS:BOOL=OFF -DSRB2_CONFIG_SYSTEM_LIBRARIES:BOOL=ON -DSRB2_USE_LIBGME:BOOL=OFF -G "Unix Makefiles"
|
||||
- |
|
||||
# make
|
||||
echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K"
|
||||
|
||||
Debian stable musl:
|
||||
stage: build
|
||||
|
||||
when: manual
|
||||
|
||||
allow_failure: true
|
||||
|
||||
artifacts:
|
||||
name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-musl"
|
||||
|
||||
variables:
|
||||
CC: musl-gcc
|
||||
LDD: musl-ldd
|
||||
|
||||
script:
|
||||
- - |
|
||||
# apt_toolchain
|
||||
echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages"
|
||||
- apt-get install gcc
|
||||
- |
|
||||
# apt_toolchain
|
||||
echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K"
|
||||
|
||||
- - |
|
||||
# apt_development
|
||||
echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0KInstalling development packages"
|
||||
- apt-get install musl-tools
|
||||
- |
|
||||
# apt_development
|
||||
echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K"
|
||||
# cmake
|
||||
echo -e "\e[0Ksection_end:`date +%s`:cmake\r\e[0K"
|
||||
|
||||
- - |
|
||||
# make
|
||||
echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2"
|
||||
- make --directory=src --keep-going CCACHE=1 ERRORMODE=1 NONX86=1 SDL=0 NOHW=1 NOZLIB=1 NOCURL=1 NOGME=1 NOOPENMPT=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 NONX86=1 SDL=0 NOHW=1 NOZLIB=1 NOCURL=1 NOGME=1 NOOPENMPT=1
|
||||
- make --directory=build.clang --keep-going || make --directory=build.clang --keep-going
|
||||
- |
|
||||
# make
|
||||
echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K"
|
||||
|
@ -478,28 +582,267 @@ Debian testing Clang:
|
|||
|
||||
when: manual
|
||||
|
||||
allow_failure: true
|
||||
|
||||
image: debian:testing-slim
|
||||
|
||||
artifacts:
|
||||
paths:
|
||||
- "build.clang/bin/"
|
||||
- "build.clang/src/config.h"
|
||||
expose_as: "testing-clang"
|
||||
name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-testing-clang"
|
||||
|
||||
variables:
|
||||
CC: clang
|
||||
WFLAGS: -Wno-cast-align -Wno-deprecated-non-prototype
|
||||
CFLAGS: -Wno-cast-align -Wno-deprecated-non-prototype
|
||||
CXX: clang
|
||||
WFLAGS: -Wno-cast-align -Wno-implicit-const-int-float-conversion -Werror -Wno-deprecated-non-prototype -Wno-single-bit-bitfield-constant-conversion
|
||||
CFLAGS: -Wno-cast-align -Wno-implicit-const-int-float-conversion -Werror -Wno-deprecated-non-prototype -Wno-single-bit-bitfield-constant-conversion
|
||||
LDFLAGS: -Wl,-fuse-ld=gold
|
||||
|
||||
Debian testing musl:
|
||||
extends: Debian stable musl
|
||||
Alpine 3 GCC:
|
||||
stage: build
|
||||
|
||||
when: on_success
|
||||
|
||||
image: alpine:3
|
||||
|
||||
allow_failure: true
|
||||
|
||||
artifacts:
|
||||
paths:
|
||||
- "bin/"
|
||||
- "src/comptime.h"
|
||||
expose_as: "Apline-3"
|
||||
name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-Apline-3"
|
||||
|
||||
before_script:
|
||||
- - |
|
||||
# apk_cache
|
||||
echo -e "\e[0Ksection_start:`date +%s`:apk_cache[collapsed=true]\r\e[0KUpdating APK listing"
|
||||
- export APK_CACHE_DIR=`pwd`/apk-cache
|
||||
- mkdir --parents --verbose $APK_CACHE_DIR/
|
||||
- ln -sf /etc/apk/cache $APK_CACHE_DIR
|
||||
- |
|
||||
# apk_cache
|
||||
echo -e "\e[0Ksection_end:`date +%s`:apk_cache\r\e[0K"
|
||||
|
||||
- - |
|
||||
# apk_update
|
||||
echo -e "\e[0Ksection_start:`date +%s`:apk_update[collapsed=true]\r\e[0KUpdating APK listing"
|
||||
- apk update
|
||||
- |
|
||||
# apk_update
|
||||
echo -e "\e[0Ksection_end:`date +%s`:apk_update\r\e[0K"
|
||||
|
||||
- - |
|
||||
# apk_upgrade
|
||||
echo -e "\e[0Ksection_start:`date +%s`:apk_upgrade[collapsed=true]\r\e[0KUpdating existing packages"
|
||||
- apk upgrade
|
||||
- |
|
||||
# apk_update
|
||||
echo -e "\e[0Ksection_end:`date +%s`:apk_upgrade\r\e[0K"
|
||||
|
||||
- - |
|
||||
# apk_common
|
||||
echo -e "\e[0Ksection_start:`date +%s`:apk_common[collapsed=true]\r\e[0KInstalling common packages"
|
||||
- apk add make git ccache nasm
|
||||
- |
|
||||
# apk_common
|
||||
echo -e "\e[0Ksection_end:`date +%s`:apk_common\r\e[0K"
|
||||
|
||||
- - |
|
||||
# ccache_config
|
||||
echo -e "\e[0Ksection_start:`date +%s`:ccache_config[collapsed=true]\r\e[0KSetting up ccache config"
|
||||
- mkdir --parents --verbose ~/.ccache/
|
||||
- touch ~/.ccache/ccache.conf
|
||||
- |
|
||||
# cache.conf
|
||||
echo Adding ccache configution option
|
||||
- |
|
||||
# base_dir
|
||||
echo base_dir = $PWD | tee -a ~/.ccache/ccache.conf
|
||||
- |
|
||||
# cache_dir
|
||||
echo cache_dir = $PWD/ccache | tee -a ~/.ccache/ccache.conf
|
||||
- |
|
||||
# compiler_check
|
||||
echo compiler_check = content | tee -a ~/.ccache/ccache.conf
|
||||
- |
|
||||
# stats_log
|
||||
echo stats_log = $PWD/ccache_statslog | tee -a ~/.ccache/ccache.conf
|
||||
- |
|
||||
# max_size
|
||||
echo max_size = 50M | tee -a ~/.ccache/ccache.conf
|
||||
- |
|
||||
# ccache_config
|
||||
echo -e "\e[0Ksection_end:`date +%s`:ccache_config\r\e[0K"
|
||||
|
||||
- - |
|
||||
# cache_reset
|
||||
echo -e "\e[0Ksection_start:`date +%s`:ccache_reset[collapsed=true]\r\e[0KResetting ccache statistics"
|
||||
- ccache --zero-stats
|
||||
- ccache --show-stats
|
||||
- |
|
||||
# ccache_reset
|
||||
echo -e "\e[0Ksection_end:`date +%s`:ccache_reset\r\e[0K"
|
||||
|
||||
script:
|
||||
- - |
|
||||
# apk_toolchain
|
||||
echo -e "\e[0Ksection_start:`date +%s`:apk_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages"
|
||||
- apk add gcc
|
||||
- |
|
||||
# apk_toolchain
|
||||
echo -e "\e[0Ksection_end:`date +%s`:apk_toolchain\r\e[0K"
|
||||
|
||||
- - |
|
||||
# apk_development
|
||||
echo -e "\e[0Ksection_start:`date +%s`:apk_development[collapsed=true]\r\e[0KInstalling development packages"
|
||||
- apk add musl-dev sdl2_mixer-dev libpng-dev curl-dev libgme-dev libopenmpt-dev miniupnpc-dev
|
||||
- |
|
||||
# apk_development
|
||||
echo -e "\e[0Ksection_end:`date +%s`:apk_development\r\e[0K"
|
||||
|
||||
- - |
|
||||
# make
|
||||
echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2"
|
||||
- make --directory=src --keep-going CCACHE=1 ERRORMODE=1 NONX86=1 NOEXECINFO=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 NONX86=1 NOEXECINFO=1
|
||||
- |
|
||||
# make
|
||||
echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K"
|
||||
|
||||
after_script:
|
||||
- - |
|
||||
# apk_clean
|
||||
echo -e "\e[0Ksection_start:`date +%s`:apk_clean[collapsed=true]\r\e[0KCleaning of unneeded APK packages"
|
||||
- apk cache clean
|
||||
- |
|
||||
# apk_clean
|
||||
echo -e "\e[0Ksection_end:`date +%s`:apk_clean\r\e[0K"
|
||||
|
||||
- - |
|
||||
# ccache_stats
|
||||
echo -e "\e[0Ksection_start:`date +%s`:ccache_stats[collapsed=true]\r\e[0Kccache statistics:"
|
||||
- ccache --show-stats --verbose
|
||||
- ccache --show-log-stats --verbose
|
||||
- |
|
||||
# ccahe_stats
|
||||
echo -e "\e[0Ksection_end:`date +%s`:ccache_stats\r\e[0K"
|
||||
|
||||
Alpine 3 GCC Dedicated:
|
||||
extends: Alpine 3 GCC
|
||||
|
||||
artifacts:
|
||||
paths:
|
||||
- "bin/"
|
||||
- "src/comptime.h"
|
||||
expose_as: "Apline-3-Dedicated"
|
||||
name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-Apline-3-Dedicated"
|
||||
|
||||
script:
|
||||
- - |
|
||||
# apk_toolchain
|
||||
echo -e "\e[0Ksection_start:`date +%s`:apk_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages"
|
||||
- apk add gcc
|
||||
- |
|
||||
# apk_toolchain
|
||||
echo -e "\e[0Ksection_end:`date +%s`:apk_toolchain\r\e[0K"
|
||||
|
||||
- - |
|
||||
# apk_development
|
||||
echo -e "\e[0Ksection_start:`date +%s`:apk_development[collapsed=true]\r\e[0KInstalling development packages"
|
||||
- apk add musl-dev libpng-dev curl-dev
|
||||
- |
|
||||
# apk_development
|
||||
echo -e "\e[0Ksection_end:`date +%s`:apk_development\r\e[0K"
|
||||
|
||||
- - |
|
||||
# make
|
||||
echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2"
|
||||
- make --directory=src --keep-going CCACHE=1 ERRORMODE=1 NONX86=1 NOEXECINFO=1 DEDICATED=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 NONX86=1 NOEXECINFO=1 DEDICATED=1
|
||||
- |
|
||||
# make
|
||||
echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K"
|
||||
|
||||
osxcross x86_64:
|
||||
stage: build
|
||||
|
||||
artifacts:
|
||||
paths:
|
||||
- "build.osxcross/bin/"
|
||||
- "build.osxcross/src/config.h"
|
||||
expose_as: "Mac x86_64"
|
||||
name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-clang"
|
||||
|
||||
variables:
|
||||
OSXCROSS_HOST: x86_64-apple-darwin21.4
|
||||
LD: x86_64-apple-darwin21.4-ld
|
||||
|
||||
script:
|
||||
- - |
|
||||
# apt_development
|
||||
echo -e "\e[0Ksection_start:`date +%s`:macports_development[collapsed=true]\r\e[0KInstalling development packages"
|
||||
- osxcross-macports install curl libopenmpt libsdl2_mixer
|
||||
- |
|
||||
# apt_development
|
||||
echo -e "\e[0Ksection_end:`date +%s`:macports_development\r\e[0K"
|
||||
|
||||
- - |
|
||||
# make
|
||||
echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KBuilding Makefiles"
|
||||
- cmake -B build.osxcross --toolchain /osxcross/toolchain.cmake -DCPM_USE_LOCAL_PACKAGES:BOOL=ON -DOPENMPT_INCLUDE_DIR:PATH="/osxcross/macports/pkgs/opt/local/include" -DSDL2_INCLUDE_DIR:PATH="/osxcross/macports/pkgs/opt/local/lib" -DSRB2_CONFIG_ENABLE_TESTS:BOOL=OFF -DSRB2_CONFIG_SYSTEM_LIBRARIES:BOOL=ON -DSRB2_CONFIG_USE_GME:BOOL=OFF -G "Unix Makefiles"
|
||||
- |
|
||||
# make
|
||||
echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K"
|
||||
|
||||
- - |
|
||||
# make
|
||||
echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2"
|
||||
- make --directory=build.osxcross --keep-going || make --directory=build.osxcross --keep-going
|
||||
- |
|
||||
# make
|
||||
echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K"
|
||||
|
||||
osxcross arm64:
|
||||
stage: build
|
||||
|
||||
when: manual
|
||||
|
||||
image: debian:testing-slim
|
||||
allow_failure: true
|
||||
|
||||
artifacts:
|
||||
name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-testing-musl"
|
||||
paths:
|
||||
- "build.osxcross/bin/"
|
||||
- "build.osxcross/src/config.h"
|
||||
expose_as: "Mac arm64"
|
||||
name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-clang"
|
||||
|
||||
variables:
|
||||
CC: musl-gcc
|
||||
LDD: musl-ldd
|
||||
LDFLAGS: -Wl,-fuse-ld=gold
|
||||
OSXCROSS_HOST: arm64-apple-darwin21.4
|
||||
LD: arm64-apple-darwin21.4-ld
|
||||
|
||||
script:
|
||||
- - |
|
||||
# apt_development
|
||||
echo -e "\e[0Ksection_start:`date +%s`:macports_development[collapsed=true]\r\e[0KInstalling development packages"
|
||||
- osxcross-macports install --arm64 curl libopenmpt libsdl2_mixer
|
||||
- |
|
||||
# apt_development
|
||||
echo -e "\e[0Ksection_end:`date +%s`:macports_development\r\e[0K"
|
||||
|
||||
- - |
|
||||
# make
|
||||
echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KBuilding Makefiles"
|
||||
- cmake -B build.osxcross --toolchain /osxcross/toolchain.cmake -DCPM_USE_LOCAL_PACKAGES:BOOL=ON -DOPENMPT_INCLUDE_DIR:PATH="/osxcross/macports/pkgs/opt/local/include" -DSDL2_INCLUDE_DIR:PATH="/osxcross/macports/pkgs/opt/local/lib" -DSRB2_CONFIG_ENABLE_TESTS:BOOL=OFF -DSRB2_CONFIG_SYSTEM_LIBRARIES:BOOL=ON -DSRB2_CONFIG_USE_GME:BOOL=OFF -G "Unix Makefiles"
|
||||
- |
|
||||
# make
|
||||
echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K"
|
||||
|
||||
- - |
|
||||
# make
|
||||
echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2"
|
||||
- make --directory=build.osxcross --keep-going || make --directory=build.osxcross --keep-going
|
||||
- |
|
||||
# make
|
||||
echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K"
|
||||
|
|
|
@ -8,7 +8,6 @@ endif()
|
|||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/")
|
||||
|
||||
include(CMakeDependentOption)
|
||||
include(cmake/CPM.cmake)
|
||||
|
||||
file(STRINGS src/version.h SRB2_VERSION)
|
||||
string(REGEX MATCH "[0-9]+\\.[0-9.]+" SRB2_VERSION ${SRB2_VERSION})
|
||||
|
@ -46,98 +45,59 @@ SET(CPACK_OUTPUT_FILE_PREFIX package)
|
|||
include(CPack)
|
||||
|
||||
# Options
|
||||
|
||||
if("${CMAKE_SYSTEM_NAME}" MATCHES Linux)
|
||||
set(SRB2_CONFIG_SYSTEM_LIBRARIES_DEFAULT ON)
|
||||
if("${CMAKE_SYSTEM_NAME}" MATCHES Windows)
|
||||
if(DEFINED VCPKG_TARGET_TRIPLET)
|
||||
set(SRB2_CONFIG_SYSTEM_LIBRARIES_DEFAULT ON)
|
||||
else()
|
||||
set(SRB2_CONFIG_SYSTEM_LIBRARIES_DEFAULT OFF)
|
||||
endif()
|
||||
else()
|
||||
set(SRB2_CONFIG_SYSTEM_LIBRARIES_DEFAULT OFF)
|
||||
set(SRB2_CONFIG_SYSTEM_LIBRARIES_DEFAULT ON)
|
||||
endif()
|
||||
|
||||
# Clang tidy options will be ignored if CMAKE_<LANG>_CLANG_TIDY are set.
|
||||
option(SRB2_CONFIG_ENABLE_CLANG_TIDY_C "Enable default clang-tidy check configuration for C" OFF)
|
||||
option(SRB2_CONFIG_ENABLE_CLANG_TIDY_CXX "Enable default clang-tidy check configuration for C++" OFF)
|
||||
option(
|
||||
SRB2_CONFIG_SYSTEM_LIBRARIES
|
||||
"Link dependencies using CMake's find_package and do not use internal builds"
|
||||
${SRB2_CONFIG_SYSTEM_LIBRARIES_DEFAULT}
|
||||
)
|
||||
option(SRB2_CONFIG_ENABLE_TESTS "Build the test suite" ON)
|
||||
# This option isn't recommended for distribution builds and probably won't work (yet).
|
||||
cmake_dependent_option(
|
||||
SRB2_CONFIG_SHARED_INTERNAL_LIBRARIES
|
||||
"Use dynamic libraries when compiling internal dependencies"
|
||||
OFF "NOT SRB2_CONFIG_SYSTEM_LIBRARIES"
|
||||
OFF
|
||||
SRB2_CONFIG_STATIC_STDLIB
|
||||
"Link static version of standard library. All dependencies must also be static"
|
||||
ON
|
||||
)
|
||||
option(SRB2_CONFIG_HWRENDER "Enable hardware render (OpenGL) support" ON)
|
||||
option(SRB2_CONFIG_USE_GME "Enable GME playback support" OFF)
|
||||
option(SRB2_CONFIG_STATIC_OPENGL "Enable static linking GL (do not do this)" OFF)
|
||||
option(SRB2_CONFIG_ERRORMODE "Compile C code with warnings treated as errors." OFF)
|
||||
option(SRB2_CONFIG_DEBUGMODE "Compile with PARANOIA, ZDEBUG, RANGECHECK and PACKETDROP defined." OFF)
|
||||
option(SRB2_CONFIG_MOBJCONSISTANCY "Compile with MOBJCONSISTANCY defined." OFF)
|
||||
option(SRB2_CONFIG_PACKETDROP "Compile with PACKETDROP defined." OFF)
|
||||
option(SRB2_CONFIG_EXECINFO "Enable stack trace dump support." ON)
|
||||
option(SRB2_CONFIG_ZDEBUG "Compile with ZDEBUG defined." OFF)
|
||||
# SRB2_CONFIG_PROFILEMODE is probably superceded by some CMake setting.
|
||||
option(SRB2_CONFIG_PROFILEMODE "Compile for profiling (GCC only)." OFF)
|
||||
set(SRB2_CONFIG_ASSET_DIRECTORY "" CACHE PATH "Path to directory that contains all asset files for the installer. If set, assets will be part of installation and cpack.")
|
||||
|
||||
if(SRB2_CONFIG_ENABLE_TESTS)
|
||||
# https://github.com/catchorg/Catch2
|
||||
CPMAddPackage(
|
||||
NAME Catch2
|
||||
VERSION 3.4.0
|
||||
GITHUB_REPOSITORY catchorg/Catch2
|
||||
OPTIONS
|
||||
"CATCH_INSTALL_DOCS OFF"
|
||||
)
|
||||
list(APPEND CMAKE_MODULE_PATH "${Catch2_SOURCE_DIR}/extras")
|
||||
include(CTest)
|
||||
include(Catch)
|
||||
add_executable(srb2tests)
|
||||
# To add tests, use target_sources to add individual test files to the target in subdirs.
|
||||
target_link_libraries(srb2tests PRIVATE Catch2::Catch2 Catch2::Catch2WithMain)
|
||||
target_compile_features(srb2tests PRIVATE c_std_11 cxx_std_17)
|
||||
catch_discover_tests(srb2tests)
|
||||
endif()
|
||||
|
||||
# Enable CCache
|
||||
# (Set USE_CCACHE=ON to use, CCACHE_OPTIONS for options)
|
||||
if("${CMAKE_HOST_SYSTEM_NAME}" STREQUAL Windows)
|
||||
option(USE_CCACHE "Enable ccache support" OFF)
|
||||
|
||||
if(USE_CCACHE)
|
||||
find_program(CCACHE_TOOL_PATH ccache)
|
||||
if(CCACHE_TOOL_PATH)
|
||||
set(CMAKE_C_COMPILER_LAUNCHER ${CCACHE_TOOL_PATH} CACHE STRING "" FORCE)
|
||||
set(CMAKE_CXX_COMPILER_LAUNCHER ${CCACHE_TOOL_PATH} CACHE STRING "" FORCE)
|
||||
else()
|
||||
message(WARNING "USE_CCACHE was set but ccache is not found (set CCACHE_TOOL_PATH)")
|
||||
endif()
|
||||
endif()
|
||||
else()
|
||||
CPMAddPackage(
|
||||
NAME Ccache.cmake
|
||||
GITHUB_REPOSITORY TheLartians/Ccache.cmake
|
||||
VERSION 1.2
|
||||
)
|
||||
endif()
|
||||
|
||||
# Dependencies
|
||||
add_subdirectory(thirdparty)
|
||||
|
||||
if("${SRB2_CONFIG_SYSTEM_LIBRARIES}")
|
||||
find_package(ZLIB REQUIRED)
|
||||
find_package(PNG REQUIRED)
|
||||
find_package(SDL2 REQUIRED)
|
||||
find_package(SDL2_mixer REQUIRED)
|
||||
find_package(CURL REQUIRED)
|
||||
find_package(OPENMPT REQUIRED)
|
||||
|
||||
# libgme defaults to "Nuked" YM2612 emulator, which is
|
||||
# very SLOW. The system library probably uses the
|
||||
# default so just always build it.
|
||||
#find_package(GME REQUIRED)
|
||||
if(SRB2_CONFIG_SHARED_INTERNAL_LIBRARIES)
|
||||
set(SRB2_INTERNAL_LIBRARY_TYPE SHARED)
|
||||
set(NOT_SRB2_CONFIG_SHARED_INTERNAL_LIBRARIES OFF)
|
||||
else()
|
||||
set(SRB2_INTERNAL_LIBRARY_TYPE STATIC)
|
||||
set(NOT_SRB2_CONFIG_SHARED_INTERNAL_LIBRARIES ON)
|
||||
endif()
|
||||
|
||||
|
||||
find_package(ZLIB REQUIRED)
|
||||
find_package(PNG REQUIRED)
|
||||
find_package(CURL REQUIRED)
|
||||
find_package(libopenmpt QUIET)
|
||||
if("${SRB2_CONFIG_USE_GME}")
|
||||
find_package(libgme QUIET)
|
||||
endif()
|
||||
find_package(miniupnpc QUIET)
|
||||
|
||||
|
||||
if(${PROJECT_SOURCE_DIR} MATCHES ${PROJECT_BINARY_DIR})
|
||||
message(FATAL_ERROR "In-source builds will bring you a world of pain. Please make a separate directory to invoke CMake from.")
|
||||
endif()
|
||||
|
|
|
@ -2,28 +2,263 @@
|
|||
"version": 3,
|
||||
"configurePresets": [
|
||||
{
|
||||
"name": "default",
|
||||
"description": "Build using default generator",
|
||||
"binaryDir": "build",
|
||||
"name": "__debug",
|
||||
"hidden": true,
|
||||
"cacheVariables": {
|
||||
"CMAKE_C_FLAGS": "-fdiagnostics-color",
|
||||
"CMAKE_CXX_FLAGS": "-fdiagnostics-color",
|
||||
"SRB2_CONFIG_DEV_BUILD": "ON",
|
||||
"CMAKE_BUILD_TYPE": "Debug"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "__develop",
|
||||
"hidden": true,
|
||||
"cacheVariables": {
|
||||
"CMAKE_C_FLAGS_RELWITHDEBINFO": "-DNDEBUG",
|
||||
"CMAKE_CXX_FLAGS_RELWITHDEBINFO": "-DNDEBUG",
|
||||
"SRB2_CONFIG_DEV_BUILD": "ON",
|
||||
"CMAKE_BUILD_TYPE": "RelWithDebInfo"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "debug",
|
||||
"description": "Build for development (no optimizations)",
|
||||
"inherits": "default",
|
||||
"name": "__release",
|
||||
"hidden": true,
|
||||
"cacheVariables": {
|
||||
"CMAKE_BUILD_TYPE": "Debug"
|
||||
"CMAKE_C_FLAGS_RELWITHDEBINFO": "-DNDEBUG",
|
||||
"CMAKE_CXX_FLAGS_RELWITHDEBINFO": "-DNDEBUG",
|
||||
"SRB2_CONFIG_DEV_BUILD": "OFF",
|
||||
"CMAKE_BUILD_TYPE": "RelWithDebInfo"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "__testers",
|
||||
"hidden": true,
|
||||
"cacheVariables": {
|
||||
"CMAKE_C_FLAGS_RELWITHDEBINFO": "-DNDEBUG",
|
||||
"CMAKE_CXX_FLAGS_RELWITHDEBINFO": "-DNDEBUG",
|
||||
"SRB2_CONFIG_DEV_BUILD": "ON",
|
||||
"CMAKE_BUILD_TYPE": "RelWithDebInfo",
|
||||
"SRB2_CONFIG_TESTERS": "ON"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "__ninja",
|
||||
"hidden": true,
|
||||
"generator": "Ninja",
|
||||
"cacheVariables": {
|
||||
"CMAKE_COLOR_DIAGNOSTICS": "ON"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "__vcpkg-toolchain",
|
||||
"hidden": true,
|
||||
"cacheVariables": {
|
||||
"CMAKE_TOOLCHAIN_FILE": "$env{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "__compiler-mingw-w64-i686",
|
||||
"hidden": true,
|
||||
"cacheVariables": {
|
||||
"CMAKE_C_COMPILER": "i686-w64-mingw32-gcc",
|
||||
"CMAKE_CXX_COMPILER": "i686-w64-mingw32-g++"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "__mingw-dynamic",
|
||||
"hidden": true,
|
||||
"cacheVariables": {
|
||||
"VCPKG_TARGET_TRIPLET": "x86-mingw-dynamic"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "__mingw-static",
|
||||
"hidden": true,
|
||||
"cacheVariables": {
|
||||
"VCPKG_HOST_TRIPLET": "x86-mingw-static",
|
||||
"VCPKG_TARGET_TRIPLET": "x86-mingw-static"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "__osx_x64",
|
||||
"hidden": true,
|
||||
"cacheVariables": {
|
||||
"VCPKG_TARGET_TRIPLET": "x64-osx"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "__osx_arm64",
|
||||
"hidden": true,
|
||||
"cacheVariables": {
|
||||
"VCPKG_TARGET_TRIPLET": "arm64-osx"
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"name": "ninja-debug",
|
||||
"hidden": false,
|
||||
"binaryDir": "build/${presetName}",
|
||||
"inherits": ["__debug", "__ninja"]
|
||||
},
|
||||
{
|
||||
"name": "ninja-develop",
|
||||
"hidden": false,
|
||||
"binaryDir": "build/${presetName}",
|
||||
"inherits": ["__develop", "__ninja"]
|
||||
},
|
||||
{
|
||||
"name": "ninja-release",
|
||||
"hidden": false,
|
||||
"binaryDir": "build/${presetName}",
|
||||
"inherits": ["__release", "__ninja"]
|
||||
},
|
||||
{
|
||||
"name": "ninja-testers",
|
||||
"hidden": false,
|
||||
"binaryDir": "build/${presetName}",
|
||||
"inherits": ["__testers", "__ninja"]
|
||||
},
|
||||
|
||||
{
|
||||
"name": "ninja-vcpkg-debug",
|
||||
"hidden": false,
|
||||
"binaryDir": "build/${presetName}",
|
||||
"inherits": ["__debug", "__ninja", "__vcpkg-toolchain"]
|
||||
},
|
||||
{
|
||||
"name": "ninja-vcpkg-develop",
|
||||
"hidden": false,
|
||||
"binaryDir": "build/${presetName}",
|
||||
"inherits": ["__develop", "__ninja", "__vcpkg-toolchain"]
|
||||
},
|
||||
{
|
||||
"name": "ninja-vcpkg-release",
|
||||
"hidden": false,
|
||||
"binaryDir": "build/${presetName}",
|
||||
"inherits": ["__release", "__ninja", "__vcpkg-toolchain"]
|
||||
},
|
||||
{
|
||||
"name": "ninja-vcpkg-testers",
|
||||
"hidden": false,
|
||||
"binaryDir": "build/${presetName}",
|
||||
"inherits": ["__testers", "__ninja", "__vcpkg-toolchain"]
|
||||
},
|
||||
|
||||
{
|
||||
"name": "ninja-x86_mingw_static_vcpkg-debug",
|
||||
"hidden": false,
|
||||
"binaryDir": "build/${presetName}",
|
||||
"inherits": ["__debug", "__compiler-mingw-w64-i686", "__ninja", "__vcpkg-toolchain", "__mingw-static"]
|
||||
},
|
||||
{
|
||||
"name": "ninja-x86_mingw_static_vcpkg-develop",
|
||||
"hidden": false,
|
||||
"binaryDir": "build/${presetName}",
|
||||
"inherits": ["__develop", "__compiler-mingw-w64-i686", "__ninja", "__vcpkg-toolchain", "__mingw-static"]
|
||||
},
|
||||
{
|
||||
"name": "ninja-x86_mingw_static_vcpkg-release",
|
||||
"hidden": false,
|
||||
"binaryDir": "build/${presetName}",
|
||||
"inherits": ["__release", "__compiler-mingw-w64-i686", "__ninja", "__vcpkg-toolchain", "__mingw-static"]
|
||||
},
|
||||
{
|
||||
"name": "ninja-x86_mingw_static_vcpkg-testers",
|
||||
"hidden": false,
|
||||
"binaryDir": "build/${presetName}",
|
||||
"inherits": ["__testers", "__compiler-mingw-w64-i686", "__ninja", "__vcpkg-toolchain", "__mingw-static"]
|
||||
},
|
||||
|
||||
{
|
||||
"name": "ninja-x64_osx_vcpkg-debug",
|
||||
"hidden": false,
|
||||
"binaryDir": "build/${presetName}",
|
||||
"inherits": ["__debug", "__ninja", "__vcpkg-toolchain", "__osx_x64"]
|
||||
},
|
||||
{
|
||||
"name": "ninja-x64_osx_vcpkg-develop",
|
||||
"hidden": false,
|
||||
"binaryDir": "build/${presetName}",
|
||||
"inherits": ["__develop", "__ninja", "__vcpkg-toolchain", "__osx_x64"]
|
||||
},
|
||||
{
|
||||
"name": "ninja-x64_osx_vcpkg-release",
|
||||
"hidden": false,
|
||||
"binaryDir": "build/${presetName}",
|
||||
"inherits": ["__release", "__ninja", "__vcpkg-toolchain", "__osx_x64"]
|
||||
},
|
||||
|
||||
{
|
||||
"name": "ninja-arm64_osx_vcpkg-debug",
|
||||
"hidden": false,
|
||||
"binaryDir": "build/${presetName}",
|
||||
"inherits": ["__debug", "__ninja", "__vcpkg-toolchain", "__osx_arm64"]
|
||||
},
|
||||
{
|
||||
"name": "ninja-arm64_osx_vcpkg-develop",
|
||||
"hidden": false,
|
||||
"binaryDir": "build/${presetName}",
|
||||
"inherits": ["__develop", "__ninja", "__vcpkg-toolchain", "__osx_arm64"]
|
||||
},
|
||||
{
|
||||
"name": "ninja-arm64_osx_vcpkg-release",
|
||||
"hidden": false,
|
||||
"binaryDir": "build/${presetName}",
|
||||
"inherits": ["__release", "__ninja", "__vcpkg-toolchain", "__osx_arm64"]
|
||||
}
|
||||
],
|
||||
|
||||
"buildPresets": [
|
||||
{
|
||||
"name": "default",
|
||||
"configurePreset": "default"
|
||||
"name": "ninja-debug",
|
||||
"configurePreset": "ninja-debug"
|
||||
},
|
||||
{
|
||||
"name": "ninja-develop",
|
||||
"configurePreset": "ninja-develop"
|
||||
},
|
||||
{
|
||||
"name": "ninja-release",
|
||||
"configurePreset": "ninja-release"
|
||||
},
|
||||
{
|
||||
"name": "ninja-x86_mingw_static_vcpkg-debug",
|
||||
"configurePreset": "ninja-x86_mingw_static_vcpkg-debug"
|
||||
},
|
||||
{
|
||||
"name": "ninja-x86_mingw_static_vcpkg-develop",
|
||||
"configurePreset": "ninja-x86_mingw_static_vcpkg-develop"
|
||||
},
|
||||
{
|
||||
"name": "ninja-x86_mingw_static_vcpkg-release",
|
||||
"configurePreset": "ninja-x86_mingw_static_vcpkg-release"
|
||||
},
|
||||
{
|
||||
"name": "ninja-x86_mingw_static_vcpkg-testers",
|
||||
"configurePreset": "ninja-x86_mingw_static_vcpkg-testers"
|
||||
},
|
||||
{
|
||||
"name": "ninja-x64_osx_vcpkg-debug",
|
||||
"configurePreset": "ninja-x64_osx_vcpkg-debug"
|
||||
},
|
||||
{
|
||||
"name": "ninja-x64_osx_vcpkg-develop",
|
||||
"configurePreset": "ninja-x64_osx_vcpkg-develop"
|
||||
},
|
||||
{
|
||||
"name": "ninja-x64_osx_vcpkg-release",
|
||||
"configurePreset": "ninja-x64_osx_vcpkg-release"
|
||||
},
|
||||
{
|
||||
"name": "ninja-arm64_osx_vcpkg-debug",
|
||||
"configurePreset": "ninja-arm64_osx_vcpkg-debug"
|
||||
},
|
||||
{
|
||||
"name": "ninja-arm64_osx_vcpkg-develop",
|
||||
"configurePreset": "ninja-arm64_osx_vcpkg-develop"
|
||||
},
|
||||
{
|
||||
"name": "ninja-arm64_osx_vcpkg-release",
|
||||
"configurePreset": "ninja-arm64_osx_vcpkg-release"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
version: 2.2.13.{branch}-{build}
|
||||
version: 2.2.14.{branch}-{build}
|
||||
os: MinGW
|
||||
|
||||
environment:
|
||||
|
|
|
@ -1,21 +0,0 @@
|
|||
set(CPM_DOWNLOAD_VERSION 0.36.0)
|
||||
|
||||
if(CPM_SOURCE_CACHE)
|
||||
set(CPM_DOWNLOAD_LOCATION "${CPM_SOURCE_CACHE}/cpm/CPM_${CPM_DOWNLOAD_VERSION}.cmake")
|
||||
elseif(DEFINED ENV{CPM_SOURCE_CACHE})
|
||||
set(CPM_DOWNLOAD_LOCATION "$ENV{CPM_SOURCE_CACHE}/cpm/CPM_${CPM_DOWNLOAD_VERSION}.cmake")
|
||||
else()
|
||||
set(CPM_DOWNLOAD_LOCATION "${CMAKE_BINARY_DIR}/cmake/CPM_${CPM_DOWNLOAD_VERSION}.cmake")
|
||||
endif()
|
||||
|
||||
# Expand relative path. This is important if the provided path contains a tilde (~)
|
||||
get_filename_component(CPM_DOWNLOAD_LOCATION ${CPM_DOWNLOAD_LOCATION} ABSOLUTE)
|
||||
if(NOT (EXISTS ${CPM_DOWNLOAD_LOCATION}))
|
||||
message(STATUS "Downloading CPM.cmake to ${CPM_DOWNLOAD_LOCATION}")
|
||||
file(DOWNLOAD
|
||||
https://github.com/cpm-cmake/CPM.cmake/releases/download/v${CPM_DOWNLOAD_VERSION}/CPM.cmake
|
||||
${CPM_DOWNLOAD_LOCATION}
|
||||
)
|
||||
endif()
|
||||
|
||||
include(${CPM_DOWNLOAD_LOCATION})
|
|
@ -1,4 +1,4 @@
|
|||
cmake_minimum_required(VERSION 3.3 FATAL_ERROR)
|
||||
cmake_minimum_required(VERSION 3.5 FATAL_ERROR)
|
||||
|
||||
set(CMAKE_BINARY_DIR "${BINARY_DIR}")
|
||||
set(CMAKE_CURRENT_BINARY_DIR "${BINARY_DIR}")
|
||||
|
|
|
@ -1,33 +0,0 @@
|
|||
include(LibFindMacros)
|
||||
|
||||
libfind_pkg_check_modules(GME_PKGCONF GME)
|
||||
|
||||
find_path(GME_INCLUDE_DIR
|
||||
NAMES gme.h
|
||||
PATHS
|
||||
${GME_PKGCONF_INCLUDE_DIRS}
|
||||
"/usr/include/gme"
|
||||
"/usr/local/include/gme"
|
||||
)
|
||||
|
||||
find_library(GME_LIBRARY
|
||||
NAMES gme
|
||||
PATHS
|
||||
${GME_PKGCONF_LIBRARY_DIRS}
|
||||
"/usr/lib"
|
||||
"/usr/local/lib"
|
||||
)
|
||||
|
||||
set(GME_PROCESS_INCLUDES GME_INCLUDE_DIR)
|
||||
set(GME_PROCESS_LIBS GME_LIBRARY)
|
||||
libfind_process(GME)
|
||||
|
||||
if(GME_FOUND AND NOT TARGET gme)
|
||||
add_library(gme UNKNOWN IMPORTED)
|
||||
set_target_properties(
|
||||
gme
|
||||
PROPERTIES
|
||||
IMPORTED_LOCATION "${GME_LIBRARY}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${GME_INCLUDE_DIR}"
|
||||
)
|
||||
endif()
|
|
@ -1,33 +0,0 @@
|
|||
include(LibFindMacros)
|
||||
|
||||
libfind_pkg_check_modules(OPENMPT_PKGCONF OPENMPT)
|
||||
|
||||
find_path(OPENMPT_INCLUDE_DIR
|
||||
NAMES libopenmpt.h
|
||||
PATHS
|
||||
${OPENMPT_PKGCONF_INCLUDE_DIRS}
|
||||
"/usr/include/libopenmpt"
|
||||
"/usr/local/include/libopenmpt"
|
||||
)
|
||||
|
||||
find_library(OPENMPT_LIBRARY
|
||||
NAMES openmpt
|
||||
PATHS
|
||||
${OPENMPT_PKGCONF_LIBRARY_DIRS}
|
||||
"/usr/lib"
|
||||
"/usr/local/lib"
|
||||
)
|
||||
|
||||
set(OPENMPT_PROCESS_INCLUDES OPENMPT_INCLUDE_DIR)
|
||||
set(OPENMPT_PROCESS_LIBS OPENMPT_LIBRARY)
|
||||
libfind_process(OPENMPT)
|
||||
|
||||
if(OPENMPT_FOUND AND NOT TARGET openmpt)
|
||||
add_library(openmpt UNKNOWN IMPORTED)
|
||||
set_target_properties(
|
||||
openmpt
|
||||
PROPERTIES
|
||||
IMPORTED_LOCATION "${OPENMPT_LIBRARY}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${OPENMPT_INCLUDE_DIR}"
|
||||
)
|
||||
endif()
|
38
cmake/Modules/Findlibgme.cmake
Normal file
38
cmake/Modules/Findlibgme.cmake
Normal file
|
@ -0,0 +1,38 @@
|
|||
include(LibFindMacros)
|
||||
|
||||
libfind_pkg_check_modules(libgme_PKGCONF gme libgme)
|
||||
|
||||
find_path(libgme_INCLUDE_DIR
|
||||
NAMES gme.h
|
||||
PATHS
|
||||
${libgme_PKGCONF_INCLUDE_DIRS}
|
||||
"/usr/include"
|
||||
"/usr/local/include"
|
||||
PATH_SUFFIXES
|
||||
gme
|
||||
)
|
||||
|
||||
find_library(libgme_LIBRARY
|
||||
NAMES gme
|
||||
PATHS
|
||||
${libgme_PKGCONF_LIBRARY_DIRS}
|
||||
"/usr/lib"
|
||||
"/usr/local/lib"
|
||||
)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(libgme
|
||||
REQUIRED_VARS libgme_LIBRARY libgme_INCLUDE_DIR)
|
||||
|
||||
if(libgme_FOUND AND NOT TARGET gme)
|
||||
add_library(gme UNKNOWN IMPORTED)
|
||||
set_target_properties(
|
||||
gme
|
||||
PROPERTIES
|
||||
IMPORTED_LOCATION "${libgme_LIBRARY}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${libgme_INCLUDE_DIR}"
|
||||
)
|
||||
add_library(gme::gme ALIAS gme)
|
||||
endif()
|
||||
|
||||
mark_as_advanced(libgme_LIBRARY libgme_INCLUDE_DIR)
|
37
cmake/Modules/Findlibopenmpt.cmake
Normal file
37
cmake/Modules/Findlibopenmpt.cmake
Normal file
|
@ -0,0 +1,37 @@
|
|||
include(LibFindMacros)
|
||||
|
||||
libfind_pkg_check_modules(libopenmpt_PKGCONF openmpt)
|
||||
|
||||
find_path(libopenmpt_INCLUDE_DIR
|
||||
NAMES libopenmpt.h
|
||||
PATHS
|
||||
${libopenmpt_PKGCONF_INCLUDE_DIRS}
|
||||
"${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/include/libopenmpt"
|
||||
"/usr/include/libopenmpt"
|
||||
"/usr/local/include/libopenmpt"
|
||||
)
|
||||
|
||||
find_library(libopenmpt_LIBRARY
|
||||
NAMES openmpt
|
||||
PATHS
|
||||
${libopenmpt_PKGCONF_LIBRARY_DIRS}
|
||||
"/usr/lib"
|
||||
"/usr/local/lib"
|
||||
)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(libopenmpt
|
||||
REQUIRED_VARS libopenmpt_LIBRARY libopenmpt_INCLUDE_DIR)
|
||||
|
||||
if(libopenmpt_FOUND AND NOT TARGET openmpt)
|
||||
add_library(openmpt UNKNOWN IMPORTED)
|
||||
set_target_properties(
|
||||
openmpt
|
||||
PROPERTIES
|
||||
IMPORTED_LOCATION "${libopenmpt_LIBRARY}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${libopenmpt_INCLUDE_DIR}"
|
||||
)
|
||||
add_library(libopenmpt::libopenmpt ALIAS openmpt)
|
||||
endif()
|
||||
|
||||
mark_as_advanced(libopenmpt_LIBRARY libopenmpt_INCLUDE_DIR)
|
39
cmake/Modules/Findminiupnpc.cmake
Normal file
39
cmake/Modules/Findminiupnpc.cmake
Normal file
|
@ -0,0 +1,39 @@
|
|||
include(LibFindMacros)
|
||||
|
||||
libfind_pkg_check_modules(libminiupnpc_PKGCONF miniupnpc libminiupnpc)
|
||||
|
||||
find_path(libminiupnpc_INCLUDE_DIR
|
||||
NAMES miniupnpc.h
|
||||
PATHS
|
||||
${libminiupnpc_PKGCONF_INCLUDE_DIRS}
|
||||
"${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/include"
|
||||
"/usr/include"
|
||||
"/usr/local/include"
|
||||
PATH_SUFFIXES
|
||||
miniupnpc
|
||||
)
|
||||
|
||||
find_library(libminiupnpc_LIBRARY
|
||||
NAMES miniupnpc
|
||||
PATHS
|
||||
${libminiupnpc_PKGCONF_LIBRARY_DIRS}
|
||||
"/usr/lib"
|
||||
"/usr/local/lib"
|
||||
)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(miniupnpc
|
||||
REQUIRED_VARS libminiupnpc_LIBRARY libminiupnpc_INCLUDE_DIR)
|
||||
|
||||
if(miniupnpc_FOUND AND NOT TARGET miniupnpc)
|
||||
add_library(miniupnpc UNKNOWN IMPORTED)
|
||||
set_target_properties(
|
||||
miniupnpc
|
||||
PROPERTIES
|
||||
IMPORTED_LOCATION "${libminiupnpc_LIBRARY}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${libminiupnpc_INCLUDE_DIR}"
|
||||
)
|
||||
add_library(miniupnpc::miniupnpc ALIAS miniupnpc)
|
||||
endif()
|
||||
|
||||
mark_as_advanced(libminiupnpc_LIBRARY libminiupnpc_INCLUDE_DIR)
|
30
cmake/PatchFile.cmake
Normal file
30
cmake/PatchFile.cmake
Normal file
|
@ -0,0 +1,30 @@
|
|||
# use GNU Patch from any platform
|
||||
|
||||
if(WIN32)
|
||||
# prioritize Git Patch on Windows as other Patches may be very old and incompatible.
|
||||
find_package(Git)
|
||||
if(Git_FOUND)
|
||||
get_filename_component(GIT_DIR ${GIT_EXECUTABLE} DIRECTORY)
|
||||
get_filename_component(GIT_DIR ${GIT_DIR} DIRECTORY)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
find_program(PATCH
|
||||
NAMES patch
|
||||
HINTS ${GIT_DIR}
|
||||
PATH_SUFFIXES usr/bin
|
||||
)
|
||||
|
||||
if(NOT PATCH)
|
||||
message(FATAL_ERROR "Did not find GNU Patch")
|
||||
endif()
|
||||
|
||||
execute_process(COMMAND ${PATCH} ${in_file} --input=${patch_file} --output=${out_file} --ignore-whitespace
|
||||
TIMEOUT 15
|
||||
COMMAND_ECHO STDOUT
|
||||
RESULT_VARIABLE ret
|
||||
)
|
||||
|
||||
if(NOT ret EQUAL 0)
|
||||
message(FATAL_ERROR "Failed to apply patch ${patch_file} to ${in_file} with ${PATCH}")
|
||||
endif()
|
16
cmake/Toolchains/mingw-w64-i686.cmake
Normal file
16
cmake/Toolchains/mingw-w64-i686.cmake
Normal file
|
@ -0,0 +1,16 @@
|
|||
set(CMAKE_SYSTEM_NAME Windows)
|
||||
set(TOOLCHAIN_PREFIX i686-w64-mingw32)
|
||||
|
||||
# cross compilers to use for C, C++ and Fortran
|
||||
set(CMAKE_C_COMPILER ${TOOLCHAIN_PREFIX}-gcc)
|
||||
set(CMAKE_CXX_COMPILER ${TOOLCHAIN_PREFIX}-g++)
|
||||
set(CMAKE_Fortran_COMPILER ${TOOLCHAIN_PREFIX}-gfortran)
|
||||
set(CMAKE_RC_COMPILER ${TOOLCHAIN_PREFIX}-windres)
|
||||
|
||||
# target environment on the build host system
|
||||
set(CMAKE_FIND_ROOT_PATH /usr/${TOOLCHAIN_PREFIX})
|
||||
|
||||
# modify default behavior of FIND_XXX() commands
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
16
cmake/Toolchains/mingw-w64-x86_64.cmake
Normal file
16
cmake/Toolchains/mingw-w64-x86_64.cmake
Normal file
|
@ -0,0 +1,16 @@
|
|||
set(CMAKE_SYSTEM_NAME Windows)
|
||||
set(TOOLCHAIN_PREFIX x86_64-w64-mingw32)
|
||||
|
||||
# cross compilers to use for C, C++ and Fortran
|
||||
set(CMAKE_C_COMPILER ${TOOLCHAIN_PREFIX}-gcc)
|
||||
set(CMAKE_CXX_COMPILER ${TOOLCHAIN_PREFIX}-g++)
|
||||
set(CMAKE_Fortran_COMPILER ${TOOLCHAIN_PREFIX}-gfortran)
|
||||
set(CMAKE_RC_COMPILER ${TOOLCHAIN_PREFIX}-windres)
|
||||
|
||||
# target environment on the build host system
|
||||
set(CMAKE_FIND_ROOT_PATH /usr/${TOOLCHAIN_PREFIX})
|
||||
|
||||
# modify default behavior of FIND_XXX() commands
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
|
@ -1,6 +1,7 @@
|
|||
@echo off
|
||||
set BRA=Unknown
|
||||
set REV=illegal
|
||||
set GL1=Dummy
|
||||
|
||||
copy nul: /b +%1\comptime.c tmp.$$$ > nul
|
||||
move tmp.$$$ %1\comptime.c > nul
|
||||
|
@ -13,8 +14,9 @@ goto filwri
|
|||
:gitrev
|
||||
set GIT=%2
|
||||
if "%GIT%"=="" set GIT=git
|
||||
for /f "usebackq" %%s in (`%GIT% rev-parse --abbrev-ref HEAD`) do @set BRA=%%s
|
||||
for /f "usebackq" %%s in (`%GIT% rev-parse HEAD`) do @set REV=%%s
|
||||
for /f "tokens=* usebackq" %%s in (`%GIT% rev-parse --abbrev-ref HEAD`) do @set BRA=%%s
|
||||
for /f "tokens=* usebackq" %%s in (`%GIT% rev-parse HEAD`) do @set REV=%%s
|
||||
for /f "tokens=* usebackq" %%s in (`%GIT% log -1 --format^=%%f`) do @set GL1=%%s
|
||||
set REV=%REV:~0,8%
|
||||
goto filwri
|
||||
|
||||
|
@ -30,3 +32,4 @@ echo // by the %0 batch file >> %1\comptime.h
|
|||
echo // >> %1\comptime.h
|
||||
echo const char* compbranch = "%BRA%"; >> %1\comptime.h
|
||||
echo const char* comprevision = "%REV%"; >> %1\comptime.h
|
||||
echo const char* compnote = "%GL1%"; >> %1\comptime.h
|
||||
|
|
|
@ -12,24 +12,26 @@ version() {
|
|||
//
|
||||
const char* compbranch = "$1";
|
||||
const char* comprevision = "$2";
|
||||
const char* compnote = "$3";
|
||||
EOF
|
||||
}
|
||||
|
||||
versiongit() {
|
||||
gitbranch="$(git rev-parse --abbrev-ref HEAD)"
|
||||
gitversion="$(git rev-parse HEAD | cut -c -8)"
|
||||
version "$gitbranch" "$gitversion";
|
||||
gitsubject="$(git log -1 --format=%f)"
|
||||
version "$gitbranch" "$gitversion" "$gitsubject";
|
||||
exit 0
|
||||
}
|
||||
|
||||
versionsvn() {
|
||||
svnrevision="$(svnversion -n "$1")"
|
||||
version "Subversion" "r$svnrevision";
|
||||
version "Subversion" "r$svnrevision" "dummy";
|
||||
exit 0
|
||||
}
|
||||
|
||||
versionfake() {
|
||||
version "Unknown" "illegal";
|
||||
version "Unknown" "illegal" "dummy";
|
||||
}
|
||||
|
||||
compversion() {
|
||||
|
|
|
@ -1,93 +0,0 @@
|
|||
================================================================
|
||||
How to add Low-res modes to your XF86Config under Linux MANUALLY
|
||||
================================================================
|
||||
|
||||
I TAKE NO RESPONSIBILITY FOR ANY DAMAGE DONE TO YOUR EQUIPMENT!!!
|
||||
|
||||
This document explains how to add low-res modes like 320x200 to your
|
||||
X-Server configuration, because some new setup tools for the X-Server
|
||||
do not support this. ONLY RECOMMENDED FOR USERS WHO KNOW WHAT THEY DO!
|
||||
|
||||
I do not take any responsibility for damage done to your monitor, your
|
||||
videocard, your harddisk, your cat, your dog or anything else!!!
|
||||
IMPORTANT IS, THAT YOUR "HorizSync" AND "VertRefresh" VALUES REALLY
|
||||
MATCH YOUR MONITOR! OTHERWISE YOUR MONITOR CAN BLOW UP!!!
|
||||
|
||||
OK, if you have read up to here, you either know what you do or really
|
||||
die-hard want those low-res modes. Here is what to do:
|
||||
Look up your XF86Config. Is is either in /etc or in /etc/X11. Here is
|
||||
what you have to add to the definition of your modeslines:
|
||||
|
||||
# Low-res Doublescan modes
|
||||
# If your chipset does not support doublescan, you get a 'squashed'
|
||||
# resolution like 320x400.
|
||||
|
||||
# 320x200 @ 70 Hz, 31.5 kHz hsync, 8:5 aspect ratio
|
||||
Modeline "320x200" 12.588 320 336 384 400 200 204 205 225 Doublescan
|
||||
# 320x240 @ 60 Hz, 31.5 kHz hsync, 4:3 aspect ratio
|
||||
Modeline "320x240" 12.588 320 336 384 400 240 245 246 262 Doublescan
|
||||
# 320x240 @ 72 Hz, 36.5 kHz hsync
|
||||
Modeline "320x240" 15.750 320 336 384 400 240 244 246 262 Doublescan
|
||||
# 400x300 @ 56 Hz, 35.2 kHz hsync, 4:3 aspect ratio
|
||||
ModeLine "400x300" 18 400 416 448 512 300 301 302 312 Doublescan
|
||||
# 400x300 @ 60 Hz, 37.8 kHz hsync
|
||||
Modeline "400x300" 20 400 416 480 528 300 301 303 314 Doublescan
|
||||
# 400x300 @ 72 Hz, 48.0 kHz hsync
|
||||
Modeline "400x300" 25 400 424 488 520 300 319 322 333 Doublescan
|
||||
|
||||
If your video card only supports a specific set of discrete dotclocks
|
||||
(RAMDAC) you may have to replace the dotclocks given here by one of the
|
||||
specified (e.g in the first modeline the dotclock is 12.588 MHz). I believe
|
||||
that nowadays all cards and monitors should work with these settings, but
|
||||
if you have outdated hardware you better check the frequencies yourself. If
|
||||
there is any uncertainty, please check the "XFree86 Video Timings HOWTO".
|
||||
|
||||
|
||||
Then have a look at the section "Screen" with the appropriate driver
|
||||
(usually either "svga" or "accel"). Under Subsection "Display" there
|
||||
are modes for the given color depth. Add the desired modes. As an
|
||||
example I give you my screens definition here with low-res modes in
|
||||
16 bit color depth:
|
||||
|
||||
Section "Screen"
|
||||
Driver "accel"
|
||||
Device "3D Charger"
|
||||
Monitor "Iiyama Pro 450"
|
||||
DefaultColorDepth 16
|
||||
|
||||
Subsection "Display"
|
||||
Depth 8
|
||||
Modes "1280x1024" "1024x768" "800x600" "640x480"
|
||||
ViewPort 0 0
|
||||
Virtual 1280 1024
|
||||
EndSubsection
|
||||
Subsection "Display"
|
||||
Depth 16
|
||||
Modes "1152x864" "1024x768" "800x600" "640x480" "400x300" "320x200" <- THIS IS ACTUALLY WHAT YOU WANT!!!
|
||||
ViewPort 0 0 ^^^^^^^^^^^^^^^^^^^
|
||||
Virtual 1152 864
|
||||
EndSubsection
|
||||
Subsection "Display"
|
||||
Depth 24
|
||||
Modes "800x600" "640x480"
|
||||
ViewPort 0 0
|
||||
Virtual 800 600
|
||||
EndSubsection
|
||||
Subsection "Display"
|
||||
Depth 32
|
||||
Modes "800x600" "640x480"
|
||||
ViewPort 0 0
|
||||
Virtual 800 600
|
||||
EndSubsection
|
||||
EndSection
|
||||
|
||||
Once again: important is, that you edit the correct Screen section.
|
||||
If you use the SVGA Server and edit the ACCEL Server, you might
|
||||
wonder where your new modes have gone.
|
||||
|
||||
If everything went fine and you want to say thank you, just write
|
||||
to "metzgermeister@users.sourceforge.net". If your monitor blew
|
||||
up and you want to kill me, find me playing Legacy or Q3A on the net
|
||||
and frag me (with your second monitor, hehe).
|
||||
|
||||
- metzgermeister
|
|
@ -1,212 +0,0 @@
|
|||
1-99 : Player Starts
|
||||
1 - Player 1 Start 1
|
||||
2 - Player 2 Start 2
|
||||
3 - Player 3 Start 3
|
||||
4 - Player 4 Start 4
|
||||
5 - Player 5 Start 4001
|
||||
6 - Player 6 Start 4002
|
||||
7 - Player 7 Start 4003
|
||||
8 - Player 8 Start 4004
|
||||
9 - Player 9 Start 4005
|
||||
10 - Player 10 Start 4006
|
||||
11 - Player 11 Start 4007
|
||||
12 - Player 12 Start 4008
|
||||
13 - Player 13 Start 4009
|
||||
14 - Player 14 Start 4010
|
||||
15 - Player 15 Start 4011
|
||||
16 - Player 16 Start 4012
|
||||
17 - Player 17 Start 4013
|
||||
18 - Player 18 Start 4014
|
||||
19 - Player 19 Start 4015
|
||||
20 - Player 20 Start 4016
|
||||
21 - Player 21 Start 4017
|
||||
22 - Player 22 Start 4018
|
||||
23 - Player 23 Start 4019
|
||||
24 - Player 24 Start 4020
|
||||
25 - Player 25 Start 4021
|
||||
26 - Player 26 Start 4022
|
||||
27 - Player 27 Start 4023
|
||||
28 - Player 28 Start 4024
|
||||
29 - Player 29 Start 4025
|
||||
30 - Player 30 Start 4026
|
||||
31 - Player 31 Start 4027
|
||||
32 - Player 32 Start 4028
|
||||
33 - Player Match Start 11
|
||||
34 - Red Team Start 87
|
||||
35 - Blue Team Start 89
|
||||
36 - Tag start New
|
||||
|
||||
100 - 199 : Enemies
|
||||
100 - Blue Crawla 3004
|
||||
101 - Red Crawla 9
|
||||
102 - GFZ Fish 58
|
||||
103 - Gold Buzz 5005
|
||||
104 - Red Buzz 5006
|
||||
105 - Jetty-Syn Bomber 3005
|
||||
106 - Jetty-Syn Gunner 22
|
||||
107 - Crawla Commander 21
|
||||
108 - Deton 71
|
||||
109 - Skim 56
|
||||
110 - THZ Turret 2004
|
||||
111 - Pop-up Turret 42
|
||||
|
||||
200 - 299 : Bosses and their associated items (if any)
|
||||
200 - Boss 1 16
|
||||
201 - Boss 2 2008
|
||||
290 - Boss Fly Point 17
|
||||
291 - EggTrap Center 2049
|
||||
|
||||
300 - 399 : Collectibles
|
||||
300 - Ring 2014
|
||||
301 - Homing Ring 69
|
||||
302 - Rail Ring 3003
|
||||
303 - Infinity Ring 80
|
||||
304 - Automatic Ring 26
|
||||
305 - Explosion Ring 54
|
||||
306 - Red CTF Flag 31
|
||||
307 - Blue CTF Flag 34
|
||||
308 - Special Stage Token 2013
|
||||
309 - Emerald 1 420
|
||||
310 - Emerald 2 421
|
||||
311 - Emerald 3 422
|
||||
312 - Emerald 4 423
|
||||
313 - Emerald 5 424
|
||||
314 - Emerald 6 425
|
||||
315 - Emerald 7 426
|
||||
316 - Hunting Emerald 1 64
|
||||
317 - Hunting Emerald 2 3002
|
||||
318 - Hunting Emerald 3 3001
|
||||
|
||||
400 - 499 : Boxes
|
||||
400 - Super Ring Box 2011
|
||||
401 - Grey Ring Box 2012
|
||||
402 - Ring Shield Box 48
|
||||
403 - Fire Shield Box 2002
|
||||
404 - Bomb Shield Box 2018
|
||||
405 - Jump Shield Box 35
|
||||
406 - Water Shield Box 2028
|
||||
407 - Sneaker Box 25
|
||||
408 - Invincibility Box 2022
|
||||
409 - 1-Up Box 41
|
||||
410 - Eggman Box 2005
|
||||
411 - Mixup Box 78
|
||||
412 - Question Box 3000
|
||||
|
||||
500 - 599 : Interactive Objects (friendly or otherwise - includes springs)
|
||||
500 - Bubble Patch 33
|
||||
501 - Level End Sign 86
|
||||
502 - Starpost 3006
|
||||
520 - Spike Ball -1
|
||||
521 - Special Stage Spike Ball 23
|
||||
522 - Ceiling Spike 67
|
||||
523 - Floor Spike 68
|
||||
540 - Fan 32
|
||||
541 - Steam Riser 30
|
||||
550 - Yellow Spring 28
|
||||
551 - Red Spring 79
|
||||
552 - Blue Spring 5004
|
||||
553 - Yellow Spring Down 65
|
||||
554 - Red Spring Down 66
|
||||
555 - Yellow Diagonal Spring 2015
|
||||
556 - Red Diagonal Spring 38
|
||||
557 - Yellow Diag Spring Down 20
|
||||
558 - Red Diag Spring Down 39
|
||||
|
||||
600 - 699 : Special placement patterns
|
||||
600 - Vertical Rigns - Stack of 5 (suitable for Yellow Spring) 84
|
||||
601 - Vertical Rings - Stack of 5 (suitable for Red Spring) 44
|
||||
602 - Diagonal rings (5) 76
|
||||
603 - Diagonal rings (10) 77
|
||||
604 - A ring of rings 47
|
||||
605 - A BIGGER ring of rings 2007
|
||||
606 - A ring of wing items 2048
|
||||
607 - A BIGGER ring of wing items 2010
|
||||
608 - A ring of rings and wings (alternating) 2046
|
||||
609 - A BIGGER ring of rings and wings (alternating) 2047
|
||||
|
||||
700 - 799 : Powerup indicators/environmental effects/miscellany
|
||||
700 - Ambient Water 1a (S) 2026
|
||||
701 - Ambient Water 1b (S) 2024
|
||||
702 - Ambient Water 2a (M) 2023
|
||||
703 - Ambient Water 2b (M) 2045
|
||||
704 - Ambient Water 3a (L) 83
|
||||
705 - Ambient Water 3b (L) 2019
|
||||
706 - Ambient Water 4a (XL) 2025
|
||||
707 - Ambient Water 4b (XL) 27
|
||||
708 - Random Ambient 1 14
|
||||
709 - Random Ambient 2 43
|
||||
750 - Chaos Spawner 8
|
||||
751 - Teleport Point 5003
|
||||
752 - Alternate View Point 5007
|
||||
753 - Zoom Tube Waypoint 18
|
||||
754 - Pusher 5001
|
||||
755 - Puller 5002
|
||||
756 - Street Light 2003
|
||||
|
||||
800 - 899 : Greenflower Scenery
|
||||
800 - Flower 1 36
|
||||
801 - Flower 2 70
|
||||
802 - Flower 3 73
|
||||
804 - Berry Bush 74
|
||||
805 - Bush 75
|
||||
|
||||
900 - 999 : Techno Hill Scenery
|
||||
900 - THZ Plant 2035
|
||||
901 - Alarm 2006
|
||||
|
||||
1000 - 1099 : Deep Sea Scenery
|
||||
1000 - Gargoyle 81
|
||||
|
||||
1100 - 1199 : Castle Eggman Scenery
|
||||
1100 - Ceiling Chain 49
|
||||
1101 - Torch Flame 24
|
||||
1102 - Eggman Statue 52
|
||||
1103 - CEZ Flower 2001
|
||||
|
||||
1200 - 1299 : Arid Canyon Scenery
|
||||
1300 - 1399 : Red Volcano Scenery
|
||||
1400 - 1499 : Dark City Scenery
|
||||
1500 - 1599 : Doom Ship Scenery
|
||||
1600 - 1699 : Egg Rock/Final Fight Scenery
|
||||
1700 - 1799 : NiGHTS Items
|
||||
1700 - Axis 72
|
||||
1701 - Axis Transfer (Normal) 61
|
||||
1702 - Axis Transfer (Line) 46
|
||||
1703 - Nights Drone 60
|
||||
1704 - Nights Bumper 82
|
||||
1705 - Hoop 57
|
||||
1706 - Nights Wing 37
|
||||
1707 - Super Loop Powerup 3007
|
||||
1708 - Drill Refill Powerup 3008
|
||||
1709 - Helper Powerup 3009
|
||||
1710 - Egg Capsule 40
|
||||
|
||||
1800 - 1849 : Mario Items
|
||||
1800 - Coin 10005
|
||||
1801 - Goomba 10000
|
||||
1802 - Blue Goomba 10001
|
||||
1803 - FireFlower 50
|
||||
1804 - Shell 10
|
||||
1805 - Puma 29
|
||||
1806 - Koopa 19
|
||||
1807 - Axe 12
|
||||
1808 - Mario Bush 1 10002
|
||||
1809 - Mario Bush 2 10003
|
||||
1810 - Toad 10004
|
||||
|
||||
1850 - 1899 : Christmas Items
|
||||
1850 - Xmas Pole 5
|
||||
1851 - Candy Cane 13
|
||||
1852 - Snowman 6
|
||||
|
||||
1900 - 1999 : Misc Scenery
|
||||
1900 - Stalagmite 0
|
||||
1901 - Stalagmite 1
|
||||
1902 - Stalagmite 2
|
||||
1903 - Stalagmite 3
|
||||
1904 - Stalagmite 4
|
||||
1905 - Stalagmite 5
|
||||
1906 - Stalagmite 6
|
||||
1907 - Stalagmite 7
|
||||
1908 - Stalagmite 8
|
||||
1909 - Stalagmite 9
|
|
@ -1,223 +0,0 @@
|
|||
Description OldNum NewNum Description
|
||||
Old Water 14 Removed
|
||||
|
||||
Level Parameters/Misc:
|
||||
Per-Sector Gravity 64 1
|
||||
Custom Exit 71 2
|
||||
Zoom Tube Parameters 18 3
|
||||
Speed Pad 65 4
|
||||
Camera Scanner 63 5
|
||||
Disable Linedef 73 6
|
||||
Flat Alignment 66 7
|
||||
Sector Special Parameters New 8
|
||||
Mace Parameters New 9
|
||||
Sprite Cull Height New 10
|
||||
Rope Hang Parameters New 11
|
||||
Rock Spawner Parameters New 12
|
||||
|
||||
PolyObjects
|
||||
Marks first line in PolyObject New 20
|
||||
Explicitly includes a PolyObject line New 21
|
||||
PolyObject: Parameters New 22
|
||||
PolyObject: Waving Flag New 31
|
||||
|
||||
Level-Load Effects:
|
||||
Instant Floor Lower 26 50
|
||||
Instant Ceiling Raise 24 51
|
||||
Continuously Falling Sector 88 52
|
||||
Continuous Floor/Ceiling Mover 2 53
|
||||
Continuous Floor Mover 3 54
|
||||
Continuous Ceiling Mover 4 55
|
||||
Continuous Two-Speed Floor/Ceiling Mover 6 56
|
||||
Continuous Two-Speed Floor Mover 7 57
|
||||
Continuous Two-Speed Ceiling Mover 8 58
|
||||
Activate Floating Platform 232 59
|
||||
Activate Floating Platform (Adjustable Speed) 233 60
|
||||
Crusher 1 (Ceiling to Floor) 43 61
|
||||
Crusher 2 (Floor to Ceiling) 50 62
|
||||
Fake Floor/Ceiling 242 63
|
||||
Appearing/Disappearing FOF New 64
|
||||
Bridge Thinker New 65
|
||||
|
||||
Floor Over Floors:
|
||||
"Floor Over Floor: Solid, Opaque, Shadowcasting " 25 100
|
||||
"Floor Over Floor: Solid, Opaque, Non-Shadowcasting " 33 101
|
||||
"Floor Over Floor: Solid, Translucent " 44 102
|
||||
"Floor Over Floor: Solid, Sides Only " 69 103
|
||||
"Floor Over Floor: Solid, No Sides " 51 104
|
||||
"Floor Over Floor: Solid, Invisible " 57 105
|
||||
|
||||
"Floor Over Floor: Water, Opaque " 48 120
|
||||
"Floor Over Floor: Water, Translucent " 45 121
|
||||
"Floor Over Floor: Water, Opaque, No Sides " 75 122
|
||||
"Floor Over Floor: Water, Translucent, No Sides " 74 123
|
||||
|
||||
"Floor Over Floor: Platform, Opaque " 59 140
|
||||
"Floor Over Floor: Platform, Translucent " 81 141
|
||||
"Floor Over Floor: Platform, Translucent, No Sides " 77 142
|
||||
|
||||
Floor Over Floor: Bobbing (Air) 38 150
|
||||
Floor Over Floor: Adjustable Bobbing (Air) 68 151
|
||||
Floor Over Floor: Reverse Adjustable Bobbing (Air) 72 152
|
||||
|
||||
"Floor Over Floor: Floating, Bobbing " 34 160
|
||||
|
||||
Floor Over Floor: Crumbling (Respawn) 36 170
|
||||
Floor Over Floor: Crumbling (No Respawn) 35 171
|
||||
"Floor Over Floor: Crumbling (Respawn), Platform " 79 172
|
||||
"Floor Over Floor: Crumbling (No Respawn), Platform " 80 173
|
||||
"Floor Over Floor: Crumbling (Respawn), Platform, Translucent " 82 174
|
||||
"Floor Over Floor: Crumbling (No Respawn), Platform, Translucent " 83 175
|
||||
"Floor Over Floor: Crumbling (Respawn), Floating, Bobbing " 39 176
|
||||
"Floor Over Floor: Crumbling (No Respawn), Floating, Bobbing " 1 177
|
||||
"Floor Over Floor: Crumbling (Respawn), Floating " 37 178
|
||||
"Floor Over Floor: Crumbling (No Respawn), Floating " 42 179
|
||||
"Floor Over Floor: Crumbling (Respawn), Bobbing (Air) " 40 180
|
||||
|
||||
"Floor Over Floor: Rising Platform, Solid, Opaque, Shadowcasting " 89 190
|
||||
"Floor Over Floor: Rising Platform, Solid, Opaque, Non-Shadowcasting " 90 191
|
||||
"Floor Over Floor: Rising Platform, Solid, Translucent " 91 192
|
||||
"Floor Over Floor: Rising Platform, Solid, Invisible " 94 193
|
||||
"Floor Over Floor: Rising Platform, Platform, Opaque " 92 194
|
||||
"Floor Over Floor: Rising Platform, Platform, Translucent " 93 195
|
||||
|
||||
Floor Over Floor: Light Block 49 200
|
||||
Floor Over Floor: Half Light Block 47 201
|
||||
Floor Over Floor: Fog Block 46 202
|
||||
|
||||
"Floor Over Floor: Intangible, Opaque " 62 220
|
||||
"Floor Over Floor: Intangible, Translucent " 52 221
|
||||
"Floor Over Floor: Intangible, Sides Only " 67 222
|
||||
"Floor Over Floor: Intangible, Invisible " 58 223
|
||||
|
||||
Floor Over Floor: Mario Block 41 250
|
||||
Floor Over Floor: Thwomp Block 54 251
|
||||
Floor Over Floor: Shatter Block 76 252
|
||||
"Floor Over Floor: Shatter Block, Translucent " 86 253
|
||||
Floor Over Floor: Bustable Block 55 254
|
||||
Floor Over Floor: Spin Bust Block 78 255
|
||||
"Floor Over Floor: Spin Bust Block, Translucent " 84 256
|
||||
Floor Over Floor: Quicksand Block 56 257
|
||||
Floor Over Floor: Laser Block 53 258
|
||||
Floor Over Floor: Custom 87 259
|
||||
|
||||
Linedef Executor Triggers:
|
||||
Trigger Linedef Executor (Continuous) 96 300
|
||||
Trigger Linedef Executor (Each Time) 97 301
|
||||
Trigger Linedef Executor (Once) 98 302
|
||||
Trigger Linedef Executor (Ring Count - Continuous) 95 303
|
||||
Trigger Linedef Executor (Ring Count - Once) 99 304
|
||||
Trigger Linedef Executor (Character Ability - Continuous) 19 305
|
||||
Trigger Linedef Executor (Character Ability - Each Time) 20 306
|
||||
Trigger Linedef Executor (Character Ability - Once) 21 307
|
||||
"Trigger Linedef Executor (Race Only, Once) " 9 308
|
||||
Trigger Linedef Executor (CTF Red Team - Continuous) 10 309
|
||||
Trigger Linedef Executor (CTF Red Team - Each Time) 11 310
|
||||
Trigger Linedef Executor (CTF Blue Team - Continuous) 12 311
|
||||
Trigger Linedef Executor (CTF Blue Team - Each Time) 13 312
|
||||
Trigger Linedef Executor (No More Enemies - Once) 15 313
|
||||
Trigger Linedef Executor (# of Pushables - Continuous) New 314
|
||||
Trigger Linedef Executor (# of Pushables - Once) New 315
|
||||
Trigger Linedef Executors (PolyObject - Land On) New 316
|
||||
Trigger Linedef Executor (Level Load) New 399
|
||||
|
||||
Linedef Executor Options:
|
||||
Linedef Executor: Set Tagged Sector's Floor Height/Pic 101 400
|
||||
Linedef Executor: Set Tagged Sector's Ceiling Height/Pic 102 401
|
||||
Linedef Executor: Set Tagged Sector's Light Level 103 402
|
||||
Linedef Executor: Move Tagged Sector's Floor 106 403
|
||||
Linedef Executor: Move Tagged Sector's Ceiling 107 404
|
||||
Linedef Executor: Lower Floor by Line 108 405
|
||||
Linedef Executor: Raise Floor by Line 109 406
|
||||
Linedef Executor: Lower Ceiling by Line 110 407
|
||||
Linedef Executor: Raise Ceiling by Line 111 408
|
||||
Linedef Executor: Change Calling Sector's Tag 112 409
|
||||
Linedef Executor: Change Front Sector's Tag 114 410
|
||||
Linedef Executor: Stop Plane Movement 116 411
|
||||
Linedef Executor: Teleport Player to Tagged Sector 104 412
|
||||
Linedef Executor: Change Music 105 413
|
||||
Linedef Executor: Play SFX 115 414
|
||||
Linedef Executor: Run Script 113 415
|
||||
Linedef Executor: Start Adjustable Fire Flicker 119 416
|
||||
Linedef Executor: Start Adjustable Glowing Light 120 417
|
||||
Linedef Executor: Start Adjustable Strobe Flash (unsynchronized) New 418
|
||||
Linedef Executor: Start Adjustable Strobe Flash (synchronized) New 419
|
||||
Linedef Executor: Fade Light Level 117 420
|
||||
Linedef Executor: Stop Lighting Effect 118 421
|
||||
Linedef Executor: Cut-Away View 121 422
|
||||
Linedef Executor: Change Sky 123 423
|
||||
Linedef Executor: Change Weather 124 424
|
||||
Linedef Executor: Change Object State 125 425
|
||||
Linedef Executor: Stop Object 122 426
|
||||
Linedef Executor: Award Score 126 427
|
||||
Linedef Executor: Start Platform Movement 127 428
|
||||
Linedef Executor: Crush Ceiling Once New 429
|
||||
Linedef Executor: Crush Floor Once New 430
|
||||
Linedef Executor: Crush Floor & Ceiling Once New 431
|
||||
Linedef Executor: Enable 2D Mode New 432
|
||||
Linedef Executor: Disable 2D Mode New 433
|
||||
Linedef Executor: Award Custom Power New 434
|
||||
Linedef Executor: Stop Conveyor New 435
|
||||
Linedef Executor: Start Conveyor New 436
|
||||
Linedef Executor: Disable Player Movement New 437
|
||||
|
||||
Linedef Executor: Execute Linedef Executor New 450
|
||||
|
||||
Linedef Executor: PolyObject: Door Slide New 480
|
||||
Linedef Executor: PolyObject: Door Swing New 481
|
||||
Linedef Executor: PolyObject: Move XY New 482
|
||||
Linedef Executor: PolyObject: Move XY w/ override New 483
|
||||
Linedef Executor: PolyObject: Rotate Right New 484
|
||||
Linedef Executor: PolyObject: Rotate Right w/ override New 485
|
||||
Linedef Executor: PolyObject: Rotate Left New 486
|
||||
Linedef Executor: PolyObject: Rotate Left w/ override New 487
|
||||
Linedef Executor: PolyObject: Start waypoint movement New 488
|
||||
Linedef Executor: PolyObject: Make Invisible New 489
|
||||
Linedef Executor: PolyObject: Make Visible New 490
|
||||
|
||||
Scrollers/Pushers:
|
||||
Scroll Wall First Side Left 100 500
|
||||
Scroll Wall First Side Opposite Direction 85 501
|
||||
Scroll Wall According to Linedef 254 502
|
||||
Acc Scroll Wall According to Linedef 218 503
|
||||
Disp Scroll Wall According to Linedef 249 504
|
||||
Scroll Texture by Offsets 255 505
|
||||
|
||||
Scroll Floor Texture 251 510
|
||||
Acc Scroll Floor Texture 215 511
|
||||
Disp Scroll Floor Texture 246 512
|
||||
Scroll Ceiling Texture 250 513
|
||||
Acc Scroll Ceiling Texture 214 514
|
||||
Disp Scroll Ceiling Texture 245 515
|
||||
|
||||
Carry Objects on Floor (no scroll) 252 520
|
||||
Acc Carry Objects on Floor 216 521
|
||||
Disp Carry Objects on Floor 247 522
|
||||
Carry Objects on Ceiling 203 523
|
||||
Acc Carry Objects on Ceiling 205 524
|
||||
Disp Carry Objects on Ceiling 201 525
|
||||
|
||||
Scroll Floor Texture and Carry Objects 253 530
|
||||
Acc Scroll Floor Texture and Carry Objects 217 531
|
||||
Disp Scroll Floor Texture and Carry Objects 248 532
|
||||
Scroll Ceiling Texture and Carry Objects 202 533
|
||||
Acc Scroll Ceiling Texture and Carry Objects 204 534
|
||||
Disp Scroll Ceiling Texture and Carry Objects 200 535
|
||||
|
||||
Friction 223 540
|
||||
Horizontal Wind 224 541
|
||||
Upwards Wind 229 542
|
||||
Downwards Wind 230 543
|
||||
Horizontal Current 225 544
|
||||
Upwards Current 227 545
|
||||
Downwards Current 228 546
|
||||
Boom Push/Pull Thing 226 547
|
||||
|
||||
Lighting:
|
||||
Floor Lighting 213 600
|
||||
Ceiling Lighting 5 601
|
||||
Adjustable Pulsating Light 60 602
|
||||
Adjustable Flickering Light 61 603
|
||||
Adjustable Blinking Light (unsynchronized) New 604
|
||||
Adjustable Blinking Light (synchronized) New 605
|
||||
Colormap 16 606
|
BIN
doc/SSN-Todo.xls
BIN
doc/SSN-Todo.xls
Binary file not shown.
|
@ -1,78 +0,0 @@
|
|||
Removed:
|
||||
- Buttons 1-20 690-709
|
||||
- Button 21 (THZ2 A/740 B/741 D/742 E/745 710
|
||||
- Close Door Blazing (Tag 743) 711
|
||||
- Raise Ceiling to Highest (Tag 744) 981
|
||||
- THZ2 Slime Raise (B/712 W713 P714 D715 S716) 986
|
||||
|
||||
Stuff to Remove/Change:
|
||||
- Light Blinks On Every 0.5 Seconds 2 Add Linedef Combine
|
||||
- Light Blinks On Every 1 Second 3 Add Linedef Combine
|
||||
- Light Pulses Smoothly 8 Remove
|
||||
- Light Blinks On Every 0.5 Seconds (Sync) 12 Add Linedef Combine
|
||||
- Lights Blinks On Every 1 Second (Sync) 13 Add Linedef Combine
|
||||
- Light Flickers Like Fire 17 Remove
|
||||
? - Damage (Fire) and Current 519 Remove (convert to combination)
|
||||
? - Damage (Water) and Current 984 Remove (convert to combination)
|
||||
|
||||
Section 1:
|
||||
1 - Damage (Generic) 11
|
||||
2 - Damage (Water) 983
|
||||
3 - Damage (Fire) 7
|
||||
4 - Damage (Electrical) 18
|
||||
5 - Spikes 4
|
||||
6 - Death Pit (Camera Mod) 16
|
||||
7 - Death Pit (No Camera Mod) 5
|
||||
8 - Instant Kill 10
|
||||
9 - Ring Drainer (Floor Touch) 978
|
||||
10 - Ring Drainer (No Floor Touch) 980
|
||||
11 - Special Stage Damage 9
|
||||
12 - Space Countdown 6
|
||||
13 - Ramp Sector (Increase step-up) 992
|
||||
14 - Non-Ramp Sector (Don't step-down) 996
|
||||
15 - Bouncy Sector (FOF Control Only) 14
|
||||
|
||||
Section 2: << 4
|
||||
1 - Trigger Linedef Exec (Pushable Objects) 971
|
||||
2 - Trigger LD Exec (Anywhere in Sec/All Pls) 972
|
||||
3 - Trigger Linedef Exec (Floor Touch/All Pls) 973
|
||||
4 - Trigger Linedef Exec (Anywhere in Sec) 974
|
||||
5 - Trigger Linedef Exec (Floor Touch) 975
|
||||
6 - Trigger Linedef Exec (Emerald Check) 967
|
||||
7 - Trigger Linedef Exec (NiGHTS Mare) 968
|
||||
8 - Check for linedef executor on FOFs (ANY) 970
|
||||
9 - Egg Trap Capsule 666
|
||||
10 - Special Stage Time/Rings, Par 990
|
||||
11 - Custom Global Gravity 991
|
||||
|
||||
Section 3: << 8
|
||||
1 - Ice/Sludge (required?!) 256
|
||||
2 - Wind/Current (required?!) 512
|
||||
3 - Ice/Sludge and Wind/Current 768
|
||||
4 - Conveyor Belt 985
|
||||
5 - Speed Pad (No Spin) 976
|
||||
6 - Speed Pad (Spin) 977
|
||||
7 - Bustable Block Sprite Parameter 1500-1515
|
||||
8 - "
|
||||
9 - "
|
||||
10 - "
|
||||
11 - "
|
||||
12 - "
|
||||
13 - "
|
||||
14 - "
|
||||
15 - "
|
||||
|
||||
Section 4: << 12
|
||||
1 - Starpost Activator 993
|
||||
2 - Special Stage Goal Combine 33
|
||||
2 - Exit Sector Combine 982
|
||||
2 - No Tag Zone Combine 987
|
||||
2 - CTF: Flag Return Combine 995
|
||||
3 - CTF: Red Team Base 988
|
||||
4 - CTF: Blue Team Base 989
|
||||
5 - Fan Sector 997
|
||||
6 - Super Sonic Transform 969
|
||||
7 - Spinner 979
|
||||
8 - Zoom Tube Start 998
|
||||
9 - Zoom Tube End 999
|
||||
10 - Finish Line 994
|
307
doc/faq.txt
307
doc/faq.txt
|
@ -1,307 +0,0 @@
|
|||
SRB2
|
||||
Release v1.09, ? 2005.
|
||||
|
||||
Last Updated: June 2005
|
||||
|
||||
Original game & sources by: Id Software.
|
||||
Additions: (c)1998 by: Fabrice Denis & Boris Pereira
|
||||
(c)1999 by: Fabrice Denis, Boris Pereira & Thierry Van Elsuwe
|
||||
(c)2000 by: Boris Pereira & Thierry Van Elsuwe
|
||||
(c)2004 By: AJ, Graue, Alam Arias, Logan Arias & Andrew Clunis
|
||||
|
||||
Special thanks to Steven McGranahan, Lee Killough, Robert Bäuml and Bell Kin for
|
||||
their large contribution and to other DooM LEGACY & SRB2 Team members.
|
||||
|
||||
Web site: http://www.SRB2.org/
|
||||
e-mail: none@none.com
|
||||
|
||||
OpenGL specific:
|
||||
Web site: http://legacy.newdoom.com/gl
|
||||
|
||||
|
||||
-----------------------------------------------------------------------
|
||||
F.A.Q.
|
||||
-----------------------------------------------------------------------
|
||||
|
||||
|
||||
If you have any trouble with SRB2, you might find a solution
|
||||
here.
|
||||
|
||||
If you find a solution to a problem that was not listed here,
|
||||
please tell us so that we can update the FAQ and help other people!
|
||||
|
||||
Mail your hardware/software problems to:
|
||||
|
||||
None@none.com subject: FAQ
|
||||
|
||||
|
||||
--------
|
||||
CONTENTS
|
||||
--------
|
||||
|
||||
[0] Miscellaneous
|
||||
[1] Mouse/Joystick/Keyboard
|
||||
[2] Video
|
||||
[3] Sound
|
||||
[4] Network
|
||||
[5] Troubleshooting
|
||||
|
||||
|
||||
-----------------
|
||||
[0] MISCELLANEOUS
|
||||
-----------------
|
||||
|
||||
* under win95 or OS/2, I don't have enough memory. How can i handle with ?
|
||||
|
||||
Tell win95 to put more dpmi memory for your dos box.
|
||||
Or use the -mb option.
|
||||
|
||||
|
||||
|
||||
---------------------------
|
||||
[1] MOUSE/JOYSTICK/KEYBOARD
|
||||
---------------------------
|
||||
|
||||
* My mouse/joystick does not work in SRB2.
|
||||
|
||||
First, check that the mouse/joystick is activated : go at the
|
||||
console and type either 'use_mouse' (or use the respective
|
||||
menuitem) or 'use_joystick'.
|
||||
|
||||
If it tells '0' or off than the mouse/joystick is not used,
|
||||
set the variable to 1. eg: 'use_mouse 1'.
|
||||
|
||||
For the joystick, different values will support different
|
||||
types of joystick, check the console documentation for the
|
||||
command 'use_joystick' for more.
|
||||
|
||||
Even if the mouse or joystick is activated, you have to
|
||||
set up the contols into the Setup Controls menu. That is:
|
||||
tell what use you will make of the mouse/joystick buttons.
|
||||
|
||||
|
||||
---------
|
||||
[2] VIDEO
|
||||
---------
|
||||
|
||||
|
||||
* Where are the other video modes ? I have only '320x200' in the
|
||||
Video Modes menu.
|
||||
|
||||
DOS
|
||||
---
|
||||
|
||||
SRB2 adds new video modes only if a VESA2 (or better) driver
|
||||
is present. The VESA2 driver is a standard of 'talking' between a
|
||||
program and the huge amount of different graphics cards
|
||||
available today.
|
||||
|
||||
If you don't have a VESA2 driver, you can download UNIVBE, or
|
||||
SMART DISPLAY DOCTOR from
|
||||
|
||||
http://www.scitechsoft.com/products/ent/free_titles.html
|
||||
|
||||
or if you have an S3 based card, you can download the free
|
||||
software called 'S3VBE'.
|
||||
|
||||
ftp://ftp.externet.hu/pub/mirror/sac/graph/s3vbe318.zip
|
||||
ftp://ftp.digsys.bg/pub/simtelnet/msdos/graphics/s3vbe318.zip
|
||||
http://www.filesearching.com/cgi-bin/s?q=s3vbe318.zip
|
||||
http://www.google.com/search?q=s3vbe318.zip
|
||||
|
||||
* The game doesn't restore the video mode I have chosen the last time
|
||||
I played SRB2.
|
||||
|
||||
The current video mode has to be made the 'default' so that it is
|
||||
saved to the config : press the key 'D' on the Video Options menu
|
||||
to set the current video mode the default.
|
||||
|
||||
* I have some problems with OpenGL mode
|
||||
|
||||
Have a look at the FAQ for OpenGL on the glLegacy web site:
|
||||
|
||||
http://www.doomnation.com/gllegacy/faqe.htm
|
||||
|
||||
# Linux: I only have a 1024x768 (or 800x600, 1280x1024, ...) resolution
|
||||
in fullscreen mode under X and SRB2 is really really slow. Can I
|
||||
have lower resolutions like 320x200 in fullscreen mode as well?
|
||||
|
||||
Probably yes. SRB2 can only use the resolutions offered by the
|
||||
X-Server. So if all fullscreen modes have a very high resolution you
|
||||
have to modify /etc/XF86Config (or /etc/X11/XF86Config). Use XF86Setup
|
||||
(or the appropriate tool coming with your distribution - sax,
|
||||
xf86config, ...) to do this.
|
||||
If you do not succeed there, you can enter them manually into your
|
||||
XF86Config file. ONLY RECOMMENDED FOR USERS WHO KNOW WHAT THEY DO!
|
||||
For a short guide on how to do this, have a look at the file
|
||||
"Doublescan.txt".
|
||||
In case of doubt consult the XFree86-HOWTO (or ask your system
|
||||
administrator :).
|
||||
|
||||
# Linux: I cannot have any fullscreen modes at all!
|
||||
|
||||
You have only modes above 1024x768 in your XF86Config. Proceed as
|
||||
described above.
|
||||
|
||||
# Linux: After a certain idle time my screensaver jams the display of
|
||||
SRB2. I can still operate SRB2, but I do not see what's happening
|
||||
and the screensaver won't go away.
|
||||
|
||||
You probably have KDE. The KDE screensaver does not obey the screensaver
|
||||
rules (at least mine, version 1.1). The solution is to deactivate the
|
||||
KDE screensaver and use another screensaver (like the xscreensaver,
|
||||
e.g.). But the hell, when you started SRB2 you should have played it
|
||||
as well and not left it alone!!!
|
||||
|
||||
---------
|
||||
[3] SOUND
|
||||
---------
|
||||
|
||||
+ DOS:I can't have CD audio music, why ?
|
||||
|
||||
Make sure that the MSCDEX driver version 2.0 or later is loaded.
|
||||
If it says 'MSCDEX version xxx' at game startup, and you still
|
||||
don't hear the cd music, then probably your card doesn't respond
|
||||
when SRB2 tries to set the cd volume. If so, make sure your sound
|
||||
card's mixer have the cd volume set up so that you can hear something.
|
||||
|
||||
+ When the CD plays, the game is very 'jerky'. It doesn't do that when
|
||||
I type 'cd off' in the console.
|
||||
|
||||
You have an old/bad cd driver, that can take up to a second to
|
||||
respond to cd driver commands. Either get the latest version of
|
||||
your driver, or turn cd update off. Check 'cd_udpate' in the
|
||||
console documentation for more.
|
||||
|
||||
* DOS:How can I *ALWAYS* disable the sounds or music of the game ?
|
||||
|
||||
Edit the allegro.cfg file and set digicard/midicard to 0 (none)
|
||||
|
||||
* DOS:My sterero sound is reversed, how can I set it the right way ?
|
||||
|
||||
Change the console variable 'stereoreverse' to either 1 or 0.
|
||||
Or, you can edit the allegro.cfg file, and set the 'flip_pan' variable.
|
||||
|
||||
|
||||
* DOS:The sounds are too 'slow', or 'low-pitched'
|
||||
|
||||
It seems to be a problem of the auto-detection of some 8bit sound
|
||||
cards. You will have to set manually the 'sb_freq' value in the
|
||||
allegro.cfg file to a lower value : 11906, 16129.
|
||||
|
||||
* DOS:SRB2 doesn't play any sound/music, but I have a sound
|
||||
blaster genuine/compatible card.
|
||||
|
||||
If you have a genuine or compatible SoundBlaster card, it is very
|
||||
important that you set the BLASTER environment variable.
|
||||
|
||||
If you are playing under DOS, and never installed your sound card
|
||||
under DOS, run the setup of your sound card for DOS.
|
||||
|
||||
Check if the BLASTER variable was set: type 'SET' under dos
|
||||
(or DOSbox)
|
||||
|
||||
Do you see something like 'BLASTER=A220 I5 D1 ...' ?
|
||||
|
||||
Yes? If you don't hear sounds/music, then tweak the settings in the
|
||||
allegro.cfg file until you get something, first try changing the
|
||||
type of the sound card, it is not always properly detected.
|
||||
|
||||
No? You have to set this variable in order that your sound card is
|
||||
detected. Run the setup that was shipped with your sound card, and
|
||||
make sure you run the setup for DOS too, it will usually add a
|
||||
line of the type 'SET BLASTER=... ...' in the autoexec.bat file.
|
||||
|
||||
|
||||
* DOS:How can I have better midi music on my 8bit sound card ?
|
||||
|
||||
Use the DIGMID driver, it is supported in SRB2.
|
||||
|
||||
What the hell is this? Well, the Gravis Ultrasound uses digital
|
||||
samples to play midi music. On a simple 8bit card, you can use digital
|
||||
samples too, which will sound usually better than what is output
|
||||
by the poor fm synthesis chip of 8bit cards.
|
||||
|
||||
You will need to get a Gravis Ultrasound patch set, you can find
|
||||
several ones for free on internet, it consists of a bunch of '.pat'
|
||||
files which are the digital samples to play the midi instruments
|
||||
(eg: piano, conga, guitar, ect.).
|
||||
|
||||
Check the Allegro homepage for some links to GUS patches:
|
||||
http://alleg.sourceforge.net/digmid.html
|
||||
http://alleg.sourceforge.net/
|
||||
http://www.talula.demon.co.uk/allegro/digmid.html
|
||||
http://www.talula.demon.co.uk/allegro/
|
||||
|
||||
Now to activate the DIGMID driver:
|
||||
|
||||
Set the 'midi_card' value to 8 (DIGMID) in the allegro.cfg file.
|
||||
Make sure you leave the 'digi_voices' blank, or set it to a low
|
||||
value, because the midi music will use digital voices.
|
||||
At the end of the allegro.cfg file, set the 'patches' value
|
||||
to the path, where you have installed a Gravis Ultrasound midi
|
||||
patch set. eg: patches = d:\music\midipat\
|
||||
|
||||
# Linux: CD music does not work or only works when run as root.
|
||||
|
||||
We do not encourage you to run SRB2 as root (you never know
|
||||
what SRB2 can do to your system - it's a mighty piece of code :).
|
||||
There is a common problem with ATAPI CD-rom drives, which are
|
||||
treated as harddisks. Usually there is a link /dev/cdrom pointing to
|
||||
device hd[b,c,d]. As harddisks are not supposed to be read directly
|
||||
via this device (especially not by a common user), there are no read
|
||||
permissions for "all". For CD-roms you can savely set read permissions
|
||||
unless you are very paranoid. Assuming your CD-rom drive is /dev/hdc,
|
||||
set permissions with "chmod +r /dev/hdc" (as root). SCSI CD-rom drives
|
||||
should not have this problem. But if they do, proceed as described
|
||||
with ATAPI drives.
|
||||
|
||||
# Linux: The CD music volume is not set properly.
|
||||
|
||||
Go to the console and type "jigglecdvolume 1".
|
||||
|
||||
-----------
|
||||
[4] NETWORK
|
||||
-----------
|
||||
|
||||
* Where can I find Internet servers ?
|
||||
|
||||
For the moment there is one public server.
|
||||
http://srb2.servegame.org/ Master server web page
|
||||
srb2.servegame.org:28910 current Master Server
|
||||
|
||||
* When I start SRB2 with -server or -connect it say :
|
||||
"BinToPort: Address already in use (EADDRINUSE)"
|
||||
|
||||
It appears only when SRB2 crashes or when you leave with ctrl-break.
|
||||
use -udpport 12345 (or any other free slot) on both sides (client and
|
||||
server).
|
||||
|
||||
This can also happens when there is already a SRB2 running on your
|
||||
computer if you whant to try two SRB2 running on the same computer
|
||||
use -clientport 12345 (or any other free slot). Then the second will
|
||||
connect to the first one.
|
||||
|
||||
* Do you use the tcp protocol ?
|
||||
|
||||
No, we use the udp protocol which is faster, but don't worry udp is a
|
||||
part of the internet protocol.
|
||||
|
||||
|
||||
-------------------
|
||||
[5] Troubleshooting
|
||||
-------------------
|
||||
|
||||
# Linux: SRB2 is hung in fullscreen mode and won´t let me leave.
|
||||
What shall I do?
|
||||
|
||||
Some people press the reset button, but hey, we are not in the
|
||||
stoneage of operating systems! There are two "proper" ways to
|
||||
get out: kill your X-Server. You can usually do this by pressing
|
||||
"CTRL-ALT-BACKSPACE". But if you have other open applications with
|
||||
important data (probably hacked away on your diploma thesis for 3
|
||||
weeks without saving once) you can also kill SRB2 directly. Press
|
||||
"CTRL-ALT-F2" and you will get to a console. Log in, type
|
||||
"killall llxSRB2" and switch back to the X-Server with "CTRL-ALT-F7".
|
||||
Some X-Server crash on this procedure - blame the X-Server for the
|
||||
loss of 3 weeks work on your diploma thesis :)
|
|
@ -1,68 +0,0 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>
|
||||
Sonic Robo Blast 2 Manual
|
||||
</title>
|
||||
<link rel="stylesheet" type="text/css" href="srb2manstyle.css">
|
||||
<!-- Borrowed some javascript code so the height of the iframe is equal to the size of the document - Sonict -->
|
||||
<script type="text/javascript">
|
||||
/* free code from dyn-web.com */
|
||||
|
||||
function getDocHeight(doc) {
|
||||
doc = doc || document;
|
||||
// from http://stackoverflow.com/questions/1145850/get-height-of-entire-document-with-javascript
|
||||
var body = doc.body, html = doc.documentElement;
|
||||
var height = Math.max( body.scrollHeight, body.offsetHeight,
|
||||
html.clientHeight, html.scrollHeight, html.offsetHeight );
|
||||
return height;
|
||||
}
|
||||
|
||||
function setIframeHeight(id) {
|
||||
var ifrm = document.getElementById(id);
|
||||
var doc = ifrm.contentDocument? ifrm.contentDocument: ifrm.contentWindow.document;
|
||||
ifrm.style.visibility = 'hidden';
|
||||
ifrm.style.height = "10px"; // reset to minimal height in case going from longer to shorter doc
|
||||
ifrm.style.height = getDocHeight( doc ) + "px";
|
||||
ifrm.style.visibility = 'visible';
|
||||
}
|
||||
</script>
|
||||
<meta http-equiv="Content-type" content="text/html; charset=UTF-8">
|
||||
</head>
|
||||
<body>
|
||||
<p class="c1">
|
||||
<img src="manual_img/sonicname2.png" alt="SONIC" width="136" height="36">
|
||||
<br>
|
||||
<img src="manual_img/srb2banner.png" alt="ROBO BLAST 2" width="224" height="43">
|
||||
</p>
|
||||
<p class="c1">
|
||||
<big><big><strong>Manual</strong></big></big>
|
||||
</p>
|
||||
<table class="cf" align="center">
|
||||
<tr><td class="c">
|
||||
<ul class="hmenu">
|
||||
<li class="hmenu"><a class="hmenu" href="intro.htm" target="ifrm">Main</a></li>
|
||||
<li class="hmenu"><a class="hmenu" href="items.htm" target="ifrm">Items</a></li>
|
||||
<li class="hmenu"><a class="hmenu" href="playerabilities.htm" target="ifrm">Player Abilities</a></li>
|
||||
<li class="hmenu"><a class="hmenu" href="basicplay.htm" target="ifrm">Gameplay</a></li>
|
||||
<li class="hmenu"><a class="hmenu" href="surroundings.htm" target="ifrm">Surroundings</a></li>
|
||||
</ul>
|
||||
</td></tr>
|
||||
<tr><td class="c">
|
||||
<ul class="hmenu">
|
||||
<li class="hmenu"><a class="hmenu" href="multiplayer.htm" target="ifrm">Multiplayer</a></li>
|
||||
<li class="hmenu"><a class="hmenu" href="zones.htm" target="ifrm">Zones</a></li>
|
||||
<li class="hmenu"><a class="hmenu" href="controls.htm" target="ifrm">Controls</a></li>
|
||||
<li class="hmenu"><a class="hmenu" href="consolecommands.htm" target="ifrm">Console Commands</a></li>
|
||||
<li class="hmenu"><a class="hmenu" href="misc.htm" target="ifrm">Misc</a></li>
|
||||
</ul>
|
||||
</td></tr>
|
||||
</table>
|
||||
<hr>
|
||||
<p class="c1">
|
||||
<!-- The "onload" property of the iframe makes an error when validated through the W3C validation checker. -->
|
||||
<!-- This will not be fixed as it isn't worth the time to fix it up properly. - Sonict -->
|
||||
<iframe id="ifrm" name="ifrm" src="intro.htm" onload="setIframeHeight(this.id)"> </iframe>
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
|
@ -1,39 +0,0 @@
|
|||
SVN-RULES
|
||||
|
||||
- As you can see, there is sub-directory in the repository, one for eatch
|
||||
platform (djgpp (dos),win32,SDL) the root directory is for all platform,
|
||||
so take care of the order we have put in.
|
||||
- do not commit/upload tests of bugged code, try to fix a maximum of know
|
||||
bugs and update know bugs list in source.txt. If you must commit your source
|
||||
make your code in #ifdef so we can disable it
|
||||
- SRB2 is a modification of doom/Doom Legacy source. We allow additionnal feature
|
||||
and visual addition.
|
||||
- Maximize communications between members, do not impose your changes, if your
|
||||
are not sure about a feature/change, talk about it in irc://irc.esper.net/srb2 chat room.
|
||||
|
||||
CODE-RULES
|
||||
|
||||
- We use no tab, 4 space indent, and tab size 8 (in case some tab have filtred
|
||||
and for makefile)
|
||||
- Self documented code, variable and function must have a name that help
|
||||
understand the code, so do not call variable and function a,b, a2, ...
|
||||
- the usage of extern in a c file is prohibited, except for declaration of a
|
||||
function with body (so it is like public keyword in c++)
|
||||
Also function protos haren't allowed for external function, put it un the
|
||||
corresponding h file.
|
||||
- Try to minimize #ifdef usage for :
|
||||
- code readability
|
||||
- the main code is for all port so if something is good for a platform all
|
||||
platform can benefit by this feature
|
||||
- Take care of platform dependent code, we would like to have code that work
|
||||
on Dos, Win32, SDL, ... little and big endian, software/Glide/OpenGl.
|
||||
|
||||
GOOD PRACTICE
|
||||
|
||||
- Try to put as mush static variable and function on module so it help to
|
||||
understand the role of the varaible/function in the module also this
|
||||
help the compiler to optimize
|
||||
- minimise global variable
|
||||
- make a log of your work, so you don't need to put a lot of comment in
|
||||
the code, this will also help us to update the what's new section of doc
|
||||
when doing final release
|
240
doc/source.txt
240
doc/source.txt
|
@ -1,240 +0,0 @@
|
|||
|
||||
1. Compile SRB2
|
||||
2. Explanation of the code
|
||||
2.1 The memory model
|
||||
2.2 Hardware Texture model
|
||||
|
||||
1. Compile SRB2
|
||||
=================
|
||||
|
||||
DOS
|
||||
---
|
||||
|
||||
need:
|
||||
- djgpp 2.03 (http://www.delorie.com/djgpp/)
|
||||
- allegro 3.12 (http://alleg.sourceforge.net/index.html)
|
||||
(
|
||||
- libsocket 0.7.4 (beta 4) or better
|
||||
for use with Winsock 1.1 (example Windows 3.1)
|
||||
(http://www.phekda.freeserve.co.uk/richdawe/lsck/lsck.htm)
|
||||
OR
|
||||
- Wattcp-32 v2.2 dev.rel 6 or better
|
||||
For use with a packet driver
|
||||
(http://www.bgnett.no/~giva/)
|
||||
(http://groups.yahoo.com/group/watt-32/)
|
||||
(http://groups.yahoo.com/group/watt-32/files/v2.2/)
|
||||
)
|
||||
- bcd 1.03 (inlcude in this package)
|
||||
- gcc 2.95.2 is recommended
|
||||
- nasm 0.98 (or better) (http://nasm.sourceforge.net/)
|
||||
|
||||
compile:
|
||||
make
|
||||
make WATTCP=1 (to make a Wattcp-32 version)
|
||||
|
||||
debug:
|
||||
when craching SRB2 will return eip
|
||||
type make asm, then you will have a 8 megs srb2.s (a assembler file)
|
||||
the you can find the faulting instruction and function
|
||||
|
||||
------------------------------------------------------------------------
|
||||
|
||||
Linux/SDL
|
||||
-----
|
||||
|
||||
need:
|
||||
- tested with gcc 2.95 and 3.X.
|
||||
- SDL 1.2
|
||||
- SDL_mixer 1.2
|
||||
- ibogg and libvorbis (http://Xiph.org/)
|
||||
- nasm 0.98 (or better)(http://nasm.sourceforge.net/) only with 2.95, else add CC30=1
|
||||
|
||||
compile
|
||||
make LINUX=1
|
||||
|
||||
debug:
|
||||
gdb ?
|
||||
|
||||
------------------------------------------------------------------------
|
||||
|
||||
Win32
|
||||
-----
|
||||
|
||||
need :
|
||||
- glide 3.x sdk (optional) (http://www.3dfx.com)
|
||||
- directx6 sdk (or higher) (http://www.micosoft.com/directx)
|
||||
- nasm 0.98 (or better) (http://nasm.sourceforge.net/)
|
||||
- use src\win32\wLegacy.dsp
|
||||
- VC6 should also work with VC5, and VS.NET 200X
|
||||
|
||||
debug:
|
||||
press on "step over" with the release version (there is some debug info
|
||||
on it). Then change the eip in the regster window when you will type
|
||||
enter the edi will go to the faulting instruction. don't forget that
|
||||
you can follow the stack for calls.
|
||||
You can also use trace with the debug version but add -win and -nomouse.
|
||||
|
||||
------------------------------------------------------------------------
|
||||
|
||||
Win32/minGW/SDL
|
||||
-----
|
||||
|
||||
need:
|
||||
- tested with gcc 2.95 and 3.X.
|
||||
- can also use Dev-C++ 5.0 beta 9 (4.9.9.0) from http://www.bloodshed.net/dev/devcpp.html
|
||||
- SDL 1.2
|
||||
- SDL_mixer 1.2
|
||||
|
||||
compile
|
||||
make minGW=1 SDL=1
|
||||
or use src\SDL\Win32SDL.dev with Dev-C++ 4.9.9.0 or later
|
||||
|
||||
debug:
|
||||
gdb ?
|
||||
|
||||
------------------------------------------------------------------------
|
||||
|
||||
WinCE/SDL WIP
|
||||
-----
|
||||
|
||||
need:
|
||||
- ActiveSync 3.8
|
||||
http://www.microsoft.com/windowsmobile/downloads/activesync38.mspx
|
||||
|
||||
- ActiveSync 3.7.1, if 3.8 isn't available for your language
|
||||
http://www.microsoft.com/windowsmobile/downloads/activesync37.mspx
|
||||
|
||||
- eMbedded Visual Tools 3.0 - 2002 Edition
|
||||
http://www.microsoft.com/downloads/details.aspx?FamilyID=f663bf48-31ee-4cbe-aac5-0affd5fb27dd
|
||||
|
||||
- Pocket PC 2000 SDK
|
||||
http://www.microsoft.com/downloads/details.aspx?FamilyID=bb3f4d7b-de2a-4e1a-a175-26a68c301ac4
|
||||
|
||||
- Pocket PC 2002 SDK (eMVT 3.0 2002 Ed. comes with this)
|
||||
http://www.microsoft.com/downloads/details.aspx?FamilyID=2dbee84a-bd94-4167-b817-2b2e548b2e92
|
||||
|
||||
- Pocket PC 2002 SDK Emulator Images (eMVT 3.0 2002 Ed. comes with this)
|
||||
http://www.microsoft.com/downloads/details.aspx?FamilyID=25f4de97-ae80-477a-9df1-496b85b3d3e3
|
||||
|
||||
- eMbedded Visual C++ 4.0
|
||||
http://www.microsoft.com/downloads/details.aspx?familyid=1DACDB3D-50D1-41B2-A107-FA75AE960856
|
||||
|
||||
- eMbedded Visual C++ 4.0 SP3 (Win CE 4.0-4.2)
|
||||
http://www.microsoft.com/downloads/details.aspx?FamilyID=5bb36f3e-5b3d-419a-9610-2fe53815ae3b
|
||||
|
||||
OR
|
||||
|
||||
- eMbedded Visual C++ 4.0 SP4 (No SH3 support,Win CE 4.0-5.0 support)
|
||||
http://www.microsoft.com/downloads/details.aspx?FamilyID=4a4ed1f4-91d3-4dbe-986e-a812984318e5
|
||||
|
||||
- eMbedded Visual C++ 4.0 Update 5625 (SP4 only)
|
||||
http://www.microsoft.com/downloads/details.aspx?FamilyID=aa282a6d-6f57-436d-8c10-0ec02d94f5b1
|
||||
|
||||
- Windows CE: Standard Software Development Kit
|
||||
http://www.microsoft.com/downloads/details.aspx?familyid=a08f6991-16b0-4019-a174-0c40e6d25fe7
|
||||
|
||||
- SDK for Windows Mobile 2003-based Pocket PCs
|
||||
http://www.microsoft.com/downloads/details.aspx?FamilyId=9996B314-0364-4623-9EDE-0B5FBB133652
|
||||
|
||||
- Emulator Images for Windows Mobile 2003 Second Edition software for Pocket PC
|
||||
http://www.microsoft.com/downloads/details.aspx?familyid=5C53E3B5-F2A2-47D7-A41D-825FD68EBB6C
|
||||
|
||||
- Microsoft Device Emulator 1.0 Community Preview
|
||||
http://beta.microsoft.com Use Guest ID "MSDEVICE" to access the Community Preview website
|
||||
|
||||
- Windows CE Utilities for Visual Studio .NET 2003 Add-on Pack 1.1
|
||||
(if you also have VS 2003 installed, you need this to install Win CE 5.0 SDK, else no need)
|
||||
http://www.microsoft.com/downloads/details.aspx?FamilyId=7EC99CA6-2095-4086-B0CC-7C6C39B28762
|
||||
|
||||
- Windows CE 5.0: Standard Software Development Kit (eMC++ 4 SP4 only)
|
||||
http://www.microsoft.com/downloads/details.aspx?FamilyID=fa1a3d66-3f61-4ddc-9510-ae450e2318c3
|
||||
|
||||
- SDL 1.27 (use patch and zip in tools\SDL1.2.7_CE)
|
||||
|
||||
compile
|
||||
use src\SDL\WinCE\SRB2CE.vcw
|
||||
|
||||
debug:
|
||||
?
|
||||
|
||||
|
||||
2. Explanation of the code
|
||||
==========================
|
||||
|
||||
2.1 The memory model (original) (z_zone.c) (by BP)
|
||||
--------------------
|
||||
|
||||
SRB2 allocate a heap of 6/32/48 megs at begining and provide a Z_Malloc function
|
||||
to allocate in this heap.
|
||||
|
||||
Z_Malloc( int size,int tag,void* user )
|
||||
|
||||
size is the size in byte
|
||||
tag can be : PU_STATIC allocated static (like malloc do)
|
||||
call Z_Free to free it
|
||||
PU_LEVEL same as static but the zone is "tagged" with the
|
||||
tag PU_LEVEL, when calling
|
||||
Z_FreeTag (PU_LEVEL, PU_LEVEL) all zone tagged
|
||||
with PU_LEVEL are freed (at the end of the level)
|
||||
PU_CACHE this one _can_ be freed automatiquely by one other
|
||||
call to Z_Malloc. the *user point to a pointer
|
||||
to this zone so when freed automatiquely the
|
||||
pointer is set to NULL so eatch time you use it
|
||||
you must check if the pointer is not NULL and
|
||||
reload it.
|
||||
|
||||
(...)
|
||||
|
||||
2.2 Hardware Texture model (by BP)
|
||||
--------------------------
|
||||
|
||||
Eatch texture/patch/flats/pic in SRB2 are converted to hardware texture at
|
||||
runtime (the GlideMipmap_s structure (hw_data.h)). I will call hardware
|
||||
texture a gr_texture so there is no confusion.
|
||||
|
||||
To remind you :
|
||||
- Texture are set of patch and are associate to linedefs (walls) can be
|
||||
upper, lower or middle texture. It can have hole on it.
|
||||
- patch are sprites (the doom patch are run of vertical lines)
|
||||
- flats are used for floors and ceiling of sectors and have size of 64x64
|
||||
it can't have hole on it
|
||||
- pic are new legacy format for picture, it can only handle plain texture
|
||||
like flats it is now used for hud in full screen for the main picture
|
||||
of legacy and for coronas (the format was extended to handle 32 bit color
|
||||
or intensity + alpha, not all are implemented at this time)
|
||||
|
||||
Since patch, flat and pic are basic structure represented by only one lump in
|
||||
the wad, the wad loader allocate for eatch lump a GlideMipmap_s (cache3Dfx)
|
||||
and init data field to NULL. Since the data structure is allocated in
|
||||
PU_3DFXCACHE (like PU_CACHE) the data will be initilised when needed
|
||||
(hw_cache.c).
|
||||
|
||||
The GlideMipmap_s structures for textures are initialized on
|
||||
HWR_PrepLevelCache (hw_cache.c) it is called in P_SetupLevel (load level)
|
||||
the number of textures is computed with TEXTURE1, TEXTURE2 lumps since this
|
||||
can be changed in runtime in SRB2 (load a wad while runing) it must be
|
||||
reallocated. Well, at this time it is realloceted at eatch level start. We
|
||||
can do better, since numtextures change only when a wad is loaded.
|
||||
|
||||
The 3dfx driver use glide3, it load gr_texture in gr_texture memory of the
|
||||
card in fifo order when there is no more place it remove the first gr_texture,
|
||||
the downloaded field of GlideMipmap_s go to false and when needed it is
|
||||
reloaded in gr_texture memory. In OpenGl, since OpenGl keep texture in there
|
||||
own memory and handle gr_texture memory of the card we no more need to
|
||||
redownload it but if we not free time to time gr_texture memory in opengl,
|
||||
it will get alot of memory, so the gr_texture memory is cleared at eatch
|
||||
new level (same time of texture reallocation). Opengl and 3dfx link the
|
||||
loaded gr_texture with the nextmipmap field of GlideMipmap_s so before clear
|
||||
textures of the heap we MUST free gr_texture memory of OpenGl or 3dfx !
|
||||
|
||||
SRB2 can also draw patch with a differant colormap (thanks to Hurdler).
|
||||
When needed it create the same gr_texture but just with a differant colormap.
|
||||
This one is linked with the original in the GlideMipmap_s with the
|
||||
nextcolormap field.
|
||||
|
||||
So when a polygone with a gr_texture must be drawn, first we check if the
|
||||
gr_textures is not allready loaded in hadware memory (downloaded field) if
|
||||
not then we check if gr_texture data is there (not grabbed by z_malloc
|
||||
function) if not we must recompute it eatch type of gr_texture (texture,
|
||||
patch, flat, pic have there own methode) the we can send the gr_texture
|
||||
to 3dfx or OpenGl.
|
1992
doc/specials.html
1992
doc/specials.html
File diff suppressed because it is too large
Load diff
313
doc/specs/udmf_srb2.txt
Normal file
313
doc/specs/udmf_srb2.txt
Normal file
|
@ -0,0 +1,313 @@
|
|||
===============================================================================
|
||||
Universal Doom Map Format Sonic Robo Blast 2 extensions v1.0 19.02.2024
|
||||
|
||||
Copyright (c) 2024 Sonic Team Junior
|
||||
uses Universal Doom Map Format Specification v1.1 as a template,
|
||||
original document Copyright (c) 2009 James Haley.
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
under the terms of the GNU Free Documentation License, Version 1.2
|
||||
or any later version published by the Free Software Foundation;
|
||||
with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
|
||||
|
||||
===============================================================================
|
||||
|
||||
This document discusses the UDMF implementation found in Sonic Robo Blast 2's engine.
|
||||
|
||||
=======================================
|
||||
I. Grammar / Syntax
|
||||
=======================================
|
||||
|
||||
No changes.
|
||||
|
||||
=======================================
|
||||
II. Implementation Semantics
|
||||
=======================================
|
||||
|
||||
------------------------------------
|
||||
II.A : Storage and Retrieval of Data
|
||||
------------------------------------
|
||||
|
||||
No changes.
|
||||
|
||||
-----------------------------------
|
||||
II.B : Storage Within Archive Files
|
||||
-----------------------------------
|
||||
|
||||
No changes.
|
||||
|
||||
--------------------------------
|
||||
II.C : Implementation Dependence
|
||||
--------------------------------
|
||||
|
||||
The SRB2 engine only supports the following namespace:
|
||||
"srb2"
|
||||
|
||||
The engine is allowed to refuse maps with an unsupported namespace,
|
||||
or emit a warning.
|
||||
|
||||
=======================================
|
||||
III. Standardized Fields
|
||||
=======================================
|
||||
|
||||
The SRB2 engine ignores any user-defined fields.
|
||||
All boolean fields default to false unless mentioned otherwise.
|
||||
|
||||
Sonic Robo Blast 2 defines the following standardized fields:
|
||||
|
||||
vertex
|
||||
{
|
||||
x = <float>; // X coordinate. No valid default.
|
||||
y = <float>; // Y coordinate. No valid default.
|
||||
zfloor = <float>; // Floor height at this vertex. Only applies to triangular sectors
|
||||
zceiling = <float>; // Ceiling height at this vertex. Only applies to triangular sectors
|
||||
}
|
||||
|
||||
linedef
|
||||
{
|
||||
id = <integer>; // ID of line. Interpreted as tag.
|
||||
moreids = <string>; // Additional line IDs, specified as a space separated list of numbers (e.g. "2 666 1003 4505")
|
||||
|
||||
v1 = <integer>; // Index of first vertex. No valid default.
|
||||
v2 = <integer>; // Index of second vertex. No valid default.
|
||||
|
||||
blocking = <bool>; // Line blocks things.
|
||||
blockmonsters = <bool>; // Line blocks enemies.
|
||||
twosided = <bool>; // Line is 2S.
|
||||
dontpegtop = <bool>; // Upper texture unpegged.
|
||||
dontpegbottom = <bool>; // Lower texture unpegged.
|
||||
skewtd = <bool>; // Upper and lower textures are skewed.
|
||||
noclimb = <bool>; // Line is not climbable.
|
||||
noskew = <bool>; // Middle texture is not skewed.
|
||||
midpeg = <bool>; // Middle texture is pegged.
|
||||
midsolid = <bool>; // Middle texture is solid.
|
||||
wrapmidtex = <bool>; // Line's mid textures are wrapped.
|
||||
nonet = <bool>; // Special only takes effect in singleplayer games.
|
||||
netonly = <bool>; // Special only takes effect in multiplayer games.
|
||||
bouncy = <bool>; // Line is bouncy.
|
||||
transfer = <bool>; // In 3D floor sides, uses the sidedef properties of the control sector.
|
||||
|
||||
alpha = <float>; // Translucency of this line. Default is 1.0
|
||||
renderstyle = <string>; // Render style. Can be:
|
||||
// - "translucent"
|
||||
// - "add"
|
||||
// - "subtract"
|
||||
// - "reversesubtract"
|
||||
// - "modulate"
|
||||
// - "fog"
|
||||
// Default is "translucent".
|
||||
|
||||
special = <integer>; // Linedef action. Default = 0.
|
||||
arg0 = <integer>; // Argument 0. Default = 0.
|
||||
arg1 = <integer>; // Argument 1. Default = 0.
|
||||
arg2 = <integer>; // Argument 2. Default = 0.
|
||||
arg3 = <integer>; // Argument 3. Default = 0.
|
||||
arg4 = <integer>; // Argument 4. Default = 0.
|
||||
arg5 = <integer>; // Argument 5. Default = 0.
|
||||
arg6 = <integer>; // Argument 6. Default = 0.
|
||||
arg7 = <integer>; // Argument 7. Default = 0.
|
||||
arg8 = <integer>; // Argument 8. Default = 0.
|
||||
arg9 = <integer>; // Argument 9. Default = 0.
|
||||
stringarg0 = <string>; // String argument 0.
|
||||
stringarg1 = <string>; // String argument 1.
|
||||
|
||||
sidefront = <integer>; // Sidedef 1 index. No valid default.
|
||||
sideback = <integer>; // Sidedef 2 index. Default = -1.
|
||||
|
||||
comment = <string>; // A comment. Implementors should attach no special
|
||||
// semantic meaning to this field.
|
||||
}
|
||||
|
||||
sidedef
|
||||
{
|
||||
offsetx = <integer>; // X offset. Default = 0.
|
||||
offsety = <integer>; // Y offset. Default = 0.
|
||||
|
||||
texturetop = <string>; // Upper texture. Default = "-".
|
||||
texturebottom = <string>; // Lower texture. Default = "-".
|
||||
texturemiddle = <string>; // Middle texture. Default = "-".
|
||||
|
||||
repeatcnt = <string>; // Number of middle texture repetitions. Default = 0
|
||||
|
||||
sector = <integer>; // Sector index. No valid default.
|
||||
|
||||
scalex_top = <float>; // X scale for upper texture. Default = 1.0.
|
||||
scaley_top = <float>; // Y scale for upper texture. Default = 1.0.
|
||||
scalex_mid = <float>; // X scale for mid texture. Default = 1.0.
|
||||
scaley_mid = <float>; // Y scale for mid texture. Default = 1.0.
|
||||
scalex_bottom = <float>; // X scale for lower texture. Default = 1.0.
|
||||
scaley_bottom = <float>; // Y scale for lower texture. Default = 1.0.
|
||||
offsetx_top = <float>; // X offset for upper texture. Default = 0.0.
|
||||
offsety_top = <float>; // Y offset for upper texture. Default = 0.0.
|
||||
offsetx_mid = <float>; // X offset for mid texture. Default = 0.0.
|
||||
offsety_mid = <float>; // Y offset for mid texture. Default = 0.0.
|
||||
offsetx_bottom = <float>; // X offset for lower texture. Default = 0.0.
|
||||
offsety_bottom = <float>; // Y offset for lower texture. Default = 0.0.
|
||||
|
||||
comment = <string>; // A comment. Implementors should attach no special
|
||||
// semantic meaning to this field.
|
||||
}
|
||||
|
||||
sector
|
||||
{
|
||||
heightfloor = <integer>; // Floor height. Default = 0.
|
||||
heightceiling = <integer>; // Ceiling height. Default = 0.
|
||||
|
||||
texturefloor = <string>; // Floor flat. No valid default.
|
||||
textureceiling = <string>; // Ceiling flat. No valid default.
|
||||
|
||||
lightlevel = <integer>; // Light level. Default = 255.
|
||||
lightfloor = <integer>; // The floor's light level. Default is 0.
|
||||
lightceiling = <integer>; // The ceiling's light level. Default is 0.
|
||||
lightfloorabsolute = <bool>; // true = 'lightfloor' is an absolute value. Default is
|
||||
// relative to the owning sector's light level.
|
||||
lightceilingabsolute = <bool>; // true = 'lightceiling' is an absolute value. Default is
|
||||
// relative to the owning sector's light level.
|
||||
|
||||
special = <integer>; // Sector special. Default = 0.
|
||||
id = <integer>; // Sector tag/id. Default = 0.
|
||||
moreids = <string>; // Additional sector IDs/tags, specified as a space separated list of numbers (e.g. "2 666 1003 4505")
|
||||
|
||||
xpanningfloor = <float>; // X texture offset of floor texture. Default = 0.0.
|
||||
ypanningfloor = <float>; // Y texture offset of floor texture. Default = 0.0.
|
||||
xpanningceiling = <float>; // X texture offset of ceiling texture. Default = 0.0.
|
||||
ypanningceiling = <float>; // Y texture offset of ceiling texture. Default = 0.0.
|
||||
xscalefloor = <float>; // X texture scale of floor texture. Default = 1.0.
|
||||
yscalefloor = <float>; // Y texture scale of floor texture. Default = 1.0.
|
||||
xscaleceiling = <float>; // X texture scale of ceiling texture. Default = 1.0.
|
||||
yscaleceiling = <float>; // Y texture scale of ceiling texture. Default = 1.0.
|
||||
rotationfloor = <float>; // Rotation of floor texture in degrees. Default = 0.0.
|
||||
rotationceiling = <float>; // Rotation of ceiling texture in degrees. Default = 0.0.
|
||||
ceilingplane_a = <float>; // Define the plane equation for the sector's ceiling. Default is a horizontal plane at 'heightceiling'.
|
||||
ceilingplane_b = <float>; // 'heightceiling' will still be used to calculate texture alignment.
|
||||
ceilingplane_c = <float>; // The plane equation will only be used if all 4 values are given.
|
||||
ceilingplane_d = <float>; // The plane is defined as a*x + b*y + c*z + d = 0 with the normal vector pointing downward.
|
||||
floorplane_a = <float>; // Define the plane equation for the sector's floor. Default is a horizontal plane at 'heightfloor'.
|
||||
floorplane_b = <float>; // 'heightfloor' will still be used to calculate texture alignment.
|
||||
floorplane_c = <float>; // The plane equation will only be used if all 4 values are given.
|
||||
floorplane_d = <float>; // The plane is defined as a*x + b*y + c*z + d = 0 with the normal vector pointing upward.
|
||||
|
||||
lightcolor = <integer>; // Sector's light color as RRGGBB value. Default = 0x000000.
|
||||
lightalpha = <integer>; // Sector's light opacity. Default = 25.
|
||||
fadecolor = <integer>; // Sector's fog color as RRGGBB value. Default = 0x000000.
|
||||
fadealpha = <integer>; // Sector's fog opacity. Default = 25.
|
||||
fadestart = <integer>; // Sector's fading range start. Default = 0.
|
||||
fadeend = <integer>; // Sector's fading range end. Default = 31.
|
||||
colormapfog = <bool>; // Sector's colormap uses fog lighting.
|
||||
colormapfadesprites = <bool>; // Sector's colormap affects full-bright sprites.
|
||||
colormapprotected = <bool>; // Sector's colormap is not affected by colormap change specials.
|
||||
|
||||
flipspecial_nofloor = <bool>; // Trigger effects that require a plane touch are not executed when the floor is touched.
|
||||
flipspecial_ceiling = <bool>; // Trigger effects that require a plane touch are executed when the ceiling is touched.
|
||||
triggerspecial_touch = <bool>; // Trigger effects are executed anywhere in the sector.
|
||||
triggerspecial_headbump = <bool>; // Trigger effects are executed if the top of the triggerer object touches a plane.
|
||||
triggerline_plane = <bool>; // Trigger effects require a plane touch to be executed.
|
||||
triggerline_mobj = <bool>; // Trigger effects can be executed by non-pushable objects.
|
||||
|
||||
invertprecip = <bool>; // Inverts the precipitation effect; if the sector is considered to be indoors,
|
||||
// precipitation is generated, and if the sector is considered to be outdoors,
|
||||
// precipitation is not generated.
|
||||
gravityflip = <bool>; // Sector flips any objects in it, if the sector has negative gravity.
|
||||
heatwave = <bool>; // Sector has the heat wave effect.
|
||||
noclipcamera = <bool>; // Sector is not tangible to the camera.
|
||||
outerspace = <bool>; // Sector has the space countdown effect.
|
||||
doublestepup = <bool>; // Sector has half the vertical height needed for objects to walk into it.
|
||||
nostepdown = <bool>; // Sector has the staircase effect disabled.
|
||||
speedpad = <bool>; // Sector is a speed pad.
|
||||
starpostactivator = <bool>; // Sector activates any Star Posts in it when walked into by a plyer.
|
||||
exit = <bool>; // Sector is an exit sector.
|
||||
specialstagepit = <bool>; // Sector is a Special Stage pit.
|
||||
returnflag = <bool>; // Sector returns any Capture the Flag flags that come in contact with it to their respective bases.
|
||||
redteambase = <bool>; // Sector is a Red Team base.
|
||||
blueteambase = <bool>; // Sector is Blue Team base.
|
||||
fan = <bool>; // Sector is a fan sector.
|
||||
supertransform = <bool>; // Sector transforms any players that come in contact with it into their 'super' mode.
|
||||
forcespin = <bool>; // Sector forces any players that come in contact with it to roll.
|
||||
zoomtubestart = <bool>; // Sector is the starting point of a zoom tube path.
|
||||
zoomtubeend = <bool>; // Sector is the ending point of a zoom tube path.
|
||||
finishline = <bool>; // Sector is a Circuit finish line.
|
||||
ropehang = <bool>; // Sector is a rope hang. Must be applied to a 3D floor.
|
||||
jumpflip = <bool>; // Sector flips the gravity of players who jump from it.
|
||||
gravityoverride = <bool>; // Reverse gravity effect is only applied when an object is in the sector.
|
||||
nophysics_floor = <bool>; // Disables floor slope physics if created through a plane equation.
|
||||
nophysics_ceiling = <bool>; // Disables ceiling slope physics if created through a plane equation.
|
||||
|
||||
friction = <float>; // Sector's friction factor.
|
||||
gravity = <float>; // Sector's gravity. Default is 1.0.
|
||||
damagetype = <integer>; // Damage type for sector damage. Can be:
|
||||
// - "None"
|
||||
// - "Generic"
|
||||
// - "Water"
|
||||
// - "Fire"
|
||||
// - "Lava"
|
||||
// - "Electric"
|
||||
// - "Spike"
|
||||
// - "DeathPitTilt"
|
||||
// - "DeathPitNoTilt"
|
||||
// - "Instakill"
|
||||
// - "SpecialStage"
|
||||
// Default = "None".
|
||||
triggertag = <integer>; // Tag to trigger when this sector is entered. Default = 0.
|
||||
triggerer = <string>; // Who can execute the trigger tag when this sector is entered. Can be:
|
||||
// - "Player"
|
||||
// - "AllPlayers"
|
||||
// - "Mobj"
|
||||
// Default = "Player".
|
||||
|
||||
comment = <string>; // A comment. Implementors should attach no special
|
||||
// semantic meaning to this field.
|
||||
}
|
||||
|
||||
thing
|
||||
{
|
||||
id = <integer>; // Thing ID. Default = 0.
|
||||
moreids = <string>; // Additional thing IDs, specified as a space separated list of numbers (e.g. "2 666 1003 4505")
|
||||
|
||||
x = <float>; // X coordinate. No valid default.
|
||||
y = <float>; // Y coordinate. No valid default.
|
||||
|
||||
height = <float>; // Z height relative to floor.
|
||||
// Relative to ceiling if flip = true.
|
||||
// Absolute if absolutez = true.
|
||||
// Default = 0.
|
||||
|
||||
angle = <integer>; // Map angle of thing in degrees. Default = 0 (East).
|
||||
pitch = <integer>; // Pitch of thing in degrees. Default = 0 (horizontal).
|
||||
roll = <integer>; // Roll of thing in degrees. Default = 0.
|
||||
scalex = <float>; // Horizontal visual scaling on thing. Default = 1.0.
|
||||
scaley = <float>; // Vertical visual scaling on thing. Default = 1.0.
|
||||
scale = <float>; // Vertical and horizontal visual scaling on thing. Default = 1.0.
|
||||
mobjscale = <float>; // Physical scale of the thing. Default = 1.0.
|
||||
|
||||
type = <integer>; // Thing type. No valid default.
|
||||
|
||||
flip = <bool>; // Thing spawns flipped, on the ceiling.
|
||||
absolutez = <bool>; // If true, the thing height is absolute, instead of being relative to the floor or ceiling.
|
||||
|
||||
arg0 = <integer>; // Argument 0. Default = 0.
|
||||
arg1 = <integer>; // Argument 1. Default = 0.
|
||||
arg2 = <integer>; // Argument 2. Default = 0.
|
||||
arg3 = <integer>; // Argument 3. Default = 0.
|
||||
arg4 = <integer>; // Argument 4. Default = 0.
|
||||
arg5 = <integer>; // Argument 5. Default = 0.
|
||||
arg6 = <integer>; // Argument 6. Default = 0.
|
||||
arg7 = <integer>; // Argument 7. Default = 0.
|
||||
arg8 = <integer>; // Argument 8. Default = 0.
|
||||
arg9 = <integer>; // Argument 9. Default = 0.
|
||||
stringarg0 = <string>; // String argument 0.
|
||||
stringarg1 = <string>; // String argument 1.
|
||||
|
||||
comment = <string>; // A comment. Implementors should attach no special
|
||||
// semantic meaning to this field.
|
||||
}
|
||||
|
||||
|
||||
=======================================
|
||||
Changelog
|
||||
=======================================
|
||||
|
||||
1.0: 19.02.2024
|
||||
Initial version.
|
||||
|
||||
===============================================================================
|
||||
EOF
|
||||
===============================================================================
|
|
@ -40,7 +40,9 @@ common
|
|||
defaultflatscale = 1.0f;
|
||||
scaledtextureoffsets = true;
|
||||
|
||||
// Colormap/fade related options
|
||||
maxcolormapalpha = 25;
|
||||
// TODO: change to 255;
|
||||
|
||||
// Thing number for start position in 3D Mode
|
||||
start3dmode = 3328;
|
||||
|
@ -100,11 +102,23 @@ mapformat_udmf
|
|||
|
||||
// When this is set to true, sectors with the same tag will light up when a line is highlighted
|
||||
linetagindicatesectors = false;
|
||||
localsidedeftextureoffsets = true;
|
||||
distinctfloorandceilingbrightness = true;
|
||||
|
||||
// Enables support for individual offsets of upper/middle/lower sidedef textures
|
||||
localsidedeftextureoffsets = true;
|
||||
|
||||
// Enables support for plane equation slopes
|
||||
planeequationsupport = true;
|
||||
|
||||
// Enables support for vertex heights
|
||||
vertexheightsupport = true;
|
||||
|
||||
// Enables setting distinct brightness for floor, ceiling, and walls
|
||||
distinctfloorandceilingbrightness = true;
|
||||
distinctwallbrightness = false;
|
||||
|
||||
// Enables setting distinct brightness for upper, middle, and lower sidedef parts
|
||||
distinctsidedefpartbrightness = false;
|
||||
|
||||
// Special linedefs
|
||||
include("SRB222_misc.cfg", "speciallinedefs_udmf");
|
||||
|
||||
|
|
|
@ -10,6 +10,45 @@ udmf
|
|||
prefix = "(0)";
|
||||
}
|
||||
|
||||
6
|
||||
{
|
||||
title = "Sector Set Portal";
|
||||
prefix = "(6)";
|
||||
arg0
|
||||
{
|
||||
title = "Target sector tag";
|
||||
type = 13;
|
||||
}
|
||||
arg1
|
||||
{
|
||||
title = "Portal type";
|
||||
type = 11;
|
||||
enum
|
||||
{
|
||||
0 = "Link to portal with same tag";
|
||||
1 = "Copy portal from second tag";
|
||||
2 = "Skybox portal";
|
||||
3 = "Plane portal";
|
||||
4 = "Horizon portal";
|
||||
5 = "Copy portal to line";
|
||||
6 = "Interactive portal (unimplemented)";
|
||||
7 = "Link to sector with second tag";
|
||||
8 = "Link to object with second tag";
|
||||
}
|
||||
}
|
||||
arg2
|
||||
{
|
||||
title = "Affected planes";
|
||||
type = 11;
|
||||
enum = "floorceiling";
|
||||
}
|
||||
arg3
|
||||
{
|
||||
title = "Misc";
|
||||
tooltip = "For type 0 portal: specifies whether the line belongs to the sector viewed\nthrough the portal (1) or the sector in which the portal is seen (0).\nFor type 1 portal: specifies the sector tag of the portal to copy.\nFor type 7 portal: specifies the sector tag to make a portal to.\nFor type 8 portal: specifies the object tag to make a portal to.";
|
||||
}
|
||||
}
|
||||
|
||||
7
|
||||
{
|
||||
title = "Sector Flat Alignment";
|
||||
|
@ -58,6 +97,7 @@ udmf
|
|||
41
|
||||
{
|
||||
title = "Horizon Effect";
|
||||
id = "srb2_horizonline";
|
||||
prefix = "(41)";
|
||||
}
|
||||
|
||||
|
@ -108,10 +148,12 @@ udmf
|
|||
arg0
|
||||
{
|
||||
title = "Speed";
|
||||
tooltip = "In fracunits per tic.";
|
||||
}
|
||||
arg1
|
||||
{
|
||||
title = "Sequence";
|
||||
title = "Waypoint sequence";
|
||||
tooltip = "The sequence number of (zoom tube) waypoints to use.";
|
||||
}
|
||||
arg2
|
||||
{
|
||||
|
@ -128,6 +170,7 @@ udmf
|
|||
arg0
|
||||
{
|
||||
title = "Speed";
|
||||
tooltip = "In fracunits per tic.";
|
||||
}
|
||||
arg1
|
||||
{
|
||||
|
@ -143,6 +186,7 @@ udmf
|
|||
{
|
||||
title = "Sound";
|
||||
type = 2;
|
||||
tooltip = "Takes a DS constant.\nExample: DSTHOK";
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -164,10 +208,12 @@ udmf
|
|||
arg0
|
||||
{
|
||||
title = "Speed";
|
||||
tooltip = "In fracunits per tic.";
|
||||
}
|
||||
arg1
|
||||
{
|
||||
title = "Sequence";
|
||||
title = "Waypoint sequence";
|
||||
tooltip = "The sequence number of (zoom tube) waypoints to use.";
|
||||
}
|
||||
arg2
|
||||
{
|
||||
|
@ -187,7 +233,7 @@ udmf
|
|||
}
|
||||
arg1
|
||||
{
|
||||
title = "Debris lifetime";
|
||||
title = "Debris lifetime (tics)";
|
||||
}
|
||||
arg2
|
||||
{
|
||||
|
@ -198,6 +244,7 @@ udmf
|
|||
stringarg0
|
||||
{
|
||||
title = "Debris object type";
|
||||
tooltip = "Uses a MT_ constant.\nExample: MT_ROCKCRUMBLE16\nDefaults to MT_ROCKCRUMBLE1.";
|
||||
type = 2;
|
||||
}
|
||||
}
|
||||
|
@ -259,21 +306,22 @@ udmf
|
|||
|
||||
20
|
||||
{
|
||||
title = "First Line";
|
||||
title = "PolyObject First Line";
|
||||
prefix = "(20)";
|
||||
arg0
|
||||
{
|
||||
title = "PolyObject ID";
|
||||
title = "PolyObject tag";
|
||||
type = 14;
|
||||
}
|
||||
arg1
|
||||
{
|
||||
title = "Parent ID";
|
||||
title = "Parent PolyObject tag";
|
||||
type = 14;
|
||||
}
|
||||
arg2
|
||||
{
|
||||
title = "Translucency";
|
||||
title = "Translucency level";
|
||||
tooltip = "Ranges from 0 (fully opaque) to 10 (fully transparent).";
|
||||
}
|
||||
arg3
|
||||
{
|
||||
|
@ -299,45 +347,48 @@ udmf
|
|||
|
||||
30
|
||||
{
|
||||
title = "Waving Flag";
|
||||
title = "Waving PolyObject Flag";
|
||||
prefix = "(30)";
|
||||
arg0
|
||||
{
|
||||
title = "PolyObject ID";
|
||||
title = "PolyObject tag";
|
||||
type = 14;
|
||||
}
|
||||
arg1
|
||||
{
|
||||
title = "Speed";
|
||||
tooltip = "In fracunits per tic.";
|
||||
}
|
||||
arg2
|
||||
{
|
||||
title = "Distance";
|
||||
tooltip = "How far to move in either direction, in fracunits.";
|
||||
}
|
||||
}
|
||||
|
||||
31
|
||||
{
|
||||
title = "Displacement by Front Sector";
|
||||
title = "Move PolyObject by Front Sector Displacement";
|
||||
prefix = "(31)";
|
||||
arg0
|
||||
{
|
||||
title = "PolyObject ID";
|
||||
title = "PolyObject tag";
|
||||
type = 14;
|
||||
}
|
||||
arg1
|
||||
{
|
||||
title = "Base speed";
|
||||
tooltip = "How much the front sector displacement translates.\nA value of 256 amounts to a 1:1 translation.";
|
||||
}
|
||||
}
|
||||
|
||||
32
|
||||
{
|
||||
title = "Angular Displacement by Front Sector";
|
||||
title = "Rotate PolyObject by Front Sector Displacement";
|
||||
prefix = "(32)";
|
||||
arg0
|
||||
{
|
||||
title = "PolyObject ID";
|
||||
title = "PolyObject tag";
|
||||
type = 14;
|
||||
}
|
||||
arg1
|
||||
|
@ -374,6 +425,7 @@ udmf
|
|||
arg0
|
||||
{
|
||||
title = "Speed";
|
||||
tooltip = "In fracunits per tic.";
|
||||
}
|
||||
arg1
|
||||
{
|
||||
|
@ -405,10 +457,12 @@ udmf
|
|||
arg2
|
||||
{
|
||||
title = "Forward speed";
|
||||
tooltip = "In fracunits per tic.";
|
||||
}
|
||||
arg3
|
||||
{
|
||||
title = "Return speed";
|
||||
tooltip = "In fracunits per tic.";
|
||||
}
|
||||
arg4
|
||||
{
|
||||
|
@ -438,10 +492,12 @@ udmf
|
|||
arg2
|
||||
{
|
||||
title = "Forward speed";
|
||||
tooltip = "In fracunits per tic.";
|
||||
}
|
||||
arg3
|
||||
{
|
||||
title = "Return speed";
|
||||
tooltip = "In fracunits per tic.";
|
||||
}
|
||||
arg4
|
||||
{
|
||||
|
@ -465,10 +521,11 @@ udmf
|
|||
arg1
|
||||
{
|
||||
title = "Speed";
|
||||
tooltip = "In fracunits per tic.";
|
||||
}
|
||||
arg2
|
||||
{
|
||||
title = "Starting delay";
|
||||
title = "Starting delay (tics)";
|
||||
}
|
||||
arg3
|
||||
{
|
||||
|
@ -504,16 +561,18 @@ udmf
|
|||
arg2
|
||||
{
|
||||
title = "Crush speed";
|
||||
tooltip = "In fracunits per tic.";
|
||||
}
|
||||
arg3
|
||||
{
|
||||
title = "Retract speed";
|
||||
tooltip = "In fracunits per tic.";
|
||||
}
|
||||
}
|
||||
|
||||
66
|
||||
{
|
||||
title = "Move Planes by Displacement";
|
||||
title = "Move Planes by Front Sector Displacement";
|
||||
prefix = "(66)";
|
||||
arg0
|
||||
{
|
||||
|
@ -550,6 +609,7 @@ udmf
|
|||
arg1
|
||||
{
|
||||
title = "Speed";
|
||||
tooltip = "In fracunits per tic.";
|
||||
}
|
||||
arg2
|
||||
{
|
||||
|
@ -601,14 +661,17 @@ udmf
|
|||
arg1
|
||||
{
|
||||
title = "Falling speed";
|
||||
tooltip = "In fracunits per tic.";
|
||||
}
|
||||
arg2
|
||||
{
|
||||
title = "Rising speed";
|
||||
tooltip = "In fracunits per tic.";
|
||||
}
|
||||
stringarg0
|
||||
{
|
||||
title = "Crushing sound";
|
||||
tooltip = "Takes a DS constant.\nExample: DSTHOK";
|
||||
type = 2;
|
||||
}
|
||||
}
|
||||
|
@ -681,6 +744,7 @@ udmf
|
|||
arg1
|
||||
{
|
||||
title = "Sinking speed";
|
||||
tooltip = "In fracunits per tic.";
|
||||
}
|
||||
arg2
|
||||
{
|
||||
|
@ -722,6 +786,7 @@ udmf
|
|||
{
|
||||
title = "Alpha";
|
||||
default = 255;
|
||||
tooltip = "Ranges from 0 (fully transparent) to 255 (fully opaque).";
|
||||
}
|
||||
arg2
|
||||
{
|
||||
|
@ -765,6 +830,7 @@ udmf
|
|||
{
|
||||
title = "Alpha";
|
||||
default = 128;
|
||||
tooltip = "Ranges from 0 (fully transparent) to 255 (fully opaque).";
|
||||
}
|
||||
arg2
|
||||
{
|
||||
|
@ -841,6 +907,7 @@ udmf
|
|||
{
|
||||
title = "Alpha";
|
||||
default = 255;
|
||||
tooltip = "Ranges from 0 (fully transparent) to 255 (fully opaque).";
|
||||
}
|
||||
arg2
|
||||
{
|
||||
|
@ -883,6 +950,7 @@ udmf
|
|||
{
|
||||
title = "Alpha";
|
||||
default = 255;
|
||||
tooltip = "Ranges from 0 (fully transparent) to 255 (fully opaque).";
|
||||
}
|
||||
arg2
|
||||
{
|
||||
|
@ -913,6 +981,7 @@ udmf
|
|||
arg5
|
||||
{
|
||||
title = "Speed";
|
||||
tooltip = "In fracunits per tic.";
|
||||
}
|
||||
arg6
|
||||
{
|
||||
|
@ -970,6 +1039,7 @@ udmf
|
|||
{
|
||||
title = "Alpha";
|
||||
default = 255;
|
||||
tooltip = "Ranges from 0 (fully transparent) to 255 (fully opaque).";
|
||||
}
|
||||
arg2
|
||||
{
|
||||
|
@ -1040,14 +1110,17 @@ udmf
|
|||
arg1
|
||||
{
|
||||
title = "Falling speed";
|
||||
tooltip = "In fracunits per tic.";
|
||||
}
|
||||
arg2
|
||||
{
|
||||
title = "Rising speed";
|
||||
tooltip = "In fracunits per tic.";
|
||||
}
|
||||
stringarg0
|
||||
{
|
||||
title = "Crushing sound";
|
||||
tooltip = "Takes a DS constant.\nExample: DSTHOK";
|
||||
type = 2;
|
||||
}
|
||||
}
|
||||
|
@ -1066,6 +1139,7 @@ udmf
|
|||
{
|
||||
title = "Alpha";
|
||||
default = 255;
|
||||
tooltip = "Ranges from 0 (fully transparent) to 255 (fully opaque).";
|
||||
}
|
||||
arg2
|
||||
{
|
||||
|
@ -1123,6 +1197,7 @@ udmf
|
|||
arg2
|
||||
{
|
||||
title = "Sinking speed";
|
||||
tooltip = "In fracunits per tic.";
|
||||
}
|
||||
arg3
|
||||
{
|
||||
|
@ -1144,6 +1219,7 @@ udmf
|
|||
{
|
||||
title = "Alpha";
|
||||
default = 128;
|
||||
tooltip = "Ranges from 0 (fully transparent) to 255 (fully opaque).";
|
||||
}
|
||||
arg2
|
||||
{
|
||||
|
@ -1177,6 +1253,7 @@ udmf
|
|||
{
|
||||
title = "Alpha";
|
||||
default = 255;
|
||||
tooltip = "Ranges from 0 (fully transparent) to 255 (fully opaque).";
|
||||
}
|
||||
arg2
|
||||
{
|
||||
|
@ -2116,6 +2193,7 @@ udmf
|
|||
arg1
|
||||
{
|
||||
title = "Speed";
|
||||
tooltip = "In fracunits per tic.";
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2221,6 +2299,7 @@ udmf
|
|||
arg2
|
||||
{
|
||||
title = "Speed";
|
||||
tooltip = "In fracunits per tic.";
|
||||
}
|
||||
arg3
|
||||
{
|
||||
|
@ -2237,7 +2316,7 @@ udmf
|
|||
|
||||
405
|
||||
{
|
||||
title = "Move Planes by Distance";
|
||||
title = "Move Planes by Set Distance";
|
||||
prefix = "(405)";
|
||||
arg0
|
||||
{
|
||||
|
@ -2257,6 +2336,7 @@ udmf
|
|||
arg3
|
||||
{
|
||||
title = "Speed";
|
||||
tooltip = "In fracunits per tic.";
|
||||
}
|
||||
arg4
|
||||
{
|
||||
|
@ -2289,14 +2369,15 @@ udmf
|
|||
arg1
|
||||
{
|
||||
title = "Speed";
|
||||
tooltip = "In fracunits per tic.";
|
||||
}
|
||||
arg2
|
||||
{
|
||||
title = "Starting delay";
|
||||
title = "Starting delay (tics)";
|
||||
}
|
||||
arg3
|
||||
{
|
||||
title = "Delay before flip";
|
||||
title = "Delay before flip (tics)";
|
||||
}
|
||||
arg4
|
||||
{
|
||||
|
@ -2328,10 +2409,12 @@ udmf
|
|||
arg2
|
||||
{
|
||||
title = "Crush speed";
|
||||
tooltip = "In fracunits per tic.";
|
||||
}
|
||||
arg3
|
||||
{
|
||||
title = "Retract speed";
|
||||
tooltip = "In fracunits per tic.";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2346,7 +2429,7 @@ udmf
|
|||
prefix = "(412)";
|
||||
arg0
|
||||
{
|
||||
title = "Destination tag";
|
||||
title = "Destination thing tag";
|
||||
type = 14;
|
||||
}
|
||||
arg1
|
||||
|
@ -2732,6 +2815,7 @@ udmf
|
|||
stringarg0
|
||||
{
|
||||
title = "Music name";
|
||||
tooltip = "Takes a music lump name, without the O_ or D_ prefix. Use - to disable music.\nExample: GFZ1";
|
||||
type = 2;
|
||||
}
|
||||
}
|
||||
|
@ -2771,6 +2855,7 @@ udmf
|
|||
stringarg0
|
||||
{
|
||||
title = "Sound name";
|
||||
tooltip = "Takes a DS constant.\nExample: DSTHOK";
|
||||
type = 2;
|
||||
}
|
||||
}
|
||||
|
@ -3026,11 +3111,11 @@ udmf
|
|||
prefix = "(448)";
|
||||
arg0
|
||||
{
|
||||
title = "Viewpoint ID";
|
||||
title = "Viewpoint thing tag";
|
||||
}
|
||||
arg1
|
||||
{
|
||||
title = "Centerpoint ID";
|
||||
title = "Centerpoint thing tag";
|
||||
}
|
||||
arg2
|
||||
{
|
||||
|
@ -3115,6 +3200,7 @@ udmf
|
|||
arg2
|
||||
{
|
||||
title = "Alpha";
|
||||
tooltip = "Ranges from 0 (fully transparent) to 255 (fully opaque).";
|
||||
}
|
||||
arg3
|
||||
{
|
||||
|
@ -3145,10 +3231,11 @@ udmf
|
|||
arg2
|
||||
{
|
||||
title = "Alpha";
|
||||
tooltip = "Ranges from 0 (fully transparent) to 255 (fully opaque).";
|
||||
}
|
||||
arg3
|
||||
{
|
||||
title = "Fading speed";
|
||||
title = "Fading speed (tics)";
|
||||
}
|
||||
arg4
|
||||
{
|
||||
|
@ -3334,16 +3421,17 @@ udmf
|
|||
|
||||
480
|
||||
{
|
||||
title = "Door Slide";
|
||||
title = "PolyObject Door Slide";
|
||||
prefix = "(480)";
|
||||
arg0
|
||||
{
|
||||
title = "PolyObject ID";
|
||||
title = "PolyObject tag";
|
||||
type = 14;
|
||||
}
|
||||
arg1
|
||||
{
|
||||
title = "Speed";
|
||||
tooltip = "In fracunits per tic.";
|
||||
}
|
||||
arg2
|
||||
{
|
||||
|
@ -3351,22 +3439,23 @@ udmf
|
|||
}
|
||||
arg3
|
||||
{
|
||||
title = "Return delay";
|
||||
title = "Return delay (tics)";
|
||||
}
|
||||
}
|
||||
|
||||
481
|
||||
{
|
||||
title = "Door Swing";
|
||||
title = "PolyObject Door Swing";
|
||||
prefix = "(481)";
|
||||
arg0
|
||||
{
|
||||
title = "PolyObject ID";
|
||||
title = "PolyObject tag";
|
||||
type = 14;
|
||||
}
|
||||
arg1
|
||||
{
|
||||
title = "Speed";
|
||||
tooltip = "In fracunits per tic.";
|
||||
}
|
||||
arg2
|
||||
{
|
||||
|
@ -3375,22 +3464,23 @@ udmf
|
|||
}
|
||||
arg3
|
||||
{
|
||||
title = "Return delay";
|
||||
title = "Return delay (tics)";
|
||||
}
|
||||
}
|
||||
|
||||
482
|
||||
{
|
||||
title = "Move";
|
||||
title = "Move PolyObject";
|
||||
prefix = "(482)";
|
||||
arg0
|
||||
{
|
||||
title = "PolyObject ID";
|
||||
title = "PolyObject tag";
|
||||
type = 14;
|
||||
}
|
||||
arg1
|
||||
{
|
||||
title = "Speed";
|
||||
tooltip = "In fracunits per tic.";
|
||||
}
|
||||
arg2
|
||||
{
|
||||
|
@ -3406,20 +3496,22 @@ udmf
|
|||
|
||||
484
|
||||
{
|
||||
title = "Rotate";
|
||||
title = "Rotate PolyObject";
|
||||
prefix = "(484)";
|
||||
arg0
|
||||
{
|
||||
title = "PolyObject ID";
|
||||
title = "PolyObject tag";
|
||||
type = 14;
|
||||
}
|
||||
arg1
|
||||
{
|
||||
title = "Speed";
|
||||
tooltip = "In degrees per tic.";
|
||||
}
|
||||
arg2
|
||||
{
|
||||
title = "Rotation";
|
||||
tooltip = "How many degrees the PolyObject will rotate.";
|
||||
type = 8;
|
||||
}
|
||||
arg3
|
||||
|
@ -3438,20 +3530,22 @@ udmf
|
|||
|
||||
488
|
||||
{
|
||||
title = "Move by Waypoints";
|
||||
title = "Move PolyObject by Waypoints";
|
||||
prefix = "(488)";
|
||||
arg0
|
||||
{
|
||||
title = "PolyObject ID";
|
||||
title = "PolyObject tag";
|
||||
type = 14;
|
||||
}
|
||||
arg1
|
||||
{
|
||||
title = "Speed";
|
||||
tooltip = "In fracunits per tic.";
|
||||
}
|
||||
arg2
|
||||
{
|
||||
title = "Waypoint sequence";
|
||||
tooltip = "The sequence number of (zoom tube) waypoints to use.";
|
||||
}
|
||||
arg3
|
||||
{
|
||||
|
@ -3478,11 +3572,11 @@ udmf
|
|||
|
||||
489
|
||||
{
|
||||
title = "Set Visibility, Tangibility";
|
||||
title = "Set PolyObject Visibility/Tangibility";
|
||||
prefix = "(489)";
|
||||
arg0
|
||||
{
|
||||
title = "PolyObject ID";
|
||||
title = "PolyObject tag";
|
||||
type = 14;
|
||||
}
|
||||
arg1
|
||||
|
@ -3511,16 +3605,17 @@ udmf
|
|||
|
||||
491
|
||||
{
|
||||
title = "Set Translucency";
|
||||
title = "Set PolyObject Translucency";
|
||||
prefix = "(491)";
|
||||
arg0
|
||||
{
|
||||
title = "PolyObject ID";
|
||||
title = "PolyObject tag";
|
||||
type = 14;
|
||||
}
|
||||
arg1
|
||||
{
|
||||
title = "Translucency level";
|
||||
tooltip = "Ranges from 0 (fully opaque) to 10 (fully transparent).";
|
||||
}
|
||||
arg2
|
||||
{
|
||||
|
@ -3532,16 +3627,17 @@ udmf
|
|||
|
||||
492
|
||||
{
|
||||
title = "Fade Translucency";
|
||||
title = "Fade PolyObject Translucency";
|
||||
prefix = "(492)";
|
||||
arg0
|
||||
{
|
||||
title = "PolyObject ID";
|
||||
title = "PolyObject tag";
|
||||
type = 14;
|
||||
}
|
||||
arg1
|
||||
{
|
||||
title = "Translucency level";
|
||||
tooltip = "Ranges from 0 (fully opaque) to 10 (fully transparent).";
|
||||
}
|
||||
arg2
|
||||
{
|
||||
|
@ -3569,7 +3665,7 @@ udmf
|
|||
|
||||
500
|
||||
{
|
||||
title = "Scroll Walls";
|
||||
title = "Scroll Wall";
|
||||
prefix = "(500)";
|
||||
arg0
|
||||
{
|
||||
|
@ -3589,7 +3685,7 @@ udmf
|
|||
|
||||
502
|
||||
{
|
||||
title = "Scroll Walls Remotely";
|
||||
title = "Scroll Tagged Walls";
|
||||
prefix = "(502)";
|
||||
arg0
|
||||
{
|
||||
|
@ -3626,6 +3722,7 @@ udmf
|
|||
{
|
||||
title = "Sector tag";
|
||||
type = 13;
|
||||
tooltip = "A tag of 0 will scroll the planes of this line's front sector.";
|
||||
}
|
||||
arg1
|
||||
{
|
||||
|
@ -3663,6 +3760,7 @@ udmf
|
|||
{
|
||||
title = "Sector tag";
|
||||
type = 13;
|
||||
tooltip = "A tag of 0 will apply the effect to this line's front sector.";
|
||||
}
|
||||
arg1
|
||||
{
|
||||
|
@ -3686,7 +3784,7 @@ udmf
|
|||
{
|
||||
title = "Flags";
|
||||
type = 12;
|
||||
flags
|
||||
enum
|
||||
{
|
||||
1 = "Slide";
|
||||
2 = "Non-exclusive";
|
||||
|
|
|
@ -78,6 +78,8 @@ sectorflags
|
|||
ropehang = "Rope Hang";
|
||||
jumpflip = "Flip Gravity on Jump";
|
||||
gravityoverride = "Make Reverse Gravity Temporary";
|
||||
nophysics_floor = "Disable Floor Slope Physics";
|
||||
nophysics_ceiling = "Disable Ceiling Slope Physics";
|
||||
flipspecial_nofloor = "No Trigger on Floor Touch";
|
||||
flipspecial_ceiling = "Trigger on Ceiling Touch";
|
||||
triggerspecial_touch = "Trigger on Edge Touch";
|
||||
|
@ -114,6 +116,8 @@ sectorflagscategories
|
|||
ropehang = "special";
|
||||
jumpflip = "special";
|
||||
gravityoverride = "special";
|
||||
nophysics_floor = "special";
|
||||
nophysics_ceiling = "special";
|
||||
flipspecial_nofloor = "trigger";
|
||||
flipspecial_ceiling = "trigger";
|
||||
triggerspecial_touch = "trigger";
|
||||
|
@ -229,20 +233,363 @@ Field data types:
|
|||
*/
|
||||
universalfields
|
||||
{
|
||||
sector
|
||||
{
|
||||
}
|
||||
|
||||
linedef
|
||||
{
|
||||
alpha
|
||||
{
|
||||
type = 1;
|
||||
default = 1.0;
|
||||
}
|
||||
|
||||
comment
|
||||
{
|
||||
type = 2;
|
||||
default = "";
|
||||
}
|
||||
|
||||
renderstyle
|
||||
{
|
||||
type = 2;
|
||||
default = "";
|
||||
}
|
||||
|
||||
stringarg0
|
||||
{
|
||||
type = 2;
|
||||
default = "";
|
||||
}
|
||||
|
||||
stringarg1
|
||||
{
|
||||
type = 2;
|
||||
default = "";
|
||||
}
|
||||
|
||||
executordelay
|
||||
{
|
||||
type = 0;
|
||||
default = 0;
|
||||
}
|
||||
}
|
||||
|
||||
sidedef
|
||||
{
|
||||
comment
|
||||
{
|
||||
type = 2;
|
||||
default = "";
|
||||
}
|
||||
|
||||
//light
|
||||
//{
|
||||
// type = 0;
|
||||
// default = 0;
|
||||
//}
|
||||
//
|
||||
//lightabsolute
|
||||
//{
|
||||
// type = 3;
|
||||
// default = false;
|
||||
//}
|
||||
//
|
||||
//light_top
|
||||
//{
|
||||
// type = 0;
|
||||
// default = 0;
|
||||
//}
|
||||
//
|
||||
//lightabsolute_top
|
||||
//{
|
||||
// type = 3;
|
||||
// default = false;
|
||||
//}
|
||||
//
|
||||
//light_mid
|
||||
//{
|
||||
// type = 0;
|
||||
// default = 0;
|
||||
//}
|
||||
//
|
||||
//lightabsolute_mid
|
||||
//{
|
||||
// type = 3;
|
||||
// default = false;
|
||||
//}
|
||||
//
|
||||
//light_bottom
|
||||
//{
|
||||
// type = 0;
|
||||
// default = 0;
|
||||
//}
|
||||
//
|
||||
//lightabsolute_bottom
|
||||
//{
|
||||
// type = 3;
|
||||
// default = false;
|
||||
//}
|
||||
|
||||
offsetx_bottom
|
||||
{
|
||||
type = 1;
|
||||
default = 0.0;
|
||||
}
|
||||
|
||||
offsetx_mid
|
||||
{
|
||||
type = 1;
|
||||
default = 0.0;
|
||||
}
|
||||
|
||||
offsetx_top
|
||||
{
|
||||
type = 1;
|
||||
default = 0.0;
|
||||
}
|
||||
|
||||
offsety_bottom
|
||||
{
|
||||
type = 1;
|
||||
default = 0.0;
|
||||
}
|
||||
|
||||
offsety_mid
|
||||
{
|
||||
type = 1;
|
||||
default = 0.0;
|
||||
}
|
||||
|
||||
offsety_top
|
||||
{
|
||||
type = 1;
|
||||
default = 0.0;
|
||||
}
|
||||
|
||||
scalex_bottom
|
||||
{
|
||||
type = 1;
|
||||
default = 1.0;
|
||||
}
|
||||
|
||||
scalex_mid
|
||||
{
|
||||
type = 1;
|
||||
default = 1.0;
|
||||
}
|
||||
|
||||
scalex_top
|
||||
{
|
||||
type = 1;
|
||||
default = 1.0;
|
||||
}
|
||||
|
||||
scaley_bottom
|
||||
{
|
||||
type = 1;
|
||||
default = 1.0;
|
||||
}
|
||||
|
||||
scaley_mid
|
||||
{
|
||||
type = 1;
|
||||
default = 1.0;
|
||||
}
|
||||
|
||||
scaley_top
|
||||
{
|
||||
type = 1;
|
||||
default = 1.0;
|
||||
}
|
||||
}
|
||||
|
||||
thing
|
||||
{
|
||||
comment
|
||||
{
|
||||
type = 2;
|
||||
default = "";
|
||||
}
|
||||
|
||||
pitch
|
||||
{
|
||||
type = 0;
|
||||
}
|
||||
|
||||
roll
|
||||
{
|
||||
type = 0;
|
||||
}
|
||||
|
||||
scalex
|
||||
{
|
||||
type = 1;
|
||||
default = 1.0;
|
||||
}
|
||||
|
||||
scaley
|
||||
{
|
||||
type = 1;
|
||||
default = 1.0;
|
||||
}
|
||||
|
||||
stringarg0
|
||||
{
|
||||
type = 2;
|
||||
default = "";
|
||||
}
|
||||
|
||||
stringarg1
|
||||
{
|
||||
type = 2;
|
||||
default = "";
|
||||
}
|
||||
|
||||
mobjscale
|
||||
{
|
||||
type = 1;
|
||||
default = 1.0;
|
||||
managed = false;
|
||||
}
|
||||
}
|
||||
|
||||
sector
|
||||
{
|
||||
comment
|
||||
{
|
||||
type = 2;
|
||||
default = "";
|
||||
}
|
||||
|
||||
damagetype
|
||||
{
|
||||
type = 2;
|
||||
default = "";
|
||||
}
|
||||
|
||||
gravity
|
||||
{
|
||||
type = 1;
|
||||
default = 1.0;
|
||||
}
|
||||
|
||||
lightcolor
|
||||
{
|
||||
type = 0;
|
||||
default = 0;
|
||||
}
|
||||
|
||||
fadecolor
|
||||
{
|
||||
type = 0;
|
||||
default = 0;
|
||||
}
|
||||
|
||||
lightalpha
|
||||
{
|
||||
type = 0;
|
||||
default = 25;
|
||||
}
|
||||
|
||||
fadealpha
|
||||
{
|
||||
type = 0;
|
||||
default = 25;
|
||||
}
|
||||
|
||||
fadestart
|
||||
{
|
||||
type = 0;
|
||||
default = 0;
|
||||
}
|
||||
|
||||
fadeend
|
||||
{
|
||||
type = 0;
|
||||
default = 31;
|
||||
}
|
||||
|
||||
xpanningfloor
|
||||
{
|
||||
type = 1;
|
||||
default = 0.0;
|
||||
}
|
||||
|
||||
ypanningfloor
|
||||
{
|
||||
type = 1;
|
||||
default = 0.0;
|
||||
}
|
||||
|
||||
rotationfloor
|
||||
{
|
||||
type = 1;
|
||||
default = 0.0;
|
||||
}
|
||||
|
||||
xscalefloor
|
||||
{
|
||||
type = 1;
|
||||
default = 1.0;
|
||||
}
|
||||
|
||||
yscalefloor
|
||||
{
|
||||
type = 1;
|
||||
default = 1.0;
|
||||
}
|
||||
|
||||
lightfloor
|
||||
{
|
||||
type = 0;
|
||||
default = 0;
|
||||
}
|
||||
|
||||
lightfloorabsolute
|
||||
{
|
||||
type = 3;
|
||||
default = false;
|
||||
}
|
||||
|
||||
xpanningceiling
|
||||
{
|
||||
type = 1;
|
||||
default = 0.0;
|
||||
}
|
||||
|
||||
ypanningceiling
|
||||
{
|
||||
type = 1;
|
||||
default = 0.0;
|
||||
}
|
||||
|
||||
rotationceiling
|
||||
{
|
||||
type = 1;
|
||||
default = 0.0;
|
||||
}
|
||||
|
||||
xscaleceiling
|
||||
{
|
||||
type = 1;
|
||||
default = 1.0;
|
||||
}
|
||||
|
||||
yscaleceiling
|
||||
{
|
||||
type = 1;
|
||||
default = 1.0;
|
||||
}
|
||||
|
||||
lightceiling
|
||||
{
|
||||
type = 0;
|
||||
default = 0;
|
||||
}
|
||||
|
||||
lightceilingabsolute
|
||||
{
|
||||
type = 3;
|
||||
default = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load diff
7183
extras/conf/udb/SRB2-22binary.cfg
Normal file
7183
extras/conf/udb/SRB2-22binary.cfg
Normal file
File diff suppressed because it is too large
Load diff
|
@ -1,6 +1,169 @@
|
|||
|
||||
This is a list of major changes in SDL's version history.
|
||||
|
||||
---------------------------------------------------------------------------
|
||||
2.28.2:
|
||||
---------------------------------------------------------------------------
|
||||
General:
|
||||
* Added the hint SDL_HINT_JOYSTICK_WGI to control whether to use Windows.Gaming.Input for controllers
|
||||
|
||||
|
||||
---------------------------------------------------------------------------
|
||||
2.28.0:
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
General:
|
||||
* Added SDL_HasWindowSurface() and SDL_DestroyWindowSurface() to switch between the window surface and rendering APIs
|
||||
* Added a display event SDL_DISPLAYEVENT_MOVED which is sent when the primary monitor changes or displays change position relative to each other
|
||||
* Added the hint SDL_HINT_ENABLE_SCREEN_KEYBOARD to control whether the on-screen keyboard should be shown when text input is active
|
||||
|
||||
|
||||
---------------------------------------------------------------------------
|
||||
2.26.0:
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
General:
|
||||
* Updated OpenGL headers to the latest API from The Khronos Group Inc.
|
||||
* Added SDL_GetWindowSizeInPixels() to get the window size in pixels, which may differ from the window coordinate size for windows with high-DPI support
|
||||
* Added simulated vsync synchronization for the software renderer
|
||||
* Added the mouse position to SDL_MouseWheelEvent
|
||||
* Added SDL_ResetHints() to reset all hints to their default values
|
||||
* Added SDL_GetJoystickGUIDInfo() to get device information encoded in a joystick GUID
|
||||
* Added the hint SDL_HINT_JOYSTICK_HIDAPI_XBOX_360 to control whether the HIDAPI driver for XBox 360 controllers should be used
|
||||
* Added the hint SDL_HINT_JOYSTICK_HIDAPI_XBOX_360_PLAYER_LED to control whether the player LEDs should be lit to indicate which player is associated with an Xbox 360 controller
|
||||
* Added the hint SDL_HINT_JOYSTICK_HIDAPI_XBOX_360_WIRELESS to control whether the HIDAPI driver for XBox 360 wireless controllers should be used
|
||||
* Added the hint SDL_HINT_JOYSTICK_HIDAPI_XBOX_ONE to control whether the HIDAPI driver for XBox One controllers should be used
|
||||
* Added the hint SDL_HINT_JOYSTICK_HIDAPI_XBOX_ONE_HOME_LED to control the brightness of the XBox One guide button LED
|
||||
* Added support for PS3 controllers to the HIDAPI driver, enabled by default on macOS, controlled by the SDL_HINT_JOYSTICK_HIDAPI_PS3 hint
|
||||
* Added support for Nintendo Wii controllers to the HIDAPI driver, not enabled by default, controlled by the SDL_HINT_JOYSTICK_HIDAPI_WII hint
|
||||
* Added the hint SDL_HINT_JOYSTICK_HIDAPI_WII_PLAYER_LED to control whether the player LED should be lit on the Nintendo Wii controllers
|
||||
* Added the hint SDL_HINT_JOYSTICK_HIDAPI_VERTICAL_JOY_CONS to control whether Nintendo Switch Joy-Con controllers will be in vertical mode when using the HIDAPI driver
|
||||
* Added access to the individual left and right gyro sensors of the combined Joy-Cons controller
|
||||
* Added a microsecond timestamp to SDL_SensorEvent and SDL_ControllerSensorEvent, when the hardware provides that information
|
||||
* Added SDL_SensorGetDataWithTimestamp() and SDL_GameControllerGetSensorDataWithTimestamp() to retrieve the last sensor data with the associated microsecond timestamp
|
||||
* Added the hint SDL_HINT_HIDAPI_IGNORE_DEVICES to have the SDL HID API ignore specific devices
|
||||
* SDL_GetRevision() now includes more information about the SDL build, including the git commit hash if available
|
||||
|
||||
Windows:
|
||||
* Added the hint SDL_HINT_MOUSE_RELATIVE_SYSTEM_SCALE to control whether the system mouse acceleration curve is used for relative mouse motion
|
||||
|
||||
macOS:
|
||||
* Implemented vsync synchronization on macOS 12
|
||||
|
||||
Linux:
|
||||
* Added SDL_SetPrimarySelectionText(), SDL_GetPrimarySelectionText(), and SDL_HasPrimarySelectionText() to interact with the X11 primary selection clipboard
|
||||
* Added the hint SDL_HINT_VIDEO_WAYLAND_EMULATE_MOUSE_WARP to control whether mouse pointer warp emulation is enabled under Wayland
|
||||
|
||||
Android:
|
||||
* Enabled IME soft keyboard input
|
||||
* Added version checking to make sure the SDL Java and C code are compatible
|
||||
|
||||
|
||||
---------------------------------------------------------------------------
|
||||
2.24.0:
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
General:
|
||||
* New version numbering scheme, similar to GLib and Flatpak.
|
||||
* An even number in the minor version (second component) indicates a production-ready stable release such as 2.24.0, which would have been 2.0.24 under the old system.
|
||||
* The patchlevel (micro version, third component) indicates a bugfix-only update: for example, 2.24.1 would be a bugfix-only release to fix bugs in 2.24.0, without adding new features.
|
||||
* An odd number in the minor version indicates a prerelease such as 2.23.0. Stable distributions should not use these prereleases.
|
||||
* The patchlevel indicates successive prereleases, for example 2.23.1 and 2.23.2 would be prereleases during development of the SDL 2.24.0 stable release.
|
||||
* Added SDL_GetPointDisplayIndex() and SDL_GetRectDisplayIndex() to get the display associated with a point and rectangle in screen space
|
||||
* Added SDL_bsearch(), SDL_crc16(), and SDL_utf8strnlen() to the stdlib routines
|
||||
* Added SDL_CPUPauseInstruction() as a macro in SDL_atomic.h
|
||||
* Added SDL_size_mul_overflow() and SDL_size_add_overflow() for better size overflow protection
|
||||
* Added SDL_ResetHint() to reset a hint to the default value
|
||||
* Added SDL_ResetKeyboard() to reset SDL's internal keyboard state, generating key up events for all currently pressed keys
|
||||
* Added the hint SDL_HINT_MOUSE_RELATIVE_WARP_MOTION to control whether mouse warping generates motion events in relative mode. This hint defaults off.
|
||||
* Added the hint SDL_HINT_TRACKPAD_IS_TOUCH_ONLY to control whether trackpads are treated as touch devices or mice. By default touchpads are treated as mouse input.
|
||||
* The hint SDL_HINT_JOYSTICK_HIDAPI_JOY_CONS now defaults on
|
||||
* Added support for mini-gamepad mode for Nintendo Joy-Con controllers using the HIDAPI driver
|
||||
* Added the hint SDL_HINT_JOYSTICK_HIDAPI_COMBINE_JOY_CONS to control whether Joy-Con controllers are automatically merged into a unified gamepad when using the HIDAPI driver. This hint defaults on.
|
||||
* The hint SDL_HINT_JOYSTICK_HIDAPI_SWITCH_HOME_LED can be set to a floating point value to set the brightness of the Home LED on Nintendo Switch controllers
|
||||
* Added the hint SDL_HINT_JOYSTICK_HIDAPI_JOYCON_HOME_LED to set the Home LED brightness for the Nintendo Joy-Con controllers. By default the Home LED is not modified.
|
||||
* Added the hint SDL_HINT_JOYSTICK_HIDAPI_SWITCH_PLAYER_LED to control whether the player LED should be lit on the Nintendo Joy-Con controllers
|
||||
* Added support for Nintendo Online classic controllers using the HIDAPI driver
|
||||
* Added the hint SDL_HINT_JOYSTICK_HIDAPI_NINTENDO_CLASSIC to control whether the HIDAPI driver for Nintendo Online classic controllers should be used
|
||||
* Added support for the NVIDIA Shield Controller to the HIDAPI driver, supporting rumble and battery status
|
||||
* Added support for NVIDIA SHIELD controller to the HIDAPI driver, and a hint SDL_HINT_JOYSTICK_HIDAPI_SHIELD to control whether this is used
|
||||
* Added functions to get the platform dependent name for a joystick or game controller:
|
||||
* SDL_JoystickPathForIndex()
|
||||
* SDL_JoystickPath()
|
||||
* SDL_GameControllerPathForIndex()
|
||||
* SDL_GameControllerPath()
|
||||
* Added SDL_GameControllerGetFirmwareVersion() and SDL_JoystickGetFirmwareVersion(), currently implemented for DualSense(tm) Wireless Controllers using HIDAPI
|
||||
* Added SDL_JoystickAttachVirtualEx() for extended virtual controller support
|
||||
* Added joystick event SDL_JOYBATTERYUPDATED for when battery status changes
|
||||
* Added SDL_GUIDToString() and SDL_GUIDFromString() to convert between SDL GUID and string
|
||||
* Added SDL_HasLSX() and SDL_HasLASX() to detect LoongArch SIMD support
|
||||
* Added SDL_GetOriginalMemoryFunctions()
|
||||
* Added SDL_GetDefaultAudioInfo() to get the name and format of the default audio device, currently implemented for PipeWire, PulseAudio, WASAPI, and DirectSound
|
||||
* Added HIDAPI driver for the NVIDIA SHIELD controller (2017 model) to enable support for battery status and rumble
|
||||
* Added support for opening audio devices with 3 or 5 channels (2.1, 4.1). All channel counts from Mono to 7.1 are now supported.
|
||||
* Rewrote audio channel converters used by SDL_AudioCVT, based on the channel matrix coefficients used as the default for FAudio voices
|
||||
* SDL log messages are no longer limited to 4K and can be any length
|
||||
* Fixed a long-standing calling convention issue with dynapi affecting OpenWatcom or OS/2 builds
|
||||
|
||||
Windows:
|
||||
* Added initial support for building for Windows and Xbox with Microsoft's Game Development Kit (GDK), see docs/README-gdk.md for details
|
||||
* Added a D3D12 renderer implementation and SDL_RenderGetD3D12Device() to retrieve the D3D12 device associated with it
|
||||
* Added the hint SDL_HINT_WINDOWS_DPI_AWARENESS to set whether the application is DPI-aware. This hint must be set before initializing the video subsystem
|
||||
* Added the hint SDL_HINT_WINDOWS_DPI_SCALING to control whether the SDL coordinates are in DPI-scaled points or pixels
|
||||
* Added the hint SDL_HINT_DIRECTINPUT_ENABLED to control whether the DirectInput driver should be used
|
||||
* Added support for SDL_GetAudioDeviceSpec to the DirectSound backend
|
||||
|
||||
Linux:
|
||||
* Support for XVidMode has been removed, mode changes are only supported using the XRandR extension
|
||||
* Added the hint SDL_HINT_VIDEO_WAYLAND_MODE_EMULATION to control whether to expose a set of emulated modes in addition to the native resolution modes available on Wayland
|
||||
* Added the hint SDL_HINT_KMSDRM_DEVICE_INDEX to specify which KMSDRM device to use if the default is not desired
|
||||
* Added the hint SDL_HINT_LINUX_DIGITAL_HATS to control whether to treat hats as digital rather than checking to see if they may be analog
|
||||
* Added the hint SDL_HINT_LINUX_HAT_DEADZONES to control whether to use deadzones on analog hats
|
||||
|
||||
macOS:
|
||||
* Bumped minimum OS deployment version to macOS 10.9
|
||||
* Added SDL_GL_FLOATBUFFERS to allow Cocoa GL contexts to use EDR
|
||||
* Added the hint SDL_HINT_MAC_OPENGL_ASYNC_DISPATCH to control whether dispatching OpenGL context updates should block the dispatching thread until the main thread finishes processing. This hint defaults to blocking, which is the safer option on modern macOS.
|
||||
|
||||
|
||||
---------------------------------------------------------------------------
|
||||
2.0.22:
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
General:
|
||||
* Added SDL_RenderGetWindow() to get the window associated with a renderer
|
||||
* Added floating point rectangle functions:
|
||||
* SDL_PointInFRect()
|
||||
* SDL_FRectEmpty()
|
||||
* SDL_FRectEquals()
|
||||
* SDL_FRectEqualsEpsilon()
|
||||
* SDL_HasIntersectionF()
|
||||
* SDL_IntersectFRect()
|
||||
* SDL_UnionFRect()
|
||||
* SDL_EncloseFPoints()
|
||||
* SDL_IntersectFRectAndLine()
|
||||
* Added SDL_IsTextInputShown() which returns whether the IME window is currently shown
|
||||
* Added SDL_ClearComposition() to dismiss the composition window without disabling IME input
|
||||
* Added SDL_TEXTEDITING_EXT event for handling long composition text, and a hint SDL_HINT_IME_SUPPORT_EXTENDED_TEXT to enable it
|
||||
* Added the hint SDL_HINT_MOUSE_RELATIVE_MODE_CENTER to control whether the mouse should be constrained to the whole window or the center of the window when relative mode is enabled
|
||||
* The mouse is now automatically captured when mouse buttons are pressed, and the hint SDL_HINT_MOUSE_AUTO_CAPTURE allows you to control this behavior
|
||||
* Added the hint SDL_HINT_VIDEO_FOREIGN_WINDOW_OPENGL to let SDL know that a foreign window will be used with OpenGL
|
||||
* Added the hint SDL_HINT_VIDEO_FOREIGN_WINDOW_VULKAN to let SDL know that a foreign window will be used with Vulkan
|
||||
* Added the hint SDL_HINT_QUIT_ON_LAST_WINDOW_CLOSE to specify whether an SDL_QUIT event will be delivered when the last application window is closed
|
||||
* Added the hint SDL_HINT_JOYSTICK_ROG_CHAKRAM to control whether ROG Chakram mice show up as joysticks
|
||||
|
||||
Windows:
|
||||
* Added support for SDL_BLENDOPERATION_MINIMUM and SDL_BLENDOPERATION_MAXIMUM to the D3D9 renderer
|
||||
|
||||
Linux:
|
||||
* Compiling with Wayland support requires libwayland-client version 1.18.0 or later
|
||||
* Added the hint SDL_HINT_X11_WINDOW_TYPE to specify the _NET_WM_WINDOW_TYPE of SDL windows
|
||||
* Added the hint SDL_HINT_VIDEO_WAYLAND_PREFER_LIBDECOR to allow using libdecor with compositors that support xdg-decoration
|
||||
|
||||
Android:
|
||||
* Added SDL_AndroidSendMessage() to send a custom command to the SDL java activity
|
||||
|
||||
|
||||
---------------------------------------------------------------------------
|
||||
2.0.20:
|
||||
---------------------------------------------------------------------------
|
||||
|
|
54
libs/SDL2/cmake/sdl2-config-version.cmake
Normal file
54
libs/SDL2/cmake/sdl2-config-version.cmake
Normal file
|
@ -0,0 +1,54 @@
|
|||
# based on the files generated by CMake's write_basic_package_version_file
|
||||
|
||||
# SDL2 CMake version configuration file:
|
||||
# This file is meant to be placed in a cmake subfolder of SDL2-devel-2.x.y-VC
|
||||
|
||||
if(NOT EXISTS "${CMAKE_CURRENT_LIST_DIR}/../include/SDL_version.h")
|
||||
message(AUTHOR_WARNING "Could not find SDL_version.h. This script is meant to be placed in the root of SDL2-devel-2.x.y-VC")
|
||||
return()
|
||||
endif()
|
||||
|
||||
file(READ "${CMAKE_CURRENT_LIST_DIR}/../include/SDL_version.h" _sdl_version_h)
|
||||
string(REGEX MATCH "#define[ \t]+SDL_MAJOR_VERSION[ \t]+([0-9]+)" _sdl_major_re "${_sdl_version_h}")
|
||||
set(_sdl_major "${CMAKE_MATCH_1}")
|
||||
string(REGEX MATCH "#define[ \t]+SDL_MINOR_VERSION[ \t]+([0-9]+)" _sdl_minor_re "${_sdl_version_h}")
|
||||
set(_sdl_minor "${CMAKE_MATCH_1}")
|
||||
string(REGEX MATCH "#define[ \t]+SDL_PATCHLEVEL[ \t]+([0-9]+)" _sdl_patch_re "${_sdl_version_h}")
|
||||
set(_sdl_patch "${CMAKE_MATCH_1}")
|
||||
if(_sdl_major_re AND _sdl_minor_re AND _sdl_patch_re)
|
||||
set(PACKAGE_VERSION "${_sdl_major}.${_sdl_minor}.${_sdl_patch}")
|
||||
else()
|
||||
message(AUTHOR_WARNING "Could not extract version from SDL_version.h.")
|
||||
return()
|
||||
endif()
|
||||
|
||||
if(PACKAGE_FIND_VERSION_RANGE)
|
||||
# Package version must be in the requested version range
|
||||
if ((PACKAGE_FIND_VERSION_RANGE_MIN STREQUAL "INCLUDE" AND PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION_MIN)
|
||||
OR ((PACKAGE_FIND_VERSION_RANGE_MAX STREQUAL "INCLUDE" AND PACKAGE_VERSION VERSION_GREATER PACKAGE_FIND_VERSION_MAX)
|
||||
OR (PACKAGE_FIND_VERSION_RANGE_MAX STREQUAL "EXCLUDE" AND PACKAGE_VERSION VERSION_GREATER_EQUAL PACKAGE_FIND_VERSION_MAX)))
|
||||
set(PACKAGE_VERSION_COMPATIBLE FALSE)
|
||||
else()
|
||||
set(PACKAGE_VERSION_COMPATIBLE TRUE)
|
||||
endif()
|
||||
else()
|
||||
if(PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION)
|
||||
set(PACKAGE_VERSION_COMPATIBLE FALSE)
|
||||
else()
|
||||
set(PACKAGE_VERSION_COMPATIBLE TRUE)
|
||||
if(PACKAGE_FIND_VERSION STREQUAL PACKAGE_VERSION)
|
||||
set(PACKAGE_VERSION_EXACT TRUE)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# if the using project doesn't have CMAKE_SIZEOF_VOID_P set, fail.
|
||||
if("${CMAKE_SIZEOF_VOID_P}" STREQUAL "")
|
||||
set(PACKAGE_VERSION_UNSUITABLE TRUE)
|
||||
endif()
|
||||
|
||||
# check that the installed version has the same 32/64bit-ness as the one which is currently searching:
|
||||
if(NOT (CMAKE_SIZEOF_VOID_P STREQUAL "8" OR CMAKE_SIZEOF_VOID_P STREQUAL "4"))
|
||||
set(PACKAGE_VERSION "${PACKAGE_VERSION} (32+64bit)")
|
||||
set(PACKAGE_VERSION_UNSUITABLE TRUE)
|
||||
endif()
|
117
libs/SDL2/cmake/sdl2-config.cmake
Normal file
117
libs/SDL2/cmake/sdl2-config.cmake
Normal file
|
@ -0,0 +1,117 @@
|
|||
# SDL2 CMake configuration file:
|
||||
# This file is meant to be placed in a cmake subfolder of SDL2-devel-2.x.y-VC
|
||||
|
||||
cmake_minimum_required(VERSION 3.0...3.5)
|
||||
|
||||
include(FeatureSummary)
|
||||
set_package_properties(SDL2 PROPERTIES
|
||||
URL "https://www.libsdl.org/"
|
||||
DESCRIPTION "low level access to audio, keyboard, mouse, joystick, and graphics hardware"
|
||||
)
|
||||
|
||||
# Copied from `configure_package_config_file`
|
||||
macro(set_and_check _var _file)
|
||||
set(${_var} "${_file}")
|
||||
if(NOT EXISTS "${_file}")
|
||||
message(FATAL_ERROR "File or directory ${_file} referenced by variable ${_var} does not exist !")
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
# Copied from `configure_package_config_file`
|
||||
macro(check_required_components _NAME)
|
||||
foreach(comp ${${_NAME}_FIND_COMPONENTS})
|
||||
if(NOT ${_NAME}_${comp}_FOUND)
|
||||
if(${_NAME}_FIND_REQUIRED_${comp})
|
||||
set(${_NAME}_FOUND FALSE)
|
||||
endif()
|
||||
endif()
|
||||
endforeach()
|
||||
endmacro()
|
||||
|
||||
set(SDL2_FOUND TRUE)
|
||||
|
||||
if(CMAKE_SIZEOF_VOID_P STREQUAL "4")
|
||||
set(_sdl_arch_subdir "x86")
|
||||
elseif(CMAKE_SIZEOF_VOID_P STREQUAL "8")
|
||||
set(_sdl_arch_subdir "x64")
|
||||
else()
|
||||
set(SDL2_FOUND FALSE)
|
||||
return()
|
||||
endif()
|
||||
|
||||
# For compatibility with autotools sdl2-config.cmake, provide SDL2_* variables.
|
||||
|
||||
set_and_check(SDL2_PREFIX "${CMAKE_CURRENT_LIST_DIR}/..")
|
||||
set_and_check(SDL2_EXEC_PREFIX "${CMAKE_CURRENT_LIST_DIR}/..")
|
||||
set_and_check(SDL2_INCLUDE_DIR "${SDL2_PREFIX}/include")
|
||||
set(SDL2_INCLUDE_DIRS "${SDL2_INCLUDE_DIR}")
|
||||
set_and_check(SDL2_BINDIR "${SDL2_PREFIX}/lib/${_sdl_arch_subdir}")
|
||||
set_and_check(SDL2_LIBDIR "${SDL2_PREFIX}/lib/${_sdl_arch_subdir}")
|
||||
|
||||
set(SDL2_LIBRARIES SDL2::SDL2main SDL2::SDL2)
|
||||
set(SDL2MAIN_LIBRARY SDL2::SDL2main)
|
||||
set(SDL2TEST_LIBRARY SDL2::SDL2test)
|
||||
|
||||
|
||||
# All targets are created, even when some might not be requested though COMPONENTS.
|
||||
# This is done for compatibility with CMake generated SDL2-target.cmake files.
|
||||
|
||||
set(_sdl2_library "${SDL2_LIBDIR}/SDL2.lib")
|
||||
set(_sdl2_dll_library "${SDL2_BINDIR}/SDL2.dll")
|
||||
if(EXISTS "${_sdl2_library}" AND EXISTS "${_sdl2_dll_library}")
|
||||
if(NOT TARGET SDL2::SDL2)
|
||||
add_library(SDL2::SDL2 SHARED IMPORTED)
|
||||
set_target_properties(SDL2::SDL2
|
||||
PROPERTIES
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${SDL2_INCLUDE_DIRS}"
|
||||
IMPORTED_IMPLIB "${_sdl2_library}"
|
||||
IMPORTED_LOCATION "${_sdl2_dll_library}"
|
||||
COMPATIBLE_INTERFACE_BOOL "SDL2_SHARED"
|
||||
INTERFACE_SDL2_SHARED "ON"
|
||||
COMPATIBLE_INTERFACE_STRING "SDL_VERSION"
|
||||
INTERFACE_SDL_VERSION "SDL2"
|
||||
)
|
||||
endif()
|
||||
set(SDL2_SDL2_FOUND TRUE)
|
||||
else()
|
||||
set(SDL2_SDL2_FOUND FALSE)
|
||||
endif()
|
||||
unset(_sdl2_library)
|
||||
unset(_sdl2_dll_library)
|
||||
|
||||
set(_sdl2main_library "${SDL2_LIBDIR}/SDL2main.lib")
|
||||
if(EXISTS "${_sdl2main_library}")
|
||||
if(NOT TARGET SDL2::SDL2main)
|
||||
add_library(SDL2::SDL2main STATIC IMPORTED)
|
||||
set_target_properties(SDL2::SDL2main
|
||||
PROPERTIES
|
||||
IMPORTED_LOCATION "${_sdl2main_library}"
|
||||
COMPATIBLE_INTERFACE_STRING "SDL_VERSION"
|
||||
INTERFACE_SDL_VERSION "SDL2"
|
||||
)
|
||||
endif()
|
||||
set(SDL2_SDL2main_FOUND TRUE)
|
||||
else()
|
||||
set(SDL2_SDL2_FOUND FALSE)
|
||||
endif()
|
||||
unset(_sdl2main_library)
|
||||
|
||||
set(_sdl2test_library "${SDL2_LIBDIR}/SDL2test.lib")
|
||||
if(EXISTS "${_sdl2test_library}")
|
||||
if(NOT TARGET SDL2::SDL2test)
|
||||
add_library(SDL2::SDL2test STATIC IMPORTED)
|
||||
set_target_properties(SDL2::SDL2test
|
||||
PROPERTIES
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${SDL2_INCLUDE_DIRS}"
|
||||
IMPORTED_LOCATION "${_sdl2test_library}"
|
||||
COMPATIBLE_INTERFACE_STRING "SDL_VERSION"
|
||||
INTERFACE_SDL_VERSION "SDL2"
|
||||
)
|
||||
endif()
|
||||
set(SDL2_SDL2test_FOUND TRUE)
|
||||
else()
|
||||
set(SDL2_SDL2_FOUND FALSE)
|
||||
endif()
|
||||
unset(_sdl2test_library)
|
||||
|
||||
check_required_components(SDL2)
|
97
libs/SDL2/docs/CONTRIBUTING.md
Normal file
97
libs/SDL2/docs/CONTRIBUTING.md
Normal file
|
@ -0,0 +1,97 @@
|
|||
# Contributing to SDL
|
||||
|
||||
We appreciate your interest in contributing to SDL, this document will describe how to report bugs, contribute code or ideas or edit documentation.
|
||||
|
||||
**Table Of Contents**
|
||||
|
||||
- [Filing a GitHub issue](#filing-a-github-issue)
|
||||
- [Reporting a bug](#reporting-a-bug)
|
||||
- [Suggesting enhancements](#suggesting-enhancements)
|
||||
- [Contributing code](#contributing-code)
|
||||
- [Forking the project](#forking-the-project)
|
||||
- [Following the style guide](#following-the-style-guide)
|
||||
- [Running the tests](#running-the-tests)
|
||||
- [Opening a pull request](#opening-a-pull-request)
|
||||
- [Contributing to the documentation](#contributing-to-the-documentation)
|
||||
- [Editing a function documentation](#editing-a-function-documentation)
|
||||
- [Editing the wiki](#editing-the-wiki)
|
||||
|
||||
## Filing a GitHub issue
|
||||
|
||||
### Reporting a bug
|
||||
|
||||
If you think you have found a bug and would like to report it, here are the steps you should take:
|
||||
|
||||
- Before opening a new issue, ensure your bug has not already been reported on the [GitHub Issues page](https://github.com/libsdl-org/SDL/issues).
|
||||
- On the issue tracker, click on [New Issue](https://github.com/libsdl-org/SDL/issues/new).
|
||||
- Include details about your environment, such as your Operating System and SDL version.
|
||||
- If possible, provide a small example that reproduces your bug.
|
||||
|
||||
### Suggesting enhancements
|
||||
|
||||
If you want to suggest changes for the project, here are the steps you should take:
|
||||
|
||||
- Check if the suggestion has already been made on:
|
||||
- the [issue tracker](https://github.com/libsdl-org/SDL/issues);
|
||||
- the [discourse forum](https://discourse.libsdl.org/);
|
||||
- or if a [pull request](https://github.com/libsdl-org/SDL/pulls) already exists.
|
||||
- On the issue tracker, click on [New Issue](https://github.com/libsdl-org/SDL/issues/new).
|
||||
- Describe what change you would like to happen.
|
||||
|
||||
## Contributing code
|
||||
|
||||
This section will cover how the process of forking the project, making a change and opening a pull request.
|
||||
|
||||
### Forking the project
|
||||
|
||||
The first step consists in making a fork of the project, this is only necessary for the first contribution.
|
||||
|
||||
Head over to https://github.com/libsdl-org/SDL and click on the `Fork` button in the top right corner of your screen, you may leave the fields unchanged and click `Create Fork`.
|
||||
|
||||
You will be redirected to your fork of the repository, click the green `Code` button and copy the git clone link.
|
||||
|
||||
If you had already forked the repository, you may update it from the web page using the `Fetch upstream` button.
|
||||
|
||||
### Following the style guide
|
||||
|
||||
Code formatting is done using a custom `.clang-format` file, you can learn more about how to run it [here](https://clang.llvm.org/docs/ClangFormat.html).
|
||||
|
||||
Some legacy code may not be formatted, as such avoid formatting the whole file at once and only format around your changes.
|
||||
|
||||
For your commit message to be properly displayed on GitHub, it should contain:
|
||||
|
||||
- A short description of the commit of 50 characters or less on the first line.
|
||||
- If necessary, add a blank line followed by a long description, each line should be 72 characters or less.
|
||||
|
||||
For example:
|
||||
|
||||
```
|
||||
Fix crash in SDL_FooBar.
|
||||
|
||||
This addresses the issue #123456 by making sure Foo was successful
|
||||
before calling Bar.
|
||||
```
|
||||
|
||||
### Running the tests
|
||||
|
||||
Tests allow you to verify if your changes did not break any behaviour, here are the steps to follow:
|
||||
|
||||
- Before pushing, run the `testautomation` suite on your machine, there should be no more failing tests after your change than before.
|
||||
- After pushing to your fork, Continuous Integration (GitHub Actions) will ensure compilation and tests still pass on other systems.
|
||||
|
||||
### Opening a pull request
|
||||
|
||||
- Head over to your fork's GitHub page.
|
||||
- Click on the `Contribute` button and `Open Pull Request`.
|
||||
- Fill out the pull request template.
|
||||
- If any changes are requested, you can add new commits to your fork and they will be automatically added to the pull request.
|
||||
|
||||
## Contributing to the documentation
|
||||
|
||||
### Editing a function documentation
|
||||
|
||||
The wiki documentation for API functions is synchronised from the headers' doxygen comments. As such, all modifications to syntax; function parameters; return value; version; related functions should be done in the header directly.
|
||||
|
||||
### Editing the wiki
|
||||
|
||||
Other changes to the wiki should done directly from https://wiki.libsdl.org/
|
|
@ -13,13 +13,13 @@ supported, but you can use the "android-project-ant" directory as a template.
|
|||
Requirements
|
||||
================================================================================
|
||||
|
||||
Android SDK (version 26 or later)
|
||||
Android SDK (version 34 or later)
|
||||
https://developer.android.com/sdk/index.html
|
||||
|
||||
Android NDK r15c or later
|
||||
https://developer.android.com/tools/sdk/ndk/index.html
|
||||
|
||||
Minimum API level supported by SDL: 16 (Android 4.1)
|
||||
Minimum API level supported by SDL: 19 (Android 4.4)
|
||||
|
||||
|
||||
How the port works
|
||||
|
@ -68,14 +68,22 @@ Finally, a word of caution: re running androidbuild.sh wipes any changes you may
|
|||
done in the build directory for the app!
|
||||
|
||||
|
||||
|
||||
For more complex projects, follow these instructions:
|
||||
|
||||
1. Copy the android-project directory wherever you want to keep your projects
|
||||
and rename it to the name of your project.
|
||||
2. Move or symlink this SDL directory into the "<project>/app/jni" directory
|
||||
3. Edit "<project>/app/jni/src/Android.mk" to include your source files
|
||||
1. Get the source code for SDL and copy the 'android-project' directory located at SDL/android-project to a suitable location. Also make sure to rename it to your project name (In these examples: YOURPROJECT).
|
||||
|
||||
4a. If you want to use Android Studio, simply open your <project> directory and start building.
|
||||
(The 'android-project' directory can basically be seen as a sort of starting point for the android-port of your project. It contains the glue code between the Android Java 'frontend' and the SDL code 'backend'. It also contains some standard behaviour, like how events should be handled, which you will be able to change.)
|
||||
|
||||
2. Move or [symlink](https://en.wikipedia.org/wiki/Symbolic_link) the SDL directory into the "YOURPROJECT/app/jni" directory
|
||||
|
||||
(This is needed as the source of SDL has to be compiled by the Android compiler)
|
||||
|
||||
3. Edit "YOURPROJECT/app/jni/src/Android.mk" to include your source files.
|
||||
|
||||
(They should be separated by spaces after the "LOCAL_SRC_FILES := " declaration)
|
||||
|
||||
4a. If you want to use Android Studio, simply open your 'YOURPROJECT' directory and start building.
|
||||
|
||||
4b. If you want to build manually, run './gradlew installDebug' in the project directory. This compiles the .java, creates an .apk with the native code embedded, and installs it on any connected Android device
|
||||
|
||||
|
@ -83,9 +91,9 @@ For more complex projects, follow these instructions:
|
|||
If you already have a project that uses CMake, the instructions change somewhat:
|
||||
|
||||
1. Do points 1 and 2 from the instruction above.
|
||||
2. Edit "<project>/app/build.gradle" to comment out or remove sections containing ndk-build
|
||||
2. Edit "YOURPROJECT/app/build.gradle" to comment out or remove sections containing ndk-build
|
||||
and uncomment the cmake sections. Add arguments to the CMake invocation as needed.
|
||||
3. Edit "<project>/app/jni/CMakeLists.txt" to include your project (it defaults to
|
||||
3. Edit "YOURPROJECT/app/jni/CMakeLists.txt" to include your project (it defaults to
|
||||
adding the "src" subdirectory). Note that you'll have SDL2, SDL2main and SDL2-static
|
||||
as targets in your project, so you should have "target_link_libraries(yourgame SDL2 SDL2main)"
|
||||
in your CMakeLists.txt file. Also be aware that you should use add_library() instead of
|
||||
|
@ -206,6 +214,9 @@ You should not use the SDL renderer API while the app going in background:
|
|||
after you read this message, GL context gets backed-up and you should not
|
||||
use the SDL renderer API.
|
||||
|
||||
When this event is received, you have to set the render target to NULL, if you're using it.
|
||||
(eg call SDL_SetRenderTarget(renderer, NULL))
|
||||
|
||||
- SDL_APP_DIDENTERFOREGROUND:
|
||||
GL context is restored, and the SDL renderer API is available (unless you
|
||||
receive SDL_RENDER_DEVICE_RESET).
|
||||
|
@ -420,13 +431,13 @@ The Tegra Graphics Debugger is available from NVidia here:
|
|||
https://developer.nvidia.com/tegra-graphics-debugger
|
||||
|
||||
|
||||
Why is API level 16 the minimum required?
|
||||
Why is API level 19 the minimum required?
|
||||
================================================================================
|
||||
|
||||
The latest NDK toolchain doesn't support targeting earlier than API level 16.
|
||||
As of this writing, according to https://developer.android.com/about/dashboards/index.html
|
||||
about 99% of the Android devices accessing Google Play support API level 16 or
|
||||
higher (January 2018).
|
||||
The latest NDK toolchain doesn't support targeting earlier than API level 19.
|
||||
As of this writing, according to https://www.composables.com/tools/distribution-chart
|
||||
about 99.7% of the Android devices accessing Google Play support API level 19 or
|
||||
higher (August 2023).
|
||||
|
||||
|
||||
A note regarding the use of the "dirty rectangles" rendering technique
|
||||
|
|
|
@ -1,40 +1,102 @@
|
|||
CMake
|
||||
================================================================================
|
||||
# CMake
|
||||
|
||||
(www.cmake.org)
|
||||
|
||||
SDL's build system was traditionally based on autotools. Over time, this
|
||||
approach has suffered from several issues across the different supported
|
||||
platforms.
|
||||
To solve these problems, a new build system based on CMake is under development.
|
||||
It works in parallel to the legacy system, so users can experiment with it
|
||||
without complication.
|
||||
While still experimental, the build system should be usable on the following
|
||||
platforms:
|
||||
To solve these problems, a new build system based on CMake was introduced.
|
||||
It is developed in parallel to the legacy autotools build system, so users
|
||||
can experiment with it without complication.
|
||||
|
||||
The CMake build system is supported on the following platforms:
|
||||
|
||||
* FreeBSD
|
||||
* Linux
|
||||
* VS.NET 2010
|
||||
* Microsoft Visual C
|
||||
* MinGW and Msys
|
||||
* macOS, iOS, and tvOS, with support for XCode
|
||||
* Android
|
||||
* Emscripten
|
||||
* RiscOS
|
||||
* Playstation Vita
|
||||
|
||||
## Building SDL
|
||||
|
||||
================================================================================
|
||||
Usage
|
||||
================================================================================
|
||||
Assuming the source for SDL is located at `~/sdl`
|
||||
```sh
|
||||
cd ~
|
||||
mkdir build
|
||||
cd build
|
||||
cmake ~/sdl
|
||||
cmake --build .
|
||||
```
|
||||
|
||||
Assuming the source for SDL is located at ~/sdl
|
||||
This will build the static and dynamic versions of SDL in the `~/build` directory.
|
||||
Installation can be done using:
|
||||
|
||||
cd ~
|
||||
mkdir build
|
||||
cd build
|
||||
cmake ../sdl
|
||||
```sh
|
||||
cmake --install . # '--install' requires CMake 3.15, or newer
|
||||
```
|
||||
|
||||
This will build the static and dynamic versions of SDL in the ~/build directory.
|
||||
## Including SDL in your project
|
||||
|
||||
SDL can be included in your project in 2 major ways:
|
||||
- using a system SDL library, provided by your (*nix) distribution or a package manager
|
||||
- using a vendored SDL library: this is SDL copied or symlinked in a subfolder.
|
||||
|
||||
================================================================================
|
||||
Usage, iOS/tvOS
|
||||
================================================================================
|
||||
The following CMake script supports both, depending on the value of `MYGAME_VENDORED`.
|
||||
|
||||
```cmake
|
||||
cmake_minimum_required(VERSION 3.5)
|
||||
project(mygame)
|
||||
|
||||
# Create an option to switch between a system sdl library and a vendored sdl library
|
||||
option(MYGAME_VENDORED "Use vendored libraries" OFF)
|
||||
|
||||
if(MYGAME_VENDORED)
|
||||
add_subdirectory(vendored/sdl EXCLUDE_FROM_ALL)
|
||||
else()
|
||||
# 1. Look for a SDL2 package, 2. look for the SDL2 component and 3. fail if none can be found
|
||||
find_package(SDL2 REQUIRED CONFIG REQUIRED COMPONENTS SDL2)
|
||||
|
||||
# 1. Look for a SDL2 package, 2. Look for the SDL2maincomponent and 3. DO NOT fail when SDL2main is not available
|
||||
find_package(SDL2 REQUIRED CONFIG COMPONENTS SDL2main)
|
||||
endif()
|
||||
|
||||
# Create your game executable target as usual
|
||||
add_executable(mygame WIN32 mygame.c)
|
||||
|
||||
# SDL2::SDL2main may or may not be available. It is e.g. required by Windows GUI applications
|
||||
if(TARGET SDL2::SDL2main)
|
||||
# It has an implicit dependency on SDL2 functions, so it MUST be added before SDL2::SDL2 (or SDL2::SDL2-static)
|
||||
target_link_libraries(mygame PRIVATE SDL2::SDL2main)
|
||||
endif()
|
||||
|
||||
# Link to the actual SDL2 library. SDL2::SDL2 is the shared SDL library, SDL2::SDL2-static is the static SDL libarary.
|
||||
target_link_libraries(mygame PRIVATE SDL2::SDL2)
|
||||
```
|
||||
|
||||
### A system SDL library
|
||||
|
||||
For CMake to find SDL, it must be installed in [a default location CMake is looking for](https://cmake.org/cmake/help/latest/command/find_package.html#config-mode-search-procedure).
|
||||
|
||||
The following components are available, to be used as an argument of `find_package`.
|
||||
|
||||
| Component name | Description |
|
||||
|----------------|--------------------------------------------------------------------------------------------|
|
||||
| SDL2 | The SDL2 shared library, available through the `SDL2::SDL2` target [^SDL_TARGET_EXCEPTION] |
|
||||
| SDL2-static | The SDL2 static library, available through the `SDL2::SDL2-static` target |
|
||||
| SDL2main | The SDL2main static library, available through the `SDL2::SDL2main` target |
|
||||
| SDL2test | The SDL2test static library, available through the `SDL2::SDL2test` target |
|
||||
|
||||
### Using a vendored SDL
|
||||
|
||||
This only requires a copy of SDL in a subdirectory.
|
||||
|
||||
## CMake configuration options for platforms
|
||||
|
||||
### iOS/tvOS
|
||||
|
||||
CMake 3.14+ natively includes support for iOS and tvOS. SDL binaries may be built
|
||||
using Xcode or Make, possibly among other build-systems.
|
||||
|
@ -53,32 +115,49 @@ To use, set the following CMake variables when running CMake's configuration sta
|
|||
- `CMAKE_OSX_ARCHITECTURES=<semicolon-separated list of CPU architectures>` (example: "arm64;armv7s;x86_64")
|
||||
|
||||
|
||||
### Examples (for iOS/tvOS):
|
||||
#### Examples
|
||||
|
||||
- for iOS-Simulator, using the latest, installed SDK:
|
||||
|
||||
`cmake ~/sdl -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_SYSROOT=iphonesimulator -DCMAKE_OSX_ARCHITECTURES=x86_64`
|
||||
```bash
|
||||
cmake ~/sdl -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_SYSROOT=iphonesimulator -DCMAKE_OSX_ARCHITECTURES=x86_64
|
||||
```
|
||||
|
||||
- for iOS-Device, using the latest, installed SDK, 64-bit only
|
||||
|
||||
`cmake ~/sdl -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_SYSROOT=iphoneos -DCMAKE_OSX_ARCHITECTURES=arm64`
|
||||
```bash
|
||||
cmake ~/sdl -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_SYSROOT=iphoneos -DCMAKE_OSX_ARCHITECTURES=arm64
|
||||
```
|
||||
|
||||
- for iOS-Device, using the latest, installed SDK, mixed 32/64 bit
|
||||
|
||||
`cmake ~/sdl -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_SYSROOT=iphoneos -DCMAKE_OSX_ARCHITECTURES="arm64;armv7s"`
|
||||
```cmake
|
||||
cmake ~/sdl -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_SYSROOT=iphoneos -DCMAKE_OSX_ARCHITECTURES="arm64;armv7s"
|
||||
```
|
||||
|
||||
- for iOS-Device, using a specific SDK revision (iOS 12.4, in this example):
|
||||
|
||||
`cmake ~/sdl -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_SYSROOT=iphoneos12.4 -DCMAKE_OSX_ARCHITECTURES=arm64`
|
||||
```cmake
|
||||
cmake ~/sdl -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_SYSROOT=iphoneos12.4 -DCMAKE_OSX_ARCHITECTURES=arm64
|
||||
```
|
||||
|
||||
- for iOS-Simulator, using the latest, installed SDK, and building SDL test apps (as .app bundles):
|
||||
|
||||
`cmake ~/sdl -DSDL_TEST=1 -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_SYSROOT=iphonesimulator -DCMAKE_OSX_ARCHITECTURES=x86_64`
|
||||
```cmake
|
||||
cmake ~/sdl -DSDL_TESTS=1 -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_SYSROOT=iphonesimulator -DCMAKE_OSX_ARCHITECTURES=x86_64
|
||||
```
|
||||
|
||||
- for tvOS-Simulator, using the latest, installed SDK:
|
||||
|
||||
`cmake ~/sdl -DCMAKE_SYSTEM_NAME=tvOS -DCMAKE_OSX_SYSROOT=appletvsimulator -DCMAKE_OSX_ARCHITECTURES=x86_64`
|
||||
```cmake
|
||||
cmake ~/sdl -DCMAKE_SYSTEM_NAME=tvOS -DCMAKE_OSX_SYSROOT=appletvsimulator -DCMAKE_OSX_ARCHITECTURES=x86_64
|
||||
```
|
||||
|
||||
- for tvOS-Device, using the latest, installed SDK:
|
||||
|
||||
`cmake ~/sdl -DCMAKE_SYSTEM_NAME=tvOS -DCMAKE_OSX_SYSROOT=appletvos -DCMAKE_OSX_ARCHITECTURES=arm64`
|
||||
```cmake
|
||||
cmake ~/sdl -DCMAKE_SYSTEM_NAME=tvOS -DCMAKE_OSX_SYSROOT=appletvos -DCMAKE_OSX_ARCHITECTURES=arm64`
|
||||
```
|
||||
|
||||
|
||||
[^SDL_TARGET_EXCEPTION]: `SDL2::SDL2` can be an ALIAS to a static `SDL2::SDL2-static` target for multiple reasons.
|
||||
|
|
|
@ -15,29 +15,34 @@ What you need:
|
|||
* Kernel-Framebuffer support: required: vesafb, radeonfb ....
|
||||
* Mesa 7.0.x - optional for OpenGL
|
||||
|
||||
/etc/directfbrc
|
||||
|
||||
This file should contain the following lines to make
|
||||
The `/etc/directfbrc` file should contain the following lines to make
|
||||
your joystick work and avoid crashes:
|
||||
------------------------
|
||||
|
||||
```
|
||||
disable-module=joystick
|
||||
disable-module=cle266
|
||||
disable-module=cyber5k
|
||||
no-linux-input-grab
|
||||
------------------------
|
||||
```
|
||||
|
||||
To disable to use x11 backend when DISPLAY variable is found use
|
||||
|
||||
```
|
||||
export SDL_DIRECTFB_X11_CHECK=0
|
||||
```
|
||||
|
||||
To disable the use of linux input devices, i.e. multimice/multikeyboard support,
|
||||
use
|
||||
|
||||
```
|
||||
export SDL_DIRECTFB_LINUX_INPUT=0
|
||||
```
|
||||
|
||||
To use hardware accelerated YUV-overlays for YUV-textures, use:
|
||||
|
||||
```
|
||||
export SDL_DIRECTFB_YUV_DIRECT=1
|
||||
```
|
||||
|
||||
This is disabled by default. It will only support one
|
||||
YUV texture, namely the first. Every other YUV texture will be
|
||||
|
@ -45,7 +50,9 @@ rendered in software.
|
|||
|
||||
In addition, you may use (directfb-1.2.x)
|
||||
|
||||
```
|
||||
export SDL_DIRECTFB_YUV_UNDERLAY=1
|
||||
```
|
||||
|
||||
to make the YUV texture an underlay. This will make the cursor to
|
||||
be shown.
|
||||
|
@ -54,14 +61,18 @@ Simple Window Manager
|
|||
=====================
|
||||
|
||||
The driver has support for a very, very basic window manager you may
|
||||
want to use when running with "wm=default". Use
|
||||
want to use when running with `wm=default`. Use
|
||||
|
||||
```
|
||||
export SDL_DIRECTFB_WM=1
|
||||
```
|
||||
|
||||
to enable basic window borders. In order to have the window title rendered,
|
||||
you need to have the following font installed:
|
||||
|
||||
```
|
||||
/usr/share/fonts/truetype/freefont/FreeSans.ttf
|
||||
```
|
||||
|
||||
OpenGL Support
|
||||
==============
|
||||
|
@ -71,21 +82,25 @@ works at least on all directfb supported platforms.
|
|||
|
||||
As of this writing 20100802 you need to pull Mesa from git and do the following:
|
||||
|
||||
------------------------
|
||||
```
|
||||
git clone git://anongit.freedesktop.org/git/mesa/mesa
|
||||
cd mesa
|
||||
git checkout 2c9fdaf7292423c157fc79b5ce43f0f199dd753a
|
||||
------------------------
|
||||
```
|
||||
|
||||
Edit configs/linux-directfb so that the Directories-section looks like
|
||||
------------------------
|
||||
Edit `configs/linux-directfb` so that the Directories-section looks like this:
|
||||
|
||||
```
|
||||
# Directories
|
||||
SRC_DIRS = mesa glu
|
||||
GLU_DIRS = sgi
|
||||
DRIVER_DIRS = directfb
|
||||
PROGRAM_DIRS =
|
||||
------------------------
|
||||
```
|
||||
|
||||
Then do the following:
|
||||
|
||||
```
|
||||
make linux-directfb
|
||||
make
|
||||
|
||||
|
@ -95,13 +110,14 @@ sudo make install INSTALL_DIR=/usr/local/dfb_GL
|
|||
cd src/mesa/drivers/directfb
|
||||
make
|
||||
sudo make install INSTALL_DIR=/usr/local/dfb_GL
|
||||
------------------------
|
||||
```
|
||||
|
||||
To run the SDL - testprograms:
|
||||
|
||||
```
|
||||
export SDL_VIDEODRIVER=directfb
|
||||
export LD_LIBRARY_PATH=/usr/local/dfb_GL/lib
|
||||
export LD_PRELOAD=/usr/local/dfb_GL/libGL.so.7
|
||||
|
||||
./testgl
|
||||
|
||||
```
|
||||
|
|
|
@ -1,5 +1,46 @@
|
|||
Emscripten
|
||||
================================================================================
|
||||
# Emscripten
|
||||
|
||||
(This documentation is not very robust; we will update and expand this later.)
|
||||
|
||||
## A quick note about audio
|
||||
|
||||
Modern web browsers will not permit web pages to produce sound before the
|
||||
user has interacted with them; this is for several reasons, not the least
|
||||
of which being that no one likes when a random browser tab suddenly starts
|
||||
making noise and the user has to scramble to figure out which and silence
|
||||
it.
|
||||
|
||||
To solve this, most browsers will refuse to let a web app use the audio
|
||||
subsystem at all before the user has interacted with (clicked on) the page
|
||||
in a meaningful way. SDL-based apps also have to deal with this problem; if
|
||||
the user hasn't interacted with the page, SDL_OpenAudioDevice will fail.
|
||||
|
||||
There are two reasonable ways to deal with this: if you are writing some
|
||||
sort of media player thing, where the user expects there to be a volume
|
||||
control when you mouseover the canvas, just default that control to a muted
|
||||
state; if the user clicks on the control to unmute it, on this first click,
|
||||
open the audio device. This allows the media to play at start, the user can
|
||||
reasonably opt-in to listening, and you never get access denied to the audio
|
||||
device.
|
||||
|
||||
Many games do not have this sort of UI, and are more rigid about starting
|
||||
audio along with everything else at the start of the process. For these, your
|
||||
best bet is to write a little Javascript that puts up a "Click here to play!"
|
||||
UI, and upon the user clicking, remove that UI and then call the Emscripten
|
||||
app's main() function. As far as the application knows, the audio device was
|
||||
available to be opened as soon as the program started, and since this magic
|
||||
happens in a little Javascript, you don't have to change your C/C++ code at
|
||||
all to make it happen.
|
||||
|
||||
Please see the discussion at https://github.com/libsdl-org/SDL/issues/6385
|
||||
for some Javascript code to steal for this approach.
|
||||
|
||||
|
||||
## Building SDL/emscripten
|
||||
|
||||
SDL currently requires at least Emscripten 3.1.35 to build. Newer versions
|
||||
are likely to work, as well.
|
||||
|
||||
|
||||
Build:
|
||||
|
||||
|
|
155
libs/SDL2/docs/README-gdk.md
Normal file
155
libs/SDL2/docs/README-gdk.md
Normal file
|
@ -0,0 +1,155 @@
|
|||
GDK
|
||||
=====
|
||||
|
||||
This port allows SDL applications to run via Microsoft's Game Development Kit (GDK).
|
||||
|
||||
Windows (GDK) and Xbox One/Xbox Series (GDKX) are supported. Although most of the Xbox code is included in the public SDL source code, NDA access is required for a small number of source files. If you have access to GDKX, these required Xbox files are posted on the GDK forums [here](https://forums.xboxlive.com/questions/130003/).
|
||||
|
||||
|
||||
Requirements
|
||||
------------
|
||||
|
||||
* Microsoft Visual Studio 2022 (in theory, it should also work in 2017 or 2019, but this has not been tested)
|
||||
* Microsoft GDK June 2022 or newer (public release [here](https://github.com/microsoft/GDK/releases/tag/June_2022))
|
||||
* To publish a package or successfully authenticate a user, you will need to create an app id/configure services in Partner Center. However, for local testing purposes (without authenticating on Xbox Live), the identifiers used by the GDK test programs in the included solution will work.
|
||||
|
||||
|
||||
Windows GDK Status
|
||||
------
|
||||
|
||||
The Windows GDK port supports the full set of Win32 APIs, renderers, controllers, input devices, etc., as the normal Windows x64 build of SDL.
|
||||
|
||||
* Additionally, the GDK port adds the following:
|
||||
* Compile-time platform detection for SDL programs. The `__GDK__` is `#define`d on every GDK platform, and the `__WINGDK__` is `#define`d on Windows GDK, specifically. (This distinction exists because other GDK platforms support a smaller subset of functionality. This allows you to mark code for "any" GDK separate from Windows GDK.)
|
||||
* GDK-specific setup:
|
||||
* Initializing/uninitializing the game runtime, and initializing Xbox Live services
|
||||
* Creating a global task queue and setting it as the default for the process. When running any async operations, passing in `NULL` as the task queue will make the task get added to the global task queue.
|
||||
|
||||
* An implementation on `WinMain` that performs the above GDK setup (you should link against SDL2main.lib, as in Windows x64). If you are unable to do this, you can instead manually call `SDL_GDKRunApp` from your entry point, passing in your `SDL_main` function and `NULL` as the parameters.
|
||||
* Global task queue callbacks are dispatched during `SDL_PumpEvents` (which is also called internally if using `SDL_PollEvent`).
|
||||
* You can get the handle of the global task queue through `SDL_GDKGetTaskQueue`, if needed. When done with the queue, be sure to use `XTaskQueueCloseHandle` to decrement the reference count (otherwise it will cause a resource leak).
|
||||
|
||||
* What doesn't work:
|
||||
* Compilation with anything other than through the included Visual C++ solution file
|
||||
|
||||
## VisualC-GDK Solution
|
||||
|
||||
The included `VisualC-GDK/SDL.sln` solution includes the following targets for the Gaming.Desktop.x64 configuration:
|
||||
|
||||
* SDL2 (DLL) - This is the typical SDL2.dll, but for Gaming.Desktop.x64.
|
||||
* SDL2main (lib) - This contains a drop-in implementation of `WinMain` that is used as the entry point for GDK programs.
|
||||
* tests/testgamecontroller - Standard SDL test program demonstrating controller functionality.
|
||||
* tests/testgdk - GDK-specific test program that demonstrates using the global task queue to login a user into Xbox Live.
|
||||
*NOTE*: As of the June 2022 GDK, you cannot test user logins without a valid Title ID and MSAAppId. You will need to manually change the identifiers in the `MicrosoftGame.config` to your valid IDs from Partner Center if you wish to test this.
|
||||
* tests/testsprite2 - Standard SDL test program demonstrating sprite drawing functionality.
|
||||
|
||||
If you set one of the test programs as a startup project, you can run it directly from Visual Studio.
|
||||
|
||||
Windows GDK Setup, Detailed Steps
|
||||
---------------------
|
||||
|
||||
These steps assume you already have a game using SDL that runs on Windows x64 along with a corresponding Visual Studio solution file for the x64 version. If you don't have this, it's easiest to use one of the test program vcxproj files in the `VisualC-GDK` directory as a starting point, though you will still need to do most of the steps below.
|
||||
|
||||
### 1. Add a Gaming.Desktop.x64 Configuration ###
|
||||
|
||||
In your game's existing Visual Studio Solution, go to Build > Configuration Manager. From the "Active solution platform" drop-down select "New...". From the drop-down list, select Gaming.Desktop.x64 and copy the settings from the x64 configuration.
|
||||
|
||||
### 2. Build SDL2 and SDL2main for GDK ###
|
||||
|
||||
Open `VisualC-GDK/SDL.sln` in Visual Studio, you need to build the SDL2 and SDL2main targets for the Gaming.Desktop.x64 platform (Release is recommended). You will need to copy/keep track of the `SDL2.dll`, `XCurl.dll` (which is output by Gaming.Desktop.x64), `SDL2.lib`, and `SDL2main.lib` output files for your game project.
|
||||
|
||||
*Alternatively*, you could setup your solution file to instead reference the SDL2/SDL2main project file targets from the SDL source, and add those projects as a dependency. This would mean that SDL2 and SDL2main would both be built when your game is built.
|
||||
|
||||
### 3. Configuring Project Settings ###
|
||||
|
||||
While the Gaming.Desktop.x64 configuration sets most of the required settings, there are some additional items to configure for your game project under the Gaming.Desktop.x64 Configuration:
|
||||
|
||||
* Under C/C++ > General > Additional Include Directories, make sure the `SDL/include` path is referenced
|
||||
* Under Linker > General > Additional Library Directories, make sure to reference the path where the newly-built SDL2.lib and SDL2main.lib are
|
||||
* Under Linker > Input > Additional Dependencies, you need the following:
|
||||
* `SDL2.lib`
|
||||
* `SDL2main.lib` (unless not using)
|
||||
* `xgameruntime.lib`
|
||||
* `../Microsoft.Xbox.Services.141.GDK.C.Thunks.lib`
|
||||
* Note that in general, the GDK libraries depend on the MSVC C/C++ runtime, so there is no way to remove this dependency from a GDK program that links against GDK.
|
||||
|
||||
### 4. Setting up SDL_main ###
|
||||
|
||||
Rather than using your own implementation of `WinMain`, it's recommended that you instead `#include "SDL_main.h"` and declare a standard main function. If you are unable to do this, you can instead manually call `SDL_GDKRunApp` from your entry point, passing in your `SDL_main` function and `NULL` as the parameters.
|
||||
|
||||
### 5. Required DLLs ###
|
||||
|
||||
The game will not launch in the debugger unless required DLLs are included in the directory that contains the game's .exe file. You need to make sure that the following files are copied into the directory:
|
||||
|
||||
* Your SDL2.dll
|
||||
* "$(Console_GRDKExtLibRoot)Xbox.Services.API.C\DesignTime\CommonConfiguration\Neutral\Lib\Release\Microsoft.Xbox.Services.141.GDK.C.Thunks.dll"
|
||||
* XCurl.dll
|
||||
|
||||
You can either copy these in a post-build step, or you can add the dlls into the project and set its Configuration Properties > General > Item type to "Copy file," which will also copy them into the output directory.
|
||||
|
||||
### 6. Setting up MicrosoftGame.config ###
|
||||
|
||||
You can copy `VisualC-GDK/tests/testgdk/MicrosoftGame.config` and use that as a starting point in your project. Minimally, you will want to change the Executable Name attribute, the DefaultDisplayName, and the Description.
|
||||
|
||||
This file must be copied into the same directory as the game's .exe file. As with the DLLs, you can either use a post-build step or the "Copy file" item type.
|
||||
|
||||
For basic testing, you do not need to change anything else in `MicrosoftGame.config`. However, if you want to test any Xbox Live services (such as logging in users) _or_ publish a package, you will need to setup a Game app on Partner Center.
|
||||
|
||||
Then, you need to set the following values to the values from Partner Center:
|
||||
|
||||
* Identity tag - Name and Publisher attributes
|
||||
* TitleId
|
||||
* MSAAppId
|
||||
|
||||
### 7. Adding Required Logos
|
||||
|
||||
Several logo PNG files are required to be able to launch the game, even from the debugger. You can use the sample logos provided in `VisualC-GDK/logos`. As with the other files, they must be copied into the same directory as the game's .exe file.
|
||||
|
||||
|
||||
### 8. Copying any Data Files ###
|
||||
|
||||
When debugging GDK games, there is no way to specify a working directory. Therefore, any required game data must also be copied into the output directory, likely in a post-build step.
|
||||
|
||||
|
||||
### 9. Build and Run from Visual Studio ###
|
||||
|
||||
At this point, you should be able to build and run your game from the Visual Studio Debugger. If you get any linker errors, make sure you double-check that you referenced all the required libs.
|
||||
|
||||
If you are testing Xbox Live functionality, it's likely you will need to change to the Sandbox for your title. To do this:
|
||||
|
||||
1. Run "Desktop VS 2022 Gaming Command Prompt" from the Start Menu
|
||||
2. Switch the sandbox name with:
|
||||
`XblPCSandbox SANDBOX.#`
|
||||
3. (To switch back to the retail sandbox):
|
||||
`XblPCSandbox RETAIL`
|
||||
|
||||
### 10. Packaging and Installing Locally
|
||||
|
||||
You can use one of the test program's `PackageLayout.xml` as a starting point. Minimally, you will need to change the exe to the correct name and also reference any required game data. As with the other data files, it's easiest if you have this copy to the output directory, although it's not a requirement as you can specify relative paths to files.
|
||||
|
||||
To create the package:
|
||||
|
||||
1. Run "Desktop VS 2022 Gaming Command Prompt" from the Start Menu
|
||||
2. `cd` to the directory containing the `PackageLayout.xml` with the correct paths (if you use the local path as in the sample package layout, this would be from your .exe output directory)
|
||||
3. `mkdir Package` to create an output directory
|
||||
4. To package the file into the `Package` directory, use:
|
||||
`makepkg pack /f PackageLayout.xml /lt /d . /nogameos /pc /pd Package`
|
||||
5. To install the package, use:
|
||||
`wdapp install PACKAGENAME.msixvc`
|
||||
6. Once the package is installed, you can run it from the start menu.
|
||||
7. As with when running from Visual Studio, if you need to test any Xbox Live functionality you must switch to the correct sandbox.
|
||||
|
||||
|
||||
Troubleshooting
|
||||
---------------
|
||||
|
||||
#### Xbox Live Login does not work
|
||||
|
||||
As of June 2022 GDK, you must have a valid Title Id and MSAAppId in order to test Xbox Live functionality such as user login. Make sure these are set correctly in the `MicrosoftGame.config`. This means that even testgdk will not let you login without setting these properties to valid values.
|
||||
|
||||
Furthermore, confirm that your PC is set to the correct sandbox.
|
||||
|
||||
|
||||
#### "The current user has already installed an unpackaged version of this app. A packaged version cannot replace this." error when installing
|
||||
|
||||
Prior to June 2022 GDK, running from the Visual Studio debugger would still locally register the app (and it would appear on the start menu). To fix this, you have to uninstall it (it's simplest to right click on it from the start menu to uninstall it).
|
|
@ -1,10 +1,10 @@
|
|||
iOS
|
||||
======
|
||||
|
||||
Building the Simple DirectMedia Layer for iOS 5.1+
|
||||
Building the Simple DirectMedia Layer for iOS 9.0+
|
||||
==============================================================================
|
||||
|
||||
Requirements: Mac OS X 10.8 or later and the iOS 7+ SDK.
|
||||
Requirements: Mac OS X 10.9 or later and the iOS 9.0 or newer SDK.
|
||||
|
||||
Instructions:
|
||||
|
||||
|
@ -191,6 +191,38 @@ More information on this subject is available here:
|
|||
http://developer.apple.com/library/ios/#documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/Introduction/Introduction.html
|
||||
|
||||
|
||||
Notes -- xcFramework
|
||||
==============================================================================
|
||||
|
||||
The SDL.xcodeproj file now includes a target to build SDL2.xcframework. An xcframework is a new (Xcode 11) uber-framework which can handle any combination of processor type and target OS platform.
|
||||
|
||||
In the past, iOS devices were always an ARM variant processor, and the simulator was always i386 or x86_64, and thus libraries could be combined into a single framework for both simulator and device. With the introduction of the Apple Silicon ARM-based machines, regular frameworks would collide as CPU type was no longer sufficient to differentiate the platform. So Apple created the new xcframework library package.
|
||||
|
||||
The xcframework target builds into a Products directory alongside the SDL.xcodeproj file, as SDL2.xcframework. This can be brought in to any iOS project and will function properly for both simulator and device, no matter their CPUs. Note that Intel Macs cannot cross-compile for Apple Silicon Macs. If you need AS compatibility, perform this build on an Apple Silicon Mac.
|
||||
|
||||
This target requires Xcode 11 or later. The target will simply fail to build if attempted on older Xcodes.
|
||||
|
||||
In addition, on Apple platforms, main() cannot be in a dynamically loaded library. This means that iOS apps which used the statically-linked libSDL2.lib and now link with the xcframwork will need to define their own main() to call SDL_UIKitRunApp(), like this:
|
||||
|
||||
#ifndef SDL_MAIN_HANDLED
|
||||
#ifdef main
|
||||
#undef main
|
||||
#endif
|
||||
|
||||
int
|
||||
main(int argc, char *argv[])
|
||||
{
|
||||
return SDL_UIKitRunApp(argc, argv, SDL_main);
|
||||
}
|
||||
#endif /* !SDL_MAIN_HANDLED */
|
||||
|
||||
Using an xcFramework is similar to using a regular framework. However, issues have been seen with the build system not seeing the headers in the xcFramework. To remedy this, add the path to the xcFramework in your app's target ==> Build Settings ==> Framework Search Paths and mark it recursive (this is critical). Also critical is to remove "*.framework" from Build Settings ==> Sub-Directories to Exclude in Recursive Searches. Clean the build folder, and on your next build the build system should be able to see any of these in your code, as expected:
|
||||
|
||||
#include "SDL_main.h"
|
||||
#include <SDL.h>
|
||||
#include <SDL_main.h>
|
||||
|
||||
|
||||
Notes -- iPhone SDL limitations
|
||||
==============================================================================
|
||||
|
||||
|
@ -261,7 +293,7 @@ e.g.
|
|||
Deploying to older versions of iOS
|
||||
==============================================================================
|
||||
|
||||
SDL supports deploying to older versions of iOS than are supported by the latest version of Xcode, all the way back to iOS 6.1
|
||||
SDL supports deploying to older versions of iOS than are supported by the latest version of Xcode, all the way back to iOS 8.0
|
||||
|
||||
In order to do that you need to download an older version of Xcode:
|
||||
https://developer.apple.com/download/more/?name=Xcode
|
||||
|
|
|
@ -3,8 +3,8 @@ Linux
|
|||
|
||||
By default SDL will only link against glibc, the rest of the features will be
|
||||
enabled dynamically at runtime depending on the available features on the target
|
||||
system. So, for example if you built SDL with Xinerama support and the target
|
||||
system does not have the Xinerama libraries installed, it will be disabled
|
||||
system. So, for example if you built SDL with XRandR support and the target
|
||||
system does not have the XRandR libraries installed, it will be disabled
|
||||
at runtime, and you won't get a missing library error, at least with the
|
||||
default configuration parameters.
|
||||
|
||||
|
@ -12,27 +12,27 @@ default configuration parameters.
|
|||
Build Dependencies
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
Ubuntu 20.04, all available features enabled:
|
||||
Ubuntu 18.04, all available features enabled:
|
||||
|
||||
sudo apt-get install build-essential git make cmake autoconf automake \
|
||||
libtool pkg-config libasound2-dev libpulse-dev libaudio-dev libjack-dev \
|
||||
libx11-dev libxext-dev libxrandr-dev libxcursor-dev libxfixes-dev libxi-dev \
|
||||
libxinerama-dev libxxf86vm-dev libxss-dev libgl1-mesa-dev libdbus-1-dev \
|
||||
libudev-dev libgles2-mesa-dev libegl1-mesa-dev libibus-1.0-dev \
|
||||
fcitx-libs-dev libsamplerate0-dev libsndio-dev libwayland-dev \
|
||||
libxkbcommon-dev libdrm-dev libgbm-dev
|
||||
sudo apt-get install build-essential git make autoconf automake libtool \
|
||||
pkg-config cmake ninja-build gnome-desktop-testing libasound2-dev libpulse-dev \
|
||||
libaudio-dev libjack-dev libsndio-dev libsamplerate0-dev libx11-dev libxext-dev \
|
||||
libxrandr-dev libxcursor-dev libxfixes-dev libxi-dev libxss-dev libwayland-dev \
|
||||
libxkbcommon-dev libdrm-dev libgbm-dev libgl1-mesa-dev libgles2-mesa-dev \
|
||||
libegl1-mesa-dev libdbus-1-dev libibus-1.0-dev libudev-dev fcitx-libs-dev
|
||||
|
||||
Ubuntu 22.04+ can also add `libpipewire-0.3-dev libdecor-0-dev` to that command line.
|
||||
|
||||
Fedora 35, all available features enabled:
|
||||
|
||||
sudo yum install gcc git-core make cmake autoconf automake libtool \
|
||||
alsa-lib-devel pulseaudio-libs-devel nas-devel pipewire-devel \
|
||||
libX11-devel libXext-devel libXrandr-devel libXcursor-devel libXfixes-devel \
|
||||
libXi-devel libXinerama-devel libXxf86vm-devel libXScrnSaver-devel \
|
||||
dbus-devel ibus-devel fcitx-devel systemd-devel mesa-libGL-devel \
|
||||
libxkbcommon-devel mesa-libGLES-devel mesa-libEGL-devel vulkan-devel \
|
||||
wayland-devel wayland-protocols-devel libdrm-devel mesa-libgbm-devel \
|
||||
libusb-devel pipewire-jack-audio-connection-kit-devel libdecor-devel \
|
||||
libsamplerate-devel
|
||||
libXi-devel libXScrnSaver-devel dbus-devel ibus-devel fcitx-devel \
|
||||
systemd-devel mesa-libGL-devel libxkbcommon-devel mesa-libGLES-devel \
|
||||
mesa-libEGL-devel vulkan-devel wayland-devel wayland-protocols-devel \
|
||||
libdrm-devel mesa-libgbm-devel libusb-devel libdecor-devel \
|
||||
libsamplerate-devel pipewire-jack-audio-connection-kit-devel \
|
||||
|
||||
NOTES:
|
||||
- This includes all the audio targets except arts and esd, because Ubuntu
|
||||
|
|
|
@ -43,15 +43,14 @@ make
|
|||
sudo make install
|
||||
```
|
||||
|
||||
This script builds SDL with 10.6 ABI compatibility on 64-bit Intel and 11.0
|
||||
This script builds SDL with 10.9 ABI compatibility on 64-bit Intel and 11.0
|
||||
ABI compatibility on ARM64 architectures. For best compatibility you
|
||||
should compile your application the same way.
|
||||
|
||||
Please note that building SDL requires at least Xcode 4.6 and the 10.7 SDK
|
||||
(even if you target back to 10.6 systems). PowerPC support for Mac OS X has
|
||||
been officially dropped as of SDL 2.0.2. 32-bit Intel, using an older Xcode
|
||||
release, is still supported at the time of this writing, but current Xcode
|
||||
releases no longer support it, and eventually neither will SDL.
|
||||
Please note that building SDL requires at least Xcode 6 and the 10.9 SDK.
|
||||
PowerPC support for macOS has been officially dropped as of SDL 2.0.2.
|
||||
32-bit Intel and macOS 10.8 runtime support has been officially dropped as
|
||||
of SDL 2.24.0.
|
||||
|
||||
To use the library once it's built, you essential have two possibilities:
|
||||
use the traditional autoconf/automake/make method, or use Xcode.
|
||||
|
|
|
@ -1,240 +0,0 @@
|
|||
Mac OS X
|
||||
==============================================================================
|
||||
|
||||
These instructions are for people using Apple's Mac OS X (pronounced
|
||||
"ten").
|
||||
|
||||
From the developer's point of view, OS X is a sort of hybrid Mac and
|
||||
Unix system, and you have the option of using either traditional
|
||||
command line tools or Apple's IDE Xcode.
|
||||
|
||||
Command Line Build
|
||||
==================
|
||||
|
||||
To build SDL using the command line, use the standard configure and make
|
||||
process:
|
||||
|
||||
./configure
|
||||
make
|
||||
sudo make install
|
||||
|
||||
You can also build SDL as a Universal library (a single binary for both
|
||||
32-bit and 64-bit Intel architectures), on Mac OS X 10.7 and newer, by using
|
||||
the gcc-fat.sh script in build-scripts:
|
||||
|
||||
mkdir mybuild
|
||||
cd mybuild
|
||||
CC=$PWD/../build-scripts/gcc-fat.sh CXX=$PWD/../build-scripts/g++-fat.sh ../configure
|
||||
make
|
||||
sudo make install
|
||||
|
||||
This script builds SDL with 10.5 ABI compatibility on i386 and 10.6
|
||||
ABI compatibility on x86_64 architectures. For best compatibility you
|
||||
should compile your application the same way.
|
||||
|
||||
Please note that building SDL requires at least Xcode 4.6 and the 10.7 SDK
|
||||
(even if you target back to 10.5 systems). PowerPC support for Mac OS X has
|
||||
been officially dropped as of SDL 2.0.2.
|
||||
|
||||
To use the library once it's built, you essential have two possibilities:
|
||||
use the traditional autoconf/automake/make method, or use Xcode.
|
||||
|
||||
==============================================================================
|
||||
Caveats for using SDL with Mac OS X
|
||||
==============================================================================
|
||||
|
||||
Some things you have to be aware of when using SDL on Mac OS X:
|
||||
|
||||
- If you register your own NSApplicationDelegate (using [NSApp setDelegate:]),
|
||||
SDL will not register its own. This means that SDL will not terminate using
|
||||
SDL_Quit if it receives a termination request, it will terminate like a
|
||||
normal app, and it will not send a SDL_DROPFILE when you request to open a
|
||||
file with the app. To solve these issues, put the following code in your
|
||||
NSApplicationDelegate implementation:
|
||||
|
||||
|
||||
- (NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication *)sender
|
||||
{
|
||||
if (SDL_GetEventState(SDL_QUIT) == SDL_ENABLE) {
|
||||
SDL_Event event;
|
||||
event.type = SDL_QUIT;
|
||||
SDL_PushEvent(&event);
|
||||
}
|
||||
|
||||
return NSTerminateCancel;
|
||||
}
|
||||
|
||||
- (BOOL)application:(NSApplication *)theApplication openFile:(NSString *)filename
|
||||
{
|
||||
if (SDL_GetEventState(SDL_DROPFILE) == SDL_ENABLE) {
|
||||
SDL_Event event;
|
||||
event.type = SDL_DROPFILE;
|
||||
event.drop.file = SDL_strdup([filename UTF8String]);
|
||||
return (SDL_PushEvent(&event) > 0);
|
||||
}
|
||||
|
||||
return NO;
|
||||
}
|
||||
|
||||
==============================================================================
|
||||
Using the Simple DirectMedia Layer with a traditional Makefile
|
||||
==============================================================================
|
||||
|
||||
An existing autoconf/automake build system for your SDL app has good chances
|
||||
to work almost unchanged on OS X. However, to produce a "real" Mac OS X binary
|
||||
that you can distribute to users, you need to put the generated binary into a
|
||||
so called "bundle", which basically is a fancy folder with a name like
|
||||
"MyCoolGame.app".
|
||||
|
||||
To get this build automatically, add something like the following rule to
|
||||
your Makefile.am:
|
||||
|
||||
bundle_contents = APP_NAME.app/Contents
|
||||
APP_NAME_bundle: EXE_NAME
|
||||
mkdir -p $(bundle_contents)/MacOS
|
||||
mkdir -p $(bundle_contents)/Resources
|
||||
echo "APPL????" > $(bundle_contents)/PkgInfo
|
||||
$(INSTALL_PROGRAM) $< $(bundle_contents)/MacOS/
|
||||
|
||||
You should replace EXE_NAME with the name of the executable. APP_NAME is what
|
||||
will be visible to the user in the Finder. Usually it will be the same
|
||||
as EXE_NAME but capitalized. E.g. if EXE_NAME is "testgame" then APP_NAME
|
||||
usually is "TestGame". You might also want to use `@PACKAGE@` to use the package
|
||||
name as specified in your configure.ac file.
|
||||
|
||||
If your project builds more than one application, you will have to do a bit
|
||||
more. For each of your target applications, you need a separate rule.
|
||||
|
||||
If you want the created bundles to be installed, you may want to add this
|
||||
rule to your Makefile.am:
|
||||
|
||||
install-exec-hook: APP_NAME_bundle
|
||||
rm -rf $(DESTDIR)$(prefix)/Applications/APP_NAME.app
|
||||
mkdir -p $(DESTDIR)$(prefix)/Applications/
|
||||
cp -r $< /$(DESTDIR)$(prefix)Applications/
|
||||
|
||||
This rule takes the Bundle created by the rule from step 3 and installs them
|
||||
into "$(DESTDIR)$(prefix)/Applications/".
|
||||
|
||||
Again, if you want to install multiple applications, you will have to augment
|
||||
the make rule accordingly.
|
||||
|
||||
|
||||
But beware! That is only part of the story! With the above, you end up with
|
||||
a bare bone .app bundle, which is double clickable from the Finder. But
|
||||
there are some more things you should do before shipping your product...
|
||||
|
||||
1) The bundle right now probably is dynamically linked against SDL. That
|
||||
means that when you copy it to another computer, *it will not run*,
|
||||
unless you also install SDL on that other computer. A good solution
|
||||
for this dilemma is to static link against SDL. On OS X, you can
|
||||
achieve that by linking against the libraries listed by
|
||||
|
||||
sdl-config --static-libs
|
||||
|
||||
instead of those listed by
|
||||
|
||||
sdl-config --libs
|
||||
|
||||
Depending on how exactly SDL is integrated into your build systems, the
|
||||
way to achieve that varies, so I won't describe it here in detail
|
||||
|
||||
2) Add an 'Info.plist' to your application. That is a special XML file which
|
||||
contains some meta-information about your application (like some copyright
|
||||
information, the version of your app, the name of an optional icon file,
|
||||
and other things). Part of that information is displayed by the Finder
|
||||
when you click on the .app, or if you look at the "Get Info" window.
|
||||
More information about Info.plist files can be found on Apple's homepage.
|
||||
|
||||
|
||||
As a final remark, let me add that I use some of the techniques (and some
|
||||
variations of them) in Exult and ScummVM; both are available in source on
|
||||
the net, so feel free to take a peek at them for inspiration!
|
||||
|
||||
|
||||
==============================================================================
|
||||
Using the Simple DirectMedia Layer with Xcode
|
||||
==============================================================================
|
||||
|
||||
These instructions are for using Apple's Xcode IDE to build SDL applications.
|
||||
|
||||
- First steps
|
||||
|
||||
The first thing to do is to unpack the Xcode.tar.gz archive in the
|
||||
top level SDL directory (where the Xcode.tar.gz archive resides).
|
||||
Because Stuffit Expander will unpack the archive into a subdirectory,
|
||||
you should unpack the archive manually from the command line:
|
||||
|
||||
cd [path_to_SDL_source]
|
||||
tar zxf Xcode.tar.gz
|
||||
|
||||
This will create a new folder called Xcode, which you can browse
|
||||
normally from the Finder.
|
||||
|
||||
- Building the Framework
|
||||
|
||||
The SDL Library is packaged as a framework bundle, an organized
|
||||
relocatable folder hierarchy of executable code, interface headers,
|
||||
and additional resources. For practical purposes, you can think of a
|
||||
framework as a more user and system-friendly shared library, whose library
|
||||
file behaves more or less like a standard UNIX shared library.
|
||||
|
||||
To build the framework, simply open the framework project and build it.
|
||||
By default, the framework bundle "SDL.framework" is installed in
|
||||
/Library/Frameworks. Therefore, the testers and project stationary expect
|
||||
it to be located there. However, it will function the same in any of the
|
||||
following locations:
|
||||
|
||||
~/Library/Frameworks
|
||||
/Local/Library/Frameworks
|
||||
/System/Library/Frameworks
|
||||
|
||||
- Build Options
|
||||
There are two "Build Styles" (See the "Targets" tab) for SDL.
|
||||
"Deployment" should be used if you aren't tweaking the SDL library.
|
||||
"Development" should be used to debug SDL apps or the library itself.
|
||||
|
||||
- Building the Testers
|
||||
Open the SDLTest project and build away!
|
||||
|
||||
- Using the Project Stationary
|
||||
Copy the stationary to the indicated folders to access it from
|
||||
the "New Project" and "Add target" menus. What could be easier?
|
||||
|
||||
- Setting up a new project by hand
|
||||
Some of you won't want to use the Stationary so I'll give some tips:
|
||||
* Create a new "Cocoa Application"
|
||||
* Add src/main/macosx/SDLMain.m , .h and .nib to your project
|
||||
* Remove "main.c" from your project
|
||||
* Remove "MainMenu.nib" from your project
|
||||
* Add "$(HOME)/Library/Frameworks/SDL.framework/Headers" to include path
|
||||
* Add "$(HOME)/Library/Frameworks" to the frameworks search path
|
||||
* Add "-framework SDL -framework Foundation -framework AppKit" to "OTHER_LDFLAGS"
|
||||
* Set the "Main Nib File" under "Application Settings" to "SDLMain.nib"
|
||||
* Add your files
|
||||
* Clean and build
|
||||
|
||||
- Building from command line
|
||||
Use pbxbuild in the same directory as your .pbproj file
|
||||
|
||||
- Running your app
|
||||
You can send command line args to your app by either invoking it from
|
||||
the command line (in *.app/Contents/MacOS) or by entering them in the
|
||||
"Executables" panel of the target settings.
|
||||
|
||||
- Implementation Notes
|
||||
Some things that may be of interest about how it all works...
|
||||
* Working directory
|
||||
As defined in the SDL_main.m file, the working directory of your SDL app
|
||||
is by default set to its parent. You may wish to change this to better
|
||||
suit your needs.
|
||||
* You have a Cocoa App!
|
||||
Your SDL app is essentially a Cocoa application. When your app
|
||||
starts up and the libraries finish loading, a Cocoa procedure is called,
|
||||
which sets up the working directory and calls your main() method.
|
||||
You are free to modify your Cocoa app with generally no consequence
|
||||
to SDL. You cannot, however, easily change the SDL window itself.
|
||||
Functionality may be added in the future to help this.
|
||||
|
||||
|
||||
Known bugs are listed in the file "BUGS.txt".
|
28
libs/SDL2/docs/README-n3ds.md
Normal file
28
libs/SDL2/docs/README-n3ds.md
Normal file
|
@ -0,0 +1,28 @@
|
|||
# Nintendo 3DS
|
||||
|
||||
SDL port for the Nintendo 3DS [Homebrew toolchain](https://devkitpro.org/) contributed by:
|
||||
|
||||
- [Pierre Wendling](https://github.com/FtZPetruska)
|
||||
|
||||
Credits to:
|
||||
|
||||
- The awesome people who ported SDL to other homebrew platforms.
|
||||
- The Devkitpro team for making all the tools necessary to achieve this.
|
||||
|
||||
## Building
|
||||
|
||||
To build for the Nintendo 3DS, make sure you have devkitARM and cmake installed and run:
|
||||
|
||||
```bash
|
||||
cmake -S. -Bbuild -DCMAKE_TOOLCHAIN_FILE="$DEVKITPRO/cmake/3DS.cmake" -DCMAKE_BUILD_TYPE=Release
|
||||
cmake --build build
|
||||
cmake --install build
|
||||
```
|
||||
|
||||
## Notes
|
||||
|
||||
- Currently only software rendering is supported.
|
||||
- SDL2main should be used to ensure ROMFS is enabled.
|
||||
- By default, the extra L2 cache and higher clock speeds of the New 2/3DS lineup are enabled. If you wish to turn it off, use `osSetSpeedupEnable(false)` in your main function.
|
||||
- `SDL_GetBasePath` returns the romfs root instead of the executable's directory.
|
||||
- The Nintendo 3DS uses a cooperative threading model on a single core, meaning a thread will never yield unless done manually through the `SDL_Delay` functions, or blocking waits (`SDL_LockMutex`, `SDL_SemWait`, `SDL_CondWait`, `SDL_WaitThread`). To avoid starving other threads, `SDL_SemTryWait` and `SDL_SemWaitTimeout` will yield if they fail to acquire the semaphore, see https://github.com/libsdl-org/SDL/pull/6776 for more information.
|
44
libs/SDL2/docs/README-ngage.md
Normal file
44
libs/SDL2/docs/README-ngage.md
Normal file
|
@ -0,0 +1,44 @@
|
|||
Nokia N-Gage
|
||||
============
|
||||
|
||||
SDL2 port for Symbian S60v1 and v2 with a main focus on the Nokia N-Gage
|
||||
(Classic and QD) by [Michael Fitzmayer](https://github.com/mupfdev).
|
||||
|
||||
Compiling
|
||||
---------
|
||||
|
||||
SDL is part of the [N-Gage SDK.](https://github.com/ngagesdk) project.
|
||||
The library is included in the
|
||||
[toolchain](https://github.com/ngagesdk/ngage-toolchain) as a
|
||||
sub-module.
|
||||
|
||||
A complete example project based on SDL2 can be found in the GitHub
|
||||
account of the SDK: [Wordle](https://github.com/ngagesdk/wordle).
|
||||
|
||||
Current level of implementation
|
||||
-------------------------------
|
||||
|
||||
The video driver currently provides full screen video support with
|
||||
keyboard input.
|
||||
|
||||
At the moment only the software renderer works.
|
||||
|
||||
Audio is not yet implemented.
|
||||
|
||||
Acknowledgements
|
||||
----------------
|
||||
|
||||
Thanks to Hannu Viitala, Kimmo Kinnunen and Markus Mertama for the
|
||||
valuable insight into Symbian programming. Without the SDL 1.2 port
|
||||
which was specially developed for CDoom (Doom for the Nokia 9210), this
|
||||
adaptation would not have been possible.
|
||||
|
||||
I would like to thank my friends
|
||||
[Razvan](https://twitter.com/bewarerazvan) and [Dan
|
||||
Whelan](https://danwhelan.ie/), for their continuous support. Without
|
||||
you and the [N-Gage community](https://discord.gg/dbUzqJ26vs), I would
|
||||
have lost my patience long ago.
|
||||
|
||||
Last but not least, I would like to thank the development team of
|
||||
[EKA2L1](https://12z1.com/) (an experimental Symbian OS emulator). Your
|
||||
patience and support in troubleshooting helped me a lot.
|
|
@ -3,7 +3,7 @@ Simple DirectMedia Layer 2 for OS/2 & eComStation
|
|||
SDL port for OS/2, authored by Andrey Vasilkin <digi@os2.snc.ru>, 2016
|
||||
|
||||
|
||||
OpenGL and audio capture not supported by this port.
|
||||
OpenGL not supported by this port.
|
||||
|
||||
Additional optional environment variables:
|
||||
|
||||
|
|
51
libs/SDL2/docs/README-ps2.md
Normal file
51
libs/SDL2/docs/README-ps2.md
Normal file
|
@ -0,0 +1,51 @@
|
|||
PS2
|
||||
======
|
||||
SDL2 port for the Sony Playstation 2 contributed by:
|
||||
- Francisco Javier Trujillo Mata
|
||||
|
||||
|
||||
Credit to
|
||||
- The guys that ported SDL to PSP & Vita because I'm taking them as reference.
|
||||
- David G. F. for helping me with several issues and tests.
|
||||
|
||||
## Building
|
||||
To build SDL2 library for the PS2, make sure you have the latest PS2Dev status and run:
|
||||
```bash
|
||||
cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=$PS2DEV/ps2sdk/ps2dev.cmake
|
||||
cmake --build build
|
||||
cmake --install build
|
||||
```
|
||||
|
||||
## Hints
|
||||
The PS2 port has a special Hint for having a dynamic VSYNC. The Hint is `SDL_HINT_PS2_DYNAMIC_VSYNC`.
|
||||
If you enabled the dynamic vsync having as well `SDL_RENDERER_PRESENTVSYNC` enabled, then if the app is not able to run at 60 FPS, automatically the `vsync` will be disabled having a better performance, instead of droping FPS to 30.
|
||||
|
||||
## Notes
|
||||
If you trying to debug a SDL app through [ps2client](https://github.com/ps2dev/ps2client) you need to avoid the IOP reset, otherwise you will lose the conection with your computer.
|
||||
So to avoid the reset of the IOP CPU, you need to call to the macro `SDL_PS2_SKIP_IOP_RESET();`.
|
||||
It could be something similar as:
|
||||
```c
|
||||
.....
|
||||
|
||||
SDL_PS2_SKIP_IOP_RESET();
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
.....
|
||||
```
|
||||
For a release binary is recommendable to reset the IOP always.
|
||||
|
||||
Remember to do a clean compilation everytime you enable or disable the `SDL_PS2_SKIP_IOP_RESET` otherwise the change won't be reflected.
|
||||
|
||||
## Getting PS2 Dev
|
||||
[Installing PS2 Dev](https://github.com/ps2dev/ps2dev)
|
||||
|
||||
## Running on PCSX2 Emulator
|
||||
[PCSX2](https://github.com/PCSX2/pcsx2)
|
||||
|
||||
[More PCSX2 information](https://pcsx2.net/)
|
||||
|
||||
## To Do
|
||||
- PS2 Screen Keyboard
|
||||
- Dialogs
|
||||
- Others
|
|
@ -1,31 +1,36 @@
|
|||
PSP
|
||||
======
|
||||
SDL port for the Sony PSP contributed by
|
||||
Captian Lex
|
||||
SDL2 port for the Sony PSP contributed by:
|
||||
- Captian Lex
|
||||
- Francisco Javier Trujillo Mata
|
||||
- Wouter Wijsman
|
||||
|
||||
|
||||
Credit to
|
||||
Marcus R.Brown,Jim Paris,Matthew H for the original SDL 1.2 for PSP
|
||||
Geecko for his PSP GU lib "Glib2d"
|
||||
|
||||
Building
|
||||
--------
|
||||
To build SDL2 library for the PSP, make sure psp-config is in the path and run:
|
||||
make -f Makefile.psp
|
||||
## Building
|
||||
To build SDL2 library for the PSP, make sure you have the latest PSPDev status and run:
|
||||
```bash
|
||||
cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=$PSPDEV/psp/share/pspdev.cmake
|
||||
cmake --build build
|
||||
cmake --install build
|
||||
```
|
||||
|
||||
|
||||
Getting PSP toolchain
|
||||
---------------------
|
||||
https://github.com/pspdev/psptoolchain
|
||||
## Getting PSP Dev
|
||||
[Installing PSP Dev](https://github.com/pspdev/pspdev)
|
||||
|
||||
Running on PPSSPP Emulator
|
||||
--------------------------
|
||||
https://github.com/hrydgard/ppsspp
|
||||
( https://github.com/hrydgard/ppsspp/wiki/Build-instructions )
|
||||
## Running on PPSSPP Emulator
|
||||
[PPSSPP](https://github.com/hrydgard/ppsspp)
|
||||
|
||||
Compiling an HelloWorld
|
||||
-----------------------
|
||||
https://psp-dev.org/doku.php?id=tutorial:hello_world
|
||||
[Build Instructions](https://github.com/hrydgard/ppsspp/wiki/Build-instructions)
|
||||
|
||||
To Do
|
||||
------
|
||||
PSP Screen Keyboard
|
||||
|
||||
## Compiling a HelloWorld
|
||||
[PSP Hello World](https://psp-dev.org/doku.php?id=tutorial:hello_world)
|
||||
|
||||
## To Do
|
||||
- PSP Screen Keyboard
|
||||
- Dialogs
|
||||
|
|
|
@ -63,7 +63,7 @@ Now, before chrooting into the ARM sysroot, you'll need to apply a workaround,
|
|||
edit $SYSROOT/etc/ld.so.preload and comment out all lines in it.
|
||||
|
||||
sudo chroot $SYSROOT
|
||||
apt-get install libudev-dev libasound2-dev libdbus-1-dev libraspberrypi0 libraspberrypi-bin libraspberrypi-dev libx11-dev libxext-dev libxrandr-dev libxcursor-dev libxi-dev libxinerama-dev libxxf86vm-dev libxss-dev
|
||||
apt-get install libudev-dev libasound2-dev libdbus-1-dev libraspberrypi0 libraspberrypi-bin libraspberrypi-dev libx11-dev libxext-dev libxrandr-dev libxcursor-dev libxi-dev libxss-dev
|
||||
exit
|
||||
sudo umount $SYSROOT/dev
|
||||
sudo umount $SYSROOT/proc
|
||||
|
|
60
libs/SDL2/docs/README-versions.md
Normal file
60
libs/SDL2/docs/README-versions.md
Normal file
|
@ -0,0 +1,60 @@
|
|||
# Versioning
|
||||
|
||||
## Since 2.23.0
|
||||
|
||||
SDL follows an "odd/even" versioning policy, similar to GLib, GTK, Flatpak
|
||||
and older versions of the Linux kernel:
|
||||
|
||||
* The major version (first part) increases when backwards compatibility
|
||||
is broken, which will happen infrequently.
|
||||
|
||||
* If the minor version (second part) is divisible by 2
|
||||
(for example 2.24.x, 2.26.x), this indicates a version of SDL that
|
||||
is believed to be stable and suitable for production use.
|
||||
|
||||
* In stable releases, the patchlevel or micro version (third part)
|
||||
indicates bugfix releases. Bugfix releases should not add or
|
||||
remove ABI, so the ".0" release (for example 2.24.0) should be
|
||||
forwards-compatible with all the bugfix releases from the
|
||||
same cycle (for example 2.24.1).
|
||||
|
||||
* The minor version increases when new API or ABI is added, or when
|
||||
other significant changes are made. Newer minor versions are
|
||||
backwards-compatible, but not fully forwards-compatible.
|
||||
For example, programs built against SDL 2.24.x should work fine
|
||||
with SDL 2.26.x, but programs built against SDL 2.26.x will not
|
||||
necessarily work with 2.24.x.
|
||||
|
||||
* If the minor version (second part) is not divisible by 2
|
||||
(for example 2.23.x, 2.25.x), this indicates a development prerelease
|
||||
of SDL that is not suitable for stable software distributions.
|
||||
Use with caution.
|
||||
|
||||
* The patchlevel or micro version (third part) increases with
|
||||
each prerelease.
|
||||
|
||||
* Each prerelease might add new API and/or ABI.
|
||||
|
||||
* Prereleases are backwards-compatible with older stable branches.
|
||||
For example, 2.25.x will be backwards-compatible with 2.24.x.
|
||||
|
||||
* Prereleases are not guaranteed to be backwards-compatible with
|
||||
each other. For example, new API or ABI added in 2.25.1
|
||||
might be removed or changed in 2.25.2.
|
||||
If this would be a problem for you, please do not use prereleases.
|
||||
|
||||
* Only upgrade to a prerelease if you can guarantee that you will
|
||||
promptly upgrade to the stable release that follows it.
|
||||
For example, do not upgrade to 2.23.x unless you will be able to
|
||||
upgrade to 2.24.0 when it becomes available.
|
||||
|
||||
* Software distributions that have a freeze policy (in particular Linux
|
||||
distributions with a release cycle, such as Debian and Fedora)
|
||||
should usually only package stable releases, and not prereleases.
|
||||
|
||||
## Before 2.23.0
|
||||
|
||||
Older versions of SDL followed a similar policy, but instead of the
|
||||
odd/even rule applying to the minor version, it applied to the patchlevel
|
||||
(micro version, third part). For example, 2.0.22 was a stable release
|
||||
and 2.0.21 was a prerelease.
|
|
@ -1,7 +1,7 @@
|
|||
Using SDL with Microsoft Visual C++
|
||||
===================================
|
||||
|
||||
### by [Lion Kimbro](mailto:snowlion@sprynet.com) with additions by [James Turk](mailto:james@conceptofzero.net)
|
||||
### by Lion Kimbro with additions by James Turk
|
||||
|
||||
You can either use the precompiled libraries from the [SDL](https://www.libsdl.org/download.php) web site, or you can build SDL
|
||||
yourself.
|
||||
|
|
|
@ -3,7 +3,7 @@ PS Vita
|
|||
SDL port for the Sony Playstation Vita and Sony Playstation TV
|
||||
|
||||
Credit to
|
||||
* xerpi and rsn8887 for initial (vita2d) port
|
||||
* xerpi, cpasjuste and rsn8887 for initial (vita2d) port
|
||||
* vitasdk/dolcesdk devs
|
||||
* CBPS discord (Namely Graphene and SonicMastr)
|
||||
|
||||
|
@ -22,6 +22,9 @@ Notes
|
|||
* gles1/gles2 support and renderers are disabled by default and can be enabled by configuring with `-DVIDEO_VITA_PVR=ON`
|
||||
These renderers support 720p and 1080i resolutions. These can be specified with:
|
||||
`SDL_setenv("VITA_RESOLUTION", "720", 1);` and `SDL_setenv("VITA_RESOLUTION", "1080", 1);`
|
||||
* Desktop GL 1.X and 2.X support and renderers are also disabled by default and also can be enabled with `-DVIDEO_VITA_PVR=ON` as long as gl4es4vita is present in your SDK.
|
||||
They support the same resolutions as the gles1/gles2 backends and require specifying `SDL_setenv("VITA_PVR_OGL", "1", 1);`
|
||||
anytime before video subsystem initialization.
|
||||
* gles2 support via PIB is disabled by default and can be enabled by configuring with `-DVIDEO_VITA_PIB=ON`
|
||||
* By default SDL emits mouse events for touch events on every touchscreen.
|
||||
Vita has two touchscreens, so it's recommended to use `SDL_SetHint(SDL_HINT_TOUCH_MOUSE_EVENTS, "0");` and handle touch events instead.
|
||||
|
|
|
@ -1,45 +1,58 @@
|
|||
Windows
|
||||
================================================================================
|
||||
# Windows
|
||||
|
||||
================================================================================
|
||||
OpenGL ES 2.x support
|
||||
================================================================================
|
||||
## LLVM and Intel C++ compiler support
|
||||
|
||||
SDL will build with the Visual Studio project files with LLVM-based compilers, such as the Intel oneAPI C++
|
||||
compiler, but you'll have to manually add the "-msse3" command line option
|
||||
to at least the SDL_audiocvt.c source file, and possibly others. This may
|
||||
not be necessary if you build SDL with CMake instead of the included Visual
|
||||
Studio solution.
|
||||
|
||||
Details are here: https://github.com/libsdl-org/SDL/issues/5186
|
||||
|
||||
|
||||
## OpenGL ES 2.x support
|
||||
|
||||
SDL has support for OpenGL ES 2.x under Windows via two alternative
|
||||
implementations.
|
||||
|
||||
The most straightforward method consists in running your app in a system with
|
||||
a graphic card paired with a relatively recent (as of November of 2013) driver
|
||||
which supports the WGL_EXT_create_context_es2_profile extension. Vendors known
|
||||
to ship said extension on Windows currently include nVidia and Intel.
|
||||
|
||||
The other method involves using the ANGLE library (https://code.google.com/p/angleproject/)
|
||||
If an OpenGL ES 2.x context is requested and no WGL_EXT_create_context_es2_profile
|
||||
extension is found, SDL will try to load the libEGL.dll library provided by
|
||||
ANGLE.
|
||||
To obtain the ANGLE binaries, you can either compile from source from
|
||||
https://chromium.googlesource.com/angle/angle or copy the relevant binaries from
|
||||
a recent Chrome/Chromium install for Windows. The files you need are:
|
||||
The other method involves using the
|
||||
[ANGLE library](https://code.google.com/p/angleproject/). If an OpenGL ES 2.x
|
||||
context is requested and no WGL_EXT_create_context_es2_profile extension is
|
||||
found, SDL will try to load the libEGL.dll library provided by ANGLE.
|
||||
|
||||
* libEGL.dll
|
||||
* libGLESv2.dll
|
||||
* d3dcompiler_46.dll (supports Windows Vista or later, better shader compiler)
|
||||
or...
|
||||
* d3dcompiler_43.dll (supports Windows XP or later)
|
||||
To obtain the ANGLE binaries, you can either compile from source from
|
||||
https://chromium.googlesource.com/angle/angle or copy the relevant binaries
|
||||
from a recent Chrome/Chromium install for Windows. The files you need are:
|
||||
|
||||
- libEGL.dll
|
||||
- libGLESv2.dll
|
||||
- d3dcompiler_46.dll (supports Windows Vista or later, better shader
|
||||
compiler) *or* d3dcompiler_43.dll (supports Windows XP or later)
|
||||
|
||||
If you compile ANGLE from source, you can configure it so it does not need the
|
||||
d3dcompiler_* DLL at all (for details on this, see their documentation).
|
||||
However, by default SDL will try to preload the d3dcompiler_46.dll to
|
||||
comply with ANGLE's requirements. If you wish SDL to preload d3dcompiler_43.dll (to
|
||||
support Windows XP) or to skip this step at all, you can use the
|
||||
SDL_HINT_VIDEO_WIN_D3DCOMPILER hint (see SDL_hints.h for more details).
|
||||
comply with ANGLE's requirements. If you wish SDL to preload
|
||||
d3dcompiler_43.dll (to support Windows XP) or to skip this step at all, you
|
||||
can use the SDL_HINT_VIDEO_WIN_D3DCOMPILER hint (see SDL_hints.h for more
|
||||
details).
|
||||
|
||||
Known Bugs:
|
||||
|
||||
* SDL_GL_SetSwapInterval is currently a no op when using ANGLE. It appears
|
||||
that there's a bug in the library which prevents the window contents from
|
||||
refreshing if this is set to anything other than the default value.
|
||||
- SDL_GL_SetSwapInterval is currently a no op when using ANGLE. It appears
|
||||
that there's a bug in the library which prevents the window contents from
|
||||
refreshing if this is set to anything other than the default value.
|
||||
|
||||
Vulkan Surface Support
|
||||
==============
|
||||
## Vulkan Surface Support
|
||||
|
||||
Support for creating Vulkan surfaces is configured on by default. To disable
|
||||
it change the value of `SDL_VIDEO_VULKAN` to 0 in `SDL_config_windows.h`. You
|
||||
must install the [Vulkan SDK](https://www.lunarg.com/vulkan-sdk/) in order to
|
||||
use Vulkan graphics in your application.
|
||||
|
||||
Support for creating Vulkan surfaces is configured on by default. To disable it change the value of `SDL_VIDEO_VULKAN` to 0 in `SDL_config_windows.h`. You must install the [Vulkan SDK](https://www.lunarg.com/vulkan-sdk/) in order to use Vulkan graphics in your application.
|
||||
|
|
|
@ -5,47 +5,21 @@ This port allows SDL applications to run on Microsoft's platforms that require
|
|||
use of "Windows Runtime", aka. "WinRT", APIs. Microsoft may, in some cases,
|
||||
refer to them as either "Windows Store", or for Windows 10, "UWP" apps.
|
||||
|
||||
Some of the operating systems that include WinRT, are:
|
||||
|
||||
* Windows 10, via its Universal Windows Platform (UWP) APIs
|
||||
* Windows 8.x
|
||||
* Windows RT 8.x (aka. Windows 8.x for ARM processors)
|
||||
* Windows Phone 8.x
|
||||
In the past, SDL has supported Windows RT 8.x, Windows Phone, etc, but in
|
||||
modern times this port is focused on UWP apps, which run on Windows 10,
|
||||
and modern Xbox consoles.
|
||||
|
||||
|
||||
Requirements
|
||||
------------
|
||||
|
||||
* Microsoft Visual C++ (aka Visual Studio), either 2017, 2015, 2013, or 2012
|
||||
* Microsoft Visual C++ (aka Visual Studio) 2019.
|
||||
- Free, "Community" or "Express" editions may be used, so long as they
|
||||
include support for either "Windows Store" or "Windows Phone" apps.
|
||||
include support for either "Windows Store" or "Windows Phone" apps.
|
||||
"Express" versions marked as supporting "Windows Desktop" development
|
||||
typically do not include support for creating WinRT apps, to note.
|
||||
(The "Community" editions of Visual C++ do, however, support both
|
||||
desktop/Win32 and WinRT development).
|
||||
- Visual Studio 2017 can be used, however it is recommended that you install
|
||||
the Visual C++ 2015 build tools. These build tools can be installed
|
||||
using VS 2017's installer. Be sure to also install the workload for
|
||||
"Universal Windows Platform development", its optional component, the
|
||||
"C++ Universal Windows Platform tools", and for UWP / Windows 10
|
||||
development, the "Windows 10 SDK (10.0.10240.0)". Please note that
|
||||
targeting UWP / Windows 10 apps from development machine(s) running
|
||||
earlier versions of Windows, such as Windows 7, is not always supported
|
||||
by Visual Studio, and you may get error(s) when attempting to do so.
|
||||
- Visual C++ 2012 can only build apps that target versions 8.0 of Windows,
|
||||
or Windows Phone. 8.0-targeted apps will run on devices running 8.1
|
||||
editions of Windows, however they will not be able to take advantage of
|
||||
8.1-specific features.
|
||||
- Visual C++ 2013 cannot create app projects that target Windows 8.0.
|
||||
Visual C++ 2013 Update 4, can create app projects for Windows Phone 8.0,
|
||||
Windows Phone 8.1, and Windows 8.1, but not Windows 8.0. An optional
|
||||
Visual Studio add-in, "Tools for Maintaining Store apps for Windows 8",
|
||||
allows Visual C++ 2013 to load and build Windows 8.0 projects that were
|
||||
created with Visual C++ 2012, so long as Visual C++ 2012 is installed
|
||||
on the same machine. More details on targeting different versions of
|
||||
Windows can found at the following web pages:
|
||||
- [Develop apps by using Visual Studio 2013](http://msdn.microsoft.com/en-us/library/windows/apps/br211384.aspx)
|
||||
- [To add the Tools for Maintaining Store apps for Windows 8](http://msdn.microsoft.com/en-us/library/windows/apps/dn263114.aspx#AddMaintenanceTools)
|
||||
* A valid Microsoft account - This requirement is not imposed by SDL, but
|
||||
rather by Microsoft's Visual C++ toolchain. This is required to launch or
|
||||
debug apps.
|
||||
|
@ -57,7 +31,7 @@ Status
|
|||
Here is a rough list of what works, and what doesn't:
|
||||
|
||||
* What works:
|
||||
* compilation via Visual C++ 2012 through 2015
|
||||
* compilation via Visual C++ 2019.
|
||||
* compile-time platform detection for SDL programs. The C/C++ #define,
|
||||
`__WINRT__`, will be set to 1 (by SDL) when compiling for WinRT.
|
||||
* GPU-accelerated 2D rendering, via SDL_Renderer.
|
||||
|
@ -234,13 +208,8 @@ To set this up for SDL/WinRT, you'll need to run through the following steps:
|
|||
"Solution Explorer")
|
||||
2. right click on your app's solution.
|
||||
3. navigate to "Add", then to "Existing Project..."
|
||||
4. find SDL/WinRT's Visual C++ project file and open it. Different project
|
||||
files exist for different WinRT platforms. All of them are in SDL's
|
||||
source distribution, in the following directories:
|
||||
* `VisualC-WinRT/UWP_VS2015/` - for Windows 10 / UWP apps
|
||||
* `VisualC-WinRT/WinPhone81_VS2013/` - for Windows Phone 8.1 apps
|
||||
* `VisualC-WinRT/WinRT80_VS2012/` - for Windows 8.0 apps
|
||||
* `VisualC-WinRT/WinRT81_VS2013/` - for Windows 8.1 apps
|
||||
4. find SDL/WinRT's Visual C++ project file and open it, in the `VisualC-WinRT`
|
||||
directory.
|
||||
5. once the project has been added, right-click on your app's project and
|
||||
select, "References..."
|
||||
6. click on the button titled, "Add New Reference..."
|
||||
|
|
|
@ -1,12 +1,6 @@
|
|||
Simple DirectMedia Layer {#mainpage}
|
||||
========================
|
||||
# Simple DirectMedia Layer
|
||||
|
||||
(SDL)
|
||||
|
||||
Version 2.0
|
||||
|
||||
---
|
||||
http://www.libsdl.org/
|
||||
https://www.libsdl.org/
|
||||
|
||||
Simple DirectMedia Layer is a cross-platform development library designed
|
||||
to provide low level access to audio, keyboard, mouse, joystick, and graphics
|
||||
|
@ -14,7 +8,7 @@ hardware via OpenGL and Direct3D. It is used by video playback software,
|
|||
emulators, and popular games including Valve's award winning catalog
|
||||
and many Humble Bundle games.
|
||||
|
||||
SDL officially supports Windows, Mac OS X, Linux, iOS, and Android.
|
||||
SDL officially supports Windows, macOS, Linux, iOS, and Android.
|
||||
Support for other platforms may be found in the source code.
|
||||
|
||||
SDL is written in C, works natively with C++, and there are bindings
|
||||
|
@ -34,23 +28,27 @@ More documentation and FAQs are available online at [the wiki](http://wiki.libsd
|
|||
- [DirectFB](README-directfb.md)
|
||||
- [DynAPI](README-dynapi.md)
|
||||
- [Emscripten](README-emscripten.md)
|
||||
- [GDK](README-gdk.md)
|
||||
- [Gesture](README-gesture.md)
|
||||
- [Git](README-git.md)
|
||||
- [iOS](README-ios.md)
|
||||
- [Linux](README-linux.md)
|
||||
- [OS X](README-macosx.md)
|
||||
- [macOS](README-macos.md)
|
||||
- [OS/2](README-os2.md)
|
||||
- [Native Client](README-nacl.md)
|
||||
- [Pandora](README-pandora.md)
|
||||
- [Supported Platforms](README-platforms.md)
|
||||
- [Porting information](README-porting.md)
|
||||
- [PSP](README-psp.md)
|
||||
- [PS2](README-ps2.md)
|
||||
- [Raspberry Pi](README-raspberrypi.md)
|
||||
- [Touch](README-touch.md)
|
||||
- [Versions](README-versions.md)
|
||||
- [WinCE](README-wince.md)
|
||||
- [Windows](README-windows.md)
|
||||
- [WinRT](README-winrt.md)
|
||||
- [PSVita](README-vita.md)
|
||||
- [Nokia N-Gage](README-ngage.md)
|
||||
|
||||
If you need help with the library, or just want to discuss SDL related
|
||||
issues, you can join the [SDL Discourse](https://discourse.libsdl.org/),
|
||||
|
|
|
@ -640,6 +640,7 @@ EXCLUDE = ../include/SDL_opengles2_gl2ext.h \
|
|||
../include/SDL_opengles.h \
|
||||
../include/SDL_opengl.h \
|
||||
../include/SDL_egl.h \
|
||||
./release_checklist.md \
|
||||
|
||||
|
||||
# The EXCLUDE_SYMLINKS tag can be used select whether or not files or
|
||||
|
|
49
libs/SDL2/docs/release_checklist.md
Normal file
49
libs/SDL2/docs/release_checklist.md
Normal file
|
@ -0,0 +1,49 @@
|
|||
# Release checklist
|
||||
|
||||
When changing the version, run `build-scripts/update-version.sh X Y Z`,
|
||||
where `X Y Z` are the major version, minor version, and patch level. So
|
||||
`2 28 1` means "change the version to 2.28.1". This script does much of the
|
||||
mechanical work.
|
||||
|
||||
|
||||
## New feature release
|
||||
|
||||
* Update `WhatsNew.txt`
|
||||
|
||||
* Bump version number to 2.EVEN.0:
|
||||
|
||||
* `./build-scripts/update-version.sh 2 EVEN 0`
|
||||
|
||||
* Do the release
|
||||
|
||||
* Update the website file include/header.inc.php to reflect the new version
|
||||
|
||||
## New bugfix release
|
||||
|
||||
* Check that no new API/ABI was added
|
||||
|
||||
* If it was, do a new feature release (see above) instead
|
||||
|
||||
* Bump version number from 2.Y.Z to 2.Y.(Z+1) (Y is even)
|
||||
|
||||
* `./build-scripts/update-version.sh 2 Y Z+1`
|
||||
|
||||
* Do the release
|
||||
|
||||
* Update the website file include/header.inc.php to reflect the new version
|
||||
|
||||
## After a feature release
|
||||
|
||||
* Create a branch like `release-2.24.x`
|
||||
|
||||
* Bump version number to 2.ODD.0 for next development branch
|
||||
|
||||
* `./build-scripts/update-version.sh 2 ODD 0`
|
||||
|
||||
## New development prerelease
|
||||
|
||||
* Bump version number from 2.Y.Z to 2.Y.(Z+1) (Y is odd)
|
||||
|
||||
* `./build-scripts/update-version.sh 2 Y Z+1`
|
||||
|
||||
* Do the release
|
Binary file not shown.
|
@ -1,6 +1,10 @@
|
|||
#!/bin/sh
|
||||
|
||||
prefix=/opt/local/i686-w64-mingw32
|
||||
# Get the canonical path of the folder containing this script
|
||||
bindir=$(cd -P -- "$(dirname -- "$0")" && printf '%s\n' "$(pwd -P)")
|
||||
|
||||
# Calculate the canonical path of the prefix, relative to the folder of this script
|
||||
prefix=$(cd -P -- "$bindir/.." && printf '%s\n' "$(pwd -P)")
|
||||
exec_prefix=${prefix}
|
||||
exec_prefix_set=no
|
||||
libdir=${exec_prefix}/lib
|
||||
|
@ -39,7 +43,7 @@ while test $# -gt 0; do
|
|||
echo $exec_prefix
|
||||
;;
|
||||
--version)
|
||||
echo 2.0.20
|
||||
echo 2.28.5
|
||||
;;
|
||||
--cflags)
|
||||
echo -I${prefix}/include/SDL2 -Dmain=SDL_main
|
||||
|
@ -49,7 +53,8 @@ while test $# -gt 0; do
|
|||
;;
|
||||
--static-libs)
|
||||
# --libs|--static-libs)
|
||||
echo -L${exec_prefix}/lib -lmingw32 -lSDL2main -lSDL2 -mwindows -Wl,--dynamicbase -Wl,--nxcompat -lm -ldinput8 -ldxguid -ldxerr8 -luser32 -lgdi32 -lwinmm -limm32 -lole32 -loleaut32 -lshell32 -lsetupapi -lversion -luuid
|
||||
sdl_static_libs=$(echo "-lmingw32 -lSDL2main -lSDL2 -mwindows -Wl,--dynamicbase -Wl,--nxcompat -lm -ldinput8 -ldxguid -ldxerr8 -luser32 -lgdi32 -lwinmm -limm32 -lole32 -loleaut32 -lshell32 -lsetupapi -lversion -luuid" | sed -E "s#-lSDL2[ $]#$libdir/libSDL2.a #g")
|
||||
echo -L${exec_prefix}/lib $sdl_static_libs
|
||||
;;
|
||||
*)
|
||||
echo "${usage}" 1>&2
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2023 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
@ -41,6 +41,7 @@
|
|||
#include "SDL_events.h"
|
||||
#include "SDL_filesystem.h"
|
||||
#include "SDL_gamecontroller.h"
|
||||
#include "SDL_guid.h"
|
||||
#include "SDL_haptic.h"
|
||||
#include "SDL_hidapi.h"
|
||||
#include "SDL_hints.h"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2023 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
@ -22,7 +22,7 @@
|
|||
#ifndef SDL_assert_h_
|
||||
#define SDL_assert_h_
|
||||
|
||||
#include "SDL_config.h"
|
||||
#include "SDL_stdinc.h"
|
||||
|
||||
#include "begin_code.h"
|
||||
/* Set up for C function definitions, even when using C++ */
|
||||
|
@ -51,8 +51,12 @@ assert can have unique static variables associated with it.
|
|||
/* Don't include intrin.h here because it contains C++ code */
|
||||
extern void __cdecl __debugbreak(void);
|
||||
#define SDL_TriggerBreakpoint() __debugbreak()
|
||||
#elif _SDL_HAS_BUILTIN(__builtin_debugtrap)
|
||||
#define SDL_TriggerBreakpoint() __builtin_debugtrap()
|
||||
#elif ( (!defined(__NACL__)) && ((defined(__GNUC__) || defined(__clang__)) && (defined(__i386__) || defined(__x86_64__))) )
|
||||
#define SDL_TriggerBreakpoint() __asm__ __volatile__ ( "int $3\n\t" )
|
||||
#elif (defined(__GNUC__) || defined(__clang__)) && defined(__riscv)
|
||||
#define SDL_TriggerBreakpoint() __asm__ __volatile__ ( "ebreak\n\t" )
|
||||
#elif ( defined(__APPLE__) && (defined(__arm64__) || defined(__aarch64__)) ) /* this might work on other ARM targets, but this is a known quantity... */
|
||||
#define SDL_TriggerBreakpoint() __asm__ __volatile__ ( "brk #22\n\t" )
|
||||
#elif defined(__APPLE__) && defined(__arm__)
|
||||
|
@ -69,7 +73,7 @@ assert can have unique static variables associated with it.
|
|||
|
||||
#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) /* C99 supports __func__ as a standard. */
|
||||
# define SDL_FUNCTION __func__
|
||||
#elif ((__GNUC__ >= 2) || defined(_MSC_VER) || defined (__WATCOMC__))
|
||||
#elif ((defined(__GNUC__) && (__GNUC__ >= 2)) || defined(_MSC_VER) || defined (__WATCOMC__))
|
||||
# define SDL_FUNCTION __FUNCTION__
|
||||
#else
|
||||
# define SDL_FUNCTION "???"
|
||||
|
@ -123,12 +127,10 @@ typedef struct SDL_AssertData
|
|||
const struct SDL_AssertData *next;
|
||||
} SDL_AssertData;
|
||||
|
||||
#if (SDL_ASSERT_LEVEL > 0)
|
||||
|
||||
/* Never call this directly. Use the SDL_assert* macros. */
|
||||
extern DECLSPEC SDL_AssertState SDLCALL SDL_ReportAssertion(SDL_AssertData *,
|
||||
const char *,
|
||||
const char *, int)
|
||||
const char *,
|
||||
const char *, int)
|
||||
#if defined(__clang__)
|
||||
#if __has_feature(attribute_analyzer_noreturn)
|
||||
/* this tells Clang's static analysis that we're a custom assert function,
|
||||
|
@ -149,9 +151,7 @@ extern DECLSPEC SDL_AssertState SDLCALL SDL_ReportAssertion(SDL_AssertData *,
|
|||
#define SDL_enabled_assert(condition) \
|
||||
do { \
|
||||
while ( !(condition) ) { \
|
||||
static struct SDL_AssertData sdl_assert_data = { \
|
||||
0, 0, #condition, 0, 0, 0, 0 \
|
||||
}; \
|
||||
static struct SDL_AssertData sdl_assert_data = { 0, 0, #condition, 0, 0, 0, 0 }; \
|
||||
const SDL_AssertState sdl_assert_state = SDL_ReportAssertion(&sdl_assert_data, SDL_FUNCTION, SDL_FILE, SDL_LINE); \
|
||||
if (sdl_assert_state == SDL_ASSERTION_RETRY) { \
|
||||
continue; /* go again. */ \
|
||||
|
@ -162,8 +162,6 @@ extern DECLSPEC SDL_AssertState SDLCALL SDL_ReportAssertion(SDL_AssertData *,
|
|||
} \
|
||||
} while (SDL_NULL_WHILE_LOOP_CONDITION)
|
||||
|
||||
#endif /* enabled assertions support code */
|
||||
|
||||
/* Enable various levels of assertions. */
|
||||
#if SDL_ASSERT_LEVEL == 0 /* assertions disabled */
|
||||
# define SDL_assert(condition) SDL_disabled_assert(condition)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2023 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
@ -237,6 +237,25 @@ typedef void (*SDL_KernelMemoryBarrierFunc)();
|
|||
#endif
|
||||
#endif
|
||||
|
||||
/* "REP NOP" is PAUSE, coded for tools that don't know it by that name. */
|
||||
#if (defined(__GNUC__) || defined(__clang__)) && (defined(__i386__) || defined(__x86_64__))
|
||||
#define SDL_CPUPauseInstruction() __asm__ __volatile__("pause\n") /* Some assemblers can't do REP NOP, so go with PAUSE. */
|
||||
#elif (defined(__arm__) && defined(__ARM_ARCH) && __ARM_ARCH >= 7) || defined(__aarch64__)
|
||||
#define SDL_CPUPauseInstruction() __asm__ __volatile__("yield" ::: "memory")
|
||||
#elif (defined(__powerpc__) || defined(__powerpc64__))
|
||||
#define SDL_CPUPauseInstruction() __asm__ __volatile__("or 27,27,27");
|
||||
#elif defined(_MSC_VER) && (defined(_M_IX86) || defined(_M_X64))
|
||||
#define SDL_CPUPauseInstruction() _mm_pause() /* this is actually "rep nop" and not a SIMD instruction. No inline asm in MSVC x86-64! */
|
||||
#elif defined(_MSC_VER) && (defined(_M_ARM) || defined(_M_ARM64))
|
||||
#define SDL_CPUPauseInstruction() __yield()
|
||||
#elif defined(__WATCOMC__) && defined(__386__)
|
||||
extern __inline void SDL_CPUPauseInstruction(void);
|
||||
#pragma aux SDL_CPUPauseInstruction = ".686p" ".xmm2" "pause"
|
||||
#else
|
||||
#define SDL_CPUPauseInstruction()
|
||||
#endif
|
||||
|
||||
|
||||
/**
|
||||
* \brief A type representing an atomic integer value. It is a struct
|
||||
* so people don't accidentally use numeric operations on it.
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2023 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
@ -169,13 +169,13 @@ typedef void (SDLCALL * SDL_AudioCallback) (void *userdata, Uint8 * stream,
|
|||
* The calculated values in this structure are calculated by SDL_OpenAudio().
|
||||
*
|
||||
* For multi-channel audio, the default SDL channel mapping is:
|
||||
* 2: FL FR (stereo)
|
||||
* 3: FL FR LFE (2.1 surround)
|
||||
* 4: FL FR BL BR (quad)
|
||||
* 5: FL FR FC BL BR (quad + center)
|
||||
* 6: FL FR FC LFE SL SR (5.1 surround - last two can also be BL BR)
|
||||
* 7: FL FR FC LFE BC SL SR (6.1 surround)
|
||||
* 8: FL FR FC LFE BL BR SL SR (7.1 surround)
|
||||
* 2: FL FR (stereo)
|
||||
* 3: FL FR LFE (2.1 surround)
|
||||
* 4: FL FR BL BR (quad)
|
||||
* 5: FL FR LFE BL BR (4.1 surround)
|
||||
* 6: FL FR FC LFE SL SR (5.1 surround - last two can also be BL BR)
|
||||
* 7: FL FR FC LFE BC SL SR (6.1 surround)
|
||||
* 8: FL FR FC LFE BL BR SL SR (7.1 surround)
|
||||
*/
|
||||
typedef struct SDL_AudioSpec
|
||||
{
|
||||
|
@ -487,6 +487,7 @@ extern DECLSPEC int SDLCALL SDL_GetNumAudioDevices(int iscapture);
|
|||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_GetNumAudioDevices
|
||||
* \sa SDL_GetDefaultAudioInfo
|
||||
*/
|
||||
extern DECLSPEC const char *SDLCALL SDL_GetAudioDeviceName(int index,
|
||||
int iscapture);
|
||||
|
@ -500,9 +501,7 @@ extern DECLSPEC const char *SDLCALL SDL_GetAudioDeviceName(int index,
|
|||
* hardware.
|
||||
*
|
||||
* `spec` will be filled with the sample rate, sample format, and channel
|
||||
* count. All other values in the structure are filled with 0. When the
|
||||
* supported struct members are 0, SDL was unable to get the property from the
|
||||
* backend.
|
||||
* count.
|
||||
*
|
||||
* \param index the index of the audio device; valid values range from 0 to
|
||||
* SDL_GetNumAudioDevices() - 1
|
||||
|
@ -514,12 +513,48 @@ extern DECLSPEC const char *SDLCALL SDL_GetAudioDeviceName(int index,
|
|||
* \since This function is available since SDL 2.0.16.
|
||||
*
|
||||
* \sa SDL_GetNumAudioDevices
|
||||
* \sa SDL_GetDefaultAudioInfo
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_GetAudioDeviceSpec(int index,
|
||||
int iscapture,
|
||||
SDL_AudioSpec *spec);
|
||||
|
||||
|
||||
/**
|
||||
* Get the name and preferred format of the default audio device.
|
||||
*
|
||||
* Some (but not all!) platforms have an isolated mechanism to get information
|
||||
* about the "default" device. This can actually be a completely different
|
||||
* device that's not in the list you get from SDL_GetAudioDeviceSpec(). It can
|
||||
* even be a network address! (This is discussed in SDL_OpenAudioDevice().)
|
||||
*
|
||||
* As a result, this call is not guaranteed to be performant, as it can query
|
||||
* the sound server directly every time, unlike the other query functions. You
|
||||
* should call this function sparingly!
|
||||
*
|
||||
* `spec` will be filled with the sample rate, sample format, and channel
|
||||
* count, if a default device exists on the system. If `name` is provided,
|
||||
* will be filled with either a dynamically-allocated UTF-8 string or NULL.
|
||||
*
|
||||
* \param name A pointer to be filled with the name of the default device (can
|
||||
* be NULL). Please call SDL_free() when you are done with this
|
||||
* pointer!
|
||||
* \param spec The SDL_AudioSpec to be initialized by this function.
|
||||
* \param iscapture non-zero to query the default recording device, zero to
|
||||
* query the default output device.
|
||||
* \returns 0 on success, nonzero on error
|
||||
*
|
||||
* \since This function is available since SDL 2.24.0.
|
||||
*
|
||||
* \sa SDL_GetAudioDeviceName
|
||||
* \sa SDL_GetAudioDeviceSpec
|
||||
* \sa SDL_OpenAudioDevice
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_GetDefaultAudioInfo(char **name,
|
||||
SDL_AudioSpec *spec,
|
||||
int iscapture);
|
||||
|
||||
|
||||
/**
|
||||
* Open a specific audio device.
|
||||
*
|
||||
|
@ -586,6 +621,7 @@ extern DECLSPEC int SDLCALL SDL_GetAudioDeviceSpec(int index,
|
|||
* - `SDL_AUDIO_ALLOW_FREQUENCY_CHANGE`
|
||||
* - `SDL_AUDIO_ALLOW_FORMAT_CHANGE`
|
||||
* - `SDL_AUDIO_ALLOW_CHANNELS_CHANGE`
|
||||
* - `SDL_AUDIO_ALLOW_SAMPLES_CHANGE`
|
||||
* - `SDL_AUDIO_ALLOW_ANY_CHANGE`
|
||||
*
|
||||
* These flags specify how SDL should behave when a device cannot offer a
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2023 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2023 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
@ -52,7 +52,7 @@ typedef enum
|
|||
dstA = dstA */
|
||||
SDL_BLENDMODE_MUL = 0x00000008, /**< color multiply
|
||||
dstRGB = (srcRGB * dstRGB) + (dstRGB * (1-srcA))
|
||||
dstA = (srcA * dstA) + (dstA * (1-srcA)) */
|
||||
dstA = dstA */
|
||||
SDL_BLENDMODE_INVALID = 0x7FFFFFFF
|
||||
|
||||
/* Additional custom blend modes can be returned by SDL_ComposeCustomBlendMode() */
|
||||
|
@ -67,9 +67,8 @@ typedef enum
|
|||
SDL_BLENDOPERATION_ADD = 0x1, /**< dst + src: supported by all renderers */
|
||||
SDL_BLENDOPERATION_SUBTRACT = 0x2, /**< dst - src : supported by D3D9, D3D11, OpenGL, OpenGLES */
|
||||
SDL_BLENDOPERATION_REV_SUBTRACT = 0x3, /**< src - dst : supported by D3D9, D3D11, OpenGL, OpenGLES */
|
||||
SDL_BLENDOPERATION_MINIMUM = 0x4, /**< min(dst, src) : supported by D3D11 */
|
||||
SDL_BLENDOPERATION_MAXIMUM = 0x5 /**< max(dst, src) : supported by D3D11 */
|
||||
|
||||
SDL_BLENDOPERATION_MINIMUM = 0x4, /**< min(dst, src) : supported by D3D9, D3D11 */
|
||||
SDL_BLENDOPERATION_MAXIMUM = 0x5 /**< max(dst, src) : supported by D3D9, D3D11 */
|
||||
} SDL_BlendOperation;
|
||||
|
||||
/**
|
||||
|
@ -87,7 +86,6 @@ typedef enum
|
|||
SDL_BLENDFACTOR_ONE_MINUS_DST_COLOR = 0x8, /**< 1-dstR, 1-dstG, 1-dstB, 1-dstA */
|
||||
SDL_BLENDFACTOR_DST_ALPHA = 0x9, /**< dstA, dstA, dstA, dstA */
|
||||
SDL_BLENDFACTOR_ONE_MINUS_DST_ALPHA = 0xA /**< 1-dstA, 1-dstA, 1-dstA, 1-dstA */
|
||||
|
||||
} SDL_BlendFactor;
|
||||
|
||||
/**
|
||||
|
@ -135,10 +133,10 @@ typedef enum
|
|||
* SDL 2.0.6. All renderers support the four blend modes listed in the
|
||||
* SDL_BlendMode enumeration.
|
||||
*
|
||||
* - **direct3d**: Supports `SDL_BLENDOPERATION_ADD` with all factors.
|
||||
* - **direct3d11**: Supports all operations with all factors. However, some
|
||||
* - **direct3d**: Supports all operations with all factors. However, some
|
||||
* factors produce unexpected results with `SDL_BLENDOPERATION_MINIMUM` and
|
||||
* `SDL_BLENDOPERATION_MAXIMUM`.
|
||||
* - **direct3d11**: Same as Direct3D 9.
|
||||
* - **opengl**: Supports the `SDL_BLENDOPERATION_ADD` operation with all
|
||||
* factors. OpenGL versions 1.1, 1.2, and 1.3 do not work correctly with SDL
|
||||
* 2.0.6.
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2023 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
@ -82,6 +82,53 @@ extern DECLSPEC char * SDLCALL SDL_GetClipboardText(void);
|
|||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_HasClipboardText(void);
|
||||
|
||||
/**
|
||||
* Put UTF-8 text into the primary selection.
|
||||
*
|
||||
* \param text the text to store in the primary selection
|
||||
* \returns 0 on success or a negative error code on failure; call
|
||||
* SDL_GetError() for more information.
|
||||
*
|
||||
* \since This function is available since SDL 2.26.0.
|
||||
*
|
||||
* \sa SDL_GetPrimarySelectionText
|
||||
* \sa SDL_HasPrimarySelectionText
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_SetPrimarySelectionText(const char *text);
|
||||
|
||||
/**
|
||||
* Get UTF-8 text from the primary selection, which must be freed with
|
||||
* SDL_free().
|
||||
*
|
||||
* This functions returns empty string if there was not enough memory left for
|
||||
* a copy of the primary selection's content.
|
||||
*
|
||||
* \returns the primary selection text on success or an empty string on
|
||||
* failure; call SDL_GetError() for more information. Caller must
|
||||
* call SDL_free() on the returned pointer when done with it (even if
|
||||
* there was an error).
|
||||
*
|
||||
* \since This function is available since SDL 2.26.0.
|
||||
*
|
||||
* \sa SDL_HasPrimarySelectionText
|
||||
* \sa SDL_SetPrimarySelectionText
|
||||
*/
|
||||
extern DECLSPEC char * SDLCALL SDL_GetPrimarySelectionText(void);
|
||||
|
||||
/**
|
||||
* Query whether the primary selection exists and contains a non-empty text
|
||||
* string.
|
||||
*
|
||||
* \returns SDL_TRUE if the primary selection has text, or SDL_FALSE if it
|
||||
* does not.
|
||||
*
|
||||
* \since This function is available since SDL 2.26.0.
|
||||
*
|
||||
* \sa SDL_GetPrimarySelectionText
|
||||
* \sa SDL_SetPrimarySelectionText
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_HasPrimarySelectionText(void);
|
||||
|
||||
|
||||
/* Ends C function definitions when using C++ */
|
||||
#ifdef __cplusplus
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2023 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
@ -38,12 +38,23 @@
|
|||
#include <winsdkver.h>
|
||||
#endif
|
||||
|
||||
/* sdkddkver.h defines more specific SDK version numbers. This is needed because older versions of the
|
||||
* Windows 10 SDK have broken declarations for the C API for DirectX 12. */
|
||||
#if !defined(HAVE_SDKDDKVER_H) && defined(__has_include)
|
||||
#if __has_include(<sdkddkver.h>)
|
||||
#define HAVE_SDKDDKVER_H 1
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_SDKDDKVER_H
|
||||
#include <sdkddkver.h>
|
||||
#endif
|
||||
|
||||
/* This is a set of defines to configure the SDL features */
|
||||
|
||||
#if !defined(_STDINT_H_) && (!defined(HAVE_STDINT_H) || !_HAVE_STDINT_H)
|
||||
#if defined(__GNUC__) || defined(__DMC__) || defined(__WATCOMC__) || defined(__clang__) || defined(__BORLANDC__) || defined(__CODEGEARC__)
|
||||
#define HAVE_STDINT_H 1
|
||||
#elif defined(_MSC_VER)
|
||||
#if !defined(HAVE_STDINT_H) && !defined(_STDINT_H_)
|
||||
/* Most everything except Visual Studio 2008 and earlier has stdint.h now */
|
||||
#if defined(_MSC_VER) && (_MSC_VER < 1600)
|
||||
typedef signed __int8 int8_t;
|
||||
typedef unsigned __int8 uint8_t;
|
||||
typedef signed __int16 int16_t;
|
||||
|
@ -60,28 +71,9 @@ typedef unsigned int uintptr_t;
|
|||
#endif
|
||||
#define _UINTPTR_T_DEFINED
|
||||
#endif
|
||||
/* Older Visual C++ headers don't have the Win64-compatible typedefs... */
|
||||
#if ((_MSC_VER <= 1200) && (!defined(DWORD_PTR)))
|
||||
#define DWORD_PTR DWORD
|
||||
#endif
|
||||
#if ((_MSC_VER <= 1200) && (!defined(LONG_PTR)))
|
||||
#define LONG_PTR LONG
|
||||
#endif
|
||||
#else /* !__GNUC__ && !_MSC_VER */
|
||||
typedef signed char int8_t;
|
||||
typedef unsigned char uint8_t;
|
||||
typedef signed short int16_t;
|
||||
typedef unsigned short uint16_t;
|
||||
typedef signed int int32_t;
|
||||
typedef unsigned int uint32_t;
|
||||
typedef signed long long int64_t;
|
||||
typedef unsigned long long uint64_t;
|
||||
#ifndef _SIZE_T_DEFINED_
|
||||
#define _SIZE_T_DEFINED_
|
||||
typedef unsigned int size_t;
|
||||
#endif
|
||||
typedef unsigned int uintptr_t;
|
||||
#endif /* __GNUC__ || _MSC_VER */
|
||||
#else
|
||||
#define HAVE_STDINT_H 1
|
||||
#endif /* Visual Studio 2008 */
|
||||
#endif /* !_STDINT_H_ && !HAVE_STDINT_H */
|
||||
|
||||
#ifdef _WIN64
|
||||
|
@ -90,9 +82,14 @@ typedef unsigned int uintptr_t;
|
|||
# define SIZEOF_VOIDP 4
|
||||
#endif
|
||||
|
||||
#ifdef __clang__
|
||||
# define HAVE_GCC_ATOMICS 1
|
||||
#endif
|
||||
|
||||
#define HAVE_DDRAW_H 1
|
||||
#define HAVE_DINPUT_H 1
|
||||
#define HAVE_DSOUND_H 1
|
||||
#ifndef __WATCOMC__
|
||||
#define HAVE_DXGI_H 1
|
||||
#define HAVE_XINPUT_H 1
|
||||
#if defined(_WIN32_MAXVER) && _WIN32_MAXVER >= 0x0A00 /* Windows 10 SDK */
|
||||
|
@ -100,11 +97,19 @@ typedef unsigned int uintptr_t;
|
|||
#endif
|
||||
#if defined(_WIN32_MAXVER) && _WIN32_MAXVER >= 0x0602 /* Windows 8 SDK */
|
||||
#define HAVE_D3D11_H 1
|
||||
#define HAVE_ROAPI_H 1
|
||||
#endif
|
||||
#if defined(WDK_NTDDI_VERSION) && WDK_NTDDI_VERSION > 0x0A000008 /* 10.0.19041.0 */
|
||||
#define HAVE_D3D12_H 1
|
||||
#endif
|
||||
#if defined(_WIN32_MAXVER) && _WIN32_MAXVER >= 0x0603 /* Windows 8.1 SDK */
|
||||
#define HAVE_SHELLSCALINGAPI_H 1
|
||||
#endif
|
||||
#define HAVE_MMDEVICEAPI_H 1
|
||||
#define HAVE_AUDIOCLIENT_H 1
|
||||
#define HAVE_TPCSHRD_H 1
|
||||
#define HAVE_SENSORSAPI_H 1
|
||||
#endif
|
||||
#if (defined(_M_IX86) || defined(_M_X64) || defined(_M_AMD64)) && (defined(_MSC_VER) && _MSC_VER >= 1600)
|
||||
#define HAVE_IMMINTRIN_H 1
|
||||
#elif defined(__has_include) && (defined(__i386__) || defined(__x86_64))
|
||||
|
@ -131,7 +136,11 @@ typedef unsigned int uintptr_t;
|
|||
#define HAVE_REALLOC 1
|
||||
#define HAVE_FREE 1
|
||||
#define HAVE_ALLOCA 1
|
||||
/* OpenWatcom requires specific calling conventions for qsort and bsearch */
|
||||
#ifndef __WATCOMC__
|
||||
#define HAVE_QSORT 1
|
||||
#define HAVE_BSEARCH 1
|
||||
#endif
|
||||
#define HAVE_ABS 1
|
||||
#define HAVE_MEMSET 1
|
||||
#define HAVE_MEMCPY 1
|
||||
|
@ -162,37 +171,40 @@ typedef unsigned int uintptr_t;
|
|||
#define HAVE__WCSNICMP 1
|
||||
#define HAVE__WCSDUP 1
|
||||
#define HAVE_ACOS 1
|
||||
#define HAVE_ACOSF 1
|
||||
#define HAVE_ASIN 1
|
||||
#define HAVE_ASINF 1
|
||||
#define HAVE_ATAN 1
|
||||
#define HAVE_ATANF 1
|
||||
#define HAVE_ATAN2 1
|
||||
#define HAVE_CEIL 1
|
||||
#define HAVE_COS 1
|
||||
#define HAVE_EXP 1
|
||||
#define HAVE_FABS 1
|
||||
#define HAVE_FLOOR 1
|
||||
#define HAVE_FMOD 1
|
||||
#define HAVE_LOG 1
|
||||
#define HAVE_LOG10 1
|
||||
#define HAVE_POW 1
|
||||
#define HAVE_SIN 1
|
||||
#define HAVE_SQRT 1
|
||||
#define HAVE_TAN 1
|
||||
#ifndef __WATCOMC__
|
||||
#define HAVE_ACOSF 1
|
||||
#define HAVE_ASINF 1
|
||||
#define HAVE_ATANF 1
|
||||
#define HAVE_ATAN2F 1
|
||||
#define HAVE_CEILF 1
|
||||
#define HAVE__COPYSIGN 1
|
||||
#define HAVE_COS 1
|
||||
#define HAVE_COSF 1
|
||||
#define HAVE_EXP 1
|
||||
#define HAVE_EXPF 1
|
||||
#define HAVE_FABS 1
|
||||
#define HAVE_FABSF 1
|
||||
#define HAVE_FLOOR 1
|
||||
#define HAVE_FLOORF 1
|
||||
#define HAVE_FMOD 1
|
||||
#define HAVE_FMODF 1
|
||||
#define HAVE_LOG 1
|
||||
#define HAVE_LOGF 1
|
||||
#define HAVE_LOG10 1
|
||||
#define HAVE_LOG10F 1
|
||||
#define HAVE_POW 1
|
||||
#define HAVE_POWF 1
|
||||
#define HAVE_SIN 1
|
||||
#define HAVE_SINF 1
|
||||
#define HAVE_SQRT 1
|
||||
#define HAVE_SQRTF 1
|
||||
#define HAVE_TAN 1
|
||||
#define HAVE_TANF 1
|
||||
#endif
|
||||
#if defined(_MSC_VER)
|
||||
/* These functions were added with the VC++ 2013 C runtime library */
|
||||
#if _MSC_VER >= 1800
|
||||
|
@ -212,8 +224,18 @@ typedef unsigned int uintptr_t;
|
|||
#if _MSC_VER >= 1400
|
||||
#define HAVE__FSEEKI64 1
|
||||
#endif
|
||||
#ifdef _USE_MATH_DEFINES
|
||||
#define HAVE_M_PI 1
|
||||
#endif
|
||||
#if !defined(_MSC_VER) || defined(_USE_MATH_DEFINES)
|
||||
#elif defined(__WATCOMC__)
|
||||
#define HAVE__FSEEKI64 1
|
||||
#define HAVE_STRTOLL 1
|
||||
#define HAVE_STRTOULL 1
|
||||
#define HAVE_VSSCANF 1
|
||||
#define HAVE_ROUND 1
|
||||
#define HAVE_SCALBN 1
|
||||
#define HAVE_TRUNC 1
|
||||
#else
|
||||
#define HAVE_M_PI 1
|
||||
#endif
|
||||
#else
|
||||
|
@ -222,7 +244,9 @@ typedef unsigned int uintptr_t;
|
|||
#endif
|
||||
|
||||
/* Enable various audio drivers */
|
||||
#if defined(HAVE_MMDEVICEAPI_H) && defined(HAVE_AUDIOCLIENT_H)
|
||||
#define SDL_AUDIO_DRIVER_WASAPI 1
|
||||
#endif
|
||||
#define SDL_AUDIO_DRIVER_DSOUND 1
|
||||
#define SDL_AUDIO_DRIVER_WINMM 1
|
||||
#define SDL_AUDIO_DRIVER_DISK 1
|
||||
|
@ -243,7 +267,11 @@ typedef unsigned int uintptr_t;
|
|||
#define SDL_HAPTIC_XINPUT 1
|
||||
|
||||
/* Enable the sensor driver */
|
||||
#ifdef HAVE_SENSORSAPI_H
|
||||
#define SDL_SENSOR_WINDOWS 1
|
||||
#else
|
||||
#define SDL_SENSOR_DUMMY 1
|
||||
#endif
|
||||
|
||||
/* Enable various shared object loading systems */
|
||||
#define SDL_LOADSO_WINDOWS 1
|
||||
|
@ -265,6 +293,9 @@ typedef unsigned int uintptr_t;
|
|||
#if !defined(SDL_VIDEO_RENDER_D3D11) && defined(HAVE_D3D11_H)
|
||||
#define SDL_VIDEO_RENDER_D3D11 1
|
||||
#endif
|
||||
#if !defined(SDL_VIDEO_RENDER_D3D12) && defined(HAVE_D3D12_H)
|
||||
#define SDL_VIDEO_RENDER_D3D12 1
|
||||
#endif
|
||||
|
||||
/* Enable OpenGL support */
|
||||
#ifndef SDL_VIDEO_OPENGL
|
||||
|
@ -295,11 +326,6 @@ typedef unsigned int uintptr_t;
|
|||
/* Enable filesystem support */
|
||||
#define SDL_FILESYSTEM_WINDOWS 1
|
||||
|
||||
/* Enable assembly routines (Win64 doesn't have inline asm) */
|
||||
#ifndef _WIN64
|
||||
#define SDL_ASSEMBLY_ROUTINES 1
|
||||
#endif
|
||||
|
||||
#endif /* SDL_config_windows_h_ */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2023 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
@ -79,7 +79,7 @@ _m_prefetch(void *__P)
|
|||
#if !defined(SDL_DISABLE_ARM_NEON_H)
|
||||
# if defined(__ARM_NEON)
|
||||
# include <arm_neon.h>
|
||||
# elif defined(__WINDOWS__) || defined(__WINRT__)
|
||||
# elif defined(__WINDOWS__) || defined(__WINRT__) || defined(__GDK__)
|
||||
/* Visual Studio doesn't define __ARM_ARCH, but _M_ARM (if set, always 7), and _M_ARM64 (if set, always 1). */
|
||||
# if defined(_M_ARM)
|
||||
# include <armintr.h>
|
||||
|
@ -90,6 +90,7 @@ _m_prefetch(void *__P)
|
|||
# include <arm64intr.h>
|
||||
# include <arm64_neon.h>
|
||||
# define __ARM_NEON 1 /* Set __ARM_NEON so that it can be used elsewhere, at compile time */
|
||||
# define __ARM_ARCH 8
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
@ -98,6 +99,14 @@ _m_prefetch(void *__P)
|
|||
#if defined(__3dNOW__) && !defined(SDL_DISABLE_MM3DNOW_H)
|
||||
#include <mm3dnow.h>
|
||||
#endif
|
||||
#if defined(__loongarch_sx) && !defined(SDL_DISABLE_LSX_H)
|
||||
#include <lsxintrin.h>
|
||||
#define __LSX__
|
||||
#endif
|
||||
#if defined(__loongarch_asx) && !defined(SDL_DISABLE_LASX_H)
|
||||
#include <lasxintrin.h>
|
||||
#define __LASX__
|
||||
#endif
|
||||
#if defined(HAVE_IMMINTRIN_H) && !defined(SDL_DISABLE_IMMINTRIN_H)
|
||||
#include <immintrin.h>
|
||||
#else
|
||||
|
@ -433,10 +442,36 @@ extern DECLSPEC SDL_bool SDLCALL SDL_HasARMSIMD(void);
|
|||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_HasNEON(void);
|
||||
|
||||
/**
|
||||
* Determine whether the CPU has LSX (LOONGARCH SIMD) features.
|
||||
*
|
||||
* This always returns false on CPUs that aren't using LOONGARCH instruction
|
||||
* sets.
|
||||
*
|
||||
* \returns SDL_TRUE if the CPU has LOONGARCH LSX features or SDL_FALSE if
|
||||
* not.
|
||||
*
|
||||
* \since This function is available since SDL 2.24.0.
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_HasLSX(void);
|
||||
|
||||
/**
|
||||
* Determine whether the CPU has LASX (LOONGARCH SIMD) features.
|
||||
*
|
||||
* This always returns false on CPUs that aren't using LOONGARCH instruction
|
||||
* sets.
|
||||
*
|
||||
* \returns SDL_TRUE if the CPU has LOONGARCH LASX features or SDL_FALSE if
|
||||
* not.
|
||||
*
|
||||
* \since This function is available since SDL 2.24.0.
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_HasLASX(void);
|
||||
|
||||
/**
|
||||
* Get the amount of RAM configured in the system.
|
||||
*
|
||||
* \returns the amount of RAM configured in the system in MB.
|
||||
* \returns the amount of RAM configured in the system in MiB.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.1.
|
||||
*/
|
||||
|
@ -494,7 +529,7 @@ extern DECLSPEC size_t SDLCALL SDL_SIMDGetAlignment(void);
|
|||
*
|
||||
* \since This function is available since SDL 2.0.10.
|
||||
*
|
||||
* \sa SDL_SIMDAlignment
|
||||
* \sa SDL_SIMDGetAlignment
|
||||
* \sa SDL_SIMDRealloc
|
||||
* \sa SDL_SIMDFree
|
||||
*/
|
||||
|
@ -518,7 +553,7 @@ extern DECLSPEC void * SDLCALL SDL_SIMDAlloc(const size_t len);
|
|||
*
|
||||
* \since This function is available since SDL 2.0.14.
|
||||
*
|
||||
* \sa SDL_SIMDAlignment
|
||||
* \sa SDL_SIMDGetAlignment
|
||||
* \sa SDL_SIMDAlloc
|
||||
* \sa SDL_SIMDFree
|
||||
*/
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2023 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
@ -192,6 +192,20 @@ typedef int64_t khronos_int64_t;
|
|||
typedef uint64_t khronos_uint64_t;
|
||||
#define KHRONOS_SUPPORT_INT64 1
|
||||
#define KHRONOS_SUPPORT_FLOAT 1
|
||||
/*
|
||||
* To support platform where unsigned long cannot be used interchangeably with
|
||||
* inptr_t (e.g. CHERI-extended ISAs), we can use the stdint.h intptr_t.
|
||||
* Ideally, we could just use (u)intptr_t everywhere, but this could result in
|
||||
* ABI breakage if khronos_uintptr_t is changed from unsigned long to
|
||||
* unsigned long long or similar (this results in different C++ name mangling).
|
||||
* To avoid changes for existing platforms, we restrict usage of intptr_t to
|
||||
* platforms where the size of a pointer is larger than the size of long.
|
||||
*/
|
||||
#if defined(__SIZEOF_LONG__) && defined(__SIZEOF_POINTER__)
|
||||
#if __SIZEOF_POINTER__ > __SIZEOF_LONG__
|
||||
#define KHRONOS_USE_INTPTR_T
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#elif defined(__VMS ) || defined(__sgi)
|
||||
|
||||
|
@ -274,14 +288,21 @@ typedef unsigned short int khronos_uint16_t;
|
|||
* pointers are 64 bits, but 'long' is still 32 bits. Win64 appears
|
||||
* to be the only LLP64 architecture in current use.
|
||||
*/
|
||||
#ifdef _WIN64
|
||||
#ifdef KHRONOS_USE_INTPTR_T
|
||||
typedef intptr_t khronos_intptr_t;
|
||||
typedef uintptr_t khronos_uintptr_t;
|
||||
#elif defined(_WIN64)
|
||||
typedef signed long long int khronos_intptr_t;
|
||||
typedef unsigned long long int khronos_uintptr_t;
|
||||
typedef signed long long int khronos_ssize_t;
|
||||
typedef unsigned long long int khronos_usize_t;
|
||||
#else
|
||||
typedef signed long int khronos_intptr_t;
|
||||
typedef unsigned long int khronos_uintptr_t;
|
||||
#endif
|
||||
|
||||
#if defined(_WIN64)
|
||||
typedef signed long long int khronos_ssize_t;
|
||||
typedef unsigned long long int khronos_usize_t;
|
||||
#else
|
||||
typedef signed long int khronos_ssize_t;
|
||||
typedef unsigned long int khronos_usize_t;
|
||||
#endif
|
||||
|
@ -516,7 +537,7 @@ extern "C" {
|
|||
** used to make the header, and the header can be found at
|
||||
** http://www.khronos.org/registry/egl
|
||||
**
|
||||
** Khronos $Git commit SHA1: b35e89ca9a $ on $Git commit date: 2021-09-01 09:34:00 +0530 $
|
||||
** Khronos $Git commit SHA1: 6fb1daea15 $ on $Git commit date: 2022-05-25 09:41:13 -0600 $
|
||||
*/
|
||||
|
||||
/*#include <EGL/eglplatform.h>*/
|
||||
|
@ -525,7 +546,7 @@ extern "C" {
|
|||
#define EGL_EGL_PROTOTYPES 1
|
||||
#endif
|
||||
|
||||
/* Generated on date 20210901 */
|
||||
/* Generated on date 20220525 */
|
||||
|
||||
/* Generated C header for:
|
||||
* API: egl
|
||||
|
@ -860,12 +881,12 @@ extern "C" {
|
|||
** used to make the header, and the header can be found at
|
||||
** http://www.khronos.org/registry/egl
|
||||
**
|
||||
** Khronos $Git commit SHA1: b35e89ca9a $ on $Git commit date: 2021-09-01 09:34:00 +0530 $
|
||||
** Khronos $Git commit SHA1: 6fb1daea15 $ on $Git commit date: 2022-05-25 09:41:13 -0600 $
|
||||
*/
|
||||
|
||||
/*#include <EGL/eglplatform.h>*/
|
||||
|
||||
#define EGL_EGLEXT_VERSION 20210901
|
||||
#define EGL_EGLEXT_VERSION 20220525
|
||||
|
||||
/* Generated C header for:
|
||||
* API: egl
|
||||
|
@ -1569,6 +1590,10 @@ EGLAPI EGLBoolean EGLAPIENTRY eglQueryDeviceBinaryEXT (EGLDeviceEXT device, EGLi
|
|||
#define EGL_RENDERER_EXT 0x335F
|
||||
#endif /* EGL_EXT_device_query_name */
|
||||
|
||||
#ifndef EGL_EXT_explicit_device
|
||||
#define EGL_EXT_explicit_device 1
|
||||
#endif /* EGL_EXT_explicit_device */
|
||||
|
||||
#ifndef EGL_EXT_gl_colorspace_bt2020_linear
|
||||
#define EGL_EXT_gl_colorspace_bt2020_linear 1
|
||||
#define EGL_GL_COLORSPACE_BT2020_LINEAR_EXT 0x333F
|
||||
|
@ -1794,6 +1819,31 @@ EGLAPI EGLBoolean EGLAPIENTRY eglStreamConsumerOutputEXT (EGLDisplay dpy, EGLStr
|
|||
#define EGL_METADATA_SCALING_EXT 50000
|
||||
#endif /* EGL_EXT_surface_SMPTE2086_metadata */
|
||||
|
||||
#ifndef EGL_EXT_surface_compression
|
||||
#define EGL_EXT_surface_compression 1
|
||||
#define EGL_SURFACE_COMPRESSION_EXT 0x34B0
|
||||
#define EGL_SURFACE_COMPRESSION_PLANE1_EXT 0x328E
|
||||
#define EGL_SURFACE_COMPRESSION_PLANE2_EXT 0x328F
|
||||
#define EGL_SURFACE_COMPRESSION_FIXED_RATE_NONE_EXT 0x34B1
|
||||
#define EGL_SURFACE_COMPRESSION_FIXED_RATE_DEFAULT_EXT 0x34B2
|
||||
#define EGL_SURFACE_COMPRESSION_FIXED_RATE_1BPC_EXT 0x34B4
|
||||
#define EGL_SURFACE_COMPRESSION_FIXED_RATE_2BPC_EXT 0x34B5
|
||||
#define EGL_SURFACE_COMPRESSION_FIXED_RATE_3BPC_EXT 0x34B6
|
||||
#define EGL_SURFACE_COMPRESSION_FIXED_RATE_4BPC_EXT 0x34B7
|
||||
#define EGL_SURFACE_COMPRESSION_FIXED_RATE_5BPC_EXT 0x34B8
|
||||
#define EGL_SURFACE_COMPRESSION_FIXED_RATE_6BPC_EXT 0x34B9
|
||||
#define EGL_SURFACE_COMPRESSION_FIXED_RATE_7BPC_EXT 0x34BA
|
||||
#define EGL_SURFACE_COMPRESSION_FIXED_RATE_8BPC_EXT 0x34BB
|
||||
#define EGL_SURFACE_COMPRESSION_FIXED_RATE_9BPC_EXT 0x34BC
|
||||
#define EGL_SURFACE_COMPRESSION_FIXED_RATE_10BPC_EXT 0x34BD
|
||||
#define EGL_SURFACE_COMPRESSION_FIXED_RATE_11BPC_EXT 0x34BE
|
||||
#define EGL_SURFACE_COMPRESSION_FIXED_RATE_12BPC_EXT 0x34BF
|
||||
typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYSUPPORTEDCOMPRESSIONRATESEXTPROC) (EGLDisplay dpy, EGLConfig config, const EGLAttrib *attrib_list, EGLint *rates, EGLint rate_size, EGLint *num_rates);
|
||||
#ifdef EGL_EGLEXT_PROTOTYPES
|
||||
EGLAPI EGLBoolean EGLAPIENTRY eglQuerySupportedCompressionRatesEXT (EGLDisplay dpy, EGLConfig config, const EGLAttrib *attrib_list, EGLint *rates, EGLint rate_size, EGLint *num_rates);
|
||||
#endif
|
||||
#endif /* EGL_EXT_surface_compression */
|
||||
|
||||
#ifndef EGL_EXT_swap_buffers_with_damage
|
||||
#define EGL_EXT_swap_buffers_with_damage 1
|
||||
typedef EGLBoolean (EGLAPIENTRYP PFNEGLSWAPBUFFERSWITHDAMAGEEXTPROC) (EGLDisplay dpy, EGLSurface surface, const EGLint *rects, EGLint n_rects);
|
||||
|
@ -2028,12 +2078,12 @@ EGLAPI EGLBoolean EGLAPIENTRY eglPostSubBufferNV (EGLDisplay dpy, EGLSurface sur
|
|||
#define EGL_STREAM_IMAGE_ADD_NV 0x3374
|
||||
#define EGL_STREAM_IMAGE_REMOVE_NV 0x3375
|
||||
#define EGL_STREAM_IMAGE_AVAILABLE_NV 0x3376
|
||||
typedef EGLBoolean (EGLAPIENTRYP PFNEGLSTREAMIMAGECONSUMERCONNECTNVPROC) (EGLDisplay dpy, EGLStreamKHR stream, EGLint num_modifiers, EGLuint64KHR *modifiers, EGLAttrib *attrib_list);
|
||||
typedef EGLBoolean (EGLAPIENTRYP PFNEGLSTREAMIMAGECONSUMERCONNECTNVPROC) (EGLDisplay dpy, EGLStreamKHR stream, EGLint num_modifiers, const EGLuint64KHR *modifiers, const EGLAttrib *attrib_list);
|
||||
typedef EGLint (EGLAPIENTRYP PFNEGLQUERYSTREAMCONSUMEREVENTNVPROC) (EGLDisplay dpy, EGLStreamKHR stream, EGLTime timeout, EGLenum *event, EGLAttrib *aux);
|
||||
typedef EGLBoolean (EGLAPIENTRYP PFNEGLSTREAMACQUIREIMAGENVPROC) (EGLDisplay dpy, EGLStreamKHR stream, EGLImage *pImage, EGLSync sync);
|
||||
typedef EGLBoolean (EGLAPIENTRYP PFNEGLSTREAMRELEASEIMAGENVPROC) (EGLDisplay dpy, EGLStreamKHR stream, EGLImage image, EGLSync sync);
|
||||
#ifdef EGL_EGLEXT_PROTOTYPES
|
||||
EGLAPI EGLBoolean EGLAPIENTRY eglStreamImageConsumerConnectNV (EGLDisplay dpy, EGLStreamKHR stream, EGLint num_modifiers, EGLuint64KHR *modifiers, EGLAttrib *attrib_list);
|
||||
EGLAPI EGLBoolean EGLAPIENTRY eglStreamImageConsumerConnectNV (EGLDisplay dpy, EGLStreamKHR stream, EGLint num_modifiers, const EGLuint64KHR *modifiers, const EGLAttrib *attrib_list);
|
||||
EGLAPI EGLint EGLAPIENTRY eglQueryStreamConsumerEventNV (EGLDisplay dpy, EGLStreamKHR stream, EGLTime timeout, EGLenum *event, EGLAttrib *aux);
|
||||
EGLAPI EGLBoolean EGLAPIENTRY eglStreamAcquireImageNV (EGLDisplay dpy, EGLStreamKHR stream, EGLImage *pImage, EGLSync sync);
|
||||
EGLAPI EGLBoolean EGLAPIENTRY eglStreamReleaseImageNV (EGLDisplay dpy, EGLStreamKHR stream, EGLImage image, EGLSync sync);
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2023 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
@ -39,7 +39,7 @@
|
|||
static __inline__ void __attribute__((__always_inline__, __nodebug__))
|
||||
_m_prefetch(void *__P)
|
||||
{
|
||||
__builtin_prefetch (__P, 0, 3 /* _MM_HINT_T0 */);
|
||||
__builtin_prefetch(__P, 0, 3 /* _MM_HINT_T0 */);
|
||||
}
|
||||
#endif /* __PRFCHWINTRIN_H */
|
||||
#endif /* __clang__ */
|
||||
|
@ -59,17 +59,26 @@ _m_prefetch(void *__P)
|
|||
#ifdef __linux__
|
||||
#include <endian.h>
|
||||
#define SDL_BYTEORDER __BYTE_ORDER
|
||||
#elif defined(__OpenBSD__)
|
||||
#elif defined(__OpenBSD__) || defined(__DragonFly__)
|
||||
#include <endian.h>
|
||||
#define SDL_BYTEORDER BYTE_ORDER
|
||||
#elif defined(__FreeBSD__) || defined(__NetBSD__)
|
||||
#include <sys/endian.h>
|
||||
#define SDL_BYTEORDER BYTE_ORDER
|
||||
/* predefs from newer gcc and clang versions: */
|
||||
#elif defined(__ORDER_LITTLE_ENDIAN__) && defined(__ORDER_BIG_ENDIAN__) && defined(__BYTE_ORDER__)
|
||||
#if (__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__)
|
||||
#define SDL_BYTEORDER SDL_LIL_ENDIAN
|
||||
#elif (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)
|
||||
#define SDL_BYTEORDER SDL_BIG_ENDIAN
|
||||
#else
|
||||
#error Unsupported endianness
|
||||
#endif /**/
|
||||
#else
|
||||
#if defined(__hppa__) || \
|
||||
defined(__m68k__) || defined(mc68000) || defined(_M_M68K) || \
|
||||
(defined(__MIPS__) && defined(__MIPSEB__)) || \
|
||||
defined(__ppc__) || defined(__POWERPC__) || defined(_M_PPC) || \
|
||||
defined(__ppc__) || defined(__POWERPC__) || defined(__powerpc__) || defined(__PPC__) || \
|
||||
defined(__sparc__)
|
||||
#define SDL_BYTEORDER SDL_BIG_ENDIAN
|
||||
#else
|
||||
|
@ -78,6 +87,28 @@ _m_prefetch(void *__P)
|
|||
#endif /* __linux__ */
|
||||
#endif /* !SDL_BYTEORDER */
|
||||
|
||||
#ifndef SDL_FLOATWORDORDER /* Not defined in SDL_config.h? */
|
||||
/* predefs from newer gcc versions: */
|
||||
#if defined(__ORDER_LITTLE_ENDIAN__) && defined(__ORDER_BIG_ENDIAN__) && defined(__FLOAT_WORD_ORDER__)
|
||||
#if (__FLOAT_WORD_ORDER__ == __ORDER_LITTLE_ENDIAN__)
|
||||
#define SDL_FLOATWORDORDER SDL_LIL_ENDIAN
|
||||
#elif (__FLOAT_WORD_ORDER__ == __ORDER_BIG_ENDIAN__)
|
||||
#define SDL_FLOATWORDORDER SDL_BIG_ENDIAN
|
||||
#else
|
||||
#error Unsupported endianness
|
||||
#endif /**/
|
||||
#elif defined(__MAVERICK__)
|
||||
/* For Maverick, float words are always little-endian. */
|
||||
#define SDL_FLOATWORDORDER SDL_LIL_ENDIAN
|
||||
#elif (defined(__arm__) || defined(__thumb__)) && !defined(__VFP_FP__) && !defined(__ARM_EABI__)
|
||||
/* For FPA, float words are always big-endian. */
|
||||
#define SDL_FLOATWORDORDER SDL_BIG_ENDIAN
|
||||
#else
|
||||
/* By default, assume that floats words follow the memory system mode. */
|
||||
#define SDL_FLOATWORDORDER SDL_BYTEORDER
|
||||
#endif /* __FLOAT_WORD_ORDER__ */
|
||||
#endif /* !SDL_FLOATWORDORDER */
|
||||
|
||||
|
||||
#include "begin_code.h"
|
||||
/* Set up for C function definitions, even when using C++ */
|
||||
|
@ -109,7 +140,7 @@ extern "C" {
|
|||
|
||||
#if HAS_BUILTIN_BSWAP16
|
||||
#define SDL_Swap16(x) __builtin_bswap16(x)
|
||||
#elif defined(_MSC_VER) && (_MSC_VER >= 1400)
|
||||
#elif (defined(_MSC_VER) && (_MSC_VER >= 1400)) && !defined(__ICL)
|
||||
#pragma intrinsic(_byteswap_ushort)
|
||||
#define SDL_Swap16(x) _byteswap_ushort(x)
|
||||
#elif defined(__i386__) && !HAS_BROKEN_BSWAP
|
||||
|
@ -158,7 +189,7 @@ SDL_Swap16(Uint16 x)
|
|||
|
||||
#if HAS_BUILTIN_BSWAP32
|
||||
#define SDL_Swap32(x) __builtin_bswap32(x)
|
||||
#elif defined(_MSC_VER) && (_MSC_VER >= 1400)
|
||||
#elif (defined(_MSC_VER) && (_MSC_VER >= 1400)) && !defined(__ICL)
|
||||
#pragma intrinsic(_byteswap_ulong)
|
||||
#define SDL_Swap32(x) _byteswap_ulong(x)
|
||||
#elif defined(__i386__) && !HAS_BROKEN_BSWAP
|
||||
|
@ -210,7 +241,7 @@ SDL_Swap32(Uint32 x)
|
|||
|
||||
#if HAS_BUILTIN_BSWAP64
|
||||
#define SDL_Swap64(x) __builtin_bswap64(x)
|
||||
#elif defined(_MSC_VER) && (_MSC_VER >= 1400)
|
||||
#elif (defined(_MSC_VER) && (_MSC_VER >= 1400)) && !defined(__ICL)
|
||||
#pragma intrinsic(_byteswap_uint64)
|
||||
#define SDL_Swap64(x) _byteswap_uint64(x)
|
||||
#elif defined(__i386__) && !HAS_BROKEN_BSWAP
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2023 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2023 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
@ -102,6 +102,7 @@ typedef enum
|
|||
SDL_KEYMAPCHANGED, /**< Keymap changed due to a system event such as an
|
||||
input language or keyboard layout change.
|
||||
*/
|
||||
SDL_TEXTEDITING_EXT, /**< Extended keyboard text editing (composition) */
|
||||
|
||||
/* Mouse events */
|
||||
SDL_MOUSEMOTION = 0x400, /**< Mouse moved */
|
||||
|
@ -117,6 +118,7 @@ typedef enum
|
|||
SDL_JOYBUTTONUP, /**< Joystick button released */
|
||||
SDL_JOYDEVICEADDED, /**< A new joystick has been inserted into the system */
|
||||
SDL_JOYDEVICEREMOVED, /**< An opened joystick has been removed */
|
||||
SDL_JOYBATTERYUPDATED, /**< Joystick battery level change */
|
||||
|
||||
/* Game controller events */
|
||||
SDL_CONTROLLERAXISMOTION = 0x650, /**< Game controller axis motion */
|
||||
|
@ -141,7 +143,7 @@ typedef enum
|
|||
SDL_MULTIGESTURE,
|
||||
|
||||
/* Clipboard events */
|
||||
SDL_CLIPBOARDUPDATE = 0x900, /**< The clipboard changed */
|
||||
SDL_CLIPBOARDUPDATE = 0x900, /**< The clipboard or primary selection changed */
|
||||
|
||||
/* Drag and drop events */
|
||||
SDL_DROPFILE = 0x1000, /**< The system requests a file open */
|
||||
|
@ -243,6 +245,19 @@ typedef struct SDL_TextEditingEvent
|
|||
Sint32 length; /**< The length of selected editing text */
|
||||
} SDL_TextEditingEvent;
|
||||
|
||||
/**
|
||||
* \brief Extended keyboard text editing event structure (event.editExt.*) when text would be
|
||||
* truncated if stored in the text buffer SDL_TextEditingEvent
|
||||
*/
|
||||
typedef struct SDL_TextEditingExtEvent
|
||||
{
|
||||
Uint32 type; /**< ::SDL_TEXTEDITING_EXT */
|
||||
Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
|
||||
Uint32 windowID; /**< The window with keyboard focus, if any */
|
||||
char* text; /**< The editing text, which should be freed with SDL_free(), and will not be NULL */
|
||||
Sint32 start; /**< The start cursor of selected editing text */
|
||||
Sint32 length; /**< The length of selected editing text */
|
||||
} SDL_TextEditingExtEvent;
|
||||
|
||||
#define SDL_TEXTINPUTEVENT_TEXT_SIZE (32)
|
||||
/**
|
||||
|
@ -303,6 +318,8 @@ typedef struct SDL_MouseWheelEvent
|
|||
Uint32 direction; /**< Set to one of the SDL_MOUSEWHEEL_* defines. When FLIPPED the values in X and Y will be opposite. Multiply by -1 to change them back */
|
||||
float preciseX; /**< The amount scrolled horizontally, positive to the right and negative to the left, with float precision (added in 2.0.18) */
|
||||
float preciseY; /**< The amount scrolled vertically, positive away from the user and negative toward the user, with float precision (added in 2.0.18) */
|
||||
Sint32 mouseX; /**< X coordinate, relative to window (added in 2.26.0) */
|
||||
Sint32 mouseY; /**< Y coordinate, relative to window (added in 2.26.0) */
|
||||
} SDL_MouseWheelEvent;
|
||||
|
||||
/**
|
||||
|
@ -381,6 +398,16 @@ typedef struct SDL_JoyDeviceEvent
|
|||
Sint32 which; /**< The joystick device index for the ADDED event, instance id for the REMOVED event */
|
||||
} SDL_JoyDeviceEvent;
|
||||
|
||||
/**
|
||||
* \brief Joysick battery level change event structure (event.jbattery.*)
|
||||
*/
|
||||
typedef struct SDL_JoyBatteryEvent
|
||||
{
|
||||
Uint32 type; /**< ::SDL_JOYBATTERYUPDATED */
|
||||
Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
|
||||
SDL_JoystickID which; /**< The joystick instance id */
|
||||
SDL_JoystickPowerLevel level; /**< The joystick battery level */
|
||||
} SDL_JoyBatteryEvent;
|
||||
|
||||
/**
|
||||
* \brief Game controller axis motion event structure (event.caxis.*)
|
||||
|
@ -449,6 +476,7 @@ typedef struct SDL_ControllerSensorEvent
|
|||
SDL_JoystickID which; /**< The joystick instance id */
|
||||
Sint32 sensor; /**< The type of the sensor, one of the values of ::SDL_SensorType */
|
||||
float data[3]; /**< Up to 3 values from the sensor, as defined in SDL_sensor.h */
|
||||
Uint64 timestamp_us; /**< The timestamp of the sensor reading in microseconds, if the hardware provides this information. */
|
||||
} SDL_ControllerSensorEvent;
|
||||
|
||||
/**
|
||||
|
@ -540,6 +568,7 @@ typedef struct SDL_SensorEvent
|
|||
Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
|
||||
Sint32 which; /**< The instance ID of the sensor */
|
||||
float data[6]; /**< Up to 6 values from the sensor - additional values can be queried using SDL_SensorGetData() */
|
||||
Uint64 timestamp_us; /**< The timestamp of the sensor reading in microseconds, if the hardware provides this information. */
|
||||
} SDL_SensorEvent;
|
||||
|
||||
/**
|
||||
|
@ -601,6 +630,7 @@ typedef union SDL_Event
|
|||
SDL_WindowEvent window; /**< Window event data */
|
||||
SDL_KeyboardEvent key; /**< Keyboard event data */
|
||||
SDL_TextEditingEvent edit; /**< Text editing event data */
|
||||
SDL_TextEditingExtEvent editExt; /**< Extended text editing event data */
|
||||
SDL_TextInputEvent text; /**< Text input event data */
|
||||
SDL_MouseMotionEvent motion; /**< Mouse motion event data */
|
||||
SDL_MouseButtonEvent button; /**< Mouse button event data */
|
||||
|
@ -610,6 +640,7 @@ typedef union SDL_Event
|
|||
SDL_JoyHatEvent jhat; /**< Joystick hat event data */
|
||||
SDL_JoyButtonEvent jbutton; /**< Joystick button event data */
|
||||
SDL_JoyDeviceEvent jdevice; /**< Joystick device change event data */
|
||||
SDL_JoyBatteryEvent jbattery; /**< Joystick battery event data */
|
||||
SDL_ControllerAxisEvent caxis; /**< Game Controller axis event data */
|
||||
SDL_ControllerButtonEvent cbutton; /**< Game Controller button event data */
|
||||
SDL_ControllerDeviceEvent cdevice; /**< Game Controller device event data */
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2023 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
@ -60,6 +60,10 @@ extern "C" {
|
|||
* - `parent`: the containing directory of the bundle. For example:
|
||||
* `/Applications/SDLApp/`
|
||||
*
|
||||
* **Nintendo 3DS Specific Functionality**: This function returns "romfs"
|
||||
* directory of the application as it is uncommon to store resources outside
|
||||
* the executable. As such it is not a writable directory.
|
||||
*
|
||||
* The returned path is guaranteed to end with a path separator ('\' on
|
||||
* Windows, '/' on most other platforms).
|
||||
*
|
||||
|
@ -92,7 +96,7 @@ extern DECLSPEC char *SDLCALL SDL_GetBasePath(void);
|
|||
*
|
||||
* `C:\\Users\\bob\\AppData\\Roaming\\My Company\\My Program Name\\`
|
||||
*
|
||||
* On Linux, the string might look like"
|
||||
* On Linux, the string might look like:
|
||||
*
|
||||
* `/home/bob/.local/share/My Program Name/`
|
||||
*
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2023 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
@ -69,7 +69,11 @@ typedef enum
|
|||
SDL_CONTROLLER_TYPE_VIRTUAL,
|
||||
SDL_CONTROLLER_TYPE_PS5,
|
||||
SDL_CONTROLLER_TYPE_AMAZON_LUNA,
|
||||
SDL_CONTROLLER_TYPE_GOOGLE_STADIA
|
||||
SDL_CONTROLLER_TYPE_GOOGLE_STADIA,
|
||||
SDL_CONTROLLER_TYPE_NVIDIA_SHIELD,
|
||||
SDL_CONTROLLER_TYPE_NINTENDO_SWITCH_JOYCON_LEFT,
|
||||
SDL_CONTROLLER_TYPE_NINTENDO_SWITCH_JOYCON_RIGHT,
|
||||
SDL_CONTROLLER_TYPE_NINTENDO_SWITCH_JOYCON_PAIR
|
||||
} SDL_GameControllerType;
|
||||
|
||||
typedef enum
|
||||
|
@ -289,6 +293,25 @@ extern DECLSPEC SDL_bool SDLCALL SDL_IsGameController(int joystick_index);
|
|||
*/
|
||||
extern DECLSPEC const char *SDLCALL SDL_GameControllerNameForIndex(int joystick_index);
|
||||
|
||||
/**
|
||||
* Get the implementation dependent path for the game controller.
|
||||
*
|
||||
* This function can be called before any controllers are opened.
|
||||
*
|
||||
* `joystick_index` is the same as the `device_index` passed to
|
||||
* SDL_JoystickOpen().
|
||||
*
|
||||
* \param joystick_index the device_index of a device, from zero to
|
||||
* SDL_NumJoysticks()-1
|
||||
* \returns the implementation-dependent path for the game controller, or NULL
|
||||
* if there is no path or the index is invalid.
|
||||
*
|
||||
* \since This function is available since SDL 2.24.0.
|
||||
*
|
||||
* \sa SDL_GameControllerPath
|
||||
*/
|
||||
extern DECLSPEC const char *SDLCALL SDL_GameControllerPathForIndex(int joystick_index);
|
||||
|
||||
/**
|
||||
* Get the type of a game controller.
|
||||
*
|
||||
|
@ -386,6 +409,23 @@ extern DECLSPEC SDL_GameController *SDLCALL SDL_GameControllerFromPlayerIndex(in
|
|||
*/
|
||||
extern DECLSPEC const char *SDLCALL SDL_GameControllerName(SDL_GameController *gamecontroller);
|
||||
|
||||
/**
|
||||
* Get the implementation-dependent path for an opened game controller.
|
||||
*
|
||||
* This is the same path as returned by SDL_GameControllerNameForIndex(), but
|
||||
* it takes a controller identifier instead of the (unstable) device index.
|
||||
*
|
||||
* \param gamecontroller a game controller identifier previously returned by
|
||||
* SDL_GameControllerOpen()
|
||||
* \returns the implementation dependent path for the game controller, or NULL
|
||||
* if there is no path or the identifier passed is invalid.
|
||||
*
|
||||
* \since This function is available since SDL 2.24.0.
|
||||
*
|
||||
* \sa SDL_GameControllerPathForIndex
|
||||
*/
|
||||
extern DECLSPEC const char *SDLCALL SDL_GameControllerPath(SDL_GameController *gamecontroller);
|
||||
|
||||
/**
|
||||
* Get the type of this currently opened controller
|
||||
*
|
||||
|
@ -415,7 +455,8 @@ extern DECLSPEC int SDLCALL SDL_GameControllerGetPlayerIndex(SDL_GameController
|
|||
* Set the player index of an opened game controller.
|
||||
*
|
||||
* \param gamecontroller the game controller object to adjust.
|
||||
* \param player_index Player index to assign to this controller.
|
||||
* \param player_index Player index to assign to this controller, or -1 to
|
||||
* clear the player index and turn off player LEDs.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.12.
|
||||
*/
|
||||
|
@ -457,6 +498,18 @@ extern DECLSPEC Uint16 SDLCALL SDL_GameControllerGetProduct(SDL_GameController *
|
|||
*/
|
||||
extern DECLSPEC Uint16 SDLCALL SDL_GameControllerGetProductVersion(SDL_GameController *gamecontroller);
|
||||
|
||||
/**
|
||||
* Get the firmware version of an opened controller, if available.
|
||||
*
|
||||
* If the firmware version isn't available this function returns 0.
|
||||
*
|
||||
* \param gamecontroller the game controller object to query.
|
||||
* \return the controller firmware version, or zero if unavailable.
|
||||
*
|
||||
* \since This function is available since SDL 2.24.0.
|
||||
*/
|
||||
extern DECLSPEC Uint16 SDLCALL SDL_GameControllerGetFirmwareVersion(SDL_GameController *gamecontroller);
|
||||
|
||||
/**
|
||||
* Get the serial number of an opened controller, if available.
|
||||
*
|
||||
|
@ -671,10 +724,10 @@ typedef enum
|
|||
SDL_CONTROLLER_BUTTON_DPAD_LEFT,
|
||||
SDL_CONTROLLER_BUTTON_DPAD_RIGHT,
|
||||
SDL_CONTROLLER_BUTTON_MISC1, /* Xbox Series X share button, PS5 microphone button, Nintendo Switch Pro capture button, Amazon Luna microphone button */
|
||||
SDL_CONTROLLER_BUTTON_PADDLE1, /* Xbox Elite paddle P1 */
|
||||
SDL_CONTROLLER_BUTTON_PADDLE2, /* Xbox Elite paddle P3 */
|
||||
SDL_CONTROLLER_BUTTON_PADDLE3, /* Xbox Elite paddle P2 */
|
||||
SDL_CONTROLLER_BUTTON_PADDLE4, /* Xbox Elite paddle P4 */
|
||||
SDL_CONTROLLER_BUTTON_PADDLE1, /* Xbox Elite paddle P1 (upper left, facing the back) */
|
||||
SDL_CONTROLLER_BUTTON_PADDLE2, /* Xbox Elite paddle P3 (upper right, facing the back) */
|
||||
SDL_CONTROLLER_BUTTON_PADDLE3, /* Xbox Elite paddle P2 (lower left, facing the back) */
|
||||
SDL_CONTROLLER_BUTTON_PADDLE4, /* Xbox Elite paddle P4 (lower right, facing the back) */
|
||||
SDL_CONTROLLER_BUTTON_TOUCHPAD, /* PS4/PS5 touchpad button */
|
||||
SDL_CONTROLLER_BUTTON_MAX
|
||||
} SDL_GameControllerButton;
|
||||
|
@ -701,7 +754,7 @@ extern DECLSPEC SDL_GameControllerButton SDLCALL SDL_GameControllerGetButtonFrom
|
|||
* The caller should not SDL_free() the returned string.
|
||||
*
|
||||
* \param button an enum value for a given SDL_GameControllerButton
|
||||
* \returns a string for the given button, or NULL if an invalid axis is
|
||||
* \returns a string for the given button, or NULL if an invalid button is
|
||||
* specified. The string returned is of the format used by
|
||||
* SDL_GameController mapping strings.
|
||||
*
|
||||
|
@ -842,6 +895,25 @@ extern DECLSPEC float SDLCALL SDL_GameControllerGetSensorDataRate(SDL_GameContro
|
|||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_GameControllerGetSensorData(SDL_GameController *gamecontroller, SDL_SensorType type, float *data, int num_values);
|
||||
|
||||
/**
|
||||
* Get the current state of a game controller sensor with the timestamp of the
|
||||
* last update.
|
||||
*
|
||||
* The number of values and interpretation of the data is sensor dependent.
|
||||
* See SDL_sensor.h for the details for each type of sensor.
|
||||
*
|
||||
* \param gamecontroller The controller to query
|
||||
* \param type The type of sensor to query
|
||||
* \param timestamp A pointer filled with the timestamp in microseconds of the
|
||||
* current sensor reading if available, or 0 if not
|
||||
* \param data A pointer filled with the current sensor state
|
||||
* \param num_values The number of values to write to data
|
||||
* \return 0 or -1 if an error occurred.
|
||||
*
|
||||
* \since This function is available since SDL 2.26.0.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_GameControllerGetSensorDataWithTimestamp(SDL_GameController *gamecontroller, SDL_SensorType type, Uint64 *timestamp, float *data, int num_values);
|
||||
|
||||
/**
|
||||
* Start a rumble effect on a game controller.
|
||||
*
|
||||
|
@ -869,8 +941,9 @@ extern DECLSPEC int SDLCALL SDL_GameControllerRumble(SDL_GameController *gamecon
|
|||
* calling it with 0 intensity stops any rumbling.
|
||||
*
|
||||
* Note that this is rumbling of the _triggers_ and not the game controller as
|
||||
* a whole. The first controller to offer this feature was the PlayStation 5's
|
||||
* DualShock 5.
|
||||
* a whole. This is currently only supported on Xbox One controllers. If you
|
||||
* want the (more common) whole-controller rumble, use
|
||||
* SDL_GameControllerRumble() instead.
|
||||
*
|
||||
* \param gamecontroller The controller to vibrate
|
||||
* \param left_rumble The intensity of the left trigger rumble motor, from 0
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2023 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
|
100
libs/SDL2/i686-w64-mingw32/include/SDL2/SDL_guid.h
Normal file
100
libs/SDL2/i686-w64-mingw32/include/SDL2/SDL_guid.h
Normal file
|
@ -0,0 +1,100 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2023 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file SDL_guid.h
|
||||
*
|
||||
* Include file for handling ::SDL_GUID values.
|
||||
*/
|
||||
|
||||
#ifndef SDL_guid_h_
|
||||
#define SDL_guid_h_
|
||||
|
||||
#include "SDL_stdinc.h"
|
||||
#include "SDL_error.h"
|
||||
|
||||
#include "begin_code.h"
|
||||
/* Set up for C function definitions, even when using C++ */
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* An SDL_GUID is a 128-bit identifier for an input device that
|
||||
* identifies that device across runs of SDL programs on the same
|
||||
* platform. If the device is detached and then re-attached to a
|
||||
* different port, or if the base system is rebooted, the device
|
||||
* should still report the same GUID.
|
||||
*
|
||||
* GUIDs are as precise as possible but are not guaranteed to
|
||||
* distinguish physically distinct but equivalent devices. For
|
||||
* example, two game controllers from the same vendor with the same
|
||||
* product ID and revision may have the same GUID.
|
||||
*
|
||||
* GUIDs may be platform-dependent (i.e., the same device may report
|
||||
* different GUIDs on different operating systems).
|
||||
*/
|
||||
typedef struct {
|
||||
Uint8 data[16];
|
||||
} SDL_GUID;
|
||||
|
||||
/* Function prototypes */
|
||||
|
||||
/**
|
||||
* Get an ASCII string representation for a given ::SDL_GUID.
|
||||
*
|
||||
* You should supply at least 33 bytes for pszGUID.
|
||||
*
|
||||
* \param guid the ::SDL_GUID you wish to convert to string
|
||||
* \param pszGUID buffer in which to write the ASCII string
|
||||
* \param cbGUID the size of pszGUID
|
||||
*
|
||||
* \since This function is available since SDL 2.24.0.
|
||||
*
|
||||
* \sa SDL_GUIDFromString
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_GUIDToString(SDL_GUID guid, char *pszGUID, int cbGUID);
|
||||
|
||||
/**
|
||||
* Convert a GUID string into a ::SDL_GUID structure.
|
||||
*
|
||||
* Performs no error checking. If this function is given a string containing
|
||||
* an invalid GUID, the function will silently succeed, but the GUID generated
|
||||
* will not be useful.
|
||||
*
|
||||
* \param pchGUID string containing an ASCII representation of a GUID
|
||||
* \returns a ::SDL_GUID structure.
|
||||
*
|
||||
* \since This function is available since SDL 2.24.0.
|
||||
*
|
||||
* \sa SDL_GUIDToString
|
||||
*/
|
||||
extern DECLSPEC SDL_GUID SDLCALL SDL_GUIDFromString(const char *pchGUID);
|
||||
|
||||
/* Ends C function definitions when using C++ */
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* SDL_guid_h_ */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2023 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2023 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2023 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
@ -278,10 +278,7 @@ extern "C" {
|
|||
* If this hint isn't specified to a valid setting, or libsamplerate isn't
|
||||
* available, SDL will use the default, internal resampling algorithm.
|
||||
*
|
||||
* Note that this is currently only applicable to resampling audio that is
|
||||
* being written to a device for playback or audio being read from a device
|
||||
* for capture. SDL_AudioCVT always uses the default resampler (although this
|
||||
* might change for SDL 2.1).
|
||||
* As of SDL 2.26, SDL_ConvertAudio() respects this hint when libsamplerate is available.
|
||||
*
|
||||
* This hint is currently only checked at audio subsystem initialization.
|
||||
*
|
||||
|
@ -380,6 +377,17 @@ extern "C" {
|
|||
*/
|
||||
#define SDL_HINT_EMSCRIPTEN_KEYBOARD_ELEMENT "SDL_EMSCRIPTEN_KEYBOARD_ELEMENT"
|
||||
|
||||
/**
|
||||
* \brief A variable that controls whether the on-screen keyboard should be shown when text input is active
|
||||
*
|
||||
* The variable can be set to the following values:
|
||||
* "0" - Do not show the on-screen keyboard
|
||||
* "1" - Show the on-screen keyboard
|
||||
*
|
||||
* The default value is "1". This hint must be set before text input is activated.
|
||||
*/
|
||||
#define SDL_HINT_ENABLE_SCREEN_KEYBOARD "SDL_ENABLE_SCREEN_KEYBOARD"
|
||||
|
||||
/**
|
||||
* \brief A variable that controls whether Steam Controllers should be exposed using the SDL joystick and game controller APIs
|
||||
*
|
||||
|
@ -392,13 +400,14 @@ extern "C" {
|
|||
#define SDL_HINT_ENABLE_STEAM_CONTROLLERS "SDL_ENABLE_STEAM_CONTROLLERS"
|
||||
|
||||
/**
|
||||
* \brief A variable controlling whether SDL logs all events pushed onto its internal queue.
|
||||
* \brief A variable controlling verbosity of the logging of SDL events pushed onto the internal queue.
|
||||
*
|
||||
* This variable can be set to the following values:
|
||||
* This variable can be set to the following values, from least to most verbose:
|
||||
*
|
||||
* "0" - Don't log any events (default)
|
||||
* "1" - Log all events except mouse and finger motion, which are pretty spammy.
|
||||
* "2" - Log all events.
|
||||
* "1" - Log most events (other than the really spammy ones).
|
||||
* "2" - Include mouse and finger motion events.
|
||||
* "3" - Include SDL_SysWMEvent events.
|
||||
*
|
||||
* This is generally meant to be used to debug SDL itself, but can be useful
|
||||
* for application developers that need better visibility into what is going
|
||||
|
@ -412,6 +421,19 @@ extern "C" {
|
|||
*/
|
||||
#define SDL_HINT_EVENT_LOGGING "SDL_EVENT_LOGGING"
|
||||
|
||||
/**
|
||||
* \brief A variable controlling whether raising the window should be done more forcefully
|
||||
*
|
||||
* This variable can be set to the following values:
|
||||
* "0" - No forcing (the default)
|
||||
* "1" - Extra level of forcing
|
||||
*
|
||||
* At present, this is only an issue under MS Windows, which makes it nearly impossible to
|
||||
* programmatically move a window to the foreground, for "security" reasons. See
|
||||
* http://stackoverflow.com/a/34414846 for a discussion.
|
||||
*/
|
||||
#define SDL_HINT_FORCE_RAISEWINDOW "SDL_HINT_FORCE_RAISEWINDOW"
|
||||
|
||||
/**
|
||||
* \brief A variable controlling how 3D acceleration is used to accelerate the SDL screen surface.
|
||||
*
|
||||
|
@ -528,6 +550,14 @@ extern "C" {
|
|||
*/
|
||||
#define SDL_HINT_GRAB_KEYBOARD "SDL_GRAB_KEYBOARD"
|
||||
|
||||
/**
|
||||
* \brief A variable containing a list of devices to ignore in SDL_hid_enumerate()
|
||||
*
|
||||
* For example, to ignore the Shanwan DS3 controller and any Valve controller, you might
|
||||
* have the string "0x2563/0x0523,0x28de/0x0000"
|
||||
*/
|
||||
#define SDL_HINT_HIDAPI_IGNORE_DEVICES "SDL_HIDAPI_IGNORE_DEVICES"
|
||||
|
||||
/**
|
||||
* \brief A variable controlling whether the idle timer is disabled on iOS.
|
||||
*
|
||||
|
@ -566,6 +596,17 @@ extern "C" {
|
|||
*/
|
||||
#define SDL_HINT_IME_SHOW_UI "SDL_IME_SHOW_UI"
|
||||
|
||||
/**
|
||||
* \brief A variable to control if extended IME text support is enabled.
|
||||
* If enabled then SDL_TextEditingExtEvent will be issued if the text would be truncated otherwise.
|
||||
* Additionally SDL_TextInputEvent will be dispatched multiple times so that it is not truncated.
|
||||
*
|
||||
* The variable can be set to the following values:
|
||||
* "0" - Legacy behavior. Text can be truncated, no heap allocations. (default)
|
||||
* "1" - Modern behavior.
|
||||
*/
|
||||
#define SDL_HINT_IME_SUPPORT_EXTENDED_TEXT "SDL_IME_SUPPORT_EXTENDED_TEXT"
|
||||
|
||||
/**
|
||||
* \brief A variable controlling whether the home indicator bar on iPhone X
|
||||
* should be hidden.
|
||||
|
@ -612,18 +653,53 @@ extern "C" {
|
|||
*/
|
||||
#define SDL_HINT_JOYSTICK_HIDAPI_GAMECUBE "SDL_JOYSTICK_HIDAPI_GAMECUBE"
|
||||
|
||||
/**
|
||||
* \brief A variable controlling whether Switch Joy-Cons should be treated the same as Switch Pro Controllers when using the HIDAPI driver.
|
||||
/**
|
||||
* \brief A variable controlling whether "low_frequency_rumble" and "high_frequency_rumble" is used to implement
|
||||
* the GameCube controller's 3 rumble modes, Stop(0), Rumble(1), and StopHard(2)
|
||||
* this is useful for applications that need full compatibility for things like ADSR envelopes.
|
||||
* Stop is implemented by setting "low_frequency_rumble" to "0" and "high_frequency_rumble" ">0"
|
||||
* Rumble is both at any arbitrary value,
|
||||
* StopHard is implemented by setting both "low_frequency_rumble" and "high_frequency_rumble" to "0"
|
||||
*
|
||||
* This variable can be set to the following values:
|
||||
* "0" - Normal rumble behavior is behavior is used (default)
|
||||
* "1" - Proper GameCube controller rumble behavior is used
|
||||
*
|
||||
*/
|
||||
#define SDL_HINT_JOYSTICK_GAMECUBE_RUMBLE_BRAKE "SDL_JOYSTICK_GAMECUBE_RUMBLE_BRAKE"
|
||||
|
||||
/**
|
||||
* \brief A variable controlling whether the HIDAPI driver for Nintendo Switch Joy-Cons should be used.
|
||||
*
|
||||
* This variable can be set to the following values:
|
||||
* "0" - basic Joy-Con support with no analog input (the default)
|
||||
* "1" - Joy-Cons treated as half full Pro Controllers with analog inputs and sensors
|
||||
* "0" - HIDAPI driver is not used
|
||||
* "1" - HIDAPI driver is used
|
||||
*
|
||||
* This does not combine Joy-Cons into a single controller. That's up to the user.
|
||||
* The default is the value of SDL_HINT_JOYSTICK_HIDAPI
|
||||
*/
|
||||
#define SDL_HINT_JOYSTICK_HIDAPI_JOY_CONS "SDL_JOYSTICK_HIDAPI_JOY_CONS"
|
||||
|
||||
/**
|
||||
/**
|
||||
* \brief A variable controlling whether Nintendo Switch Joy-Con controllers will be combined into a single Pro-like controller when using the HIDAPI driver
|
||||
*
|
||||
* This variable can be set to the following values:
|
||||
* "0" - Left and right Joy-Con controllers will not be combined and each will be a mini-gamepad
|
||||
* "1" - Left and right Joy-Con controllers will be combined into a single controller (the default)
|
||||
*/
|
||||
#define SDL_HINT_JOYSTICK_HIDAPI_COMBINE_JOY_CONS "SDL_JOYSTICK_HIDAPI_COMBINE_JOY_CONS"
|
||||
|
||||
/**
|
||||
* \brief A variable controlling whether Nintendo Switch Joy-Con controllers will be in vertical mode when using the HIDAPI driver
|
||||
*
|
||||
* This variable can be set to the following values:
|
||||
* "0" - Left and right Joy-Con controllers will not be in vertical mode (the default)
|
||||
* "1" - Left and right Joy-Con controllers will be in vertical mode
|
||||
*
|
||||
* This hint must be set before calling SDL_Init(SDL_INIT_GAMECONTROLLER)
|
||||
*/
|
||||
#define SDL_HINT_JOYSTICK_HIDAPI_VERTICAL_JOY_CONS "SDL_JOYSTICK_HIDAPI_VERTICAL_JOY_CONS"
|
||||
|
||||
/**
|
||||
* \brief A variable controlling whether the HIDAPI driver for Amazon Luna controllers connected via Bluetooth should be used.
|
||||
*
|
||||
* This variable can be set to the following values:
|
||||
|
@ -634,6 +710,42 @@ extern "C" {
|
|||
*/
|
||||
#define SDL_HINT_JOYSTICK_HIDAPI_LUNA "SDL_JOYSTICK_HIDAPI_LUNA"
|
||||
|
||||
/**
|
||||
* \brief A variable controlling whether the HIDAPI driver for Nintendo Online classic controllers should be used.
|
||||
*
|
||||
* This variable can be set to the following values:
|
||||
* "0" - HIDAPI driver is not used
|
||||
* "1" - HIDAPI driver is used
|
||||
*
|
||||
* The default is the value of SDL_HINT_JOYSTICK_HIDAPI
|
||||
*/
|
||||
#define SDL_HINT_JOYSTICK_HIDAPI_NINTENDO_CLASSIC "SDL_JOYSTICK_HIDAPI_NINTENDO_CLASSIC"
|
||||
|
||||
/**
|
||||
* \brief A variable controlling whether the HIDAPI driver for NVIDIA SHIELD controllers should be used.
|
||||
*
|
||||
* This variable can be set to the following values:
|
||||
* "0" - HIDAPI driver is not used
|
||||
* "1" - HIDAPI driver is used
|
||||
*
|
||||
* The default is the value of SDL_HINT_JOYSTICK_HIDAPI
|
||||
*/
|
||||
#define SDL_HINT_JOYSTICK_HIDAPI_SHIELD "SDL_JOYSTICK_HIDAPI_SHIELD"
|
||||
|
||||
/**
|
||||
* \brief A variable controlling whether the HIDAPI driver for PS3 controllers should be used.
|
||||
*
|
||||
* This variable can be set to the following values:
|
||||
* "0" - HIDAPI driver is not used
|
||||
* "1" - HIDAPI driver is used
|
||||
*
|
||||
* The default is the value of SDL_HINT_JOYSTICK_HIDAPI on macOS, and "0" on other platforms.
|
||||
*
|
||||
* It is not possible to use this driver on Windows, due to limitations in the default drivers
|
||||
* installed. See https://github.com/ViGEm/DsHidMini for an alternative driver on Windows.
|
||||
*/
|
||||
#define SDL_HINT_JOYSTICK_HIDAPI_PS3 "SDL_JOYSTICK_HIDAPI_PS3"
|
||||
|
||||
/**
|
||||
* \brief A variable controlling whether the HIDAPI driver for PS4 controllers should be used.
|
||||
*
|
||||
|
@ -716,7 +828,7 @@ extern "C" {
|
|||
#define SDL_HINT_JOYSTICK_HIDAPI_STADIA "SDL_JOYSTICK_HIDAPI_STADIA"
|
||||
|
||||
/**
|
||||
* \brief A variable controlling whether the HIDAPI driver for Steam Controllers should be used.
|
||||
* \brief A variable controlling whether the HIDAPI driver for Bluetooth Steam Controllers should be used.
|
||||
*
|
||||
* This variable can be set to the following values:
|
||||
* "0" - HIDAPI driver is not used
|
||||
|
@ -739,16 +851,56 @@ extern "C" {
|
|||
#define SDL_HINT_JOYSTICK_HIDAPI_SWITCH "SDL_JOYSTICK_HIDAPI_SWITCH"
|
||||
|
||||
/**
|
||||
* \brief A variable controlling whether the Home button LED should be turned on when a Nintendo Switch controller is opened
|
||||
* \brief A variable controlling whether the Home button LED should be turned on when a Nintendo Switch Pro controller is opened
|
||||
*
|
||||
* This variable can be set to the following values:
|
||||
* "0" - home button LED is turned off
|
||||
* "1" - home button LED is turned on
|
||||
*
|
||||
* By default the Home button LED state is not changed.
|
||||
* By default the Home button LED state is not changed. This hint can also be set to a floating point value between 0.0 and 1.0 which controls the brightness of the Home button LED.
|
||||
*/
|
||||
#define SDL_HINT_JOYSTICK_HIDAPI_SWITCH_HOME_LED "SDL_JOYSTICK_HIDAPI_SWITCH_HOME_LED"
|
||||
|
||||
/**
|
||||
* \brief A variable controlling whether the Home button LED should be turned on when a Nintendo Switch Joy-Con controller is opened
|
||||
*
|
||||
* This variable can be set to the following values:
|
||||
* "0" - home button LED is turned off
|
||||
* "1" - home button LED is turned on
|
||||
*
|
||||
* By default the Home button LED state is not changed. This hint can also be set to a floating point value between 0.0 and 1.0 which controls the brightness of the Home button LED.
|
||||
*/
|
||||
#define SDL_HINT_JOYSTICK_HIDAPI_JOYCON_HOME_LED "SDL_JOYSTICK_HIDAPI_JOYCON_HOME_LED"
|
||||
|
||||
/**
|
||||
* \brief A variable controlling whether the player LEDs should be lit to indicate which player is associated with a Nintendo Switch controller.
|
||||
*
|
||||
* This variable can be set to the following values:
|
||||
* "0" - player LEDs are not enabled
|
||||
* "1" - player LEDs are enabled (the default)
|
||||
*/
|
||||
#define SDL_HINT_JOYSTICK_HIDAPI_SWITCH_PLAYER_LED "SDL_JOYSTICK_HIDAPI_SWITCH_PLAYER_LED"
|
||||
|
||||
/**
|
||||
* \brief A variable controlling whether the HIDAPI driver for Nintendo Wii and Wii U controllers should be used.
|
||||
*
|
||||
* This variable can be set to the following values:
|
||||
* "0" - HIDAPI driver is not used
|
||||
* "1" - HIDAPI driver is used
|
||||
*
|
||||
* This driver doesn't work with the dolphinbar, so the default is SDL_FALSE for now.
|
||||
*/
|
||||
#define SDL_HINT_JOYSTICK_HIDAPI_WII "SDL_JOYSTICK_HIDAPI_WII"
|
||||
|
||||
/**
|
||||
* \brief A variable controlling whether the player LEDs should be lit to indicate which player is associated with a Wii controller.
|
||||
*
|
||||
* This variable can be set to the following values:
|
||||
* "0" - player LEDs are not enabled
|
||||
* "1" - player LEDs are enabled (the default)
|
||||
*/
|
||||
#define SDL_HINT_JOYSTICK_HIDAPI_WII_PLAYER_LED "SDL_JOYSTICK_HIDAPI_WII_PLAYER_LED"
|
||||
|
||||
/**
|
||||
* \brief A variable controlling whether the HIDAPI driver for XBox controllers should be used.
|
||||
*
|
||||
|
@ -760,17 +912,69 @@ extern "C" {
|
|||
*/
|
||||
#define SDL_HINT_JOYSTICK_HIDAPI_XBOX "SDL_JOYSTICK_HIDAPI_XBOX"
|
||||
|
||||
/**
|
||||
/**
|
||||
* \brief A variable controlling whether the HIDAPI driver for XBox 360 controllers should be used.
|
||||
*
|
||||
* This variable can be set to the following values:
|
||||
* "0" - HIDAPI driver is not used
|
||||
* "1" - HIDAPI driver is used
|
||||
*
|
||||
* The default is the value of SDL_HINT_JOYSTICK_HIDAPI_XBOX
|
||||
*/
|
||||
#define SDL_HINT_JOYSTICK_HIDAPI_XBOX_360 "SDL_JOYSTICK_HIDAPI_XBOX_360"
|
||||
|
||||
/**
|
||||
* \brief A variable controlling whether the player LEDs should be lit to indicate which player is associated with an Xbox 360 controller.
|
||||
*
|
||||
* This variable can be set to the following values:
|
||||
* "0" - player LEDs are not enabled
|
||||
* "1" - player LEDs are enabled (the default)
|
||||
*/
|
||||
#define SDL_HINT_JOYSTICK_HIDAPI_XBOX_360_PLAYER_LED "SDL_JOYSTICK_HIDAPI_XBOX_360_PLAYER_LED"
|
||||
|
||||
/**
|
||||
* \brief A variable controlling whether the HIDAPI driver for XBox 360 wireless controllers should be used.
|
||||
*
|
||||
* This variable can be set to the following values:
|
||||
* "0" - HIDAPI driver is not used
|
||||
* "1" - HIDAPI driver is used
|
||||
*
|
||||
* The default is the value of SDL_HINT_JOYSTICK_HIDAPI_XBOX_360
|
||||
*/
|
||||
#define SDL_HINT_JOYSTICK_HIDAPI_XBOX_360_WIRELESS "SDL_JOYSTICK_HIDAPI_XBOX_360_WIRELESS"
|
||||
|
||||
/**
|
||||
* \brief A variable controlling whether the HIDAPI driver for XBox One controllers should be used.
|
||||
*
|
||||
* This variable can be set to the following values:
|
||||
* "0" - HIDAPI driver is not used
|
||||
* "1" - HIDAPI driver is used
|
||||
*
|
||||
* The default is the value of SDL_HINT_JOYSTICK_HIDAPI_XBOX
|
||||
*/
|
||||
#define SDL_HINT_JOYSTICK_HIDAPI_XBOX_ONE "SDL_JOYSTICK_HIDAPI_XBOX_ONE"
|
||||
|
||||
/**
|
||||
* \brief A variable controlling whether the Home button LED should be turned on when an Xbox One controller is opened
|
||||
*
|
||||
* This variable can be set to the following values:
|
||||
* "0" - home button LED is turned off
|
||||
* "1" - home button LED is turned on
|
||||
*
|
||||
* By default the Home button LED state is not changed. This hint can also be set to a floating point value between 0.0 and 1.0 which controls the brightness of the Home button LED. The default brightness is 0.4.
|
||||
*/
|
||||
#define SDL_HINT_JOYSTICK_HIDAPI_XBOX_ONE_HOME_LED "SDL_JOYSTICK_HIDAPI_XBOX_ONE_HOME_LED"
|
||||
|
||||
/**
|
||||
* \brief A variable controlling whether the RAWINPUT joystick drivers should be used for better handling XInput-capable devices.
|
||||
*
|
||||
* This variable can be set to the following values:
|
||||
* "0" - RAWINPUT drivers are not used
|
||||
* "1" - RAWINPUT drivers are used (the default)
|
||||
*
|
||||
*/
|
||||
#define SDL_HINT_JOYSTICK_RAWINPUT "SDL_JOYSTICK_RAWINPUT"
|
||||
|
||||
/**
|
||||
/**
|
||||
* \brief A variable controlling whether the RAWINPUT driver should pull correlated data from XInput.
|
||||
*
|
||||
* This variable can be set to the following values:
|
||||
|
@ -783,7 +987,16 @@ extern "C" {
|
|||
*/
|
||||
#define SDL_HINT_JOYSTICK_RAWINPUT_CORRELATE_XINPUT "SDL_JOYSTICK_RAWINPUT_CORRELATE_XINPUT"
|
||||
|
||||
/**
|
||||
/**
|
||||
* \brief A variable controlling whether the ROG Chakram mice should show up as joysticks
|
||||
*
|
||||
* This variable can be set to the following values:
|
||||
* "0" - ROG Chakram mice do not show up as joysticks (the default)
|
||||
* "1" - ROG Chakram mice show up as joysticks
|
||||
*/
|
||||
#define SDL_HINT_JOYSTICK_ROG_CHAKRAM "SDL_JOYSTICK_ROG_CHAKRAM"
|
||||
|
||||
/**
|
||||
* \brief A variable controlling whether a separate thread should be used
|
||||
* for handling joystick detection and raw input messages on Windows
|
||||
*
|
||||
|
@ -794,6 +1007,15 @@ extern "C" {
|
|||
*/
|
||||
#define SDL_HINT_JOYSTICK_THREAD "SDL_JOYSTICK_THREAD"
|
||||
|
||||
/**
|
||||
* \brief A variable controlling whether Windows.Gaming.Input should be used for controller handling.
|
||||
*
|
||||
* This variable can be set to the following values:
|
||||
* "0" - WGI is not used
|
||||
* "1" - WGI is used (the default)
|
||||
*/
|
||||
#define SDL_HINT_JOYSTICK_WGI "SDL_JOYSTICK_WGI"
|
||||
|
||||
/**
|
||||
* \brief Determines whether SDL enforces that DRM master is required in order
|
||||
* to initialize the KMSDRM video backend.
|
||||
|
@ -817,14 +1039,32 @@ extern "C" {
|
|||
*/
|
||||
#define SDL_HINT_KMSDRM_REQUIRE_DRM_MASTER "SDL_KMSDRM_REQUIRE_DRM_MASTER"
|
||||
|
||||
/**
|
||||
/**
|
||||
* \brief A comma separated list of devices to open as joysticks
|
||||
*
|
||||
* This variable is currently only used by the Linux joystick driver.
|
||||
*/
|
||||
#define SDL_HINT_JOYSTICK_DEVICE "SDL_JOYSTICK_DEVICE"
|
||||
|
||||
/**
|
||||
/**
|
||||
* \brief A variable controlling whether joysticks on Linux will always treat 'hat' axis inputs (ABS_HAT0X - ABS_HAT3Y) as 8-way digital hats without checking whether they may be analog.
|
||||
*
|
||||
* This variable can be set to the following values:
|
||||
* "0" - Only map hat axis inputs to digital hat outputs if the input axes appear to actually be digital (the default)
|
||||
* "1" - Always handle the input axes numbered ABS_HAT0X to ABS_HAT3Y as digital hats
|
||||
*/
|
||||
#define SDL_HINT_LINUX_DIGITAL_HATS "SDL_LINUX_DIGITAL_HATS"
|
||||
|
||||
/**
|
||||
* \brief A variable controlling whether digital hats on Linux will apply deadzones to their underlying input axes or use unfiltered values.
|
||||
*
|
||||
* This variable can be set to the following values:
|
||||
* "0" - Return digital hat values based on unfiltered input axis values
|
||||
* "1" - Return digital hat values with deadzones on the input axes taken into account (the default)
|
||||
*/
|
||||
#define SDL_HINT_LINUX_HAT_DEADZONES "SDL_LINUX_HAT_DEADZONES"
|
||||
|
||||
/**
|
||||
* \brief A variable controlling whether to use the classic /dev/input/js* joystick interface or the newer /dev/input/event* joystick interface on Linux
|
||||
*
|
||||
* This variable can be set to the following values:
|
||||
|
@ -835,7 +1075,7 @@ extern "C" {
|
|||
*/
|
||||
#define SDL_HINT_LINUX_JOYSTICK_CLASSIC "SDL_LINUX_JOYSTICK_CLASSIC"
|
||||
|
||||
/**
|
||||
/**
|
||||
* \brief A variable controlling whether joysticks on Linux adhere to their HID-defined deadzones or return unfiltered values.
|
||||
*
|
||||
* This variable can be set to the following values:
|
||||
|
@ -860,6 +1100,24 @@ extern "C" {
|
|||
*/
|
||||
#define SDL_HINT_MAC_CTRL_CLICK_EMULATE_RIGHT_CLICK "SDL_MAC_CTRL_CLICK_EMULATE_RIGHT_CLICK"
|
||||
|
||||
/**
|
||||
* \brief A variable controlling whether dispatching OpenGL context updates should block the dispatching thread until the main thread finishes processing
|
||||
*
|
||||
* This variable can be set to the following values:
|
||||
* "0" - Dispatching OpenGL context updates will block the dispatching thread until the main thread finishes processing (default).
|
||||
* "1" - Dispatching OpenGL context updates will allow the dispatching thread to continue execution.
|
||||
*
|
||||
* Generally you want the default, but if you have OpenGL code in a background thread on a Mac, and the main thread
|
||||
* hangs because it's waiting for that background thread, but that background thread is also hanging because it's
|
||||
* waiting for the main thread to do an update, this might fix your issue.
|
||||
*
|
||||
* This hint only applies to macOS.
|
||||
*
|
||||
* This hint is available since SDL 2.24.0.
|
||||
*
|
||||
*/
|
||||
#define SDL_HINT_MAC_OPENGL_ASYNC_DISPATCH "SDL_MAC_OPENGL_ASYNC_DISPATCH"
|
||||
|
||||
/**
|
||||
* \brief A variable setting the double click radius, in pixels.
|
||||
*/
|
||||
|
@ -886,6 +1144,22 @@ extern "C" {
|
|||
*/
|
||||
#define SDL_HINT_MOUSE_NORMAL_SPEED_SCALE "SDL_MOUSE_NORMAL_SPEED_SCALE"
|
||||
|
||||
/**
|
||||
* \brief A variable controlling whether relative mouse mode constrains the mouse to the center of the window
|
||||
*
|
||||
* This variable can be set to the following values:
|
||||
* "0" - Relative mouse mode constrains the mouse to the window
|
||||
* "1" - Relative mouse mode constrains the mouse to the center of the window
|
||||
*
|
||||
* Constraining to the center of the window works better for FPS games and when the
|
||||
* application is running over RDP. Constraining to the whole window works better
|
||||
* for 2D games and increases the chance that the mouse will be in the correct
|
||||
* position when using high DPI mice.
|
||||
*
|
||||
* By default SDL will constrain the mouse to the center of the window
|
||||
*/
|
||||
#define SDL_HINT_MOUSE_RELATIVE_MODE_CENTER "SDL_MOUSE_RELATIVE_MODE_CENTER"
|
||||
|
||||
/**
|
||||
* \brief A variable controlling whether relative mouse mode is implemented using mouse warping
|
||||
*
|
||||
|
@ -913,6 +1187,28 @@ extern "C" {
|
|||
*/
|
||||
#define SDL_HINT_MOUSE_RELATIVE_SPEED_SCALE "SDL_MOUSE_RELATIVE_SPEED_SCALE"
|
||||
|
||||
/**
|
||||
* \brief A variable controlling whether the system mouse acceleration curve is used for relative mouse motion.
|
||||
*
|
||||
* This variable can be set to the following values:
|
||||
* "0" - Relative mouse motion will be unscaled (the default)
|
||||
* "1" - Relative mouse motion will be scaled using the system mouse acceleration curve.
|
||||
*
|
||||
* If SDL_HINT_MOUSE_RELATIVE_SPEED_SCALE is set, that will override the system speed scale.
|
||||
*/
|
||||
#define SDL_HINT_MOUSE_RELATIVE_SYSTEM_SCALE "SDL_MOUSE_RELATIVE_SYSTEM_SCALE"
|
||||
|
||||
/**
|
||||
* \brief A variable controlling whether a motion event should be generated for mouse warping in relative mode.
|
||||
*
|
||||
* This variable can be set to the following values:
|
||||
* "0" - Warping the mouse will not generate a motion event in relative mode
|
||||
* "1" - Warping the mouse will generate a motion event in relative mode
|
||||
*
|
||||
* By default warping the mouse will not generate motion events in relative mode. This avoids the application having to filter out large relative motion due to warping.
|
||||
*/
|
||||
#define SDL_HINT_MOUSE_RELATIVE_WARP_MOTION "SDL_MOUSE_RELATIVE_WARP_MOTION"
|
||||
|
||||
/**
|
||||
* \brief A variable controlling whether mouse events should generate synthetic touch events
|
||||
*
|
||||
|
@ -922,6 +1218,19 @@ extern "C" {
|
|||
*/
|
||||
#define SDL_HINT_MOUSE_TOUCH_EVENTS "SDL_MOUSE_TOUCH_EVENTS"
|
||||
|
||||
/**
|
||||
* \brief A variable controlling whether the mouse is captured while mouse buttons are pressed
|
||||
*
|
||||
* This variable can be set to the following values:
|
||||
* "0" - The mouse is not captured while mouse buttons are pressed
|
||||
* "1" - The mouse is captured while mouse buttons are pressed
|
||||
*
|
||||
* By default the mouse is captured while mouse buttons are pressed so if the mouse is dragged
|
||||
* outside the window, the application continues to receive mouse events until the button is
|
||||
* released.
|
||||
*/
|
||||
#define SDL_HINT_MOUSE_AUTO_CAPTURE "SDL_MOUSE_AUTO_CAPTURE"
|
||||
|
||||
/**
|
||||
* \brief Tell SDL not to catch the SIGINT or SIGTERM signals.
|
||||
*
|
||||
|
@ -987,7 +1296,7 @@ extern "C" {
|
|||
* When polling for events, SDL_PumpEvents is used to gather new events from devices.
|
||||
* If a device keeps producing new events between calls to SDL_PumpEvents, a poll loop will
|
||||
* become stuck until the new events stop.
|
||||
* This is most noticable when moving a high frequency mouse.
|
||||
* This is most noticeable when moving a high frequency mouse.
|
||||
*
|
||||
* By default, poll sentinels are enabled.
|
||||
*/
|
||||
|
@ -1021,6 +1330,8 @@ extern "C" {
|
|||
*
|
||||
* This variable can be one of the following values:
|
||||
* "primary" (default), "portrait", "landscape", "inverted-portrait", "inverted-landscape"
|
||||
*
|
||||
* Since SDL 2.0.22 this variable accepts a comma-separated list of values above.
|
||||
*/
|
||||
#define SDL_HINT_QTWAYLAND_CONTENT_ORIENTATION "SDL_QTWAYLAND_CONTENT_ORIENTATION"
|
||||
|
||||
|
@ -1105,6 +1416,8 @@ extern "C" {
|
|||
*
|
||||
* This variable is case insensitive and can be set to the following values:
|
||||
* "direct3d"
|
||||
* "direct3d11"
|
||||
* "direct3d12"
|
||||
* "opengl"
|
||||
* "opengles2"
|
||||
* "opengles"
|
||||
|
@ -1161,7 +1474,29 @@ extern "C" {
|
|||
*/
|
||||
#define SDL_HINT_RENDER_VSYNC "SDL_RENDER_VSYNC"
|
||||
|
||||
/**
|
||||
/**
|
||||
* \brief A variable controlling whether the Metal render driver select low power device over default one
|
||||
*
|
||||
* This variable can be set to the following values:
|
||||
* "0" - Use the prefered OS device
|
||||
* "1" - Select a low power one
|
||||
*
|
||||
* By default the prefered OS device is used.
|
||||
*/
|
||||
#define SDL_HINT_RENDER_METAL_PREFER_LOW_POWER_DEVICE "SDL_RENDER_METAL_PREFER_LOW_POWER_DEVICE"
|
||||
|
||||
/**
|
||||
* \brief A variable controlling if VSYNC is automatically disable if doesn't reach the enough FPS
|
||||
*
|
||||
* This variable can be set to the following values:
|
||||
* "0" - It will be using VSYNC as defined in the main flag. Default
|
||||
* "1" - If VSYNC was previously enabled, then it will disable VSYNC if doesn't reach enough speed
|
||||
*
|
||||
* By default SDL does not enable the automatic VSYNC
|
||||
*/
|
||||
#define SDL_HINT_PS2_DYNAMIC_VSYNC "SDL_PS2_DYNAMIC_VSYNC"
|
||||
|
||||
/**
|
||||
* \brief A variable to control whether the return key on the soft keyboard
|
||||
* should hide the soft keyboard on Android and iOS.
|
||||
*
|
||||
|
@ -1278,6 +1613,18 @@ extern "C" {
|
|||
*/
|
||||
#define SDL_HINT_TOUCH_MOUSE_EVENTS "SDL_TOUCH_MOUSE_EVENTS"
|
||||
|
||||
/**
|
||||
* \brief A variable controlling which touchpad should generate synthetic mouse events
|
||||
*
|
||||
* This variable can be set to the following values:
|
||||
* "0" - Only front touchpad should generate mouse events. Default
|
||||
* "1" - Only back touchpad should generate mouse events.
|
||||
* "2" - Both touchpads should generate mouse events.
|
||||
*
|
||||
* By default SDL will generate mouse events for all touch devices
|
||||
*/
|
||||
#define SDL_HINT_VITA_TOUCH_MOUSE_DEVICE "SDL_HINT_VITA_TOUCH_MOUSE_DEVICE"
|
||||
|
||||
/**
|
||||
* \brief A variable controlling whether the Android / tvOS remotes
|
||||
* should be listed as joystick devices, instead of sending keyboard events.
|
||||
|
@ -1362,9 +1709,7 @@ extern "C" {
|
|||
* SDL_WINDOW_RESIZABLE windows will offer the "fullscreen"
|
||||
* button on their titlebars).
|
||||
*
|
||||
* The default value is "1". Spaces are disabled regardless of this hint if
|
||||
* the OS isn't at least Mac OS X Lion (10.7). This hint must be set before
|
||||
* any windows are created.
|
||||
* The default value is "1". This hint must be set before any windows are created.
|
||||
*/
|
||||
#define SDL_HINT_VIDEO_MAC_FULLSCREEN_SPACES "SDL_VIDEO_MAC_FULLSCREEN_SPACES"
|
||||
|
||||
|
@ -1387,6 +1732,52 @@ extern "C" {
|
|||
*/
|
||||
#define SDL_HINT_VIDEO_WAYLAND_ALLOW_LIBDECOR "SDL_VIDEO_WAYLAND_ALLOW_LIBDECOR"
|
||||
|
||||
/**
|
||||
* \brief A variable controlling whether the libdecor Wayland backend is preferred over native decrations.
|
||||
*
|
||||
* When this hint is set, libdecor will be used to provide window decorations, even if xdg-decoration is
|
||||
* available. (Note that, by default, libdecor will use xdg-decoration itself if available).
|
||||
*
|
||||
* This variable can be set to the following values:
|
||||
* "0" - libdecor is enabled only if server-side decorations are unavailable.
|
||||
* "1" - libdecor is always enabled if available.
|
||||
*
|
||||
* libdecor is used over xdg-shell when xdg-decoration protocol is unavailable.
|
||||
*/
|
||||
#define SDL_HINT_VIDEO_WAYLAND_PREFER_LIBDECOR "SDL_VIDEO_WAYLAND_PREFER_LIBDECOR"
|
||||
|
||||
/**
|
||||
* \brief A variable controlling whether video mode emulation is enabled under Wayland.
|
||||
*
|
||||
* When this hint is set, a standard set of emulated CVT video modes will be exposed for use by the application.
|
||||
* If it is disabled, the only modes exposed will be the logical desktop size and, in the case of a scaled
|
||||
* desktop, the native display resolution.
|
||||
*
|
||||
* This variable can be set to the following values:
|
||||
* "0" - Video mode emulation is disabled.
|
||||
* "1" - Video mode emulation is enabled.
|
||||
*
|
||||
* By default video mode emulation is enabled.
|
||||
*/
|
||||
#define SDL_HINT_VIDEO_WAYLAND_MODE_EMULATION "SDL_VIDEO_WAYLAND_MODE_EMULATION"
|
||||
|
||||
/**
|
||||
* \brief Enable or disable mouse pointer warp emulation, needed by some older games.
|
||||
*
|
||||
* When this hint is set, any SDL will emulate mouse warps using relative mouse mode.
|
||||
* This is required for some older games (such as Source engine games), which warp the
|
||||
* mouse to the centre of the screen rather than using relative mouse motion. Note that
|
||||
* relative mouse mode may have different mouse acceleration behaviour than pointer warps.
|
||||
*
|
||||
* This variable can be set to the following values:
|
||||
* "0" - All mouse warps fail, as mouse warping is not available under wayland.
|
||||
* "1" - Some mouse warps will be emulated by forcing relative mouse mode.
|
||||
*
|
||||
* If not set, this is automatically enabled unless an application uses relative mouse
|
||||
* mode directly.
|
||||
*/
|
||||
#define SDL_HINT_VIDEO_WAYLAND_EMULATE_MOUSE_WARP "SDL_VIDEO_WAYLAND_EMULATE_MOUSE_WARP"
|
||||
|
||||
/**
|
||||
* \brief A variable that is the address of another SDL_Window* (as a hex string formatted with "%p").
|
||||
*
|
||||
|
@ -1406,6 +1797,28 @@ extern "C" {
|
|||
*/
|
||||
#define SDL_HINT_VIDEO_WINDOW_SHARE_PIXEL_FORMAT "SDL_VIDEO_WINDOW_SHARE_PIXEL_FORMAT"
|
||||
|
||||
/**
|
||||
* \brief When calling SDL_CreateWindowFrom(), make the window compatible with OpenGL.
|
||||
*
|
||||
* This variable can be set to the following values:
|
||||
* "0" - Don't add any graphics flags to the SDL_WindowFlags
|
||||
* "1" - Add SDL_WINDOW_OPENGL to the SDL_WindowFlags
|
||||
*
|
||||
* By default SDL will not make the foreign window compatible with OpenGL.
|
||||
*/
|
||||
#define SDL_HINT_VIDEO_FOREIGN_WINDOW_OPENGL "SDL_VIDEO_FOREIGN_WINDOW_OPENGL"
|
||||
|
||||
/**
|
||||
* \brief When calling SDL_CreateWindowFrom(), make the window compatible with Vulkan.
|
||||
*
|
||||
* This variable can be set to the following values:
|
||||
* "0" - Don't add any graphics flags to the SDL_WindowFlags
|
||||
* "1" - Add SDL_WINDOW_VULKAN to the SDL_WindowFlags
|
||||
*
|
||||
* By default SDL will not make the foreign window compatible with Vulkan.
|
||||
*/
|
||||
#define SDL_HINT_VIDEO_FOREIGN_WINDOW_VULKAN "SDL_VIDEO_FOREIGN_WINDOW_VULKAN"
|
||||
|
||||
/**
|
||||
* \brief A variable specifying which shader compiler to preload when using the Chrome ANGLE binaries
|
||||
*
|
||||
|
@ -1466,13 +1879,11 @@ extern "C" {
|
|||
#define SDL_HINT_VIDEO_X11_WINDOW_VISUALID "SDL_VIDEO_X11_WINDOW_VISUALID"
|
||||
|
||||
/**
|
||||
* \brief A variable controlling whether the X11 Xinerama extension should be used.
|
||||
* \brief A no-longer-used variable controlling whether the X11 Xinerama extension should be used.
|
||||
*
|
||||
* This variable can be set to the following values:
|
||||
* "0" - Disable Xinerama
|
||||
* "1" - Enable Xinerama
|
||||
*
|
||||
* By default SDL will use Xinerama if it is available.
|
||||
* Before SDL 2.0.24, this would let apps and users disable Xinerama support on X11.
|
||||
* Now SDL never uses Xinerama, and does not check for this hint at all.
|
||||
* The preprocessor define is left here for source compatibility.
|
||||
*/
|
||||
#define SDL_HINT_VIDEO_X11_XINERAMA "SDL_VIDEO_X11_XINERAMA"
|
||||
|
||||
|
@ -1483,18 +1894,16 @@ extern "C" {
|
|||
* "0" - Disable XRandR
|
||||
* "1" - Enable XRandR
|
||||
*
|
||||
* By default SDL will not use XRandR because of window manager issues.
|
||||
* By default SDL will use XRandR.
|
||||
*/
|
||||
#define SDL_HINT_VIDEO_X11_XRANDR "SDL_VIDEO_X11_XRANDR"
|
||||
|
||||
/**
|
||||
* \brief A variable controlling whether the X11 VidMode extension should be used.
|
||||
* \brief A no-longer-used variable controlling whether the X11 VidMode extension should be used.
|
||||
*
|
||||
* This variable can be set to the following values:
|
||||
* "0" - Disable XVidMode
|
||||
* "1" - Enable XVidMode
|
||||
*
|
||||
* By default SDL will use XVidMode if it is available.
|
||||
* Before SDL 2.0.24, this would let apps and users disable XVidMode support on X11.
|
||||
* Now SDL never uses XVidMode, and does not check for this hint at all.
|
||||
* The preprocessor define is left here for source compatibility.
|
||||
*/
|
||||
#define SDL_HINT_VIDEO_X11_XVIDMODE "SDL_VIDEO_X11_XVIDMODE"
|
||||
|
||||
|
@ -1578,6 +1987,28 @@ extern "C" {
|
|||
*/
|
||||
#define SDL_HINT_WINDOWS_DISABLE_THREAD_NAMING "SDL_WINDOWS_DISABLE_THREAD_NAMING"
|
||||
|
||||
/**
|
||||
* \brief Controls whether menus can be opened with their keyboard shortcut (Alt+mnemonic).
|
||||
*
|
||||
* If the mnemonics are enabled, then menus can be opened by pressing the Alt
|
||||
* key and the corresponding mnemonic (for example, Alt+F opens the File menu).
|
||||
* However, in case an invalid mnemonic is pressed, Windows makes an audible
|
||||
* beep to convey that nothing happened. This is true even if the window has
|
||||
* no menu at all!
|
||||
*
|
||||
* Because most SDL applications don't have menus, and some want to use the Alt
|
||||
* key for other purposes, SDL disables mnemonics (and the beeping) by default.
|
||||
*
|
||||
* Note: This also affects keyboard events: with mnemonics enabled, when a
|
||||
* menu is opened from the keyboard, you will not receive a KEYUP event for
|
||||
* the mnemonic key, and *might* not receive one for Alt.
|
||||
*
|
||||
* This variable can be set to the following values:
|
||||
* "0" - Alt+mnemonic does nothing, no beeping. (default)
|
||||
* "1" - Alt+mnemonic opens menus, invalid mnemonics produce a beep.
|
||||
*/
|
||||
#define SDL_HINT_WINDOWS_ENABLE_MENU_MNEMONICS "SDL_WINDOWS_ENABLE_MENU_MNEMONICS"
|
||||
|
||||
/**
|
||||
* \brief A variable controlling whether the windows message loop is processed by SDL
|
||||
*
|
||||
|
@ -1654,6 +2085,57 @@ extern "C" {
|
|||
*/
|
||||
#define SDL_HINT_WINDOWS_USE_D3D9EX "SDL_WINDOWS_USE_D3D9EX"
|
||||
|
||||
/**
|
||||
* \brief Controls whether SDL will declare the process to be DPI aware.
|
||||
*
|
||||
* This hint must be set before initializing the video subsystem.
|
||||
*
|
||||
* The main purpose of declaring DPI awareness is to disable OS bitmap scaling of SDL windows on monitors with
|
||||
* a DPI scale factor.
|
||||
*
|
||||
* This hint is equivalent to requesting DPI awareness via external means (e.g. calling SetProcessDpiAwarenessContext)
|
||||
* and does not cause SDL to use a virtualized coordinate system, so it will generally give you 1 SDL coordinate = 1 pixel
|
||||
* even on high-DPI displays.
|
||||
*
|
||||
* For more information, see:
|
||||
* https://docs.microsoft.com/en-us/windows/win32/hidpi/high-dpi-desktop-application-development-on-windows
|
||||
*
|
||||
* This variable can be set to the following values:
|
||||
* "" - Do not change the DPI awareness (default).
|
||||
* "unaware" - Declare the process as DPI unaware. (Windows 8.1 and later).
|
||||
* "system" - Request system DPI awareness. (Vista and later).
|
||||
* "permonitor" - Request per-monitor DPI awareness. (Windows 8.1 and later).
|
||||
* "permonitorv2" - Request per-monitor V2 DPI awareness. (Windows 10, version 1607 and later).
|
||||
* The most visible difference from "permonitor" is that window title bar will be scaled
|
||||
* to the visually correct size when dragging between monitors with different scale factors.
|
||||
* This is the preferred DPI awareness level.
|
||||
*
|
||||
* If the requested DPI awareness is not available on the currently running OS, SDL will try to request the best
|
||||
* available match.
|
||||
*/
|
||||
#define SDL_HINT_WINDOWS_DPI_AWARENESS "SDL_WINDOWS_DPI_AWARENESS"
|
||||
|
||||
/**
|
||||
* \brief Uses DPI-scaled points as the SDL coordinate system on Windows.
|
||||
*
|
||||
* This changes the SDL coordinate system units to be DPI-scaled points, rather than pixels everywhere.
|
||||
* This means windows will be appropriately sized, even when created on high-DPI displays with scaling.
|
||||
*
|
||||
* e.g. requesting a 640x480 window from SDL, on a display with 125% scaling in Windows display settings,
|
||||
* will create a window with an 800x600 client area (in pixels).
|
||||
*
|
||||
* Setting this to "1" implicitly requests process DPI awareness (setting SDL_WINDOWS_DPI_AWARENESS is unnecessary),
|
||||
* and forces SDL_WINDOW_ALLOW_HIGHDPI on all windows.
|
||||
*
|
||||
* This variable can be set to the following values:
|
||||
* "0" - SDL coordinates equal Windows coordinates. No automatic window resizing when dragging
|
||||
* between monitors with different scale factors (unless this is performed by
|
||||
* Windows itself, which is the case when the process is DPI unaware).
|
||||
* "1" - SDL coordinates are in DPI-scaled points. Automatically resize windows as needed on
|
||||
* displays with non-100% scale factors.
|
||||
*/
|
||||
#define SDL_HINT_WINDOWS_DPI_SCALING "SDL_WINDOWS_DPI_SCALING"
|
||||
|
||||
/**
|
||||
* \brief A variable controlling whether the window frame and title bar are interactive when the cursor is hidden
|
||||
*
|
||||
|
@ -1796,6 +2278,15 @@ extern "C" {
|
|||
*/
|
||||
#define SDL_HINT_XINPUT_ENABLED "SDL_XINPUT_ENABLED"
|
||||
|
||||
/**
|
||||
* \brief A variable that lets you disable the detection and use of DirectInput gamepad devices
|
||||
*
|
||||
* The variable can be set to the following values:
|
||||
* "0" - Disable DirectInput detection (only uses XInput)
|
||||
* "1" - Enable DirectInput detection (the default)
|
||||
*/
|
||||
#define SDL_HINT_DIRECTINPUT_ENABLED "SDL_DIRECTINPUT_ENABLED"
|
||||
|
||||
/**
|
||||
* \brief A variable that causes SDL to use the old axis and button mapping for XInput devices.
|
||||
*
|
||||
|
@ -1824,6 +2315,133 @@ extern "C" {
|
|||
*/
|
||||
#define SDL_HINT_AUDIO_INCLUDE_MONITORS "SDL_AUDIO_INCLUDE_MONITORS"
|
||||
|
||||
/**
|
||||
* \brief A variable that forces X11 windows to create as a custom type.
|
||||
*
|
||||
* This is currently only used for X11 and ignored elsewhere.
|
||||
*
|
||||
* During SDL_CreateWindow, SDL uses the _NET_WM_WINDOW_TYPE X11 property
|
||||
* to report to the window manager the type of window it wants to create.
|
||||
* This might be set to various things if SDL_WINDOW_TOOLTIP or
|
||||
* SDL_WINDOW_POPUP_MENU, etc, were specified. For "normal" windows that
|
||||
* haven't set a specific type, this hint can be used to specify a custom
|
||||
* type. For example, a dock window might set this to
|
||||
* "_NET_WM_WINDOW_TYPE_DOCK".
|
||||
*
|
||||
* If not set or set to "", this hint is ignored. This hint must be set
|
||||
* before the SDL_CreateWindow() call that it is intended to affect.
|
||||
*
|
||||
* This hint is available since SDL 2.0.22.
|
||||
*/
|
||||
#define SDL_HINT_X11_WINDOW_TYPE "SDL_X11_WINDOW_TYPE"
|
||||
|
||||
/**
|
||||
* \brief A variable that decides whether to send SDL_QUIT when closing the final window.
|
||||
*
|
||||
* By default, SDL sends an SDL_QUIT event when there is only one window
|
||||
* and it receives an SDL_WINDOWEVENT_CLOSE event, under the assumption most
|
||||
* apps would also take the loss of this window as a signal to terminate the
|
||||
* program.
|
||||
*
|
||||
* However, it's not unreasonable in some cases to have the program continue
|
||||
* to live on, perhaps to create new windows later.
|
||||
*
|
||||
* Changing this hint to "0" will cause SDL to not send an SDL_QUIT event
|
||||
* when the final window is requesting to close. Note that in this case,
|
||||
* there are still other legitimate reasons one might get an SDL_QUIT
|
||||
* event: choosing "Quit" from the macOS menu bar, sending a SIGINT (ctrl-c)
|
||||
* on Unix, etc.
|
||||
*
|
||||
* The default value is "1". This hint can be changed at any time.
|
||||
*
|
||||
* This hint is available since SDL 2.0.22. Before then, you always get
|
||||
* an SDL_QUIT event when closing the final window.
|
||||
*/
|
||||
#define SDL_HINT_QUIT_ON_LAST_WINDOW_CLOSE "SDL_QUIT_ON_LAST_WINDOW_CLOSE"
|
||||
|
||||
|
||||
/**
|
||||
* \brief A variable that decides what video backend to use.
|
||||
*
|
||||
* By default, SDL will try all available video backends in a reasonable
|
||||
* order until it finds one that can work, but this hint allows the app
|
||||
* or user to force a specific target, such as "x11" if, say, you are
|
||||
* on Wayland but want to try talking to the X server instead.
|
||||
*
|
||||
* This functionality has existed since SDL 2.0.0 (indeed, before that)
|
||||
* but before 2.0.22 this was an environment variable only. In 2.0.22,
|
||||
* it was upgraded to a full SDL hint, so you can set the environment
|
||||
* variable as usual or programatically set the hint with SDL_SetHint,
|
||||
* which won't propagate to child processes.
|
||||
*
|
||||
* The default value is unset, in which case SDL will try to figure out
|
||||
* the best video backend on your behalf. This hint needs to be set
|
||||
* before SDL_Init() is called to be useful.
|
||||
*
|
||||
* This hint is available since SDL 2.0.22. Before then, you could set
|
||||
* the environment variable to get the same effect.
|
||||
*/
|
||||
#define SDL_HINT_VIDEODRIVER "SDL_VIDEODRIVER"
|
||||
|
||||
/**
|
||||
* \brief A variable that decides what audio backend to use.
|
||||
*
|
||||
* By default, SDL will try all available audio backends in a reasonable
|
||||
* order until it finds one that can work, but this hint allows the app
|
||||
* or user to force a specific target, such as "alsa" if, say, you are
|
||||
* on PulseAudio but want to try talking to the lower level instead.
|
||||
*
|
||||
* This functionality has existed since SDL 2.0.0 (indeed, before that)
|
||||
* but before 2.0.22 this was an environment variable only. In 2.0.22,
|
||||
* it was upgraded to a full SDL hint, so you can set the environment
|
||||
* variable as usual or programatically set the hint with SDL_SetHint,
|
||||
* which won't propagate to child processes.
|
||||
*
|
||||
* The default value is unset, in which case SDL will try to figure out
|
||||
* the best audio backend on your behalf. This hint needs to be set
|
||||
* before SDL_Init() is called to be useful.
|
||||
*
|
||||
* This hint is available since SDL 2.0.22. Before then, you could set
|
||||
* the environment variable to get the same effect.
|
||||
*/
|
||||
#define SDL_HINT_AUDIODRIVER "SDL_AUDIODRIVER"
|
||||
|
||||
/**
|
||||
* \brief A variable that decides what KMSDRM device to use.
|
||||
*
|
||||
* Internally, SDL might open something like "/dev/dri/cardNN" to
|
||||
* access KMSDRM functionality, where "NN" is a device index number.
|
||||
*
|
||||
* SDL makes a guess at the best index to use (usually zero), but the
|
||||
* app or user can set this hint to a number between 0 and 99 to
|
||||
* force selection.
|
||||
*
|
||||
* This hint is available since SDL 2.24.0.
|
||||
*/
|
||||
#define SDL_HINT_KMSDRM_DEVICE_INDEX "SDL_KMSDRM_DEVICE_INDEX"
|
||||
|
||||
|
||||
/**
|
||||
* \brief A variable that treats trackpads as touch devices.
|
||||
*
|
||||
* On macOS (and possibly other platforms in the future), SDL will report
|
||||
* touches on a trackpad as mouse input, which is generally what users
|
||||
* expect from this device; however, these are often actually full
|
||||
* multitouch-capable touch devices, so it might be preferable to some apps
|
||||
* to treat them as such.
|
||||
*
|
||||
* Setting this hint to true will make the trackpad input report as a
|
||||
* multitouch device instead of a mouse. The default is false.
|
||||
*
|
||||
* Note that most platforms don't support this hint. As of 2.24.0, it
|
||||
* only supports MacBooks' trackpads on macOS. Others may follow later.
|
||||
*
|
||||
* This hint is checked during SDL_Init and can not be changed after.
|
||||
*
|
||||
* This hint is available since SDL 2.24.0.
|
||||
*/
|
||||
#define SDL_HINT_TRACKPAD_IS_TOUCH_ONLY "SDL_TRACKPAD_IS_TOUCH_ONLY"
|
||||
|
||||
|
||||
/**
|
||||
* \brief An enumeration of hint priorities
|
||||
|
@ -1876,6 +2494,38 @@ extern DECLSPEC SDL_bool SDLCALL SDL_SetHintWithPriority(const char *name,
|
|||
extern DECLSPEC SDL_bool SDLCALL SDL_SetHint(const char *name,
|
||||
const char *value);
|
||||
|
||||
/**
|
||||
* Reset a hint to the default value.
|
||||
*
|
||||
* This will reset a hint to the value of the environment variable, or NULL if
|
||||
* the environment isn't set. Callbacks will be called normally with this
|
||||
* change.
|
||||
*
|
||||
* \param name the hint to set
|
||||
* \returns SDL_TRUE if the hint was set, SDL_FALSE otherwise.
|
||||
*
|
||||
* \since This function is available since SDL 2.24.0.
|
||||
*
|
||||
* \sa SDL_GetHint
|
||||
* \sa SDL_SetHint
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_ResetHint(const char *name);
|
||||
|
||||
/**
|
||||
* Reset all hints to the default values.
|
||||
*
|
||||
* This will reset all hints to the value of the associated environment
|
||||
* variable, or NULL if the environment isn't set. Callbacks will be called
|
||||
* normally with this change.
|
||||
*
|
||||
* \since This function is available since SDL 2.26.0.
|
||||
*
|
||||
* \sa SDL_GetHint
|
||||
* \sa SDL_SetHint
|
||||
* \sa SDL_ResetHint
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_ResetHints(void);
|
||||
|
||||
/**
|
||||
* Get the value of a hint.
|
||||
*
|
||||
|
@ -1949,9 +2599,16 @@ extern DECLSPEC void SDLCALL SDL_DelHintCallback(const char *name,
|
|||
/**
|
||||
* Clear all hints.
|
||||
*
|
||||
* This function is automatically called during SDL_Quit().
|
||||
* This function is automatically called during SDL_Quit(), and deletes all
|
||||
* callbacks without calling them and frees all memory associated with hints.
|
||||
* If you're calling this from application code you probably want to call
|
||||
* SDL_ResetHints() instead.
|
||||
*
|
||||
* This function will be removed from the API the next time we rev the ABI.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_ResetHints
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_ClearHints(void);
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2023 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
@ -43,6 +43,8 @@
|
|||
|
||||
#include "SDL_stdinc.h"
|
||||
#include "SDL_error.h"
|
||||
#include "SDL_guid.h"
|
||||
#include "SDL_mutex.h"
|
||||
|
||||
#include "begin_code.h"
|
||||
/* Set up for C function definitions, even when using C++ */
|
||||
|
@ -65,13 +67,14 @@ extern "C" {
|
|||
/**
|
||||
* The joystick structure used to identify an SDL joystick
|
||||
*/
|
||||
#ifdef SDL_THREAD_SAFETY_ANALYSIS
|
||||
extern SDL_mutex *SDL_joystick_lock;
|
||||
#endif
|
||||
struct _SDL_Joystick;
|
||||
typedef struct _SDL_Joystick SDL_Joystick;
|
||||
|
||||
/* A structure that encodes the stable unique id for a joystick device */
|
||||
typedef struct {
|
||||
Uint8 data[16];
|
||||
} SDL_JoystickGUID;
|
||||
typedef SDL_GUID SDL_JoystickGUID;
|
||||
|
||||
/**
|
||||
* This is a unique ID for a joystick for the time it is connected to the system,
|
||||
|
@ -125,9 +128,14 @@ typedef enum
|
|||
* the API functions that take a joystick index will be valid, and joystick
|
||||
* and game controller events will not be delivered.
|
||||
*
|
||||
* As of SDL 2.26.0, you can take the joystick lock around reinitializing the
|
||||
* joystick subsystem, to prevent other threads from seeing joysticks in an
|
||||
* uninitialized state. However, all open joysticks will be closed and SDL
|
||||
* functions called with them will fail.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.7.
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_LockJoysticks(void);
|
||||
extern DECLSPEC void SDLCALL SDL_LockJoysticks(void) SDL_ACQUIRE(SDL_joystick_lock);
|
||||
|
||||
|
||||
/**
|
||||
|
@ -142,7 +150,7 @@ extern DECLSPEC void SDLCALL SDL_LockJoysticks(void);
|
|||
*
|
||||
* \since This function is available since SDL 2.0.7.
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_UnlockJoysticks(void);
|
||||
extern DECLSPEC void SDLCALL SDL_UnlockJoysticks(void) SDL_RELEASE(SDL_joystick_lock);
|
||||
|
||||
/**
|
||||
* Count the number of joysticks attached to the system.
|
||||
|
@ -153,6 +161,7 @@ extern DECLSPEC void SDLCALL SDL_UnlockJoysticks(void);
|
|||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_JoystickName
|
||||
* \sa SDL_JoystickPath
|
||||
* \sa SDL_JoystickOpen
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_NumJoysticks(void);
|
||||
|
@ -174,6 +183,23 @@ extern DECLSPEC int SDLCALL SDL_NumJoysticks(void);
|
|||
*/
|
||||
extern DECLSPEC const char *SDLCALL SDL_JoystickNameForIndex(int device_index);
|
||||
|
||||
/**
|
||||
* Get the implementation dependent path of a joystick.
|
||||
*
|
||||
* This can be called before any joysticks are opened.
|
||||
*
|
||||
* \param device_index the index of the joystick to query (the N'th joystick
|
||||
* on the system)
|
||||
* \returns the path of the selected joystick. If no path can be found, this
|
||||
* function returns NULL; call SDL_GetError() for more information.
|
||||
*
|
||||
* \since This function is available since SDL 2.24.0.
|
||||
*
|
||||
* \sa SDL_JoystickPath
|
||||
* \sa SDL_JoystickOpen
|
||||
*/
|
||||
extern DECLSPEC const char *SDLCALL SDL_JoystickPathForIndex(int device_index);
|
||||
|
||||
/**
|
||||
* Get the player index of a joystick, or -1 if it's not available This can be
|
||||
* called before any joysticks are opened.
|
||||
|
@ -262,13 +288,12 @@ extern DECLSPEC SDL_JoystickType SDLCALL SDL_JoystickGetDeviceType(int device_in
|
|||
/**
|
||||
* Get the instance ID of a joystick.
|
||||
*
|
||||
* This can be called before any joysticks are opened. If the index is out of
|
||||
* range, this function will return -1.
|
||||
* This can be called before any joysticks are opened.
|
||||
*
|
||||
* \param device_index the index of the joystick to query (the N'th joystick
|
||||
* on the system
|
||||
* \returns the instance id of the selected joystick. If called on an invalid
|
||||
* index, this function returns zero
|
||||
* index, this function returns -1.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.6.
|
||||
*/
|
||||
|
@ -330,6 +355,54 @@ extern DECLSPEC int SDLCALL SDL_JoystickAttachVirtual(SDL_JoystickType type,
|
|||
int nbuttons,
|
||||
int nhats);
|
||||
|
||||
/**
|
||||
* The structure that defines an extended virtual joystick description
|
||||
*
|
||||
* The caller must zero the structure and then initialize the version with `SDL_VIRTUAL_JOYSTICK_DESC_VERSION` before passing it to SDL_JoystickAttachVirtualEx()
|
||||
* All other elements of this structure are optional and can be left 0.
|
||||
*
|
||||
* \sa SDL_JoystickAttachVirtualEx
|
||||
*/
|
||||
typedef struct SDL_VirtualJoystickDesc
|
||||
{
|
||||
Uint16 version; /**< `SDL_VIRTUAL_JOYSTICK_DESC_VERSION` */
|
||||
Uint16 type; /**< `SDL_JoystickType` */
|
||||
Uint16 naxes; /**< the number of axes on this joystick */
|
||||
Uint16 nbuttons; /**< the number of buttons on this joystick */
|
||||
Uint16 nhats; /**< the number of hats on this joystick */
|
||||
Uint16 vendor_id; /**< the USB vendor ID of this joystick */
|
||||
Uint16 product_id; /**< the USB product ID of this joystick */
|
||||
Uint16 padding; /**< unused */
|
||||
Uint32 button_mask; /**< A mask of which buttons are valid for this controller
|
||||
e.g. (1 << SDL_CONTROLLER_BUTTON_A) */
|
||||
Uint32 axis_mask; /**< A mask of which axes are valid for this controller
|
||||
e.g. (1 << SDL_CONTROLLER_AXIS_LEFTX) */
|
||||
const char *name; /**< the name of the joystick */
|
||||
|
||||
void *userdata; /**< User data pointer passed to callbacks */
|
||||
void (SDLCALL *Update)(void *userdata); /**< Called when the joystick state should be updated */
|
||||
void (SDLCALL *SetPlayerIndex)(void *userdata, int player_index); /**< Called when the player index is set */
|
||||
int (SDLCALL *Rumble)(void *userdata, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble); /**< Implements SDL_JoystickRumble() */
|
||||
int (SDLCALL *RumbleTriggers)(void *userdata, Uint16 left_rumble, Uint16 right_rumble); /**< Implements SDL_JoystickRumbleTriggers() */
|
||||
int (SDLCALL *SetLED)(void *userdata, Uint8 red, Uint8 green, Uint8 blue); /**< Implements SDL_JoystickSetLED() */
|
||||
int (SDLCALL *SendEffect)(void *userdata, const void *data, int size); /**< Implements SDL_JoystickSendEffect() */
|
||||
|
||||
} SDL_VirtualJoystickDesc;
|
||||
|
||||
/**
|
||||
* \brief The current version of the SDL_VirtualJoystickDesc structure
|
||||
*/
|
||||
#define SDL_VIRTUAL_JOYSTICK_DESC_VERSION 1
|
||||
|
||||
/**
|
||||
* Attach a new virtual joystick with extended properties.
|
||||
*
|
||||
* \returns the joystick's device index, or -1 if an error occurred.
|
||||
*
|
||||
* \since This function is available since SDL 2.24.0.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_JoystickAttachVirtualEx(const SDL_VirtualJoystickDesc *desc);
|
||||
|
||||
/**
|
||||
* Detach a virtual joystick.
|
||||
*
|
||||
|
@ -360,6 +433,10 @@ extern DECLSPEC SDL_bool SDLCALL SDL_JoystickIsVirtual(int device_index);
|
|||
* the following: SDL_PollEvent, SDL_PumpEvents, SDL_WaitEventTimeout,
|
||||
* SDL_WaitEvent.
|
||||
*
|
||||
* Note that when sending trigger axes, you should scale the value to the full
|
||||
* range of Sint16. For example, a trigger at rest would have the value of
|
||||
* `SDL_JOYSTICK_AXIS_MIN`.
|
||||
*
|
||||
* \param joystick the virtual joystick on which to set state.
|
||||
* \param axis the specific axis on the virtual joystick to set.
|
||||
* \param value the new value for the specified axis.
|
||||
|
@ -419,6 +496,19 @@ extern DECLSPEC int SDLCALL SDL_JoystickSetVirtualHat(SDL_Joystick *joystick, in
|
|||
*/
|
||||
extern DECLSPEC const char *SDLCALL SDL_JoystickName(SDL_Joystick *joystick);
|
||||
|
||||
/**
|
||||
* Get the implementation dependent path of a joystick.
|
||||
*
|
||||
* \param joystick the SDL_Joystick obtained from SDL_JoystickOpen()
|
||||
* \returns the path of the selected joystick. If no path can be found, this
|
||||
* function returns NULL; call SDL_GetError() for more information.
|
||||
*
|
||||
* \since This function is available since SDL 2.24.0.
|
||||
*
|
||||
* \sa SDL_JoystickPathForIndex
|
||||
*/
|
||||
extern DECLSPEC const char *SDLCALL SDL_JoystickPath(SDL_Joystick *joystick);
|
||||
|
||||
/**
|
||||
* Get the player index of an opened joystick.
|
||||
*
|
||||
|
@ -436,7 +526,8 @@ extern DECLSPEC int SDLCALL SDL_JoystickGetPlayerIndex(SDL_Joystick *joystick);
|
|||
* Set the player index of an opened joystick.
|
||||
*
|
||||
* \param joystick the SDL_Joystick obtained from SDL_JoystickOpen()
|
||||
* \param player_index the player index to set.
|
||||
* \param player_index Player index to assign to this joystick, or -1 to clear
|
||||
* the player index and turn off player LEDs.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.12.
|
||||
*/
|
||||
|
@ -495,6 +586,19 @@ extern DECLSPEC Uint16 SDLCALL SDL_JoystickGetProduct(SDL_Joystick *joystick);
|
|||
*/
|
||||
extern DECLSPEC Uint16 SDLCALL SDL_JoystickGetProductVersion(SDL_Joystick *joystick);
|
||||
|
||||
/**
|
||||
* Get the firmware version of an opened joystick, if available.
|
||||
*
|
||||
* If the firmware version isn't available this function returns 0.
|
||||
*
|
||||
* \param joystick the SDL_Joystick obtained from SDL_JoystickOpen()
|
||||
* \returns the firmware version of the selected joystick, or 0 if
|
||||
* unavailable.
|
||||
*
|
||||
* \since This function is available since SDL 2.24.0.
|
||||
*/
|
||||
extern DECLSPEC Uint16 SDLCALL SDL_JoystickGetFirmwareVersion(SDL_Joystick *joystick);
|
||||
|
||||
/**
|
||||
* Get the serial number of an opened joystick, if available.
|
||||
*
|
||||
|
@ -551,6 +655,25 @@ extern DECLSPEC void SDLCALL SDL_JoystickGetGUIDString(SDL_JoystickGUID guid, ch
|
|||
*/
|
||||
extern DECLSPEC SDL_JoystickGUID SDLCALL SDL_JoystickGetGUIDFromString(const char *pchGUID);
|
||||
|
||||
/**
|
||||
* Get the device information encoded in a SDL_JoystickGUID structure
|
||||
*
|
||||
* \param guid the SDL_JoystickGUID you wish to get info about
|
||||
* \param vendor A pointer filled in with the device VID, or 0 if not
|
||||
* available
|
||||
* \param product A pointer filled in with the device PID, or 0 if not
|
||||
* available
|
||||
* \param version A pointer filled in with the device version, or 0 if not
|
||||
* available
|
||||
* \param crc16 A pointer filled in with a CRC used to distinguish different
|
||||
* products with the same VID/PID, or 0 if not available
|
||||
*
|
||||
* \since This function is available since SDL 2.26.0.
|
||||
*
|
||||
* \sa SDL_JoystickGetDeviceGUID
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_GetJoystickGUIDInfo(SDL_JoystickGUID guid, Uint16 *vendor, Uint16 *product, Uint16 *version, Uint16 *crc16);
|
||||
|
||||
/**
|
||||
* Get the status of a specified joystick.
|
||||
*
|
||||
|
@ -829,9 +952,9 @@ extern DECLSPEC int SDLCALL SDL_JoystickRumble(SDL_Joystick *joystick, Uint16 lo
|
|||
* Each call to this function cancels any previous trigger rumble effect, and
|
||||
* calling it with 0 intensity stops any rumbling.
|
||||
*
|
||||
* Note that this function is for _trigger_ rumble; the first joystick to
|
||||
* support this was the PlayStation 5's DualShock 5 controller. If you want
|
||||
* the (more common) whole-controller rumble, use SDL_JoystickRumble()
|
||||
* Note that this is rumbling of the _triggers_ and not the game controller as
|
||||
* a whole. This is currently only supported on Xbox One controllers. If you
|
||||
* want the (more common) whole-controller rumble, use SDL_JoystickRumble()
|
||||
* instead.
|
||||
*
|
||||
* \param joystick The joystick to vibrate
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2023 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
@ -90,9 +90,21 @@ extern DECLSPEC SDL_Window * SDLCALL SDL_GetKeyboardFocus(void);
|
|||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_PumpEvents
|
||||
* \sa SDL_ResetKeyboard
|
||||
*/
|
||||
extern DECLSPEC const Uint8 *SDLCALL SDL_GetKeyboardState(int *numkeys);
|
||||
|
||||
/**
|
||||
* Clear the state of the keyboard
|
||||
*
|
||||
* This function will generate key up events for all pressed keys.
|
||||
*
|
||||
* \since This function is available since SDL 2.24.0.
|
||||
*
|
||||
* \sa SDL_GetKeyboardState
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_ResetKeyboard(void);
|
||||
|
||||
/**
|
||||
* Get the current key modifier state for the keyboard.
|
||||
*
|
||||
|
@ -268,9 +280,34 @@ extern DECLSPEC SDL_bool SDLCALL SDL_IsTextInputActive(void);
|
|||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_StopTextInput(void);
|
||||
|
||||
/**
|
||||
* Dismiss the composition window/IME without disabling the subsystem.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.22.
|
||||
*
|
||||
* \sa SDL_StartTextInput
|
||||
* \sa SDL_StopTextInput
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_ClearComposition(void);
|
||||
|
||||
/**
|
||||
* Returns if an IME Composite or Candidate window is currently shown.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.22.
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_IsTextInputShown(void);
|
||||
|
||||
/**
|
||||
* Set the rectangle used to type Unicode text inputs.
|
||||
*
|
||||
* To start text input in a given location, this function is intended to be
|
||||
* called before SDL_StartTextInput, although some platforms support moving
|
||||
* the rectangle even while text input (and a composition) is active.
|
||||
*
|
||||
* Note: If you want to use the system native IME window, try setting hint
|
||||
* **SDL_HINT_IME_SHOW_UI** to **1**, otherwise this function won't give you
|
||||
* any feedback.
|
||||
*
|
||||
* \param rect the SDL_Rect structure representing the rectangle to receive
|
||||
* text (ignored if NULL)
|
||||
*
|
||||
|
@ -278,7 +315,7 @@ extern DECLSPEC void SDLCALL SDL_StopTextInput(void);
|
|||
*
|
||||
* \sa SDL_StartTextInput
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_SetTextInputRect(SDL_Rect *rect);
|
||||
extern DECLSPEC void SDLCALL SDL_SetTextInputRect(const SDL_Rect *rect);
|
||||
|
||||
/**
|
||||
* Check whether the platform has screen keyboard support.
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2023 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
@ -40,7 +40,7 @@
|
|||
* an SDLK_* constant for those keys that do not generate characters.
|
||||
*
|
||||
* A special exception is the number keys at the top of the keyboard which
|
||||
* always map to SDLK_0...SDLK_9, regardless of layout.
|
||||
* map to SDLK_0...SDLK_9 on AZERTY layouts.
|
||||
*/
|
||||
typedef Sint32 SDL_Keycode;
|
||||
|
||||
|
@ -318,7 +318,12 @@ typedef enum
|
|||
SDLK_APP2 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_APP2),
|
||||
|
||||
SDLK_AUDIOREWIND = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AUDIOREWIND),
|
||||
SDLK_AUDIOFASTFORWARD = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AUDIOFASTFORWARD)
|
||||
SDLK_AUDIOFASTFORWARD = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AUDIOFASTFORWARD),
|
||||
|
||||
SDLK_SOFTLEFT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_SOFTLEFT),
|
||||
SDLK_SOFTRIGHT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_SOFTRIGHT),
|
||||
SDLK_CALL = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CALL),
|
||||
SDLK_ENDCALL = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_ENDCALL)
|
||||
} SDL_KeyCode;
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2023 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2023 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2023 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
@ -47,9 +47,9 @@ extern "C" {
|
|||
|
||||
|
||||
/**
|
||||
* \brief The maximum size of a log message
|
||||
* \brief The maximum size of a log message prior to SDL 2.0.24
|
||||
*
|
||||
* Messages longer than the maximum size will be truncated
|
||||
* As of 2.0.24 there is no limit to the length of SDL log messages.
|
||||
*/
|
||||
#define SDL_MAX_LOG_MESSAGE 4096
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2023 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
@ -51,6 +51,15 @@
|
|||
*/
|
||||
#define SDL_MAIN_NEEDED
|
||||
|
||||
#elif defined(__GDK__)
|
||||
/* On GDK, SDL provides a main function that initializes the game runtime.
|
||||
|
||||
Please note that #include'ing SDL_main.h is not enough to get a main()
|
||||
function working. You must either link against SDL2main or, if not possible,
|
||||
call the SDL_GDKRunApp function from your entry point.
|
||||
*/
|
||||
#define SDL_MAIN_NEEDED
|
||||
|
||||
#elif defined(__IPHONEOS__)
|
||||
/* On iOS SDL provides a main function that creates an application delegate
|
||||
and starts the iOS application run loop.
|
||||
|
@ -92,6 +101,22 @@
|
|||
*/
|
||||
#define SDL_MAIN_AVAILABLE
|
||||
|
||||
#elif defined(__PS2__)
|
||||
#define SDL_MAIN_AVAILABLE
|
||||
|
||||
#define SDL_PS2_SKIP_IOP_RESET() \
|
||||
void reset_IOP(); \
|
||||
void reset_IOP() {}
|
||||
|
||||
#elif defined(__3DS__)
|
||||
/*
|
||||
On N3DS, SDL provides a main function that sets up the screens
|
||||
and storage.
|
||||
|
||||
If you provide this yourself, you may define SDL_MAIN_HANDLED
|
||||
*/
|
||||
#define SDL_MAIN_AVAILABLE
|
||||
|
||||
#endif
|
||||
#endif /* SDL_MAIN_HANDLED */
|
||||
|
||||
|
@ -145,7 +170,7 @@ extern SDLMAIN_DECLSPEC int SDL_main(int argc, char *argv[]);
|
|||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_SetMainReady(void);
|
||||
|
||||
#ifdef __WIN32__
|
||||
#if defined(__WIN32__) || defined(__GDK__)
|
||||
|
||||
/**
|
||||
* Register a win32 window class for SDL's use.
|
||||
|
@ -189,7 +214,7 @@ extern DECLSPEC int SDLCALL SDL_RegisterApp(const char *name, Uint32 style, void
|
|||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_UnregisterApp(void);
|
||||
|
||||
#endif /* __WIN32__ */
|
||||
#endif /* defined(__WIN32__) || defined(__GDK__) */
|
||||
|
||||
|
||||
#ifdef __WINRT__
|
||||
|
@ -224,6 +249,28 @@ extern DECLSPEC int SDLCALL SDL_UIKitRunApp(int argc, char *argv[], SDL_main_fun
|
|||
|
||||
#endif /* __IPHONEOS__ */
|
||||
|
||||
#ifdef __GDK__
|
||||
|
||||
/**
|
||||
* Initialize and launch an SDL GDK application.
|
||||
*
|
||||
* \param mainFunction the SDL app's C-style main(), an SDL_main_func
|
||||
* \param reserved reserved for future use; should be NULL
|
||||
* \returns 0 on success or -1 on failure; call SDL_GetError() to retrieve
|
||||
* more information on the failure.
|
||||
*
|
||||
* \since This function is available since SDL 2.24.0.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_GDKRunApp(SDL_main_func mainFunction, void *reserved);
|
||||
|
||||
/**
|
||||
* Callback from the application to let the suspend continue.
|
||||
*
|
||||
* \since This function is available since SDL 2.28.0.
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_GDKSuspendComplete(void);
|
||||
|
||||
#endif /* __GDK__ */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2023 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2023 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
@ -82,7 +82,7 @@ extern DECLSPEC void SDLCALL SDL_Metal_DestroyView(SDL_MetalView view);
|
|||
*
|
||||
* \since This function is available since SDL 2.0.14.
|
||||
*
|
||||
* \sa SDL_MetalCreateView
|
||||
* \sa SDL_Metal_CreateView
|
||||
*/
|
||||
extern DECLSPEC void *SDLCALL SDL_Metal_GetLayer(SDL_MetalView view);
|
||||
|
||||
|
@ -92,6 +92,7 @@ extern DECLSPEC void *SDLCALL SDL_Metal_GetLayer(SDL_MetalView view);
|
|||
*
|
||||
* \param window SDL_Window from which the drawable size should be queried
|
||||
* \param w Pointer to variable for storing the width in pixels, may be NULL
|
||||
* \param h Pointer to variable for storing the height in pixels, may be NULL
|
||||
*
|
||||
* \since This function is available since SDL 2.0.14.
|
||||
*
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2023 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2023 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
@ -154,7 +154,9 @@ extern DECLSPEC Uint32 SDLCALL SDL_GetRelativeMouseState(int *x, int *y);
|
|||
/**
|
||||
* Move the mouse cursor to the given position within the window.
|
||||
*
|
||||
* This function generates a mouse motion event.
|
||||
* This function generates a mouse motion event if relative mode is not
|
||||
* enabled. If relative mode is enabled, you can force mouse events for the
|
||||
* warp by setting the SDL_HINT_MOUSE_RELATIVE_WARP_MOTION hint.
|
||||
*
|
||||
* Note that this function will appear to succeed, but not actually move the
|
||||
* mouse when used over Microsoft Remote Desktop.
|
||||
|
@ -196,13 +198,9 @@ extern DECLSPEC int SDLCALL SDL_WarpMouseGlobal(int x, int y);
|
|||
/**
|
||||
* Set relative mouse mode.
|
||||
*
|
||||
* While the mouse is in relative mode, the cursor is hidden, and the driver
|
||||
* will try to report continuous motion in the current window. Only relative
|
||||
* motion events will be delivered, the mouse position will not change.
|
||||
*
|
||||
* Note that this function will not be able to provide continuous relative
|
||||
* motion when used over Microsoft Remote Desktop, instead motion is limited
|
||||
* to the bounds of the screen.
|
||||
* While the mouse is in relative mode, the cursor is hidden, the mouse
|
||||
* position is constrained to the window, and SDL will report continuous
|
||||
* relative mouse motion even if the mouse is at the edge of the window.
|
||||
*
|
||||
* This function will flush any pending mouse motion.
|
||||
*
|
||||
|
@ -245,6 +243,15 @@ extern DECLSPEC int SDLCALL SDL_SetRelativeMouseMode(SDL_bool enabled);
|
|||
* While capturing is enabled, the current window will have the
|
||||
* `SDL_WINDOW_MOUSE_CAPTURE` flag set.
|
||||
*
|
||||
* Please note that as of SDL 2.0.22, SDL will attempt to "auto capture" the
|
||||
* mouse while the user is pressing a button; this is to try and make mouse
|
||||
* behavior more consistent between platforms, and deal with the common case
|
||||
* of a user dragging the mouse outside of the window. This means that if you
|
||||
* are calling SDL_CaptureMouse() only to deal with this situation, you no
|
||||
* longer have to (although it is safe to do so). If this causes problems for
|
||||
* your app, you can disable auto capture by setting the
|
||||
* `SDL_HINT_MOUSE_AUTO_CAPTURE` hint to zero.
|
||||
*
|
||||
* \param enabled SDL_TRUE to enable capturing, SDL_FALSE to disable.
|
||||
* \returns 0 on success or -1 if not supported; call SDL_GetError() for more
|
||||
* information.
|
||||
|
@ -378,6 +385,9 @@ extern DECLSPEC SDL_Cursor *SDLCALL SDL_GetCursor(void);
|
|||
/**
|
||||
* Get the default cursor.
|
||||
*
|
||||
* You do not have to call SDL_FreeCursor() on the return value, but it is
|
||||
* safe to do so.
|
||||
*
|
||||
* \returns the default cursor on success or NULL on failure.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2023 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
@ -31,6 +31,80 @@
|
|||
#include "SDL_stdinc.h"
|
||||
#include "SDL_error.h"
|
||||
|
||||
/******************************************************************************/
|
||||
/* Enable thread safety attributes only with clang.
|
||||
* The attributes can be safely erased when compiling with other compilers.
|
||||
*/
|
||||
#if defined(SDL_THREAD_SAFETY_ANALYSIS) && \
|
||||
defined(__clang__) && (!defined(SWIG))
|
||||
#define SDL_THREAD_ANNOTATION_ATTRIBUTE__(x) __attribute__((x))
|
||||
#else
|
||||
#define SDL_THREAD_ANNOTATION_ATTRIBUTE__(x) /* no-op */
|
||||
#endif
|
||||
|
||||
#define SDL_CAPABILITY(x) \
|
||||
SDL_THREAD_ANNOTATION_ATTRIBUTE__(capability(x))
|
||||
|
||||
#define SDL_SCOPED_CAPABILITY \
|
||||
SDL_THREAD_ANNOTATION_ATTRIBUTE__(scoped_lockable)
|
||||
|
||||
#define SDL_GUARDED_BY(x) \
|
||||
SDL_THREAD_ANNOTATION_ATTRIBUTE__(guarded_by(x))
|
||||
|
||||
#define SDL_PT_GUARDED_BY(x) \
|
||||
SDL_THREAD_ANNOTATION_ATTRIBUTE__(pt_guarded_by(x))
|
||||
|
||||
#define SDL_ACQUIRED_BEFORE(x) \
|
||||
SDL_THREAD_ANNOTATION_ATTRIBUTE__(acquired_before(x))
|
||||
|
||||
#define SDL_ACQUIRED_AFTER(x) \
|
||||
SDL_THREAD_ANNOTATION_ATTRIBUTE__(acquired_after(x))
|
||||
|
||||
#define SDL_REQUIRES(x) \
|
||||
SDL_THREAD_ANNOTATION_ATTRIBUTE__(requires_capability(x))
|
||||
|
||||
#define SDL_REQUIRES_SHARED(x) \
|
||||
SDL_THREAD_ANNOTATION_ATTRIBUTE__(requires_shared_capability(x))
|
||||
|
||||
#define SDL_ACQUIRE(x) \
|
||||
SDL_THREAD_ANNOTATION_ATTRIBUTE__(acquire_capability(x))
|
||||
|
||||
#define SDL_ACQUIRE_SHARED(x) \
|
||||
SDL_THREAD_ANNOTATION_ATTRIBUTE__(acquire_shared_capability(x))
|
||||
|
||||
#define SDL_RELEASE(x) \
|
||||
SDL_THREAD_ANNOTATION_ATTRIBUTE__(release_capability(x))
|
||||
|
||||
#define SDL_RELEASE_SHARED(x) \
|
||||
SDL_THREAD_ANNOTATION_ATTRIBUTE__(release_shared_capability(x))
|
||||
|
||||
#define SDL_RELEASE_GENERIC(x) \
|
||||
SDL_THREAD_ANNOTATION_ATTRIBUTE__(release_generic_capability(x))
|
||||
|
||||
#define SDL_TRY_ACQUIRE(x, y) \
|
||||
SDL_THREAD_ANNOTATION_ATTRIBUTE__(try_acquire_capability(x, y))
|
||||
|
||||
#define SDL_TRY_ACQUIRE_SHARED(x, y) \
|
||||
SDL_THREAD_ANNOTATION_ATTRIBUTE__(try_acquire_shared_capability(x, y))
|
||||
|
||||
#define SDL_EXCLUDES(x) \
|
||||
SDL_THREAD_ANNOTATION_ATTRIBUTE__(locks_excluded(x))
|
||||
|
||||
#define SDL_ASSERT_CAPABILITY(x) \
|
||||
SDL_THREAD_ANNOTATION_ATTRIBUTE__(assert_capability(x))
|
||||
|
||||
#define SDL_ASSERT_SHARED_CAPABILITY(x) \
|
||||
SDL_THREAD_ANNOTATION_ATTRIBUTE__(assert_shared_capability(x))
|
||||
|
||||
#define SDL_RETURN_CAPABILITY(x) \
|
||||
SDL_THREAD_ANNOTATION_ATTRIBUTE__(lock_returned(x))
|
||||
|
||||
#define SDL_NO_THREAD_SAFETY_ANALYSIS \
|
||||
SDL_THREAD_ANNOTATION_ATTRIBUTE__(no_thread_safety_analysis)
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
|
||||
#include "begin_code.h"
|
||||
/* Set up for C function definitions, even when using C++ */
|
||||
#ifdef __cplusplus
|
||||
|
@ -96,7 +170,7 @@ extern DECLSPEC SDL_mutex *SDLCALL SDL_CreateMutex(void);
|
|||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_LockMutex(SDL_mutex * mutex);
|
||||
extern DECLSPEC int SDLCALL SDL_LockMutex(SDL_mutex * mutex) SDL_ACQUIRE(mutex);
|
||||
#define SDL_mutexP(m) SDL_LockMutex(m)
|
||||
|
||||
/**
|
||||
|
@ -119,7 +193,7 @@ extern DECLSPEC int SDLCALL SDL_LockMutex(SDL_mutex * mutex);
|
|||
* \sa SDL_LockMutex
|
||||
* \sa SDL_UnlockMutex
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_TryLockMutex(SDL_mutex * mutex);
|
||||
extern DECLSPEC int SDLCALL SDL_TryLockMutex(SDL_mutex * mutex) SDL_TRY_ACQUIRE(0, mutex);
|
||||
|
||||
/**
|
||||
* Unlock the mutex.
|
||||
|
@ -138,7 +212,7 @@ extern DECLSPEC int SDLCALL SDL_TryLockMutex(SDL_mutex * mutex);
|
|||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_UnlockMutex(SDL_mutex * mutex);
|
||||
extern DECLSPEC int SDLCALL SDL_UnlockMutex(SDL_mutex * mutex) SDL_RELEASE(mutex);
|
||||
#define SDL_mutexV(m) SDL_UnlockMutex(m)
|
||||
|
||||
/**
|
||||
|
@ -276,7 +350,7 @@ extern DECLSPEC int SDLCALL SDL_SemTryWait(SDL_sem * sem);
|
|||
* successful it will atomically decrement the semaphore value.
|
||||
*
|
||||
* \param sem the semaphore to wait on
|
||||
* \param ms the length of the timeout, in milliseconds
|
||||
* \param timeout the length of the timeout, in milliseconds
|
||||
* \returns 0 if the wait succeeds, `SDL_MUTEX_TIMEDOUT` if the wait does not
|
||||
* succeed in the allotted time, or a negative error code on failure;
|
||||
* call SDL_GetError() for more information.
|
||||
|
@ -290,7 +364,7 @@ extern DECLSPEC int SDLCALL SDL_SemTryWait(SDL_sem * sem);
|
|||
* \sa SDL_SemValue
|
||||
* \sa SDL_SemWait
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_SemWaitTimeout(SDL_sem * sem, Uint32 ms);
|
||||
extern DECLSPEC int SDLCALL SDL_SemWaitTimeout(SDL_sem *sem, Uint32 timeout);
|
||||
|
||||
/**
|
||||
* Atomically increment a semaphore's value and wake waiting threads.
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2023 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2023 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
@ -2107,57 +2107,6 @@ typedef void (APIENTRYP PFNGLMULTITEXCOORD4SVARBPROC) (GLenum target, const GLsh
|
|||
|
||||
|
||||
|
||||
/*
|
||||
* ???. GL_MESA_packed_depth_stencil
|
||||
* XXX obsolete
|
||||
*/
|
||||
#ifndef GL_MESA_packed_depth_stencil
|
||||
#define GL_MESA_packed_depth_stencil 1
|
||||
|
||||
#define GL_DEPTH_STENCIL_MESA 0x8750
|
||||
#define GL_UNSIGNED_INT_24_8_MESA 0x8751
|
||||
#define GL_UNSIGNED_INT_8_24_REV_MESA 0x8752
|
||||
#define GL_UNSIGNED_SHORT_15_1_MESA 0x8753
|
||||
#define GL_UNSIGNED_SHORT_1_15_REV_MESA 0x8754
|
||||
|
||||
#endif /* GL_MESA_packed_depth_stencil */
|
||||
|
||||
|
||||
#ifndef GL_ATI_blend_equation_separate
|
||||
#define GL_ATI_blend_equation_separate 1
|
||||
|
||||
#define GL_ALPHA_BLEND_EQUATION_ATI 0x883D
|
||||
|
||||
GLAPI void GLAPIENTRY glBlendEquationSeparateATI( GLenum modeRGB, GLenum modeA );
|
||||
typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEATIPROC) (GLenum modeRGB, GLenum modeA);
|
||||
|
||||
#endif /* GL_ATI_blend_equation_separate */
|
||||
|
||||
|
||||
/* GL_OES_EGL_image */
|
||||
#ifndef GL_OES_EGL_image
|
||||
typedef void* GLeglImageOES;
|
||||
#endif
|
||||
|
||||
#ifndef GL_OES_EGL_image
|
||||
#define GL_OES_EGL_image 1
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GLAPI void APIENTRY glEGLImageTargetTexture2DOES (GLenum target, GLeglImageOES image);
|
||||
GLAPI void APIENTRY glEGLImageTargetRenderbufferStorageOES (GLenum target, GLeglImageOES image);
|
||||
#endif
|
||||
typedef void (APIENTRYP PFNGLEGLIMAGETARGETTEXTURE2DOESPROC) (GLenum target, GLeglImageOES image);
|
||||
typedef void (APIENTRYP PFNGLEGLIMAGETARGETRENDERBUFFERSTORAGEOESPROC) (GLenum target, GLeglImageOES image);
|
||||
#endif
|
||||
|
||||
|
||||
/**
|
||||
** NOTE!!!!! If you add new functions to this file, or update
|
||||
** glext.h be sure to regenerate the gl_mangle.h file. See comments
|
||||
** in that file for details.
|
||||
**/
|
||||
|
||||
|
||||
|
||||
/**********************************************************************
|
||||
* Begin system-specific stuff
|
||||
*/
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2023 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue