Merge pull request #89340 from akien-mga/4.1-cherrypicks
Cherry-picks for the 4.1 branch (future 4.1.4) - 3rd batch
This commit is contained in:
commit
fbc4a7e3a5
|
@ -12,7 +12,7 @@ runs:
|
|||
using: "composite"
|
||||
steps:
|
||||
- name: Download Godot Artifact
|
||||
uses: actions/download-artifact@v3
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: ${{ inputs.name }}
|
||||
path: ${{ inputs.path }}
|
||||
|
|
|
@ -12,7 +12,7 @@ runs:
|
|||
steps:
|
||||
# Upload cache on completion and check it out now
|
||||
- name: Load .scons_cache directory
|
||||
uses: actions/cache@v3
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ${{inputs.scons-cache}}
|
||||
key: ${{inputs.cache-name}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
|
||||
|
|
|
@ -12,7 +12,7 @@ runs:
|
|||
steps:
|
||||
# Use python 3.x release (works cross platform)
|
||||
- name: Set up Python 3.x
|
||||
uses: actions/setup-python@v4
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
# Semantic version range syntax or exact version of a Python version
|
||||
python-version: ${{ inputs.python-version }}
|
||||
|
|
|
@ -12,7 +12,7 @@ runs:
|
|||
using: "composite"
|
||||
steps:
|
||||
- name: Upload Godot Artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ inputs.name }}
|
||||
path: ${{ inputs.path }}
|
||||
|
|
|
@ -21,7 +21,7 @@ jobs:
|
|||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Java 11
|
||||
uses: actions/setup-java@v3
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: temurin
|
||||
java-version: 11
|
||||
|
|
|
@ -23,10 +23,11 @@ jobs:
|
|||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Emscripten latest
|
||||
uses: mymindstorm/setup-emsdk@v12
|
||||
uses: mymindstorm/setup-emsdk@v14
|
||||
with:
|
||||
version: ${{env.EM_VERSION}}
|
||||
actions-cache-folder: ${{env.EM_CACHE_FOLDER}}
|
||||
cache-key: emsdk-${{ matrix.cache-name }}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
|
||||
|
||||
- name: Verify Emscripten setup
|
||||
run: |
|
||||
|
|
|
@ -132,6 +132,10 @@ cppcheck-cppcheck-build-dir/
|
|||
*.pydevproject
|
||||
*.launch
|
||||
|
||||
# Emacs
|
||||
\#*\#
|
||||
.\#*
|
||||
|
||||
# GCOV code coverage
|
||||
*.gcda
|
||||
*.gcno
|
||||
|
|
|
@ -263,8 +263,8 @@ License: BSD-3-clause
|
|||
|
||||
Files: ./thirdparty/libpng/
|
||||
Comment: libpng
|
||||
Copyright: 1995-2019, The PNG Reference Library Authors.
|
||||
2018-2019, Cosmin Truta.
|
||||
Copyright: 1995-2024, The PNG Reference Library Authors.
|
||||
2018-2024, Cosmin Truta.
|
||||
2000-2002, 2004, 2006-2018 Glenn Randers-Pehrson.
|
||||
1996-1997, Andreas Dilger.
|
||||
1995-1996, Guy Eric Schalnat, Group 42, Inc.
|
||||
|
|
|
@ -152,7 +152,7 @@ env_base["x86_libtheora_opt_gcc"] = False
|
|||
env_base["x86_libtheora_opt_vc"] = False
|
||||
|
||||
# avoid issues when building with different versions of python out of the same directory
|
||||
env_base.SConsignFile(".sconsign{0}.dblite".format(pickle.HIGHEST_PROTOCOL))
|
||||
env_base.SConsignFile(File("#.sconsign{0}.dblite".format(pickle.HIGHEST_PROTOCOL)).abspath)
|
||||
|
||||
# Build options
|
||||
|
||||
|
|
|
@ -730,6 +730,16 @@ void _err_flush_stdout();
|
|||
} else \
|
||||
((void)0)
|
||||
|
||||
/**
|
||||
* Warns about `m_msg` only when verbose mode is enabled.
|
||||
*/
|
||||
#define WARN_VERBOSE(m_msg) \
|
||||
{ \
|
||||
if (is_print_verbose_enabled()) { \
|
||||
WARN_PRINT(m_msg); \
|
||||
} \
|
||||
}
|
||||
|
||||
// Print deprecated warning message macros.
|
||||
|
||||
/**
|
||||
|
|
|
@ -314,6 +314,7 @@
|
|||
03000000242e00000b20000000000000,Hyperkin Admiral N64 Controller,+rightx:b11,+righty:b13,-rightx:b8,-righty:b12,a:b1,b:b0,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,lefttrigger:b14,leftx:a0,lefty:a1,rightshoulder:b5,start:b9,platform:Windows,
|
||||
03000000242e0000ff0b000000000000,Hyperkin N64 Adapter,a:b1,b:b2,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightx:a2,righty:a3,start:b9,platform:Windows,
|
||||
03000000790000004e95000000000000,Hyperkin N64 Controller Adapter,a:b1,b:b2,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b7,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b5,rightx:a5,righty:a2,start:b9,platform:Windows,
|
||||
03000000242e00006a48000000000000,Hyperkin RetroN Sq,a:b3,b:b7,back:b5,dpdown:+a4,dpleft:-a0,dpright:+a0,dpup:-a4,leftshoulder:b0,rightshoulder:b1,start:b4,x:b2,y:b6,platform:Windows,
|
||||
03000000242e00006a38000000000000,Hyperkin Trooper 2,a:b0,b:b1,back:b4,leftshoulder:b2,leftx:a0,lefty:a1,rightshoulder:b3,start:b5,platform:Windows,
|
||||
03000000d81d00000e00000000000000,iBuffalo AC02 Arcade Joystick,a:b0,b:b1,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b10,lefttrigger:b7,leftx:a0,lefty:a1,rightshoulder:b2,rightstick:b11,righttrigger:b3,rightx:a2,righty:a5,start:b8,x:b4,y:b5,platform:Windows,
|
||||
03000000d81d00000f00000000000000,iBuffalo BSGP1204 Series,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:b5,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Windows,
|
||||
|
@ -352,7 +353,7 @@
|
|||
030000006d040000d2ca000000000000,Logitech Cordless Precision,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,
|
||||
030000006d04000011c2000000000000,Logitech Cordless Wingman,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b9,leftstick:b5,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b2,righttrigger:b7,rightx:a3,righty:a4,x:b4,platform:Windows,
|
||||
030000006d04000016c2000000000000,Logitech Dual Action,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,
|
||||
030000006d0400001dc2000000000000,Logitech F310,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows,
|
||||
030000006d0400001dc2000000000000,Logitech F310,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows,
|
||||
030000006d04000018c2000000000000,Logitech F510,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,
|
||||
030000006d0400001ec2000000000000,Logitech F510,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows,
|
||||
030000006d04000019c2000000000000,Logitech F710,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,
|
||||
|
@ -429,6 +430,8 @@
|
|||
03000000f70600000100000000000000,N64 Adaptoid,+rightx:b2,+righty:b1,-rightx:b4,-righty:b5,a:b0,b:b3,dpdown:b11,dpleft:b12,dpright:b13,dpup:b10,leftshoulder:b6,lefttrigger:b9,leftx:a0,lefty:a1,rightshoulder:b7,start:b8,platform:Windows,
|
||||
030000006b140000010c000000000000,Nacon GC 400ES,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Windows,
|
||||
030000006b1400001106000000000000,Nacon Revolution 3 PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,
|
||||
0300000085320000170d000000000000,Nacon Revolution 5 Pro,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,touchpad:b13,x:b0,y:b3,platform:Windows,
|
||||
0300000085320000190d000000000000,Nacon Revolution 5 Pro,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,touchpad:b13,x:b0,y:b3,platform:Windows,
|
||||
030000006b140000100d000000000000,Nacon Revolution Infinity PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,
|
||||
030000006b140000080d000000000000,Nacon Revolution Unlimited Pro Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,
|
||||
03000000bd12000001c0000000000000,Nebular,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a5,righty:a2,start:b9,x:b3,y:b0,platform:Windows,
|
||||
|
@ -450,7 +453,7 @@
|
|||
03000000550900001072000000000000,NVIDIA Shield,a:b9,b:b8,back:b11,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b5,leftstick:b3,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b4,rightstick:b2,righttrigger:a4,rightx:a2,righty:a5,start:b0,x:b7,y:b6,platform:Windows,
|
||||
030000005509000000b4000000000000,NVIDIA Virtual,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:+a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:-a2,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows,
|
||||
03000000120c00000288000000000000,Nyko Air Flo Xbox Controller,a:b0,b:b1,back:b7,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:b10,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:b11,rightx:a3,righty:a4,start:b6,x:b2,y:b3,platform:Windows,
|
||||
030000004b120000014d000000000000,Nyko Airflo,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:a3,leftstick:a0,lefttrigger:b6,rightshoulder:b5,rightstick:a2,righttrigger:b7,start:b9,x:b2,y:b3,platform:Windows,
|
||||
030000004b120000014d000000000000,NYKO Airflo EX,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,leftstick:b11,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b12,righttrigger:b7,rightx:a3,righty:a2,start:b9,x:b2,y:b3,platform:Windows,
|
||||
03000000d62000001d57000000000000,Nyko Airflo PS3 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,
|
||||
03000000791d00000900000000000000,Nyko Playpad,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,rightx:a2,righty:a5,start:b11,x:b3,y:b4,platform:Windows,
|
||||
03000000782300000a10000000000000,Onlive Controller,a:b15,b:b14,back:b7,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b5,leftshoulder:b11,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a3,righty:a4,start:b6,x:b13,y:b12,platform:Windows,
|
||||
|
@ -459,7 +462,7 @@
|
|||
030000008916000000fd000000000000,Onza TE,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows,
|
||||
03000000d62000006d57000000000000,OPP PS3 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,
|
||||
030000006b14000001a1000000000000,Orange Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,leftstick:b6,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a4,rightx:a5,righty:a2,start:b9,x:b2,y:b3,platform:Windows,
|
||||
03000000362800000100000000000000,OUYA Controller,a:b0,b:b3,dpdown:b9,dpleft:b10,dpright:b11,dpup:b8,guide:b14,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:b13,rightx:a3,righty:a4,x:b1,y:b2,platform:Windows,
|
||||
03000000362800000100000000000000,OUYA Controller,a:b0,b:b3,dpdown:b9,dpleft:b10,dpright:b11,dpup:b8,guide:b14,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,x:b1,y:b2,platform:Windows,
|
||||
03000000120c0000f60e000000000000,P4 Gamepad,a:b1,b:b2,back:b12,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b5,lefttrigger:b7,rightshoulder:b4,righttrigger:b6,start:b9,x:b0,y:b3,platform:Windows,
|
||||
03000000790000002201000000000000,PC Controller,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Windows,
|
||||
030000006f0e00008501000000000000,PDP Fightpad Pro GameCube Controller,a:b1,b:b0,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,misc1:b13,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Windows,
|
||||
|
@ -532,6 +535,7 @@
|
|||
030000004c050000a00b000000000000,PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,
|
||||
030000004c050000c405000000000000,PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,touchpad:b13,x:b0,y:b3,platform:Windows,
|
||||
030000004c050000cc09000000000000,PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,
|
||||
030000004c0500005f0e000000000000,PS5 Access Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,misc1:b14,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,touchpad:b13,x:b0,y:b3,platform:Windows,
|
||||
030000004c050000e60c000000000000,PS5 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,misc1:b14,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,touchpad:b13,x:b0,y:b3,platform:Windows,
|
||||
030000004c050000f20d000000000000,PS5 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,misc1:b14,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,touchpad:b13,x:b0,y:b3,platform:Windows,
|
||||
03000000830500005020000000000000,PSX,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:b7,rightx:a2,righty:a3,start:b11,x:b2,y:b3,platform:Windows,
|
||||
|
@ -556,6 +560,7 @@
|
|||
030000009b2800003200000000000000,Raphnet GC and N64 Adapter,a:b0,b:b7,dpdown:b11,dpleft:b12,dpright:b13,dpup:b10,lefttrigger:+a5,leftx:a0,lefty:a1,rightshoulder:b2,righttrigger:+a2,rightx:a3,righty:a4,start:b3,x:b1,y:b8,platform:Windows,
|
||||
030000009b2800006000000000000000,Raphnet GC and N64 Adapter,a:b0,b:b7,dpdown:b11,dpleft:b12,dpright:b13,dpup:b10,lefttrigger:+a5,leftx:a0,lefty:a1,rightshoulder:b2,righttrigger:+a2,rightx:a3,righty:a4,start:b3,x:b1,y:b8,platform:Windows,
|
||||
030000009b2800001800000000000000,Raphnet Jaguar Adapter,a:b2,b:b1,back:b4,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b0,righttrigger:b10,start:b3,x:b11,y:b12,platform:Windows,
|
||||
030000009b2800006100000000000000,Raphnet N64 Adapter,+rightx:b9,+righty:b7,-rightx:b8,-righty:b6,a:b0,b:b1,dpdown:b11,dpleft:b12,dpright:b13,dpup:b10,leftshoulder:b4,lefttrigger:b2,leftx:a0,lefty:a1,rightshoulder:b5,start:b3,platform:Windows,
|
||||
030000009b2800006300000000000000,Raphnet N64 Adapter,+rightx:b9,+righty:b7,-rightx:b8,-righty:b6,a:b0,b:b1,dpdown:b11,dpleft:b12,dpright:b13,dpup:b10,leftshoulder:b4,lefttrigger:b2,leftx:a0,lefty:a1,rightshoulder:b5,start:b3,platform:Windows,
|
||||
030000009b2800000200000000000000,Raphnet NES Adapter,a:b7,b:b6,back:b5,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftx:a0,lefty:a1,start:b4,platform:Windows,
|
||||
030000009b2800004400000000000000,Raphnet PS1 and PS2 Adapter,a:b1,b:b2,back:b5,dpdown:b13,dpleft:b14,dpright:b15,dpup:b12,leftshoulder:b6,leftstick:b10,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:b9,rightx:a3,righty:a4,start:b4,x:b0,y:b3,platform:Windows,
|
||||
|
@ -608,6 +613,7 @@
|
|||
03000000050b00001a1a000000000000,ROG Chakram X,a:b1,b:b0,leftx:a0,lefty:a1,x:b2,y:b3,platform:Windows,
|
||||
03000000050b00001c1a000000000000,ROG Chakram X,a:b1,b:b0,leftx:a0,lefty:a1,x:b2,y:b3,platform:Windows,
|
||||
030000004f04000001d0000000000000,Rumble Force,a:b0,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b1,y:b3,platform:Windows,
|
||||
030000000d0f0000ad00000000000000,RX Gamepad,a:b0,b:b4,back:b11,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b3,rightshoulder:b6,start:b9,x:b2,y:b1,platform:Windows,
|
||||
030000008916000000fe000000000000,Sabertooth,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows,
|
||||
03000000c6240000045d000000000000,Sabertooth,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows,
|
||||
03000000a30600001af5000000000000,Saitek Cyborg,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a3,righty:a4,start:b9,x:b0,y:b3,platform:Windows,
|
||||
|
@ -674,6 +680,7 @@
|
|||
03000000457500002211000000000000,Szmy Power PC Gamepad,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,
|
||||
030000004f0400000ab1000000000000,T16000M,a:b0,b:b1,back:b12,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b11,leftshoulder:b4,lefttrigger:b9,leftx:a0,lefty:a1,rightshoulder:b6,righttrigger:b7,start:b10,x:b2,y:b3,platform:Windows,
|
||||
030000000d0f00007b00000000000000,TAC GEAR,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,
|
||||
03000000e40a00000307000000000000,Taito Egret II Mini Control Panel,a:b4,b:b2,back:b6,guide:b9,leftx:a0,lefty:a1,rightshoulder:b0,righttrigger:b1,start:b7,x:b8,y:b3,platform:Windows,
|
||||
03000000e40a00000207000000000000,Taito Egret II Mini Controller,a:b4,b:b2,back:b6,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,guide:b9,rightshoulder:b0,righttrigger:b1,start:b7,x:b8,y:b3,platform:Windows,
|
||||
03000000d814000001a0000000000000,TE Kitty,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,
|
||||
03000000fa1900000706000000000000,Team 5,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Windows,
|
||||
|
@ -961,6 +968,7 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,
|
|||
030000004c050000c405000000000000,PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Mac OS X,
|
||||
030000004c050000c405000000010000,PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Mac OS X,
|
||||
030000004c050000cc09000000010000,PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Mac OS X,
|
||||
0300004b4c0500005f0e000000010000,PS5 Access Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,misc1:b14,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,touchpad:b13,x:b0,y:b3,platform:Mac OS X,
|
||||
030000004c050000e60c000000010000,PS5 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,misc1:b14,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,touchpad:b13,x:b0,y:b3,platform:Mac OS X,
|
||||
030000004c050000f20d000000010000,PS5 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,misc1:b14,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,touchpad:b13,x:b0,y:b3,platform:Mac OS X,
|
||||
050000004c050000e60c000000010000,PS5 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,touchpad:b13,x:b0,y:b3,platform:Mac OS X,
|
||||
|
@ -1013,6 +1021,8 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,
|
|||
03000000110100001714000020010000,SteelSeries Stratus XL,a:b0,b:b1,dpdown:b9,dpleft:b11,dpright:b10,dpup:b8,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1~,rightshoulder:b5,righttrigger:b7,rightx:a2,righty:a3~,start:b12,x:b2,y:b3,platform:Mac OS X,
|
||||
030000000d0f0000f600000000010000,Switch Hori Pad,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Mac OS X,
|
||||
03000000457500002211000000010000,SZMY Power PC Gamepad,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Mac OS X,
|
||||
03000000e40a00000307000001000000,Taito Egret II Mini Control Panel,a:b4,b:b2,back:b6,guide:b9,leftx:a0,lefty:a1,rightshoulder:b0,righttrigger:b1,start:b7,x:b8,y:b3,platform:Mac OS X,
|
||||
03000000e40a00000207000001000000,Taito Egret II Mini Controller,a:b4,b:b2,back:b6,guide:b9,leftx:a0,lefty:a1,rightshoulder:b0,righttrigger:b1,start:b7,x:b8,y:b3,platform:Mac OS X,
|
||||
03000000790000001c18000003100000,TGZ Controller,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Mac OS X,
|
||||
03000000591c00002400000021000000,THEC64 Joystick,a:b0,b:b1,back:b6,leftshoulder:b4,leftx:a0,lefty:a4,rightshoulder:b5,start:b7,x:b2,y:b3,platform:Mac OS X,
|
||||
03000000591c00002600000021000000,THEGamepad,a:b2,b:b1,back:b6,dpdown:+a4,dpleft:-a0,dpright:+a0,dpup:-a4,leftshoulder:b4,rightshoulder:b5,start:b7,x:b3,y:b0,platform:Mac OS X,
|
||||
|
@ -1164,14 +1174,15 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,
|
|||
03000000c21100000791000011010000,Be1 GC101 Controller 1.03,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Linux,
|
||||
03000000c31100000791000011010000,Be1 GC101 Controller 1.03,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux,
|
||||
030000005e0400008e02000003030000,Be1 GC101 Xbox 360,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
|
||||
03000000bc2000004d50000011010000,BEITONG A1T2 BFM,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux,
|
||||
05000000bc2000000055000001000000,BETOP AX1 BFM,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux,
|
||||
03000000bc2000004d50000011010000,Beitong A1T2 BFM,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux,
|
||||
05000000bc2000000055000001000000,Betop AX1 BFM,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux,
|
||||
03000000bc2000006412000011010000,Betop Controller,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b30,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Linux,
|
||||
030000006b1400000209000011010000,Bigben,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux,
|
||||
03000000120c0000200e000011010000,Brook Mars PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Linux,
|
||||
03000000120c0000210e000011010000,Brook Mars PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux,
|
||||
03000000120c0000f70e000011010000,Brook Universal Fighting Board,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,rightshoulder:b5,rightstick:b11,righttrigger:b7,start:b9,x:b0,y:b3,platform:Linux,
|
||||
03000000e82000006058000001010000,Cideko AK08b,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Linux,
|
||||
03000000af1e00002400000010010000,Clockwork Pi DevTerm,a:b2,b:b1,back:b8,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,start:b9,x:b3,y:b0,platform:Linux,
|
||||
030000000b0400003365000000010000,Competition Pro,a:b0,b:b1,back:b2,leftx:a0,lefty:a1,start:b3,platform:Linux,
|
||||
03000000260900008888000000010000,Cyber Gadget GameCube Controller,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b6,righttrigger:a5,rightx:a2,righty:a3~,start:b7,x:b2,y:b3,platform:Linux,
|
||||
03000000a306000022f6000011010000,Cyborg V3 Rumble,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:+a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:-a3,rightx:a2,righty:a4,start:b9,x:b0,y:b3,platform:Linux,
|
||||
|
@ -1218,7 +1229,6 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,
|
|||
06000000adde0000efbe000002010000,Hidromancer Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
|
||||
03000000d81400000862000011010000,HitBox PS3 PC Analog Mode,a:b1,b:b2,back:b8,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,guide:b9,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b12,x:b0,y:b3,platform:Linux,
|
||||
03000000c9110000f055000011010000,HJC Gamepad,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Linux,
|
||||
03000000632500002605000010010000,HJDX,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a5,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux,
|
||||
030000000d0f00000d00000000010000,Hori,a:b0,b:b6,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b3,rightshoulder:b7,start:b9,x:b1,y:b2,platform:Linux,
|
||||
030000000d0f00006d00000020010000,Hori EDGE 301,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:+a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:+a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
|
||||
030000000d0f00008400000011010000,Hori Fighting Commander,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Linux,
|
||||
|
@ -1256,6 +1266,7 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,
|
|||
03000000242e00008816000001010000,Hyperkin X91,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
|
||||
03000000f00300008d03000011010000,HyperX Clutch,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux,
|
||||
03000000830500006020000010010000,iBuffalo Super Famicom Controller,a:b1,b:b0,back:b6,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b4,rightshoulder:b5,start:b7,x:b3,y:b2,platform:Linux,
|
||||
030000008f0e00001330000001010000,iCode Retro Adapter,b:b3,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b9,lefttrigger:b10,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b1,start:b7,x:b2,y:b0,platform:Linux,
|
||||
050000006964726f69643a636f6e0000,idroidcon Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux,
|
||||
03000000b50700001503000010010000,Impact,a:b2,b:b3,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b11,righttrigger:b7,rightx:a3,righty:a2,start:b9,x:b0,y:b1,platform:Linux,
|
||||
03000000d80400008200000003000000,IMS PCU0,a:b1,b:b0,back:b4,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,start:b5,x:b3,y:b2,platform:Linux,
|
||||
|
@ -1389,6 +1400,7 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,
|
|||
03000000550900001072000011010000,NVIDIA Controller,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b13,leftshoulder:b4,leftstick:b8,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a4,rightx:a2,righty:a3,start:b7,x:b2,y:b3,platform:Linux,
|
||||
03000000550900001472000011010000,NVIDIA Controller v01.04,a:b0,b:b1,back:b14,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b16,leftshoulder:b4,leftstick:b7,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b8,righttrigger:a4,rightx:a2,righty:a5,start:b6,x:b2,y:b3,platform:Linux,
|
||||
05000000550900001472000001000000,NVIDIA Controller v01.04,a:b0,b:b1,back:b14,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b16,leftshoulder:b4,leftstick:b7,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b8,righttrigger:a4,rightx:a2,righty:a5,start:b6,x:b2,y:b3,platform:Linux,
|
||||
030000004b120000014d000000010000,NYKO Airflo EX,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,leftstick:b11,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b12,righttrigger:b7,rightx:a3,righty:a2,start:b9,x:b2,y:b3,platform:Linux,
|
||||
03000000451300000830000010010000,NYKO CORE,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Linux,
|
||||
19000000010000000100000001010000,ODROID Go 2,a:b1,b:b0,dpdown:b7,dpleft:b8,dpright:b9,dpup:b6,guide:b10,leftshoulder:b4,leftstick:b12,lefttrigger:b11,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b13,righttrigger:b14,start:b15,x:b2,y:b3,platform:Linux,
|
||||
19000000010000000200000011000000,ODROID Go 2,a:b1,b:b0,dpdown:b9,dpleft:b10,dpright:b11,dpup:b8,guide:b12,leftshoulder:b4,leftstick:b14,lefttrigger:b13,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b15,righttrigger:b16,start:b17,x:b2,y:b3,platform:Linux,
|
||||
|
@ -1407,6 +1419,7 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,
|
|||
030000006f0e0000c802000012010000,PDP Kingdom Hearts Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
|
||||
030000006f0e00002801000011010000,PDP PS3 Rock Candy Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux,
|
||||
030000006f0e00000901000011010000,PDP PS3 Versus Fighting,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,platform:Linux,
|
||||
030000006f0e00002f01000011010000,PDP Wired PS3 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux,
|
||||
03000000ad1b000004f9000000010000,PDP Xbox 360 Versus Fighting,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,lefttrigger:a2,rightshoulder:b5,righttrigger:a5,start:b7,x:b2,y:b3,platform:Linux,
|
||||
030000006f0e0000a802000023020000,PDP Xbox One Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,leftstick:b11,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b12,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Linux,
|
||||
030000006f0e0000a702000023020000,PDP Xbox One Raven Black,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
|
||||
|
@ -1463,6 +1476,7 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,
|
|||
050000004c050000cc09000000010000,PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Linux,
|
||||
050000004c050000cc09000000810000,PS4 Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,leftstick:b11,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b12,righttrigger:a5,rightx:a3,righty:a4,start:b9,x:b3,y:b2,platform:Linux,
|
||||
050000004c050000cc09000001800000,PS4 Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,leftstick:b11,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b12,righttrigger:a5,rightx:a3,righty:a4,start:b9,x:b3,y:b2,platform:Linux,
|
||||
0300004b4c0500005f0e000011010000,PS5 Access Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,misc1:b14,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,touchpad:b13,x:b0,y:b3,platform:Linux,
|
||||
030000004c050000e60c000011010000,PS5 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,misc1:b14,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,touchpad:b13,x:b0,y:b3,platform:Linux,
|
||||
030000004c050000e60c000011810000,PS5 Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,leftstick:b11,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b12,righttrigger:a5,rightx:a3,righty:a4,start:b9,x:b3,y:b2,platform:Linux,
|
||||
030000004c050000f20d000011010000,PS5 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,misc1:b14,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,touchpad:b13,x:b0,y:b3,platform:Linux,
|
||||
|
@ -1528,9 +1542,10 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,
|
|||
03000000b40400000a01000000010000,Sega Saturn,a:b0,b:b1,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b6,lefttrigger:b7,rightshoulder:b5,righttrigger:b2,start:b8,x:b3,y:b4,platform:Linux,
|
||||
030000001f08000001e4000010010000,SFC Controller,a:b2,b:b1,back:b8,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b4,rightshoulder:b5,start:b9,x:b3,y:b0,platform:Linux,
|
||||
03000000632500002305000010010000,ShanWan Gamepad,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Linux,
|
||||
03000000632500002605000010010000,Shanwan Gamepad,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux,
|
||||
03000000632500007505000010010000,Shanwan Gamepad,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Linux,
|
||||
03000000bc2000000055000010010000,Shanwan Gamepad,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux,
|
||||
03000000f025000021c1000010010000,Shanwan Gioteck PS3 Controller,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Linux,
|
||||
03000000632500007505000010010000,Shanwan PS3 PC,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Linux,
|
||||
03000000bc2000000055000010010000,Shanwan PS3 PC ,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux,
|
||||
03000000341a00000908000010010000,SL6566,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Linux,
|
||||
050000004c050000cc09000001000000,Sony DualShock 4,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Linux,
|
||||
03000000ff000000cb01000010010000,Sony PlayStation Portable,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftx:a0,lefty:a1,rightshoulder:b5,start:b7,x:b2,y:b3,platform:Linux,
|
||||
|
@ -1564,6 +1579,8 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,
|
|||
03000000457500000401000011010000,SZMY Power DS4 Wired Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,misc1:b13,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Linux,
|
||||
03000000457500002211000010010000,SZMY Power Gamepad,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Linux,
|
||||
030000008f0e00001431000010010000,SZMY Power PS3,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux,
|
||||
03000000e40a00000307000011010000,Taito Egret II Mini Control Panel,a:b4,b:b2,back:b6,guide:b9,leftx:a0,lefty:a1,rightshoulder:b0,righttrigger:b1,start:b7,x:b8,y:b3,platform:Linux,
|
||||
03000000e40a00000207000011010000,Taito Egret II Mini Controller,a:b4,b:b2,back:b6,guide:b9,leftx:a0,lefty:a1,rightshoulder:b0,righttrigger:b1,start:b7,x:b8,y:b3,platform:Linux,
|
||||
03000000ba2200000701000001010000,Technology Innovation PS2 Adapter,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a5,righty:a2,start:b9,x:b3,y:b2,platform:Linux,
|
||||
03000000790000001c18000011010000,TGZ Controller,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux,
|
||||
03000000591c00002400000010010000,THEC64 Joystick,a:b0,b:b1,back:b6,leftshoulder:b4,leftx:a0,lefty:a1,rightshoulder:b5,start:b7,x:b2,y:b3,platform:Linux,
|
||||
|
@ -1871,9 +1888,9 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,
|
|||
36313938306539326233393732613361,Retro Bit SNES Controller,a:b0,b:b1,back:b15,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b9,rightshoulder:b10,start:b6,x:b2,y:b3,platform:Android,
|
||||
526574726f466c616720576972656420,Retro Controller,a:b0,b:b1,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b17,rightshoulder:b18,start:b10,x:b2,y:b3,platform:Android,
|
||||
61343739353764363165343237303336,Retro Controller,a:b0,b:b1,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b17,lefttrigger:b18,leftx:a0,lefty:a1,start:b10,x:b2,y:b3,platform:Android,
|
||||
526574726f696420506f636b65742043,Retroid Pocket,a:b1,b:b0,back:b4,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b9,leftstick:b7,lefttrigger:a5,leftx:a0,lefty:a1,paddle1:b17,paddle2:b18,rightshoulder:b10,rightstick:b8,righttrigger:a4,rightx:a2,righty:a3,start:b6,x:b3,y:b2,platform:Android,
|
||||
582d426f7820436f6e74726f6c6c6572,Retroid Pocket,a:b0,b:b1,back:b4,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b9,leftstick:b7,lefttrigger:a5,leftx:a0,lefty:a1,paddle1:b17,paddle2:b18,rightshoulder:b10,rightstick:b8,righttrigger:a4,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android,
|
||||
38653130373365613538333235303036,Retroid Pocket 2,a:b0,b:b1,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b9,lefttrigger:b17,leftx:a0,lefty:a1,rightshoulder:b10,righttrigger:b18,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android,
|
||||
526574726f696420506f636b65742043,Retroid Pocket Flip,a:b1,b:b0,back:b4,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b9,leftstick:b7,lefttrigger:a5,leftx:a0,lefty:a1,paddle1:b17,paddle2:b18,rightshoulder:b10,rightstick:b8,righttrigger:a4,rightx:a2,righty:a3,start:b6,x:b3,y:b2,platform:Android,
|
||||
582d426f7820436f6e74726f6c6c6572,Retroid Pocket Flip,a:b0,b:b1,back:b4,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b9,leftstick:b7,lefttrigger:a5,leftx:a0,lefty:a1,paddle1:b17,paddle2:b18,rightshoulder:b10,rightstick:b8,righttrigger:a4,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android,
|
||||
64363363336633363736393038313463,Retrolink,a:b1,b:b0,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,start:b6,platform:Android,
|
||||
37393234373533633333323633646531,RetroUSB N64 RetroPort,+rightx:b17,+righty:b15,-rightx:b18,-righty:b6,a:b10,b:b9,dpdown:b19,dpleft:b1,dpright:b0,dpup:b2,leftshoulder:b7,lefttrigger:b20,leftx:a0,lefty:a1,rightshoulder:b5,start:b3,platform:Android,
|
||||
5365616c6965436f6d707574696e6720,RetroUSB N64 RetroPort,+rightx:b17,+righty:b15,-rightx:b18,-righty:b6,a:b10,b:b9,dpdown:b19,dpleft:b1,dpright:b0,dpup:b2,leftshoulder:b7,lefttrigger:b20,leftx:a0,lefty:a1,rightshoulder:b5,start:b3,platform:Android,
|
||||
|
@ -1902,6 +1919,7 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,
|
|||
05000000de2800000611000001000000,Steam Controller,a:b0,b:b1,back:b6,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:a3,start:b7,x:b2,y:b3,platform:Android,
|
||||
0500000011010000201400000f7e0f00,SteelSeries Nimbus,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b3,lefttrigger:b9,leftx:a0,lefty:a1,rightshoulder:b20,righttrigger:b10,rightx:a2,righty:a3,x:b19,y:b2,platform:Android,
|
||||
35306436396437373135383665646464,SteelSeries Nimbus Plus,a:b0,b:b1,leftshoulder:b3,leftstick:b17,lefttrigger:b9,leftx:a0,rightshoulder:b20,rightstick:b18,righttrigger:b10,rightx:a2,x:b19,y:b2,platform:Android,
|
||||
33313930373536613937326534303931,Taito Egret II Mini Control Panel,a:b25,b:b23,back:b27,guide:b30,leftx:a0,lefty:a1,rightshoulder:b21,righttrigger:b22,start:b28,x:b29,y:b24,platform:Android,
|
||||
54475a20436f6e74726f6c6c65720000,TGZ Controller,a:b0,b:b1,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b9,leftstick:b7,lefttrigger:b17,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:b18,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android,
|
||||
62363434353532386238336663643836,TGZ Controller,a:b0,b:b1,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b9,leftstick:b7,lefttrigger:b17,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:b18,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android,
|
||||
37323236633763666465316365313236,THEC64 Joystick,a:b21,b:b22,back:b27,leftshoulder:b25,leftx:a0,lefty:a1,rightshoulder:b26,start:b27,x:b23,y:b24,platform:Android,
|
||||
|
|
|
@ -506,20 +506,20 @@ Ref<ResourceLoader::LoadToken> ResourceLoader::_load_start(const String &p_path,
|
|||
float ResourceLoader::_dependency_get_progress(const String &p_path) {
|
||||
if (thread_load_tasks.has(p_path)) {
|
||||
ThreadLoadTask &load_task = thread_load_tasks[p_path];
|
||||
float current_progress = 0.0;
|
||||
int dep_count = load_task.sub_tasks.size();
|
||||
if (dep_count > 0) {
|
||||
float dep_progress = 0;
|
||||
for (const String &E : load_task.sub_tasks) {
|
||||
dep_progress += _dependency_get_progress(E);
|
||||
current_progress += _dependency_get_progress(E);
|
||||
}
|
||||
dep_progress /= float(dep_count);
|
||||
dep_progress *= 0.5;
|
||||
dep_progress += load_task.progress * 0.5;
|
||||
return dep_progress;
|
||||
current_progress /= float(dep_count);
|
||||
current_progress *= 0.5;
|
||||
current_progress += load_task.progress * 0.5;
|
||||
} else {
|
||||
return load_task.progress;
|
||||
current_progress = load_task.progress;
|
||||
}
|
||||
|
||||
load_task.max_reported_progress = MAX(load_task.max_reported_progress, current_progress);
|
||||
return load_task.max_reported_progress;
|
||||
} else {
|
||||
return 1.0; //assume finished loading it so it no longer exists
|
||||
}
|
||||
|
|
|
@ -168,7 +168,8 @@ private:
|
|||
String remapped_path;
|
||||
String dependent_path;
|
||||
String type_hint;
|
||||
float progress = 0.0;
|
||||
float progress = 0.0f;
|
||||
float max_reported_progress = 0.0f;
|
||||
ThreadLoadStatus status = THREAD_LOAD_IN_PROGRESS;
|
||||
ResourceFormatLoader::CacheMode cache_mode = ResourceFormatLoader::CACHE_MODE_REUSE;
|
||||
Error error = OK;
|
||||
|
|
|
@ -92,6 +92,7 @@
|
|||
#undef Error
|
||||
#undef OK
|
||||
#undef CONNECT_DEFERRED // override from Windows SDK, clashes with Object enum
|
||||
#undef MONO_FONT
|
||||
#endif
|
||||
|
||||
// Make room for our constexpr's below by overriding potential system-specific macros.
|
||||
|
|
|
@ -2435,61 +2435,66 @@
|
|||
The maximum number of game controller axes: OpenVR supports up to 5 Joysticks making a total of 10 axes.
|
||||
</constant>
|
||||
<constant name="MIDI_MESSAGE_NONE" value="0" enum="MIDIMessage">
|
||||
Enum value which doesn't correspond to any MIDI message. This is used to initialize [enum MIDIMessage] properties with a generic state.
|
||||
Does not correspond to any MIDI message. This is the default value of [member InputEventMIDI.message].
|
||||
</constant>
|
||||
<constant name="MIDI_MESSAGE_NOTE_OFF" value="8" enum="MIDIMessage">
|
||||
MIDI note OFF message. Not all MIDI devices send this event; some send [constant MIDI_MESSAGE_NOTE_ON] with zero velocity instead. See the documentation of [InputEventMIDI] for information of how to use MIDI inputs.
|
||||
MIDI message sent when a note is released.
|
||||
[b]Note:[/b] Not all MIDI devices send this message; some may send [constant MIDI_MESSAGE_NOTE_ON] with [member InputEventMIDI.velocity] set to [code]0[/code].
|
||||
</constant>
|
||||
<constant name="MIDI_MESSAGE_NOTE_ON" value="9" enum="MIDIMessage">
|
||||
MIDI note ON message. Some MIDI devices send this event with velocity zero instead of [constant MIDI_MESSAGE_NOTE_OFF], but implementations vary. See the documentation of [InputEventMIDI] for information of how to use MIDI inputs.
|
||||
MIDI message sent when a note is pressed.
|
||||
</constant>
|
||||
<constant name="MIDI_MESSAGE_AFTERTOUCH" value="10" enum="MIDIMessage">
|
||||
MIDI aftertouch message. This message is most often sent by pressing down on the key after it "bottoms out".
|
||||
MIDI message sent to indicate a change in pressure while a note is being pressed down, also called aftertouch.
|
||||
</constant>
|
||||
<constant name="MIDI_MESSAGE_CONTROL_CHANGE" value="11" enum="MIDIMessage">
|
||||
MIDI control change message. This message is sent when a controller value changes. Controllers include devices such as pedals and levers.
|
||||
MIDI message sent when a controller value changes. In a MIDI device, a controller is any input that doesn't play notes. These may include sliders for volume, balance, and panning, as well as switches and pedals. See the [url=https://en.wikipedia.org/wiki/General_MIDI#Controller_events]General MIDI specification[/url] for a small list.
|
||||
</constant>
|
||||
<constant name="MIDI_MESSAGE_PROGRAM_CHANGE" value="12" enum="MIDIMessage">
|
||||
MIDI program change message. This message sent when the program patch number changes.
|
||||
MIDI message sent when the MIDI device changes its current instrument (also called [i]program[/i] or [i]preset[/i]).
|
||||
</constant>
|
||||
<constant name="MIDI_MESSAGE_CHANNEL_PRESSURE" value="13" enum="MIDIMessage">
|
||||
MIDI channel pressure message. This message is most often sent by pressing down on the key after it "bottoms out". This message is different from polyphonic after-touch as it indicates the highest pressure across all keys.
|
||||
MIDI message sent to indicate a change in pressure for the whole channel. Some MIDI devices may send this instead of [constant MIDI_MESSAGE_AFTERTOUCH].
|
||||
</constant>
|
||||
<constant name="MIDI_MESSAGE_PITCH_BEND" value="14" enum="MIDIMessage">
|
||||
MIDI pitch bend message. This message is sent to indicate a change in the pitch bender (wheel or lever, typically).
|
||||
MIDI message sent when the value of the pitch bender changes, usually a wheel on the MIDI device.
|
||||
</constant>
|
||||
<constant name="MIDI_MESSAGE_SYSTEM_EXCLUSIVE" value="240" enum="MIDIMessage">
|
||||
MIDI system exclusive message. This has behavior exclusive to the device you're receiving input from. Getting this data is not implemented in Godot.
|
||||
MIDI system exclusive (SysEx) message. This type of message is not standardized and it's highly dependent on the MIDI device sending it.
|
||||
[b]Note:[/b] Getting this message's data from [InputEventMIDI] is not implemented.
|
||||
</constant>
|
||||
<constant name="MIDI_MESSAGE_QUARTER_FRAME" value="241" enum="MIDIMessage">
|
||||
MIDI quarter frame message. Contains timing information that is used to synchronize MIDI devices. Getting this data is not implemented in Godot.
|
||||
MIDI message sent every quarter frame to keep connected MIDI devices synchronized. Related to [constant MIDI_MESSAGE_TIMING_CLOCK].
|
||||
[b]Note:[/b] Getting this message's data from [InputEventMIDI] is not implemented.
|
||||
</constant>
|
||||
<constant name="MIDI_MESSAGE_SONG_POSITION_POINTER" value="242" enum="MIDIMessage">
|
||||
MIDI song position pointer message. Gives the number of 16th notes since the start of the song. Getting this data is not implemented in Godot.
|
||||
MIDI message sent to jump onto a new position in the current sequence or song.
|
||||
[b]Note:[/b] Getting this message's data from [InputEventMIDI] is not implemented.
|
||||
</constant>
|
||||
<constant name="MIDI_MESSAGE_SONG_SELECT" value="243" enum="MIDIMessage">
|
||||
MIDI song select message. Specifies which sequence or song is to be played. Getting this data is not implemented in Godot.
|
||||
MIDI message sent to select a sequence or song to play.
|
||||
[b]Note:[/b] Getting this message's data from [InputEventMIDI] is not implemented.
|
||||
</constant>
|
||||
<constant name="MIDI_MESSAGE_TUNE_REQUEST" value="246" enum="MIDIMessage">
|
||||
MIDI tune request message. Upon receiving a tune request, all analog synthesizers should tune their oscillators.
|
||||
MIDI message sent to request a tuning calibration. Used on analog synthesizers. Most modern MIDI devices do not need this message.
|
||||
</constant>
|
||||
<constant name="MIDI_MESSAGE_TIMING_CLOCK" value="248" enum="MIDIMessage">
|
||||
MIDI timing clock message. Sent 24 times per quarter note when synchronization is required.
|
||||
MIDI message sent 24 times after [constant MIDI_MESSAGE_QUARTER_FRAME], to keep connected MIDI devices synchronized.
|
||||
</constant>
|
||||
<constant name="MIDI_MESSAGE_START" value="250" enum="MIDIMessage">
|
||||
MIDI start message. Start the current sequence playing. This message will be followed with Timing Clocks.
|
||||
MIDI message sent to start the current sequence or song from the beginning.
|
||||
</constant>
|
||||
<constant name="MIDI_MESSAGE_CONTINUE" value="251" enum="MIDIMessage">
|
||||
MIDI continue message. Continue at the point the sequence was stopped.
|
||||
MIDI message sent to resume from the point the current sequence or song was paused.
|
||||
</constant>
|
||||
<constant name="MIDI_MESSAGE_STOP" value="252" enum="MIDIMessage">
|
||||
MIDI stop message. Stop the current sequence.
|
||||
MIDI message sent to pause the current sequence or song.
|
||||
</constant>
|
||||
<constant name="MIDI_MESSAGE_ACTIVE_SENSING" value="254" enum="MIDIMessage">
|
||||
MIDI active sensing message. This message is intended to be sent repeatedly to tell the receiver that a connection is alive.
|
||||
MIDI message sent repeatedly while the MIDI device is idle, to tell the receiver that the connection is alive. Most MIDI devices do not send this message.
|
||||
</constant>
|
||||
<constant name="MIDI_MESSAGE_SYSTEM_RESET" value="255" enum="MIDIMessage">
|
||||
MIDI system reset message. Reset all receivers in the system to power-up status. It should not be sent on power-up itself.
|
||||
MIDI message sent to reset a MIDI device to its default state, as if it was just turned on. It should not be sent when the MIDI device is being turned on.
|
||||
</constant>
|
||||
<constant name="OK" value="0" enum="Error">
|
||||
Methods that return [enum Error] return [constant OK] when no error occurred.
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
<method name="_get_child_nodes" qualifiers="virtual const">
|
||||
<return type="Dictionary" />
|
||||
<description>
|
||||
When inheriting from [AnimationRootNode], implement this virtual method to return all children animation nodes in order as a [code]name: node[/code] dictionary.
|
||||
When inheriting from [AnimationRootNode], implement this virtual method to return all child animation nodes in order as a [code]name: node[/code] dictionary.
|
||||
</description>
|
||||
</method>
|
||||
<method name="_get_parameter_default_value" qualifiers="virtual const">
|
||||
|
@ -115,7 +115,7 @@
|
|||
<param index="7" name="sync" type="bool" default="true" />
|
||||
<param index="8" name="test_only" type="bool" default="false" />
|
||||
<description>
|
||||
Blend another animation node (in case this animation node contains children animation nodes). This function is only useful if you inherit from [AnimationRootNode] instead, else editors will not display your animation node for addition.
|
||||
Blend another animation node (in case this animation node contains child animation nodes). This function is only useful if you inherit from [AnimationRootNode] instead, otherwise editors will not display your animation node for addition.
|
||||
</description>
|
||||
</method>
|
||||
<method name="find_input" qualifiers="const">
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
A time-scaling animation node used in [AnimationTree].
|
||||
</brief_description>
|
||||
<description>
|
||||
Allows to scale the speed of the animation (or reverse it) in any children [AnimationNode]s. Setting it to [code]0.0[/code] will pause the animation.
|
||||
Allows to scale the speed of the animation (or reverse it) in any child [AnimationNode]s. Setting it to [code]0.0[/code] will pause the animation.
|
||||
</description>
|
||||
<tutorials>
|
||||
<link title="Using AnimationTree">$DOCS_URL/tutorials/animation/animation_tree.html</link>
|
||||
|
|
|
@ -218,6 +218,11 @@
|
|||
<param index="1" name="before" type="bool" default="true" />
|
||||
<description>
|
||||
Finds the index of an existing value (or the insertion index that maintains sorting order, if the value is not yet present in the array) using binary search. Optionally, a [param before] specifier can be passed. If [code]false[/code], the returned index comes after all existing entries of the value in the array.
|
||||
[codeblock]
|
||||
var array = ["a", "b", "c", "c", "d", "e"]
|
||||
print(array.bsearch("c", true)) # Prints 2, at the first matching element.
|
||||
print(array.bsearch("c", false)) # Prints 4, after the last matching element, pointing to "d".
|
||||
[/codeblock]
|
||||
[b]Note:[/b] Calling [method bsearch] on an unsorted array results in unexpected behavior.
|
||||
</description>
|
||||
</method>
|
||||
|
@ -228,6 +233,7 @@
|
|||
<param index="2" name="before" type="bool" default="true" />
|
||||
<description>
|
||||
Finds the index of an existing value (or the insertion index that maintains sorting order, if the value is not yet present in the array) using binary search and a custom comparison method. Optionally, a [param before] specifier can be passed. If [code]false[/code], the returned index comes after all existing entries of the value in the array. The custom method receives two arguments (an element from the array and the value searched for) and must return [code]true[/code] if the first argument is less than the second, and return [code]false[/code] otherwise.
|
||||
[b]Note:[/b] The custom method must accept the two arguments in any order, you cannot rely on that the first argument will always be from the array.
|
||||
[b]Note:[/b] Calling [method bsearch_custom] on an unsorted array results in unexpected behavior.
|
||||
</description>
|
||||
</method>
|
||||
|
|
|
@ -280,6 +280,8 @@
|
|||
<return type="void" />
|
||||
<param index="0" name="enable" type="bool" />
|
||||
<description>
|
||||
If set to [code]true[/code], all instances of [AudioStreamPlayback] will call [method AudioStreamPlayback._tag_used_streams] every mix step.
|
||||
[b]Note:[/b] This is enabled by default in the editor, as it is used by editor plugins for the audio stream previews.
|
||||
</description>
|
||||
</method>
|
||||
<method name="swap_bus_effects">
|
||||
|
|
|
@ -16,31 +16,39 @@
|
|||
<method name="_get_beat_count" qualifiers="virtual const">
|
||||
<return type="int" />
|
||||
<description>
|
||||
Overridable method. Should return the total number of beats of this audio stream. Used by the engine to determine the position of every beat.
|
||||
Ideally, the returned value should be based off the stream's sample rate ([member AudioStreamWAV.mix_rate], for example).
|
||||
</description>
|
||||
</method>
|
||||
<method name="_get_bpm" qualifiers="virtual const">
|
||||
<return type="float" />
|
||||
<description>
|
||||
Overridable method. Should return the tempo of this audio stream, in beats per minute (BPM). Used by the engine to determine the position of every beat.
|
||||
Ideally, the returned value should be based off the stream's sample rate ([member AudioStreamWAV.mix_rate], for example).
|
||||
</description>
|
||||
</method>
|
||||
<method name="_get_length" qualifiers="virtual const">
|
||||
<return type="float" />
|
||||
<description>
|
||||
Override this method to customize the returned value of [method get_length]. Should return the length of this audio stream, in seconds.
|
||||
</description>
|
||||
</method>
|
||||
<method name="_get_stream_name" qualifiers="virtual const">
|
||||
<return type="String" />
|
||||
<description>
|
||||
Override this method to customize the name assigned to this audio stream. Unused by the engine.
|
||||
</description>
|
||||
</method>
|
||||
<method name="_instantiate_playback" qualifiers="virtual const">
|
||||
<return type="AudioStreamPlayback" />
|
||||
<description>
|
||||
Override this method to customize the returned value of [method instantiate_playback]. Should returned a new [AudioStreamPlayback] created when the stream is played (such as by an [AudioStreamPlayer])..
|
||||
</description>
|
||||
</method>
|
||||
<method name="_is_monophonic" qualifiers="virtual const">
|
||||
<return type="bool" />
|
||||
<description>
|
||||
Override this method to customize the returned value of [method is_monophonic]. Should return [code]true[/code] if this audio stream only supports one channel.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_length" qualifiers="const">
|
||||
|
@ -52,13 +60,13 @@
|
|||
<method name="instantiate_playback">
|
||||
<return type="AudioStreamPlayback" />
|
||||
<description>
|
||||
Returns an AudioStreamPlayback. Useful for when you want to extend [method _instantiate_playback] but call [method instantiate_playback] from an internally held AudioStream subresource. An example of this can be found in the source files for [code]AudioStreamRandomPitch::instantiate_playback[/code].
|
||||
Returns a newly created [AudioStreamPlayback] intended to play this audio stream. Useful for when you want to extend [method _instantiate_playback] but call [method instantiate_playback] from an internally held AudioStream subresource. An example of this can be found in the source code for [code]AudioStreamRandomPitch::instantiate_playback[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="is_monophonic" qualifiers="const">
|
||||
<return type="bool" />
|
||||
<description>
|
||||
Returns true if this audio stream only supports monophonic playback, or false if the audio stream supports polyphony.
|
||||
Returns [code]true[/code] if this audio stream only supports one channel ([i]monophony[/i]), or [code]false[/code] if the audio stream supports two or more channels ([i]polyphony[/i]).
|
||||
</description>
|
||||
</method>
|
||||
</methods>
|
||||
|
|
|
@ -13,16 +13,19 @@
|
|||
<method name="_get_loop_count" qualifiers="virtual const">
|
||||
<return type="int" />
|
||||
<description>
|
||||
Overridable method. Should return how many times this audio stream has looped. Most built-in playbacks always return [code]0[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="_get_playback_position" qualifiers="virtual const">
|
||||
<return type="float" />
|
||||
<description>
|
||||
Overridable method. Should return the current progress along the audio stream, in seconds.
|
||||
</description>
|
||||
</method>
|
||||
<method name="_is_playing" qualifiers="virtual const">
|
||||
<return type="bool" />
|
||||
<description>
|
||||
Overridable method. Should return [code]true[/code] if this playback is active and playing its audio stream.
|
||||
</description>
|
||||
</method>
|
||||
<method name="_mix" qualifiers="virtual">
|
||||
|
@ -31,28 +34,34 @@
|
|||
<param index="1" name="rate_scale" type="float" />
|
||||
<param index="2" name="frames" type="int" />
|
||||
<description>
|
||||
Override this method to customize how the audio stream is mixed. This method is called even if the playback is not active.
|
||||
[b]Note:[/b] It is not useful to override this method in GDScript or C#. Only GDExtension can take advantage of it.
|
||||
</description>
|
||||
</method>
|
||||
<method name="_seek" qualifiers="virtual">
|
||||
<return type="void" />
|
||||
<param index="0" name="position" type="float" />
|
||||
<description>
|
||||
Override this method to customize what happens when seeking this audio stream at the given [param position], such as by calling [method AudioStreamPlayer.seek].
|
||||
</description>
|
||||
</method>
|
||||
<method name="_start" qualifiers="virtual">
|
||||
<return type="void" />
|
||||
<param index="0" name="from_pos" type="float" />
|
||||
<description>
|
||||
Override this method to customize what happens when the playback starts at the given position, such as by calling [method AudioStreamPlayer.play].
|
||||
</description>
|
||||
</method>
|
||||
<method name="_stop" qualifiers="virtual">
|
||||
<return type="void" />
|
||||
<description>
|
||||
Override this method to customize what happens when the playback is stopped, such as by calling [method AudioStreamPlayer.stop].
|
||||
</description>
|
||||
</method>
|
||||
<method name="_tag_used_streams" qualifiers="virtual">
|
||||
<return type="void" />
|
||||
<description>
|
||||
Overridable method. Called whenever the audio stream is mixed if the playback is active and [method AudioServer.set_enable_tagging_used_audio_streams] has been set to [code]true[/code]. Editor plugins may use this method to "tag" the current position along the audio stream and display it in a preview.
|
||||
</description>
|
||||
</method>
|
||||
</methods>
|
||||
|
|
|
@ -4,10 +4,12 @@
|
|||
A 3×3 matrix for representing 3D rotation and scale.
|
||||
</brief_description>
|
||||
<description>
|
||||
A 3×3 matrix used for representing 3D rotation and scale. Usually used as an orthogonal basis for a [Transform3D].
|
||||
Contains 3 vector fields X, Y and Z as its columns, which are typically interpreted as the local basis vectors of a transformation. For such use, it is composed of a scaling and a rotation matrix, in that order (M = R.S).
|
||||
Basis can also be accessed as an array of 3D vectors. These vectors are usually orthogonal to each other, but are not necessarily normalized (due to scaling).
|
||||
For more information, read the "Matrices and transforms" documentation article.
|
||||
The [Basis] built-in [Variant] type is a 3x3 [url=https://en.wikipedia.org/wiki/Matrix_(mathematics)]matrix[/url] used to represent 3D rotation, scale, and shear. It is frequently used within a [Transform3D].
|
||||
A [Basis] is composed by 3 axis vectors, each representing a column of the matrix: [member x], [member y], and [member z]. The length of each axis ([method Vector3.length]) influences the basis's scale, while the direction of all axes influence the rotation. Usually, these axes are perpendicular to one another. However, when you rotate any axis individually, the basis becomes sheared. Applying a sheared basis to a 3D model will make the model appear distorted.
|
||||
A [Basis] is [b]orthogonal[/b] if its axes are perpendicular to each other. A basis is [b]normalized[/b] if the length of every axis is [code]1[/code]. A basis is [b]uniform[/b] if all axes share the same length (see [method get_scale]). A basis is [b]orthonormal[/b] if it is both orthogonal and normalized, which allows it to only represent rotations. A basis is [b]conformal[/b] if it is both orthogonal and uniform, which ensures it is not distorted.
|
||||
For a general introduction, see the [url=$DOCS_URL/tutorials/math/matrices_and_transforms.html]Matrices and transforms[/url] tutorial.
|
||||
[b]Note:[/b] Godot uses a [url=https://en.wikipedia.org/wiki/Right-hand_rule]right-handed coordinate system[/url], which is a common standard. For directions, the convention for built-in types like [Camera3D] is for -Z to point forward (+X is right, +Y is up, and +Z is back). Other objects may use different direction conventions. For more information, see the [url=$DOCS_URL/tutorials/assets_pipeline/importing_scenes.html#d-asset-direction-conventions]Importing 3D Scenes[/url] tutorial.
|
||||
[b]Note:[/b] The basis matrices are exposed as [url=https://www.mindcontrol.org/~hplus/graphics/matrix-layout.html]column-major[/url] order, which is the same as OpenGL. However, they are stored internally in row-major order, which is the same as DirectX.
|
||||
</description>
|
||||
<tutorials>
|
||||
<link title="Math documentation index">$DOCS_URL/tutorials/math/index.html</link>
|
||||
|
@ -22,7 +24,7 @@
|
|||
<constructor name="Basis">
|
||||
<return type="Basis" />
|
||||
<description>
|
||||
Constructs a default-initialized [Basis] set to [constant IDENTITY].
|
||||
Constructs a [Basis] identical to the [constant IDENTITY].
|
||||
</description>
|
||||
</constructor>
|
||||
<constructor name="Basis">
|
||||
|
@ -37,14 +39,16 @@
|
|||
<param index="0" name="axis" type="Vector3" />
|
||||
<param index="1" name="angle" type="float" />
|
||||
<description>
|
||||
Constructs a pure rotation basis matrix, rotated around the given [param axis] by [param angle] (in radians). The axis must be a normalized vector.
|
||||
Constructs a [Basis] that only represents rotation, rotated around the [param axis] by the given [param angle], in radians. The axis must be a normalized vector.
|
||||
[b]Note:[/b] This is the same as using [method rotated] on the [constant IDENTITY] basis. With more than one angle consider using [method from_euler], instead.
|
||||
</description>
|
||||
</constructor>
|
||||
<constructor name="Basis">
|
||||
<return type="Basis" />
|
||||
<param index="0" name="from" type="Quaternion" />
|
||||
<description>
|
||||
Constructs a pure rotation basis matrix from the given quaternion.
|
||||
Constructs a [Basis] that only represents rotation from the given [Quaternion].
|
||||
[b]Note:[/b] Quaternions [i]only[/i] store rotation, not scale. Because of this, conversions from [Basis] to [Quaternion] cannot always be reversed.
|
||||
</description>
|
||||
</constructor>
|
||||
<constructor name="Basis">
|
||||
|
@ -53,7 +57,7 @@
|
|||
<param index="1" name="y_axis" type="Vector3" />
|
||||
<param index="2" name="z_axis" type="Vector3" />
|
||||
<description>
|
||||
Constructs a basis matrix from 3 axis vectors (matrix columns).
|
||||
Constructs a [Basis] from 3 axis vectors. These are the columns of the basis matrix.
|
||||
</description>
|
||||
</constructor>
|
||||
</constructors>
|
||||
|
@ -61,8 +65,10 @@
|
|||
<method name="determinant" qualifiers="const">
|
||||
<return type="float" />
|
||||
<description>
|
||||
Returns the determinant of the basis matrix. If the basis is uniformly scaled, its determinant is the square of the scale.
|
||||
A negative determinant means the basis has a negative scale. A zero determinant means the basis isn't invertible, and is usually considered invalid.
|
||||
Returns the [url=https://en.wikipedia.org/wiki/Determinant]determinant[/url] of this basis's matrix. For advanced math, this number can be used to determine a few attributes:
|
||||
- If the determinant is exactly [code]0[/code], the basis is not invertible (see [method inverse]).
|
||||
- If the determinant is a negative number, the basis represents a negative scale.
|
||||
[b]Note:[/b] If the basis's scale is the same for every axis, its determinant is always that scale by the power of 2.
|
||||
</description>
|
||||
</method>
|
||||
<method name="from_euler" qualifiers="static">
|
||||
|
@ -70,40 +76,108 @@
|
|||
<param index="0" name="euler" type="Vector3" />
|
||||
<param index="1" name="order" type="int" default="2" />
|
||||
<description>
|
||||
Constructs a pure rotation Basis matrix from Euler angles in the specified Euler rotation order. By default, use YXZ order (most common). See the [enum EulerOrder] enum for possible values.
|
||||
Constructs a new [Basis] that only represents rotation from the given [Vector3] of [url=https://en.wikipedia.org/wiki/Euler_angles]Euler angles[/url], in radians.
|
||||
- The [member Vector3.x] should contain the angle around the [member x] axis (pitch).
|
||||
- The [member Vector3.y] should contain the angle around the [member y] axis (yaw).
|
||||
- The [member Vector3.z] should contain the angle around the [member z] axis (roll).
|
||||
[codeblocks]
|
||||
[gdscript]
|
||||
# Creates a Basis whose z axis points down.
|
||||
var my_basis = Basis.from_euler(Vector3(TAU / 4, 0, 0))
|
||||
|
||||
print(my_basis.z) # Prints (0, -1, 0).
|
||||
[/gdscript]
|
||||
[csharp]
|
||||
// Creates a Basis whose z axis points down.
|
||||
var myBasis = Basis.FromEuler(new Vector3(Mathf.Tau / 4.0f, 0.0f, 0.0f));
|
||||
|
||||
GD.Print(myBasis.Z); // Prints (0, -1, 0).
|
||||
[/csharp]
|
||||
[/codeblocks]
|
||||
The order of each consecutive rotation can be changed with [param order] (see [enum EulerOrder] constants). By default, the YXZ convention is used ([constant EULER_ORDER_YXZ]): the basis rotates first around the Y axis (yaw), then X (pitch), and lastly Z (roll). When using the opposite method [method get_euler], this order is reversed.
|
||||
</description>
|
||||
</method>
|
||||
<method name="from_scale" qualifiers="static">
|
||||
<return type="Basis" />
|
||||
<param index="0" name="scale" type="Vector3" />
|
||||
<description>
|
||||
Constructs a pure scale basis matrix with no rotation or shearing. The scale values are set as the diagonal of the matrix, and the other parts of the matrix are zero.
|
||||
Constructs a new [Basis] that only represents scale, with no rotation or shear, from the given [param scale] vector.
|
||||
[codeblocks]
|
||||
[gdscript]
|
||||
var my_basis = Basis.from_scale(Vector3(2, 4, 8))
|
||||
|
||||
print(my_basis.x) # Prints (2, 0, 0).
|
||||
print(my_basis.y) # Prints (0, 4, 0).
|
||||
print(my_basis.z) # Prints (0, 0, 8).
|
||||
[/gdscript]
|
||||
[csharp]
|
||||
var myBasis = Basis.FromScale(new Vector3(2.0f, 4.0f, 8.0f));
|
||||
|
||||
GD.Print(myBasis.X); // Prints (2, 0, 0).
|
||||
GD.Print(myBasis.Y); // Prints (0, 4, 0).
|
||||
GD.Print(myBasis.Z); // Prints (0, 0, 8).
|
||||
[/csharp]
|
||||
[/codeblocks]
|
||||
[b]Note:[/b] In linear algebra, the matrix of this basis is also known as a [url=https://en.wikipedia.org/wiki/Diagonal_matrix]diagonal matrix[/url].
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_euler" qualifiers="const">
|
||||
<return type="Vector3" />
|
||||
<param index="0" name="order" type="int" default="2" />
|
||||
<description>
|
||||
Returns the basis's rotation in the form of Euler angles. The Euler order depends on the [param order] parameter, by default it uses the YXZ convention: when decomposing, first Z, then X, and Y last. The returned vector contains the rotation angles in the format (X angle, Y angle, Z angle).
|
||||
Consider using the [method get_rotation_quaternion] method instead, which returns a [Quaternion] quaternion instead of Euler angles.
|
||||
Returns this basis's rotation as a [Vector3] of [url=https://en.wikipedia.org/wiki/Euler_angles]Euler angles[/url], in radians.
|
||||
- The [member Vector3.x] contains the angle around the [member x] axis (pitch);
|
||||
- The [member Vector3.y] contains the angle around the [member y] axis (yaw);
|
||||
- The [member Vector3.z] contains the angle around the [member z] axis (roll).
|
||||
The order of each consecutive rotation can be changed with [param order] (see [enum EulerOrder] constants). By default, the YXZ convention is used ([constant EULER_ORDER_YXZ]): Z (roll) is calculated first, then X (pitch), and lastly Y (yaw). When using the opposite method [method from_euler], this order is reversed.
|
||||
[b]Note:[/b] Euler angles are much more intuitive but are not suitable for 3D math. Because of this, consider using the [method get_rotation_quaternion] method instead, which returns a [Quaternion].
|
||||
[b]Note:[/b] In the Inspector dock, a basis's rotation is often displayed in Euler angles (in degrees), as is the case with the [member Node3D.rotation] property.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_rotation_quaternion" qualifiers="const">
|
||||
<return type="Quaternion" />
|
||||
<description>
|
||||
Returns the basis's rotation in the form of a quaternion. See [method get_euler] if you need Euler angles, but keep in mind quaternions should generally be preferred to Euler angles.
|
||||
Returns this basis's rotation as a [Quaternion].
|
||||
[b]Note:[/b] Quatenions are much more suitable for 3D math but are less intuitive. For user interfaces, consider using the [method get_euler] method, which returns Euler angles.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_scale" qualifiers="const">
|
||||
<return type="Vector3" />
|
||||
<description>
|
||||
Assuming that the matrix is the combination of a rotation and scaling, return the absolute value of scaling factors along each axis.
|
||||
Returns the length of each axis of this basis, as a [Vector3]. If the basis is not sheared, this is the scaling factor. It is not affected by rotation.
|
||||
[codeblocks]
|
||||
[gdscript]
|
||||
var my_basis = Basis(
|
||||
Vector3(2, 0, 0),
|
||||
Vector3(0, 4, 0),
|
||||
Vector3(0, 0, 8)
|
||||
)
|
||||
# Rotating the Basis in any way preserves its scale.
|
||||
my_basis = my_basis.rotated(Vector3.UP, TAU / 2)
|
||||
my_basis = my_basis.rotated(Vector3.RIGHT, TAU / 4)
|
||||
|
||||
print(my_basis.get_scale()) # Prints (2, 4, 8).
|
||||
[/gdscript]
|
||||
[csharp]
|
||||
var myBasis = new Basis(
|
||||
Vector3(2.0f, 0.0f, 0.0f),
|
||||
Vector3(0.0f, 4.0f, 0.0f),
|
||||
Vector3(0.0f, 0.0f, 8.0f)
|
||||
);
|
||||
// Rotating the Basis in any way preserves its scale.
|
||||
myBasis = myBasis.Rotated(Vector3.Up, Mathf.Tau / 2.0f);
|
||||
myBasis = myBasis.Rotated(Vector3.Right, Mathf.Tau / 4.0f);
|
||||
|
||||
GD.Print(myBasis.Scale); // Prints (2, 4, 8).
|
||||
[/csharp]
|
||||
[/codeblocks]
|
||||
[b]Note:[/b] If the value returned by [method determinant] is negative, the scale is also negative.
|
||||
</description>
|
||||
</method>
|
||||
<method name="inverse" qualifiers="const">
|
||||
<return type="Basis" />
|
||||
<description>
|
||||
Returns the inverse of the matrix.
|
||||
Returns the [url=https://en.wikipedia.org/wiki/Invertible_matrix]inverse of this basis's matrix[/url].
|
||||
</description>
|
||||
</method>
|
||||
<method name="is_equal_approx" qualifiers="const">
|
||||
|
@ -125,15 +199,35 @@
|
|||
<param index="1" name="up" type="Vector3" default="Vector3(0, 1, 0)" />
|
||||
<param index="2" name="use_model_front" type="bool" default="false" />
|
||||
<description>
|
||||
Creates a Basis with a rotation such that the forward axis (-Z) points towards the [param target] position.
|
||||
The up axis (+Y) points as close to the [param up] vector as possible while staying perpendicular to the forward axis. The resulting Basis is orthonormalized. The [param target] and [param up] vectors cannot be zero, and cannot be parallel to each other.
|
||||
If [param use_model_front] is [code]true[/code], the +Z axis (asset front) is treated as forward (implies +X is left) and points toward the [param target] position. By default, the -Z axis (camera forward) is treated as forward (implies +X is right).
|
||||
Creates a new [Basis] with a rotation such that the forward axis (-Z) points towards the [param target] position.
|
||||
By default, the -Z axis (camera forward) is treated as forward (implies +X is right). If [param use_model_front] is [code]true[/code], the +Z axis (asset front) is treated as forward (implies +X is left) and points toward the [param target] position.
|
||||
The up axis (+Y) points as close to the [param up] vector as possible while staying perpendicular to the forward axis. The returned basis is orthonormalized (see [method orthonormalized]). The [param target] and [param up] vectors cannot be [constant Vector3.ZERO], and cannot be parallel to each other.
|
||||
</description>
|
||||
</method>
|
||||
<method name="orthonormalized" qualifiers="const">
|
||||
<return type="Basis" />
|
||||
<description>
|
||||
Returns the orthonormalized version of the matrix (useful to call from time to time to avoid rounding error for orthogonal matrices). This performs a Gram-Schmidt orthonormalization on the basis of the matrix.
|
||||
Returns the orthonormalized version of this basis. An orthonormal basis is both [i]orthogonal[/i] (the axes are perpendicular to each other) and [i]normalized[/i] (the axes have a length of [code]1[/code]), which also means it can only represent rotation.
|
||||
It is often useful to call this method to avoid rounding errors on a rotating basis:
|
||||
[codeblocks]
|
||||
[gdscript]
|
||||
# Rotate this Node3D every frame.
|
||||
func _process(delta):
|
||||
basis = basis.rotated(Vector3.UP, TAU * delta)
|
||||
basis = basis.rotated(Vector3.RIGHT, TAU * delta)
|
||||
|
||||
basis = basis.orthonormalized()
|
||||
[/gdscript]
|
||||
[csharp]
|
||||
// Rotate this Node3D every frame.
|
||||
public override void _Process(double delta)
|
||||
{
|
||||
Basis = Basis.Rotated(Vector3.Up, Mathf.Tau * (float)delta)
|
||||
.Rotated(Vector3.Right, Mathf.Tau * (float)delta)
|
||||
.Orthonormalized();
|
||||
}
|
||||
[/csharp]
|
||||
[/codeblocks]
|
||||
</description>
|
||||
</method>
|
||||
<method name="rotated" qualifiers="const">
|
||||
|
@ -141,14 +235,60 @@
|
|||
<param index="0" name="axis" type="Vector3" />
|
||||
<param index="1" name="angle" type="float" />
|
||||
<description>
|
||||
Introduce an additional rotation around the given axis by [param angle] (in radians). The axis must be a normalized vector.
|
||||
Returns this basis rotated around the given [param axis] by [param angle] (in radians). The [param axis] must be a normalized vector (see [method Vector3.normalized]).
|
||||
Positive values rotate this basis clockwise around the axis, while negative values rotate it counterclockwise.
|
||||
[codeblocks]
|
||||
[gdscript]
|
||||
var my_basis = Basis.IDENTITY
|
||||
var angle = TAU / 2
|
||||
|
||||
my_basis = my_basis.rotated(Vector3.UP, angle) # Rotate around the up axis (yaw).
|
||||
my_basis = my_basis.rotated(Vector3.RIGHT, angle) # Rotate around the right axis (pitch).
|
||||
my_basis = my_basis.rotated(Vector3.BACK, angle) # Rotate around the back axis (roll).
|
||||
[/gdscript]
|
||||
[csharp]
|
||||
var myBasis = Basis.Identity;
|
||||
var angle = Mathf.Tau / 2.0f;
|
||||
|
||||
myBasis = myBasis.Rotated(Vector3.Up, angle); // Rotate around the up axis (yaw).
|
||||
myBasis = myBasis.Rotated(Vector3.Right, angle); // Rotate around the right axis (pitch).
|
||||
myBasis = myBasis.Rotated(Vector3.Back, angle); // Rotate around the back axis (roll).
|
||||
[/csharp]
|
||||
[/codeblocks]
|
||||
</description>
|
||||
</method>
|
||||
<method name="scaled" qualifiers="const">
|
||||
<return type="Basis" />
|
||||
<param index="0" name="scale" type="Vector3" />
|
||||
<description>
|
||||
Introduce an additional scaling specified by the given 3D scaling factor.
|
||||
Returns this basis with each axis's components scaled by the given [param scale]'s components.
|
||||
The basis matrix's rows are multiplied by [param scale]'s components. This operation is a global scale (relative to the parent).
|
||||
[codeblocks]
|
||||
[gdscript]
|
||||
var my_basis = Basis(
|
||||
Vector3(1, 1, 1),
|
||||
Vector3(2, 2, 2),
|
||||
Vector3(3, 3, 3)
|
||||
)
|
||||
my_basis = my_basis.scaled(Vector3(0, 2, -2))
|
||||
|
||||
print(my_basis.x) # Prints (0, 2, -2).
|
||||
print(my_basis.y) # Prints (0, 4, -4).
|
||||
print(my_basis.z) # Prints (0, 6, -6).
|
||||
[/gdscript]
|
||||
[csharp]
|
||||
var myBasis = new Basis(
|
||||
new Vector3(1.0f, 1.0f, 1.0f),
|
||||
new Vector3(2.0f, 2.0f, 2.0f),
|
||||
new Vector3(3.0f, 3.0f, 3.0f)
|
||||
);
|
||||
myBasis = myBasis.Scaled(new Vector3(0.0f, 2.0f, -2.0f));
|
||||
|
||||
GD.Print(myBasis.X); // Prints (0, 2, -2).
|
||||
GD.Print(myBasis.Y); // Prints (0, 4, -4).
|
||||
GD.Print(myBasis.Z); // Prints (0, 6, -6).
|
||||
[/csharp]
|
||||
[/codeblocks]
|
||||
</description>
|
||||
</method>
|
||||
<method name="slerp" qualifiers="const">
|
||||
|
@ -156,61 +296,122 @@
|
|||
<param index="0" name="to" type="Basis" />
|
||||
<param index="1" name="weight" type="float" />
|
||||
<description>
|
||||
Assuming that the matrix is a proper rotation matrix, slerp performs a spherical-linear interpolation with another rotation matrix.
|
||||
Performs a spherical-linear interpolation with the [param to] basis, given a [param weight]. Both this basis and [param to] should represent a rotation.
|
||||
[b]Example:[/b] Smoothly rotate a [Node3D] to the target basis over time, with a [Tween].
|
||||
[codeblock]
|
||||
var start_basis = Basis.IDENTITY
|
||||
var target_basis = Basis.IDENTITY.rotated(Vector3.UP, TAU / 2)
|
||||
|
||||
func _ready():
|
||||
create_tween().tween_method(interpolate, 0.0, 1.0, 5.0).set_trans(Tween.TRANS_EXPO)
|
||||
|
||||
func interpolate(weight):
|
||||
basis = start_basis.slerp(target_basis, weight)
|
||||
[/codeblock]
|
||||
</description>
|
||||
</method>
|
||||
<method name="tdotx" qualifiers="const">
|
||||
<return type="float" />
|
||||
<param index="0" name="with" type="Vector3" />
|
||||
<description>
|
||||
Transposed dot product with the X axis of the matrix.
|
||||
Returns the transposed dot product between [param with] and the [member x] axis (see [method transposed]).
|
||||
This is equivalent to [code]basis.x.dot(vector)[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="tdoty" qualifiers="const">
|
||||
<return type="float" />
|
||||
<param index="0" name="with" type="Vector3" />
|
||||
<description>
|
||||
Transposed dot product with the Y axis of the matrix.
|
||||
Returns the transposed dot product between [param with] and the [member y] axis (see [method transposed]).
|
||||
This is equivalent to [code]basis.y.dot(vector)[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="tdotz" qualifiers="const">
|
||||
<return type="float" />
|
||||
<param index="0" name="with" type="Vector3" />
|
||||
<description>
|
||||
Transposed dot product with the Z axis of the matrix.
|
||||
Returns the transposed dot product between [param with] and the [member z] axis (see [method transposed]).
|
||||
This is equivalent to [code]basis.z.dot(vector)[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="transposed" qualifiers="const">
|
||||
<return type="Basis" />
|
||||
<description>
|
||||
Returns the transposed version of the matrix.
|
||||
Returns the transposed version of this basis. This turns the basis matrix's columns into rows, and its rows into columns.
|
||||
[codeblocks]
|
||||
[gdscript]
|
||||
var my_basis = Basis(
|
||||
Vector3(1, 2, 3),
|
||||
Vector3(4, 5, 6),
|
||||
Vector3(7, 8, 9)
|
||||
)
|
||||
my_basis = my_basis.transposed()
|
||||
|
||||
print(my_basis.x) # Prints (1, 4, 7).
|
||||
print(my_basis.y) # Prints (2, 5, 8).
|
||||
print(my_basis.z) # Prints (3, 6, 9).
|
||||
[/gdscript]
|
||||
[csharp]
|
||||
var myBasis = new Basis(
|
||||
new Vector3(1.0f, 2.0f, 3.0f),
|
||||
new Vector3(4.0f, 5.0f, 6.0f),
|
||||
new Vector3(7.0f, 8.0f, 9.0f)
|
||||
);
|
||||
myBasis = myBasis.Transposed();
|
||||
|
||||
GD.Print(myBasis.X); // Prints (1, 4, 7).
|
||||
GD.Print(myBasis.Y); // Prints (2, 5, 8).
|
||||
GD.Print(myBasis.Z); // Prints (3, 6, 9).
|
||||
[/csharp]
|
||||
[/codeblocks]
|
||||
</description>
|
||||
</method>
|
||||
</methods>
|
||||
<members>
|
||||
<member name="x" type="Vector3" setter="" getter="" default="Vector3(1, 0, 0)">
|
||||
The basis matrix's X vector (column 0). Equivalent to array index [code]0[/code].
|
||||
The basis's X axis, and the column [code]0[/code] of the matrix.
|
||||
On the identity basis, this vector points right ([constant Vector3.RIGHT]).
|
||||
</member>
|
||||
<member name="y" type="Vector3" setter="" getter="" default="Vector3(0, 1, 0)">
|
||||
The basis matrix's Y vector (column 1). Equivalent to array index [code]1[/code].
|
||||
The basis's Y axis, and the column [code]1[/code] of the matrix.
|
||||
On the identity basis, this vector points up ([constant Vector3.UP]).
|
||||
</member>
|
||||
<member name="z" type="Vector3" setter="" getter="" default="Vector3(0, 0, 1)">
|
||||
The basis matrix's Z vector (column 2). Equivalent to array index [code]2[/code].
|
||||
The basis's Z axis, and the column [code]2[/code] of the matrix.
|
||||
On the identity basis, this vector points back ([constant Vector3.BACK]).
|
||||
</member>
|
||||
</members>
|
||||
<constants>
|
||||
<constant name="IDENTITY" value="Basis(1, 0, 0, 0, 1, 0, 0, 0, 1)">
|
||||
The identity basis, with no rotation or scaling applied.
|
||||
This is identical to calling [code]Basis()[/code] without any parameters. This constant can be used to make your code clearer, and for consistency with C#.
|
||||
The identity basis. This is a basis with no rotation, no shear, and its scale being [code]1[/code]. This means that:
|
||||
- The [member x] points right ([constant Vector3.RIGHT]);
|
||||
- The [member y] points up ([constant Vector3.UP]);
|
||||
- The [member z] points back ([constant Vector3.BACK]).
|
||||
[codeblock]
|
||||
var basis := Basis.IDENTITY
|
||||
print("| X | Y | Z")
|
||||
print("| %s | %s | %s" % [basis.x.x, basis.y.x, basis.z.x])
|
||||
print("| %s | %s | %s" % [basis.x.y, basis.y.y, basis.z.y])
|
||||
print("| %s | %s | %s" % [basis.x.z, basis.y.z, basis.z.z])
|
||||
# Prints:
|
||||
# | X | Y | Z
|
||||
# | 1 | 0 | 0
|
||||
# | 0 | 1 | 0
|
||||
# | 0 | 0 | 1
|
||||
[/codeblock]
|
||||
This is identical to creating [code]Basis()[/code] without any parameters. This constant can be used to make your code clearer, and for consistency with C#.
|
||||
</constant>
|
||||
<constant name="FLIP_X" value="Basis(-1, 0, 0, 0, 1, 0, 0, 0, 1)">
|
||||
The basis that will flip something along the X axis when used in a transformation.
|
||||
When any basis is multiplied by [constant FLIP_X], it negates all components of the [member x] axis (the X column).
|
||||
When [constant FLIP_X] is multiplied by any basis, it negates the [member Vector3.x] component of all axes (the X row).
|
||||
</constant>
|
||||
<constant name="FLIP_Y" value="Basis(1, 0, 0, 0, -1, 0, 0, 0, 1)">
|
||||
The basis that will flip something along the Y axis when used in a transformation.
|
||||
When any basis is multiplied by [constant FLIP_Y], it negates all components of the [member y] axis (the Y column).
|
||||
When [constant FLIP_Y] is multiplied by any basis, it negates the [member Vector3.y] component of all axes (the Y row).
|
||||
</constant>
|
||||
<constant name="FLIP_Z" value="Basis(1, 0, 0, 0, 1, 0, 0, 0, -1)">
|
||||
The basis that will flip something along the Z axis when used in a transformation.
|
||||
When any basis is multiplied by [constant FLIP_Z], it negates all components of the [member z] axis (the Z column).
|
||||
When [constant FLIP_Z] is multiplied by any basis, it negates the [member Vector3.z] component of all axes (the Z row).
|
||||
</constant>
|
||||
</constants>
|
||||
<operators>
|
||||
|
@ -218,7 +419,7 @@
|
|||
<return type="bool" />
|
||||
<param index="0" name="right" type="Basis" />
|
||||
<description>
|
||||
Returns [code]true[/code] if the [Basis] matrices are not equal.
|
||||
Returns [code]true[/code] if the components of both [Basis] matrices are not equal.
|
||||
[b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable.
|
||||
</description>
|
||||
</operator>
|
||||
|
@ -226,35 +427,46 @@
|
|||
<return type="Basis" />
|
||||
<param index="0" name="right" type="Basis" />
|
||||
<description>
|
||||
Composes these two basis matrices by multiplying them together. This has the effect of transforming the second basis (the child) by the first basis (the parent).
|
||||
Transforms (multiplies) the [param right] basis by this basis.
|
||||
This is the operation performed between parent and child [Node3D]s.
|
||||
</description>
|
||||
</operator>
|
||||
<operator name="operator *">
|
||||
<return type="Vector3" />
|
||||
<param index="0" name="right" type="Vector3" />
|
||||
<description>
|
||||
Transforms (multiplies) the [Vector3] by the given [Basis] matrix.
|
||||
Transforms (multiplies) the [param right] vector by this basis, returning a [Vector3].
|
||||
[codeblocks]
|
||||
[gdscript]
|
||||
var my_basis = Basis(Vector3(1, 1, 1), Vector3(1, 1, 1), Vector3(0, 2, 5))
|
||||
print(my_basis * Vector3(1, 2, 3)) # Prints (7, 3, 16)
|
||||
[/gdscript]
|
||||
[csharp]
|
||||
var myBasis = new Basis(new Vector3(1, 1, 1), new Vector3(1, 1, 1), new Vector3(0, 2, 5));
|
||||
GD.Print(my_basis * new Vector3(1, 2, 3)); // Prints (7, 3, 16)
|
||||
[/csharp]
|
||||
[/codeblocks]
|
||||
</description>
|
||||
</operator>
|
||||
<operator name="operator *">
|
||||
<return type="Basis" />
|
||||
<param index="0" name="right" type="float" />
|
||||
<description>
|
||||
This operator multiplies all components of the [Basis], which scales it uniformly.
|
||||
Multiplies all components of the [Basis] by the given [float]. This affects the basis's scale uniformly, resizing all 3 axes by the [param right] value.
|
||||
</description>
|
||||
</operator>
|
||||
<operator name="operator *">
|
||||
<return type="Basis" />
|
||||
<param index="0" name="right" type="int" />
|
||||
<description>
|
||||
This operator multiplies all components of the [Basis], which scales it uniformly.
|
||||
Multiplies all components of the [Basis] by the given [int]. This affects the basis's scale uniformly, resizing all 3 axes by the [param right] value.
|
||||
</description>
|
||||
</operator>
|
||||
<operator name="operator ==">
|
||||
<return type="bool" />
|
||||
<param index="0" name="right" type="Basis" />
|
||||
<description>
|
||||
Returns [code]true[/code] if the [Basis] matrices are exactly equal.
|
||||
Returns [code]true[/code] if the components of both [Basis] matrices are exactly equal.
|
||||
[b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable.
|
||||
</description>
|
||||
</operator>
|
||||
|
@ -262,7 +474,8 @@
|
|||
<return type="Vector3" />
|
||||
<param index="0" name="index" type="int" />
|
||||
<description>
|
||||
Access basis components using their index. [code]b[0][/code] is equivalent to [code]b.x[/code], [code]b[1][/code] is equivalent to [code]b.y[/code], and [code]b[2][/code] is equivalent to [code]b.z[/code].
|
||||
Accesses each axis (column) of this basis by their index. Index [code]0[/code] is the same as [member x], index [code]1[/code] is the same as [member y], and index [code]2[/code] is the same as [member z].
|
||||
[b]Note:[/b] In C++, this operator accesses the rows of the basis matrix, [i]not[/i] the columns. For the same behavior as scripting languages, use the [code]set_column[/code] and [code]get_column[/code] methods.
|
||||
</description>
|
||||
</operator>
|
||||
</operators>
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
<method name="apply_rest">
|
||||
<return type="void" />
|
||||
<description>
|
||||
Stores the node's current transforms in [member rest].
|
||||
Resets the bone to the rest pose. This is equivalent to setting [member Node2D.transform] to [member rest].
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_autocalculate_length_and_angle" qualifiers="const">
|
||||
|
|
|
@ -113,6 +113,7 @@
|
|||
func _ready():
|
||||
grab_focus.call_deferred()
|
||||
[/codeblock]
|
||||
[b]Note:[/b] Deferred calls are processed at idle time. Idle time happens mainly at the end of process and physics frames. In it, deferred calls will be run until there are none left, which means you can defer calls from other deferred calls and they'll still be run in the current idle time cycle. This means you should not call a method deferred from itself (or from a method called by it), as this causes infinite recursion the same way as if you had called the method directly.
|
||||
See also [method Object.call_deferred].
|
||||
</description>
|
||||
</method>
|
||||
|
|
|
@ -522,7 +522,7 @@
|
|||
<return type="void" />
|
||||
<description>
|
||||
Moves this node to display on top of its siblings.
|
||||
Internally, the node is moved to the bottom of parent's children list. The method has no effect on nodes without a parent.
|
||||
Internally, the node is moved to the bottom of parent's child list. The method has no effect on nodes without a parent.
|
||||
</description>
|
||||
</method>
|
||||
<method name="queue_redraw">
|
||||
|
@ -562,7 +562,7 @@
|
|||
</methods>
|
||||
<members>
|
||||
<member name="clip_children" type="int" setter="set_clip_children_mode" getter="get_clip_children_mode" enum="CanvasItem.ClipChildrenMode" default="0">
|
||||
Allows the current node to clip children nodes, essentially acting as a mask.
|
||||
Allows the current node to clip child nodes, essentially acting as a mask.
|
||||
</member>
|
||||
<member name="light_mask" type="int" setter="set_light_mask" getter="get_light_mask" default="1">
|
||||
The rendering layers in which this [CanvasItem] responds to [Light2D] nodes.
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
A color represented in RGBA format.
|
||||
</brief_description>
|
||||
<description>
|
||||
A color represented in RGBA format by a red ([member r]), green ([member g]), blue ([member b]), and alpha ([member a]) component. Each component is a 16-bit floating-point value, usually ranging from [code]0.0[/code] to [code]1.0[/code]. Some properties (such as [member CanvasItem.modulate]) may support values greater than [code]1.0[/code], for overbright or HDR (High Dynamic Range) colors.
|
||||
A color represented in RGBA format by a red ([member r]), green ([member g]), blue ([member b]), and alpha ([member a]) component. Each component is a 32-bit floating-point value, usually ranging from [code]0.0[/code] to [code]1.0[/code]. Some properties (such as [member CanvasItem.modulate]) may support values greater than [code]1.0[/code], for overbright or HDR (High Dynamic Range) colors.
|
||||
Colors can be created in various ways: By the various [Color] constructors, by static methods such as [method from_hsv], and by using a name from the set of standardized colors based on [url=https://en.wikipedia.org/wiki/X11_color_names]X11 color names[/url] with the addition of [constant TRANSPARENT]. GDScript also provides [method @GDScript.Color8], which uses integers from [code]0[/code] to [code]255[/code] and doesn't support overbright colors.
|
||||
[b]Note:[/b] In a boolean context, a Color will evaluate to [code]false[/code] if it is equal to [code]Color(0, 0, 0, 1)[/code] (opaque black). Otherwise, a Color will always evaluate to [code]true[/code].
|
||||
[url=https://raw.githubusercontent.com/godotengine/godot-docs/4.1/img/color_constants.png]Color constants cheatsheet[/url]
|
||||
|
|
|
@ -8,6 +8,6 @@
|
|||
Used in scripting by [EditorExportPlugin] to configure platform-specific customization of scenes and resources. See [method EditorExportPlugin._begin_customize_scenes] and [method EditorExportPlugin._begin_customize_resources] for more details.
|
||||
</description>
|
||||
<tutorials>
|
||||
<link title="$DOCS_URL/tutorials/platform/consoles.html">Console support in Godot</link>
|
||||
<link title="Console support in Godot">$DOCS_URL/tutorials/platform/consoles.html</link>
|
||||
</tutorials>
|
||||
</class>
|
||||
|
|
|
@ -463,12 +463,14 @@
|
|||
</constant>
|
||||
<constant name="WRITE" value="2" enum="ModeFlags">
|
||||
Opens the file for write operations. The file is created if it does not exist, and truncated if it does.
|
||||
[b]Note:[/b] When creating a file it must be in an already existing directory. To recursively create directories for a file path, see [method DirAccess.make_dir_recursive]).
|
||||
</constant>
|
||||
<constant name="READ_WRITE" value="3" enum="ModeFlags">
|
||||
Opens the file for read and write operations. Does not truncate the file. The cursor is positioned at the beginning of the file.
|
||||
</constant>
|
||||
<constant name="WRITE_READ" value="7" enum="ModeFlags">
|
||||
Opens the file for read and write operations. The file is created if it does not exist, and truncated if it does. The cursor is positioned at the beginning of the file.
|
||||
[b]Note:[/b] When creating a file it must be in an already existing directory. To recursively create directories for a file path, see [method DirAccess.make_dir_recursive]).
|
||||
</constant>
|
||||
<constant name="COMPRESSION_FASTLZ" value="0" enum="CompressionMode">
|
||||
Uses the [url=https://fastlz.org/]FastLZ[/url] compression method.
|
||||
|
|
|
@ -39,10 +39,10 @@
|
|||
</constants>
|
||||
<theme_items>
|
||||
<theme_item name="h_separation" data_type="constant" type="int" default="4">
|
||||
The horizontal separation of children nodes.
|
||||
The horizontal separation of child nodes.
|
||||
</theme_item>
|
||||
<theme_item name="v_separation" data_type="constant" type="int" default="4">
|
||||
The vertical separation of children nodes.
|
||||
The vertical separation of child nodes.
|
||||
</theme_item>
|
||||
</theme_items>
|
||||
</class>
|
||||
|
|
|
@ -131,7 +131,7 @@
|
|||
<param index="0" name="char" type="int" />
|
||||
<param index="1" name="font_size" type="int" />
|
||||
<description>
|
||||
Returns the size of a character, optionally taking kerning into account if the next character is provided.
|
||||
Returns the size of a character. Does not take kerning into account.
|
||||
[b]Note:[/b] Do not use this function to calculate width of the string character by character, use [method get_string_size] or [TextLine] instead. The height returned is the font height (see also [method get_height]) and has no relation to the glyph height.
|
||||
</description>
|
||||
</method>
|
||||
|
|
|
@ -18,10 +18,10 @@
|
|||
</members>
|
||||
<theme_items>
|
||||
<theme_item name="h_separation" data_type="constant" type="int" default="4">
|
||||
The horizontal separation of children nodes.
|
||||
The horizontal separation of child nodes.
|
||||
</theme_item>
|
||||
<theme_item name="v_separation" data_type="constant" type="int" default="4">
|
||||
The vertical separation of children nodes.
|
||||
The vertical separation of child nodes.
|
||||
</theme_item>
|
||||
</theme_items>
|
||||
</class>
|
||||
|
|
|
@ -279,6 +279,7 @@
|
|||
Input.ParseInputEvent(cancelEvent);
|
||||
[/csharp]
|
||||
[/codeblocks]
|
||||
[b]Note:[/b] Calling this function has no influence on the operating system. So for example sending an [InputEventMouseMotion] will not move the OS mouse cursor to the specified position (use [method warp_mouse] instead) and sending [kbd]Alt/Cmd + Tab[/kbd] as [InputEventKey] won't toggle between active windows.
|
||||
</description>
|
||||
</method>
|
||||
<method name="remove_joy_mapping">
|
||||
|
|
|
@ -16,8 +16,9 @@
|
|||
<member name="pressed" type="bool" setter="set_pressed" getter="is_pressed" default="false">
|
||||
If [code]true[/code], the button's state is pressed. If [code]false[/code], the button's state is released.
|
||||
</member>
|
||||
<member name="pressure" type="float" setter="set_pressure" getter="get_pressure" default="0.0">
|
||||
Represents the pressure the user puts on the button with their finger, if the controller supports it. Ranges from [code]0[/code] to [code]1[/code].
|
||||
<member name="pressure" type="float" setter="set_pressure" getter="get_pressure" default="0.0" is_deprecated="true">
|
||||
Represents the pressure the user puts on a pressure-sensitive button.
|
||||
[i]Deprecated.[/i] This property is never set by the engine and is always [code]0[/code].
|
||||
</member>
|
||||
</members>
|
||||
</class>
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="InputEventMIDI" inherits="InputEvent" version="4.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
|
||||
<brief_description>
|
||||
Represents an input event from a MIDI device, such as a piano.
|
||||
Represents a MIDI message from a MIDI device, such as a musical keyboard.
|
||||
</brief_description>
|
||||
<description>
|
||||
InputEventMIDI allows receiving input events from MIDI (Musical Instrument Digital Interface) devices such as a piano.
|
||||
MIDI signals can be sent over a 5-pin MIDI connector or over USB, if your device supports both be sure to check the settings in the device to see which output it's using.
|
||||
To receive input events from MIDI devices, you need to call [method OS.open_midi_inputs]. You can check which devices are detected using [method OS.get_connected_midi_inputs].
|
||||
InputEventMIDI stores information about messages from [url=https://en.wikipedia.org/wiki/MIDI]MIDI[/url] (Musical Instrument Digital Interface) devices. These may include musical keyboards, synthesizers, and drum machines.
|
||||
MIDI messages can be received over a 5-pin MIDI connector or over USB. If your device supports both be sure to check the settings in the device to see which output it is using.
|
||||
By default, Godot does not detect MIDI devices. You need to call [method OS.open_midi_inputs], first. You can check which devices are detected with [method OS.get_connected_midi_inputs], and close the connection with [method OS.close_midi_inputs].
|
||||
[codeblocks]
|
||||
[gdscript]
|
||||
func _ready():
|
||||
|
@ -17,16 +17,16 @@
|
|||
if input_event is InputEventMIDI:
|
||||
_print_midi_info(input_event)
|
||||
|
||||
func _print_midi_info(midi_event: InputEventMIDI):
|
||||
func _print_midi_info(midi_event):
|
||||
print(midi_event)
|
||||
print("Channel " + str(midi_event.channel))
|
||||
print("Message " + str(midi_event.message))
|
||||
print("Pitch " + str(midi_event.pitch))
|
||||
print("Velocity " + str(midi_event.velocity))
|
||||
print("Instrument " + str(midi_event.instrument))
|
||||
print("Pressure " + str(midi_event.pressure))
|
||||
print("Controller number: " + str(midi_event.controller_number))
|
||||
print("Controller value: " + str(midi_event.controller_value))
|
||||
print("Channel ", midi_event.channel)
|
||||
print("Message ", midi_event.message)
|
||||
print("Pitch ", midi_event.pitch)
|
||||
print("Velocity ", midi_event.velocity)
|
||||
print("Instrument ", midi_event.instrument)
|
||||
print("Pressure ", midi_event.pressure)
|
||||
print("Controller number: ", midi_event.controller_number)
|
||||
print("Controller value: ", midi_event.controller_value)
|
||||
[/gdscript]
|
||||
[csharp]
|
||||
public override void _Ready()
|
||||
|
@ -35,9 +35,9 @@
|
|||
GD.Print(OS.GetConnectedMidiInputs());
|
||||
}
|
||||
|
||||
public override void _Input(InputEvent @event)
|
||||
public override void _Input(InputEvent inputEvent)
|
||||
{
|
||||
if (@event is InputEventMIDI midiEvent)
|
||||
if (inputEvent is InputEventMIDI midiEvent)
|
||||
{
|
||||
PrintMIDIInfo(midiEvent);
|
||||
}
|
||||
|
@ -57,7 +57,7 @@
|
|||
}
|
||||
[/csharp]
|
||||
[/codeblocks]
|
||||
Note that Godot does not currently support MIDI output, so there is no way to emit MIDI signals from Godot. Only MIDI input works.
|
||||
[b]Note:[/b] Godot does not support MIDI output, so there is no way to emit MIDI messages from Godot. Only MIDI input is supported.
|
||||
</description>
|
||||
<tutorials>
|
||||
<link title="MIDI Message Status Byte List">https://www.midi.org/specifications-old/item/table-2-expanded-messages-list-status-bytes</link>
|
||||
|
@ -66,33 +66,39 @@
|
|||
</tutorials>
|
||||
<members>
|
||||
<member name="channel" type="int" setter="set_channel" getter="get_channel" default="0">
|
||||
The MIDI channel of this input event. There are 16 channels, so this value ranges from 0 to 15. MIDI channel 9 is reserved for the use with percussion instruments, the rest of the channels are for non-percussion instruments.
|
||||
The MIDI channel of this message, ranging from [code]0[/code] to [code]15[/code]. MIDI channel [code]9[/code] is reserved for percussion instruments.
|
||||
</member>
|
||||
<member name="controller_number" type="int" setter="set_controller_number" getter="get_controller_number" default="0">
|
||||
If the message is [constant MIDI_MESSAGE_CONTROL_CHANGE], this indicates the controller number, otherwise this is zero. Controllers include devices such as pedals and levers.
|
||||
The unique number of the controller, if [member message] is [constant MIDI_MESSAGE_CONTROL_CHANGE], otherwise this is [code]0[/code]. This value can be used to identify sliders for volume, balance, and panning, as well as switches and pedals on the MIDI device. See the [url=https://en.wikipedia.org/wiki/General_MIDI#Controller_events]General MIDI specification[/url] for a small list.
|
||||
</member>
|
||||
<member name="controller_value" type="int" setter="set_controller_value" getter="get_controller_value" default="0">
|
||||
If the message is [constant MIDI_MESSAGE_CONTROL_CHANGE], this indicates the controller value, otherwise this is zero. Controllers include devices such as pedals and levers.
|
||||
The value applied to the controller. If [member message] is [constant MIDI_MESSAGE_CONTROL_CHANGE], this value ranges from [code]0[/code] to [code]127[/code], otherwise it is [code]0[/code]. See also [member controller_value].
|
||||
</member>
|
||||
<member name="instrument" type="int" setter="set_instrument" getter="get_instrument" default="0">
|
||||
The instrument of this input event. This value ranges from 0 to 127. Refer to the instrument list on the General MIDI wikipedia article to see a list of instruments, except that this value is 0-index, so subtract one from every number on that chart. A standard piano will have an instrument number of 0.
|
||||
The instrument (also called [i]program[/i] or [i]preset[/i]) used on this MIDI message. This value ranges from [code]0[/code] to [code]127[/code].
|
||||
To see what each value means, refer to the [url=https://en.wikipedia.org/wiki/General_MIDI#Program_change_events]General MIDI's instrument list[/url]. Keep in mind that the list is off by 1 because it does not begin from 0. A value of [code]0[/code] corresponds to the acoustic grand piano.
|
||||
</member>
|
||||
<member name="message" type="int" setter="set_message" getter="get_message" enum="MIDIMessage" default="0">
|
||||
Returns a value indicating the type of message for this MIDI signal. This is a member of the [enum MIDIMessage] enum.
|
||||
For MIDI messages between 0x80 and 0xEF, only the left half of the bits are returned as this value, as the other part is the channel (ex: 0x94 becomes 0x9). For MIDI messages from 0xF0 to 0xFF, the value is returned as-is.
|
||||
Notes will return [constant MIDI_MESSAGE_NOTE_ON] when activated, but they might not always return [constant MIDI_MESSAGE_NOTE_OFF] when deactivated, therefore your code should treat the input as stopped if some period of time has passed.
|
||||
Some MIDI devices may send [constant MIDI_MESSAGE_NOTE_ON] with zero velocity instead of [constant MIDI_MESSAGE_NOTE_OFF].
|
||||
For more information, see the note in [member velocity] and the MIDI message status byte list chart linked above.
|
||||
Represents the type of MIDI message (see the [enum MIDIMessage] enum).
|
||||
For more information, see the [url=https://www.midi.org/specifications-old/item/table-2-expanded-messages-list-status-bytes]MIDI message status byte list chart[/url].
|
||||
</member>
|
||||
<member name="pitch" type="int" setter="set_pitch" getter="get_pitch" default="0">
|
||||
The pitch index number of this MIDI signal. This value ranges from 0 to 127. On a piano, middle C is 60, and A440 is 69, see the "MIDI note" column of the piano key frequency chart on Wikipedia for more information.
|
||||
The pitch index number of this MIDI message. This value ranges from [code]0[/code] to [code]127[/code].
|
||||
On a piano, the [b]middle C[/b] is [code]60[/code], followed by a [b]C-sharp[/b] ([code]61[/code]), then a [b]D[/b] ([code]62[/code]), and so on. Each octave is split in offsets of 12. See the "MIDI note number" column of the [url=https://en.wikipedia.org/wiki/Piano_key_frequencies]piano key frequency chart[/url] a full list.
|
||||
</member>
|
||||
<member name="pressure" type="int" setter="set_pressure" getter="get_pressure" default="0">
|
||||
The pressure of the MIDI signal. This value ranges from 0 to 127. For many devices, this value is always zero.
|
||||
The strength of the key being pressed. This value ranges from [code]0[/code] to [code]127[/code].
|
||||
[b]Note:[/b] For many devices, this value is always [code]0[/code]. Other devices such as musical keyboards may simulate pressure by changing the [member velocity], instead.
|
||||
</member>
|
||||
<member name="velocity" type="int" setter="set_velocity" getter="get_velocity" default="0">
|
||||
The velocity of the MIDI signal. This value ranges from 0 to 127. For a piano, this corresponds to how quickly the key was pressed, and is rarely above about 110 in practice.
|
||||
[b]Note:[/b] Some MIDI devices may send a [constant MIDI_MESSAGE_NOTE_ON] message with zero velocity and expect this to be treated the same as a [constant MIDI_MESSAGE_NOTE_OFF] message, but device implementations vary so Godot reports event data exactly as received. Depending on the hardware and the needs of the game/app, this MIDI quirk can be handled robustly with a couple lines of script (check for [constant MIDI_MESSAGE_NOTE_ON] with velocity zero).
|
||||
The velocity of the MIDI message. This value ranges from [code]0[/code] to [code]127[/code]. For a musical keyboard, this corresponds to how quickly the key was pressed, and is rarely above [code]110[/code] in practice.
|
||||
[b]Note:[/b] Some MIDI devices may send a [constant MIDI_MESSAGE_NOTE_ON] message with [code]0[/code] velocity and expect it to be treated the same as a [constant MIDI_MESSAGE_NOTE_OFF] message. If necessary, this can be handled with a few lines of code:
|
||||
[codeblock]
|
||||
func _input(event):
|
||||
if event is InputEventMIDI:
|
||||
if event.message == MIDI_MESSAGE_NOTE_ON and event.velocity > 0:
|
||||
print("Note pressed!")
|
||||
[/codeblock]
|
||||
</member>
|
||||
</members>
|
||||
</class>
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
[csharp]
|
||||
using Godot;
|
||||
|
||||
[GlobalClass]
|
||||
public partial class CustomMainLoop : MainLoop
|
||||
{
|
||||
private double _timeElapsed = 0;
|
||||
|
|
|
@ -237,16 +237,16 @@
|
|||
[PackedVector2Array] for second UV coordinates.
|
||||
</constant>
|
||||
<constant name="ARRAY_CUSTOM0" value="6" enum="ArrayType">
|
||||
Contains custom color channel 0. [PackedByteArray] if [code](format >> Mesh.ARRAY_FORMAT_CUSTOM0_SHIFT) & Mesh.ARRAY_FORMAT_CUSTOM_MASK[/code] is [constant ARRAY_CUSTOM_RGBA8_UNORM], [constant ARRAY_CUSTOM_RGBA8_UNORM], [constant ARRAY_CUSTOM_RG_HALF] or [constant ARRAY_CUSTOM_RGBA_HALF]. [PackedFloat32Array] otherwise.
|
||||
Contains custom color channel 0. [PackedByteArray] if [code](format >> Mesh.ARRAY_FORMAT_CUSTOM0_SHIFT) & Mesh.ARRAY_FORMAT_CUSTOM_MASK[/code] is [constant ARRAY_CUSTOM_RGBA8_UNORM], [constant ARRAY_CUSTOM_RGBA8_SNORM], [constant ARRAY_CUSTOM_RG_HALF], or [constant ARRAY_CUSTOM_RGBA_HALF]. [PackedFloat32Array] otherwise.
|
||||
</constant>
|
||||
<constant name="ARRAY_CUSTOM1" value="7" enum="ArrayType">
|
||||
Contains custom color channel 1. [PackedByteArray] if [code](format >> Mesh.ARRAY_FORMAT_CUSTOM1_SHIFT) & Mesh.ARRAY_FORMAT_CUSTOM_MASK[/code] is [constant ARRAY_CUSTOM_RGBA8_UNORM], [constant ARRAY_CUSTOM_RGBA8_UNORM], [constant ARRAY_CUSTOM_RG_HALF] or [constant ARRAY_CUSTOM_RGBA_HALF]. [PackedFloat32Array] otherwise.
|
||||
Contains custom color channel 1. [PackedByteArray] if [code](format >> Mesh.ARRAY_FORMAT_CUSTOM1_SHIFT) & Mesh.ARRAY_FORMAT_CUSTOM_MASK[/code] is [constant ARRAY_CUSTOM_RGBA8_UNORM], [constant ARRAY_CUSTOM_RGBA8_SNORM], [constant ARRAY_CUSTOM_RG_HALF], or [constant ARRAY_CUSTOM_RGBA_HALF]. [PackedFloat32Array] otherwise.
|
||||
</constant>
|
||||
<constant name="ARRAY_CUSTOM2" value="8" enum="ArrayType">
|
||||
Contains custom color channel 2. [PackedByteArray] if [code](format >> Mesh.ARRAY_FORMAT_CUSTOM2_SHIFT) & Mesh.ARRAY_FORMAT_CUSTOM_MASK[/code] is [constant ARRAY_CUSTOM_RGBA8_UNORM], [constant ARRAY_CUSTOM_RGBA8_UNORM], [constant ARRAY_CUSTOM_RG_HALF] or [constant ARRAY_CUSTOM_RGBA_HALF]. [PackedFloat32Array] otherwise.
|
||||
Contains custom color channel 2. [PackedByteArray] if [code](format >> Mesh.ARRAY_FORMAT_CUSTOM2_SHIFT) & Mesh.ARRAY_FORMAT_CUSTOM_MASK[/code] is [constant ARRAY_CUSTOM_RGBA8_UNORM], [constant ARRAY_CUSTOM_RGBA8_SNORM], [constant ARRAY_CUSTOM_RG_HALF], or [constant ARRAY_CUSTOM_RGBA_HALF]. [PackedFloat32Array] otherwise.
|
||||
</constant>
|
||||
<constant name="ARRAY_CUSTOM3" value="9" enum="ArrayType">
|
||||
Contains custom color channel 3. [PackedByteArray] if [code](format >> Mesh.ARRAY_FORMAT_CUSTOM3_SHIFT) & Mesh.ARRAY_FORMAT_CUSTOM_MASK[/code] is [constant ARRAY_CUSTOM_RGBA8_UNORM], [constant ARRAY_CUSTOM_RGBA8_UNORM], [constant ARRAY_CUSTOM_RG_HALF] or [constant ARRAY_CUSTOM_RGBA_HALF]. [PackedFloat32Array] otherwise.
|
||||
Contains custom color channel 3. [PackedByteArray] if [code](format >> Mesh.ARRAY_FORMAT_CUSTOM3_SHIFT) & Mesh.ARRAY_FORMAT_CUSTOM_MASK[/code] is [constant ARRAY_CUSTOM_RGBA8_UNORM], [constant ARRAY_CUSTOM_RGBA8_SNORM], [constant ARRAY_CUSTOM_RG_HALF], or [constant ARRAY_CUSTOM_RGBA_HALF]. [PackedFloat32Array] otherwise.
|
||||
</constant>
|
||||
<constant name="ARRAY_BONES" value="10" enum="ArrayType">
|
||||
[PackedFloat32Array] or [PackedInt32Array] of bone indices. Contains either 4 or 8 numbers per vertex depending on the presence of the [constant ARRAY_FLAG_USE_8_BONE_WEIGHTS] flag.
|
||||
|
|
|
@ -874,7 +874,7 @@
|
|||
Set the process thread group for this node (basically, whether it receives [constant NOTIFICATION_PROCESS], [constant NOTIFICATION_PHYSICS_PROCESS], [method _process] or [method _physics_process] (and the internal versions) on the main thread or in a sub-thread.
|
||||
By default, the thread group is [constant PROCESS_THREAD_GROUP_INHERIT], which means that this node belongs to the same thread group as the parent node. The thread groups means that nodes in a specific thread group will process together, separate to other thread groups (depending on [member process_thread_group_order]). If the value is set is [constant PROCESS_THREAD_GROUP_SUB_THREAD], this thread group will occur on a sub thread (not the main thread), otherwise if set to [constant PROCESS_THREAD_GROUP_MAIN_THREAD] it will process on the main thread. If there is not a parent or grandparent node set to something other than inherit, the node will belong to the [i]default thread group[/i]. This default group will process on the main thread and its group order is 0.
|
||||
During processing in a sub-thread, accessing most functions in nodes outside the thread group is forbidden (and it will result in an error in debug mode). Use [method Object.call_deferred], [method call_thread_safe], [method call_deferred_thread_group] and the likes in order to communicate from the thread groups to the main thread (or to other thread groups).
|
||||
To better understand process thread groups, the idea is that any node set to any other value than [constant PROCESS_THREAD_GROUP_INHERIT] will include any children (and grandchildren) nodes set to inherit into its process thread group. this means that the processing of all the nodes in the group will happen together, at the same time as the node including them.
|
||||
To better understand process thread groups, the idea is that any node set to any other value than [constant PROCESS_THREAD_GROUP_INHERIT] will include any child (and grandchild) nodes set to inherit into its process thread group. This means that the processing of all the nodes in the group will happen together, at the same time as the node including them.
|
||||
</member>
|
||||
<member name="process_thread_group_order" type="int" setter="set_process_thread_group_order" getter="get_process_thread_group_order">
|
||||
Change the process thread group order. Groups with a lesser order will process before groups with a greater order. This is useful when a large amount of nodes process in sub thread and, afterwards, another group wants to collect their result in the main thread, as an example.
|
||||
|
@ -1111,13 +1111,13 @@
|
|||
Never process. Completely disables processing, ignoring the [SceneTree]'s paused property. This is the inverse of [constant PROCESS_MODE_ALWAYS].
|
||||
</constant>
|
||||
<constant name="PROCESS_THREAD_GROUP_INHERIT" value="0" enum="ProcessThreadGroup">
|
||||
If the [member process_thread_group] property is sent to this, the node will belong to any parent (or grandparent) node that has a thread group mode that is not inherit. See [member process_thread_group] for more information.
|
||||
Process this node based on the thread group mode of the first parent (or grandparent) node that has a thread group mode that is not inherit. See [member process_thread_group] for more information.
|
||||
</constant>
|
||||
<constant name="PROCESS_THREAD_GROUP_MAIN_THREAD" value="1" enum="ProcessThreadGroup">
|
||||
Process this node (and children nodes set to inherit) on the main thread. See [member process_thread_group] for more information.
|
||||
Process this node (and child nodes set to inherit) on the main thread. See [member process_thread_group] for more information.
|
||||
</constant>
|
||||
<constant name="PROCESS_THREAD_GROUP_SUB_THREAD" value="2" enum="ProcessThreadGroup">
|
||||
Process this node (and children nodes set to inherit) on a sub-thread. See [member process_thread_group] for more information.
|
||||
Process this node (and child nodes set to inherit) on a sub-thread. See [member process_thread_group] for more information.
|
||||
</constant>
|
||||
<constant name="FLAG_PROCESS_THREAD_MESSAGES" value="1" enum="ProcessThreadMessages" is_bitfield="true">
|
||||
</constant>
|
||||
|
@ -1142,10 +1142,10 @@
|
|||
Node will not be internal.
|
||||
</constant>
|
||||
<constant name="INTERNAL_MODE_FRONT" value="1" enum="InternalMode">
|
||||
Node will be placed at the front of parent's node list, before any non-internal sibling.
|
||||
The node will be placed at the beginning of the parent's children, before any non-internal sibling.
|
||||
</constant>
|
||||
<constant name="INTERNAL_MODE_BACK" value="2" enum="InternalMode">
|
||||
Node will be placed at the back of parent's node list, after any non-internal sibling.
|
||||
The node will be placed at the end of the parent's children, after any non-internal sibling.
|
||||
</constant>
|
||||
</constants>
|
||||
</class>
|
||||
|
|
|
@ -48,7 +48,8 @@
|
|||
<method name="get_parent_node_3d" qualifiers="const">
|
||||
<return type="Node3D" />
|
||||
<description>
|
||||
Returns the parent [Node3D], or an empty [Object] if no parent exists or parent is not of type [Node3D].
|
||||
Returns the parent [Node3D], or [code]null[/code] if no parent exists, the parent is not of type [Node3D], or [member top_level] is [code]true[/code].
|
||||
[b]Note:[/b] Calling this method is not equivalent to [code]get_parent() as Node3D[/code], which does not take [member top_level] into account.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_world_3d" qualifiers="const">
|
||||
|
|
|
@ -122,6 +122,7 @@
|
|||
[b]Note:[/b] To execute a PowerShell built-in command, specify [code]powershell.exe[/code] in [param path], [code]-Command[/code] as the first argument, and the desired command as the second argument.
|
||||
[b]Note:[/b] To execute a Unix shell built-in command, specify shell executable name in [param path], [code]-c[/code] as the first argument, and the desired command as the second argument.
|
||||
[b]Note:[/b] On macOS, sandboxed applications are limited to run only embedded helper executables, specified during export.
|
||||
[b]Note:[/b] On Android, system commands such as [code]dumpsys[/code] can only be run on a rooted device.
|
||||
</description>
|
||||
</method>
|
||||
<method name="find_keycode_from_string" qualifiers="const">
|
||||
|
@ -185,9 +186,11 @@
|
|||
Similar to [method get_cmdline_args], but this returns the user arguments (any argument passed after the double dash [code]--[/code] or double plus [code]++[/code] argument). These are left untouched by Godot for the user. [code]++[/code] can be used in situations where [code]--[/code] is intercepted by another program (such as [code]startx[/code]).
|
||||
For example, in the command line below, [code]--fullscreen[/code] will not be returned in [method get_cmdline_user_args] and [code]--level 1[/code] will only be returned in [method get_cmdline_user_args]:
|
||||
[codeblock]
|
||||
godot --fullscreen -- --level 1
|
||||
# Or:
|
||||
godot --fullscreen ++ --level 1
|
||||
# Godot has been executed with the following command:
|
||||
# godot --fullscreen -- --level=2 --hardcore
|
||||
|
||||
OS.get_cmdline_args() # Returns ["--fullscreen", "--level=2", "--hardcore"]
|
||||
OS.get_cmdline_user_args() # Returns ["--level=2", "--hardcore"]
|
||||
[/codeblock]
|
||||
</description>
|
||||
</method>
|
||||
|
|
|
@ -324,7 +324,7 @@
|
|||
<param index="0" name="method" type="StringName" />
|
||||
<description>
|
||||
Calls the [param method] on the object during idle time. Always returns null, [b]not[/b] the method's result.
|
||||
Idle time happens mainly at the end of process and physics frames. In it, deferred calls will be run until there are none left, which means you can defer calls from other deferred calls and they'll still be run in the current idle time cycle. If not done carefully, this can result in infinite recursion without causing a stack overflow, which will hang the game similarly to an infinite loop.
|
||||
Idle time happens mainly at the end of process and physics frames. In it, deferred calls will be run until there are none left, which means you can defer calls from other deferred calls and they'll still be run in the current idle time cycle. This means you should not call a method deferred from itself (or from a method called by it), as this causes infinite recursion the same way as if you had called the method directly.
|
||||
This method supports a variable number of arguments, so parameters can be passed as a comma separated list.
|
||||
[codeblocks]
|
||||
[gdscript]
|
||||
|
@ -561,7 +561,7 @@
|
|||
[csharp]
|
||||
var node = new Node2D();
|
||||
node.Rotation = 1.5f;
|
||||
var a = node.Get("rotation"); // a is 1.5
|
||||
var a = node.Get(Node2D.PropertyName.Rotation); // a is 1.5
|
||||
[/csharp]
|
||||
[/codeblocks]
|
||||
[b]Note:[/b] In C#, [param property] must be in snake_case when referring to built-in Godot properties. Prefer using the names exposed in the [code]PropertyName[/code] class to avoid allocating a new [StringName] on each call.
|
||||
|
@ -828,7 +828,7 @@
|
|||
[/gdscript]
|
||||
[csharp]
|
||||
var node = new Node2D();
|
||||
node.Set("global_scale", new Vector2(8, 2.5));
|
||||
node.Set(Node2D.PropertyName.GlobalScale, new Vector2(8, 2.5));
|
||||
GD.Print(node.GlobalScale); // Prints Vector2(8, 2.5)
|
||||
[/csharp]
|
||||
[/codeblocks]
|
||||
|
@ -853,21 +853,21 @@
|
|||
var node = Node2D.new()
|
||||
add_child(node)
|
||||
|
||||
node.rotation = 45.0
|
||||
node.set_deferred("rotation", 90.0)
|
||||
print(node.rotation) # Prints 45.0
|
||||
node.rotation = 1.5
|
||||
node.set_deferred("rotation", 3.0)
|
||||
print(node.rotation) # Prints 1.5
|
||||
|
||||
await get_tree().process_frame
|
||||
print(node.rotation) # Prints 90.0
|
||||
print(node.rotation) # Prints 3.0
|
||||
[/gdscript]
|
||||
[csharp]
|
||||
var node = new Node2D();
|
||||
node.Rotation = 45f;
|
||||
node.SetDeferred("rotation", 90f);
|
||||
GD.Print(node.Rotation); // Prints 45.0
|
||||
node.Rotation = 1.5f;
|
||||
node.SetDeferred(Node2D.PropertyName.Rotation, 3f);
|
||||
GD.Print(node.Rotation); // Prints 1.5
|
||||
|
||||
await ToSignal(GetTree(), SceneTree.SignalName.ProcessFrame);
|
||||
GD.Print(node.Rotation); // Prints 90.0
|
||||
GD.Print(node.Rotation); // Prints 3.0
|
||||
[/csharp]
|
||||
[/codeblocks]
|
||||
[b]Note:[/b] In C#, [param property] must be in snake_case when referring to built-in Godot properties. Prefer using the names exposed in the [code]PropertyName[/code] class to avoid allocating a new [StringName] on each call.
|
||||
|
|
|
@ -106,7 +106,7 @@
|
|||
<members>
|
||||
<member name="_bundled" type="Dictionary" setter="_set_bundled_scene" getter="_get_bundled_scene" default="{ "conn_count": 0, "conns": PackedInt32Array(), "editable_instances": [], "names": PackedStringArray(), "node_count": 0, "node_paths": [], "nodes": PackedInt32Array(), "variants": [], "version": 3 }">
|
||||
A dictionary representation of the scene contents.
|
||||
Available keys include "rnames" and "variants" for resources, "node_count", "nodes", "node_paths" for nodes, "editable_instances" for base scene children overrides, "conn_count" and "conns" for signal connections, and "version" for the format style of the PackedScene.
|
||||
Available keys include "rnames" and "variants" for resources, "node_count", "nodes", "node_paths" for nodes, "editable_instances" for paths to overridden nodes, "conn_count" and "conns" for signal connections, and "version" for the format style of the PackedScene.
|
||||
</member>
|
||||
</members>
|
||||
<constants>
|
||||
|
|
|
@ -12,9 +12,10 @@
|
|||
</tutorials>
|
||||
<members>
|
||||
<member name="motion_mirroring" type="Vector2" setter="set_mirroring" getter="get_mirroring" default="Vector2(0, 0)">
|
||||
The ParallaxLayer's [Texture2D] repeating. Useful for creating an infinite scrolling background. If an axis is set to [code]0[/code], the [Texture2D] will not be repeated.
|
||||
If the length of the viewport axis is bigger than twice the repeated axis size, it will not repeat infinitely, as the parallax layer only draws 2 instances of the texture at any given time.
|
||||
[b]Note:[/b] Despite its name, the texture will not be mirrored, it will simply be repeated.
|
||||
The interval, in pixels, at which the [ParallaxLayer] is drawn repeatedly. Useful for creating an infinitely scrolling background. If an axis is set to [code]0[/code], the [ParallaxLayer] will be drawn only once along that direction.
|
||||
[b]Note:[/b] If you want the repetition to pixel-perfect match a [Texture2D] displayed by a child node, you should account for any scale applied to the texture when defining this interval. For example, if you use a child [Sprite2D] scaled to [code]0.5[/code] to display a 600x600 texture, and want this sprite to be repeated continuously horizontally, you should set the mirroring to [code]Vector2(300, 0)[/code].
|
||||
[b]Note:[/b] If the length of the viewport axis is bigger than twice the repeated axis size, it will not repeat infinitely, as the parallax layer only draws 2 instances of the layer at any given time. The visibility window is calculated from the parent [ParallaxBackground]'s position, not the layer's own position. So, if you use mirroring, [b]do not[/b] change the [ParallaxLayer] position relative to its parent. Instead, if you need to adjust the background's position, set the [member CanvasLayer.offset] property in the parent [ParallaxBackground].
|
||||
[b]Note:[/b] Despite the name, the layer will not be mirrored, it will only be repeated.
|
||||
</member>
|
||||
<member name="motion_offset" type="Vector2" setter="set_motion_offset" getter="get_motion_offset" default="Vector2(0, 0)">
|
||||
The ParallaxLayer's offset relative to the parent ParallaxBackground's [member ParallaxBackground.scroll_offset].
|
||||
|
|
|
@ -61,6 +61,7 @@
|
|||
</member>
|
||||
<member name="bounce" type="float" setter="set_bounce" getter="get_bounce" default="0.0">
|
||||
The body's bounciness. Values range from [code]0[/code] (no bounce) to [code]1[/code] (full bounciness).
|
||||
[b]Note:[/b] Even with [member bounce] set to [code]1.0[/code], some energy will be lost over time due to linear and angular damping. To have a [PhysicalBone3D] that preserves all its energy over time, set [member bounce] to [code]1.0[/code], [member linear_damp_mode] to [constant DAMP_MODE_REPLACE], [member linear_damp] to [code]0.0[/code], [member angular_damp_mode] to [constant DAMP_MODE_REPLACE], and [member angular_damp] to [code]0.0[/code].
|
||||
</member>
|
||||
<member name="can_sleep" type="bool" setter="set_can_sleep" getter="is_able_to_sleep" default="true">
|
||||
If [code]true[/code], the body is deactivated when there is no movement, so it will not take part in the simulation until it is awakened by an external force.
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
</member>
|
||||
<member name="bounce" type="float" setter="set_bounce" getter="get_bounce" default="0.0">
|
||||
The body's bounciness. Values range from [code]0[/code] (no bounce) to [code]1[/code] (full bounciness).
|
||||
[b]Note:[/b] Even with [member bounce] set to [code]1.0[/code], some energy will be lost over time due to linear and angular damping. To have a [PhysicsBody3D] that preserves all its energy over time, set [member bounce] to [code]1.0[/code], the body's linear damp mode to [b]Replace[/b] (if applicable), its linear damp to [code]0.0[/code], its angular damp mode to [b]Replace[/b] (if applicable), and its angular damp to [code]0.0[/code].
|
||||
</member>
|
||||
<member name="friction" type="float" setter="set_friction" getter="get_friction" default="1.0">
|
||||
The body's friction. Values range from [code]0[/code] (frictionless) to [code]1[/code] (maximum friction).
|
||||
|
|
|
@ -757,15 +757,18 @@
|
|||
</member>
|
||||
<member name="display/window/size/initial_position" type="Vector2i" setter="" getter="" default="Vector2i(0, 0)">
|
||||
Main window initial position (in virtual desktop coordinates), this setting is used only if [member display/window/size/initial_position_type] is set to "Absolute" ([code]0[/code]).
|
||||
[b]Note:[/b] This setting only affects the exported project, or when the project is run from the command line. In the editor, the value of [member EditorSettings.run/window_placement/rect_custom_position] is used instead.
|
||||
</member>
|
||||
<member name="display/window/size/initial_position_type" type="int" setter="" getter="" default="1">
|
||||
Main window initial position.
|
||||
[code]0[/code] - "Absolute", [member display/window/size/initial_position] is used to set window position.
|
||||
[code]1[/code] - "Primary Screen Center".
|
||||
[code]2[/code] - "Other Screen Center", [member display/window/size/initial_screen] is used to set the screen.
|
||||
[b]Note:[/b] This setting only affects the exported project, or when the project is run from the command line. In the editor, the value of [member EditorSettings.run/window_placement/rect] is used instead.
|
||||
</member>
|
||||
<member name="display/window/size/initial_screen" type="int" setter="" getter="" default="0">
|
||||
Main window initial screen, this setting is used only if [member display/window/size/initial_position_type] is set to "Other Screen Center" ([code]2[/code]).
|
||||
[b]Note:[/b] This setting only affects the exported project, or when the project is run from the command line. In the editor, the value of [member EditorSettings.run/window_placement/screen] is used instead.
|
||||
</member>
|
||||
<member name="display/window/size/mode" type="int" setter="" getter="" default="0">
|
||||
Main window mode. See [enum DisplayServer.WindowMode] for possible values and how each mode behaves.
|
||||
|
|
|
@ -4,19 +4,24 @@
|
|||
A unit quaternion used for representing 3D rotations.
|
||||
</brief_description>
|
||||
<description>
|
||||
Quaternions are similar to [Basis], which implements the matrix representation of rotations. Unlike [Basis], which stores rotation, scale, and shearing, quaternions only store rotation.
|
||||
Quaternions can be parametrized using both an axis-angle pair or Euler angles. Due to their compactness and the way they are stored in memory, certain operations (obtaining axis-angle and performing SLERP, in particular) are more efficient and robust against floating-point errors.
|
||||
[b]Note:[/b] Quaternions need to be normalized before being used for rotation.
|
||||
The [Quaternion] built-in [Variant] type is a 4D data structure that represents rotation in the form of a [url=https://en.wikipedia.org/wiki/Quaternions_and_spatial_rotation]Hamilton convention quaternion[/url]. Compared to the [Basis] type which can store both rotation and scale, quaternions can [i]only[/i] store rotation.
|
||||
A [Quaternion] is composed by 4 floating-point components: [member w], [member x], [member y], and [member z]. These components are very compact in memory, and because of this some operations are more efficient and less likely to cause floating-point errors. Methods such as [method get_angle], [method get_axis], and [method slerp] are faster than their [Basis] counterparts.
|
||||
For a great introduction to quaternions, see [url=https://www.youtube.com/watch?v=d4EgbgTm0Bg]this video by 3Blue1Brown[/url]. You do not need to know the math behind quaternions, as Godot provides several helper methods that handle it for you. These include [method slerp] and [method spherical_cubic_interpolate], as well as the [code]*[/code] operator.
|
||||
[b]Note:[/b] Quaternions must be normalized before being used for rotation (see [method normalized]).
|
||||
[b]Note:[/b] Similarly to [Vector2] and [Vector3], the components of a quaternion use 32-bit precision by default, unlike [float] which is always 64-bit. If double precision is needed, compile the engine with the option [code]precision=double[/code].
|
||||
</description>
|
||||
<tutorials>
|
||||
<link title="3Blue1Brown's video on Quaternions">https://www.youtube.com/watch?v=d4EgbgTm0Bg</link>
|
||||
<link title="Online Quaternion Visualization">https://quaternions.online/</link>
|
||||
<link title="Using 3D transforms">$DOCS_URL/tutorials/3d/using_transforms.html#interpolating-with-quaternions</link>
|
||||
<link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link>
|
||||
<link title="Advanced Quaternion Visualization">https://iwatake2222.github.io/rotation_master/rotation_master.html</link>
|
||||
</tutorials>
|
||||
<constructors>
|
||||
<constructor name="Quaternion">
|
||||
<return type="Quaternion" />
|
||||
<description>
|
||||
Constructs a default-initialized quaternion with all components set to [code]0[/code].
|
||||
Constructs a [Quaternion] identical to the [constant IDENTITY].
|
||||
</description>
|
||||
</constructor>
|
||||
<constructor name="Quaternion">
|
||||
|
@ -31,7 +36,7 @@
|
|||
<param index="0" name="arc_from" type="Vector3" />
|
||||
<param index="1" name="arc_to" type="Vector3" />
|
||||
<description>
|
||||
Constructs a quaternion representing the shortest arc between two points on the surface of a sphere with a radius of [code]1.0[/code].
|
||||
Constructs a [Quaternion] representing the shortest arc between [param arc_from] and [param arc_to]. These can be imagined as two points intersecting a sphere's surface, with a radius of [code]1.0[/code].
|
||||
</description>
|
||||
</constructor>
|
||||
<constructor name="Quaternion">
|
||||
|
@ -39,14 +44,15 @@
|
|||
<param index="0" name="axis" type="Vector3" />
|
||||
<param index="1" name="angle" type="float" />
|
||||
<description>
|
||||
Constructs a quaternion that will rotate around the given axis by the specified angle. The axis must be a normalized vector.
|
||||
Constructs a [Quaternion] representing rotation around the [param axis] by the given [param angle], in radians. The axis must be a normalized vector.
|
||||
</description>
|
||||
</constructor>
|
||||
<constructor name="Quaternion">
|
||||
<return type="Quaternion" />
|
||||
<param index="0" name="from" type="Basis" />
|
||||
<description>
|
||||
Constructs a quaternion from the given [Basis].
|
||||
Constructs a [Quaternion] from the given rotation [Basis].
|
||||
This constructor is faster than [method Basis.get_rotation_quaternion], but the given basis must be [i]orthonormalized[/i] (see [method Basis.orthonormalized]). Otherwise, the constructor fails and returns [constant IDENTITY].
|
||||
</description>
|
||||
</constructor>
|
||||
<constructor name="Quaternion">
|
||||
|
@ -56,7 +62,8 @@
|
|||
<param index="2" name="z" type="float" />
|
||||
<param index="3" name="w" type="float" />
|
||||
<description>
|
||||
Constructs a quaternion defined by the given values.
|
||||
Constructs a [Quaternion] defined by the given values.
|
||||
[b]Note:[/b] Only normalized quaternions represent rotation; if these values are not normalized, the new [Quaternion] will not be a valid rotation.
|
||||
</description>
|
||||
</constructor>
|
||||
</constructors>
|
||||
|
@ -73,7 +80,8 @@
|
|||
<return type="float" />
|
||||
<param index="0" name="with" type="Quaternion" />
|
||||
<description>
|
||||
Returns the dot product of two quaternions.
|
||||
Returns the dot product between this quaternion and [param with].
|
||||
This is equivalent to [code](quat.x * with.x) + (quat.y * with.y) + (quat.z * with.z) + (quat.w * with.w)[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="exp" qualifiers="const">
|
||||
|
@ -85,7 +93,7 @@
|
|||
<return type="Quaternion" />
|
||||
<param index="0" name="euler" type="Vector3" />
|
||||
<description>
|
||||
Constructs a Quaternion from Euler angles in YXZ rotation order.
|
||||
Constructs a new [Quaternion] from the given [Vector3] of [url=https://en.wikipedia.org/wiki/Euler_angles]Euler angles[/url], in radians. This method always uses the YXZ convention ([constant EULER_ORDER_YXZ]).
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_angle" qualifiers="const">
|
||||
|
@ -102,13 +110,14 @@
|
|||
<return type="Vector3" />
|
||||
<param index="0" name="order" type="int" default="2" />
|
||||
<description>
|
||||
Returns the quaternion's rotation in the form of Euler angles. The Euler order depends on the [param order] parameter, for example using the YXZ convention: since this method decomposes, first Z, then X, and Y last. See the [enum EulerOrder] enum for possible values. The returned vector contains the rotation angles in the format (X angle, Y angle, Z angle).
|
||||
Returns this quaternion's rotation as a [Vector3] of [url=https://en.wikipedia.org/wiki/Euler_angles]Euler angles[/url], in radians.
|
||||
The order of each consecutive rotation can be changed with [param order] (see [enum EulerOrder] constants). By default, the YXZ convention is used ([constant EULER_ORDER_YXZ]): Z (roll) is calculated first, then X (pitch), and lastly Y (yaw). When using the opposite method [method from_euler], this order is reversed.
|
||||
</description>
|
||||
</method>
|
||||
<method name="inverse" qualifiers="const">
|
||||
<return type="Quaternion" />
|
||||
<description>
|
||||
Returns the inverse of the quaternion.
|
||||
Returns the inverse version of this quaternion, inverting the sign of every component except [member w].
|
||||
</description>
|
||||
</method>
|
||||
<method name="is_equal_approx" qualifiers="const">
|
||||
|
@ -127,30 +136,32 @@
|
|||
<method name="is_normalized" qualifiers="const">
|
||||
<return type="bool" />
|
||||
<description>
|
||||
Returns whether the quaternion is normalized or not.
|
||||
Returns [code]true[/code] if this quaternion is normalized. See also [method normalized].
|
||||
</description>
|
||||
</method>
|
||||
<method name="length" qualifiers="const">
|
||||
<return type="float" />
|
||||
<description>
|
||||
Returns the length of the quaternion.
|
||||
Returns this quaternion's length, also called magnitude.
|
||||
</description>
|
||||
</method>
|
||||
<method name="length_squared" qualifiers="const">
|
||||
<return type="float" />
|
||||
<description>
|
||||
Returns the length of the quaternion, squared.
|
||||
Returns this quaternion's length, squared.
|
||||
[b]Note:[/b] This method is faster than [method length], so prefer it if you only need to compare quaternion lengths.
|
||||
</description>
|
||||
</method>
|
||||
<method name="log" qualifiers="const">
|
||||
<return type="Quaternion" />
|
||||
<description>
|
||||
Returns the logarithm of this quaternion. Multiplies this quaternion's rotation axis by its rotation angle, and stores the result in the returned quaternion's vector part ([member x], [member y], and [member z]). The returned quaternion's real part ([member w]) is always [code]0.0[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="normalized" qualifiers="const">
|
||||
<return type="Quaternion" />
|
||||
<description>
|
||||
Returns a copy of the quaternion, normalized to unit length.
|
||||
Returns a copy of this quaternion, normalized so that its length is [code]1.0[/code]. See also [method is_normalized].
|
||||
</description>
|
||||
</method>
|
||||
<method name="slerp" qualifiers="const">
|
||||
|
@ -158,8 +169,7 @@
|
|||
<param index="0" name="to" type="Quaternion" />
|
||||
<param index="1" name="weight" type="float" />
|
||||
<description>
|
||||
Returns the result of the spherical linear interpolation between this quaternion and [param to] by amount [param weight].
|
||||
[b]Note:[/b] Both quaternions must be normalized.
|
||||
Performs a spherical-linear interpolation with the [param to] quaternion, given a [param weight] and returns the result. Both this quaternion and [param to] must be normalized.
|
||||
</description>
|
||||
</method>
|
||||
<method name="slerpni" qualifiers="const">
|
||||
|
@ -167,7 +177,7 @@
|
|||
<param index="0" name="to" type="Quaternion" />
|
||||
<param index="1" name="weight" type="float" />
|
||||
<description>
|
||||
Returns the result of the spherical linear interpolation between this quaternion and [param to] by amount [param weight], but without checking if the rotation path is not bigger than 90 degrees.
|
||||
Performs a spherical-linear interpolation with the [param to] quaternion, given a [param weight] and returns the result. Unlike [method slerp], this method does not check if the rotation path is smaller than 90 degrees. Both this quaternion and [param to] must be normalized.
|
||||
</description>
|
||||
</method>
|
||||
<method name="spherical_cubic_interpolate" qualifiers="const">
|
||||
|
@ -197,25 +207,26 @@
|
|||
</methods>
|
||||
<members>
|
||||
<member name="w" type="float" setter="" getter="" default="1.0">
|
||||
W component of the quaternion (real part).
|
||||
Quaternion components should usually not be manipulated directly.
|
||||
W component of the quaternion. This is the "real" part.
|
||||
[b]Note:[/b] Quaternion components should usually not be manipulated directly.
|
||||
</member>
|
||||
<member name="x" type="float" setter="" getter="" default="0.0">
|
||||
X component of the quaternion (imaginary [code]i[/code] axis part).
|
||||
Quaternion components should usually not be manipulated directly.
|
||||
X component of the quaternion. This is the value along the "imaginary" [code]i[/code] axis.
|
||||
[b]Note:[/b] Quaternion components should usually not be manipulated directly.
|
||||
</member>
|
||||
<member name="y" type="float" setter="" getter="" default="0.0">
|
||||
Y component of the quaternion (imaginary [code]j[/code] axis part).
|
||||
Quaternion components should usually not be manipulated directly.
|
||||
Y component of the quaternion. This is the value along the "imaginary" [code]j[/code] axis.
|
||||
[b]Note:[/b] Quaternion components should usually not be manipulated directly.
|
||||
</member>
|
||||
<member name="z" type="float" setter="" getter="" default="0.0">
|
||||
Z component of the quaternion (imaginary [code]k[/code] axis part).
|
||||
Quaternion components should usually not be manipulated directly.
|
||||
Z component of the quaternion. This is the value along the "imaginary" [code]k[/code] axis.
|
||||
[b]Note:[/b] Quaternion components should usually not be manipulated directly.
|
||||
</member>
|
||||
</members>
|
||||
<constants>
|
||||
<constant name="IDENTITY" value="Quaternion(0, 0, 0, 1)">
|
||||
The identity quaternion, representing no rotation. Equivalent to an identity [Basis] matrix. If a vector is transformed by an identity quaternion, it will not change.
|
||||
The identity quaternion, representing no rotation. This has the same rotation as [constant Basis.IDENTITY].
|
||||
If a [Vector3] is rotated (multiplied) by this quaternion, it does not change.
|
||||
</constant>
|
||||
</constants>
|
||||
<operators>
|
||||
|
@ -223,7 +234,7 @@
|
|||
<return type="bool" />
|
||||
<param index="0" name="right" type="Quaternion" />
|
||||
<description>
|
||||
Returns [code]true[/code] if the quaternions are not equal.
|
||||
Returns [code]true[/code] if the components of both quaternions are not exactly equal.
|
||||
[b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable.
|
||||
</description>
|
||||
</operator>
|
||||
|
@ -231,63 +242,69 @@
|
|||
<return type="Quaternion" />
|
||||
<param index="0" name="right" type="Quaternion" />
|
||||
<description>
|
||||
Composes these two quaternions by multiplying them together. This has the effect of rotating the second quaternion (the child) by the first quaternion (the parent).
|
||||
Composes (multiplies) two quaternions. This rotates the [param right] quaternion (the child) by this quaternion (the parent).
|
||||
</description>
|
||||
</operator>
|
||||
<operator name="operator *">
|
||||
<return type="Vector3" />
|
||||
<param index="0" name="right" type="Vector3" />
|
||||
<description>
|
||||
Rotates (multiplies) the [Vector3] by the given [Quaternion].
|
||||
Rotates (multiplies) the [param right] vector by this quaternion, returning a [Vector3].
|
||||
</description>
|
||||
</operator>
|
||||
<operator name="operator *">
|
||||
<return type="Quaternion" />
|
||||
<param index="0" name="right" type="float" />
|
||||
<description>
|
||||
Multiplies each component of the [Quaternion] by the given value. This operation is not meaningful on its own, but it can be used as a part of a larger expression.
|
||||
Multiplies each component of the [Quaternion] by the right [float] value.
|
||||
This operation is not meaningful on its own, but it can be used as a part of a larger expression.
|
||||
</description>
|
||||
</operator>
|
||||
<operator name="operator *">
|
||||
<return type="Quaternion" />
|
||||
<param index="0" name="right" type="int" />
|
||||
<description>
|
||||
Multiplies each component of the [Quaternion] by the given value. This operation is not meaningful on its own, but it can be used as a part of a larger expression.
|
||||
Multiplies each component of the [Quaternion] by the right [int] value.
|
||||
This operation is not meaningful on its own, but it can be used as a part of a larger expression.
|
||||
</description>
|
||||
</operator>
|
||||
<operator name="operator +">
|
||||
<return type="Quaternion" />
|
||||
<param index="0" name="right" type="Quaternion" />
|
||||
<description>
|
||||
Adds each component of the left [Quaternion] to the right [Quaternion]. This operation is not meaningful on its own, but it can be used as a part of a larger expression, such as approximating an intermediate rotation between two nearby rotations.
|
||||
Adds each component of the left [Quaternion] to the right [Quaternion].
|
||||
This operation is not meaningful on its own, but it can be used as a part of a larger expression, such as approximating an intermediate rotation between two nearby rotations.
|
||||
</description>
|
||||
</operator>
|
||||
<operator name="operator -">
|
||||
<return type="Quaternion" />
|
||||
<param index="0" name="right" type="Quaternion" />
|
||||
<description>
|
||||
Subtracts each component of the left [Quaternion] by the right [Quaternion]. This operation is not meaningful on its own, but it can be used as a part of a larger expression.
|
||||
Subtracts each component of the left [Quaternion] by the right [Quaternion].
|
||||
This operation is not meaningful on its own, but it can be used as a part of a larger expression.
|
||||
</description>
|
||||
</operator>
|
||||
<operator name="operator /">
|
||||
<return type="Quaternion" />
|
||||
<param index="0" name="right" type="float" />
|
||||
<description>
|
||||
Divides each component of the [Quaternion] by the given value. This operation is not meaningful on its own, but it can be used as a part of a larger expression.
|
||||
Divides each component of the [Quaternion] by the right [float] value.
|
||||
This operation is not meaningful on its own, but it can be used as a part of a larger expression.
|
||||
</description>
|
||||
</operator>
|
||||
<operator name="operator /">
|
||||
<return type="Quaternion" />
|
||||
<param index="0" name="right" type="int" />
|
||||
<description>
|
||||
Divides each component of the [Quaternion] by the given value. This operation is not meaningful on its own, but it can be used as a part of a larger expression.
|
||||
Divides each component of the [Quaternion] by the right [int] value.
|
||||
This operation is not meaningful on its own, but it can be used as a part of a larger expression.
|
||||
</description>
|
||||
</operator>
|
||||
<operator name="operator ==">
|
||||
<return type="bool" />
|
||||
<param index="0" name="right" type="Quaternion" />
|
||||
<description>
|
||||
Returns [code]true[/code] if the quaternions are exactly equal.
|
||||
Returns [code]true[/code] if the components of both quaternions are exactly equal.
|
||||
[b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable.
|
||||
</description>
|
||||
</operator>
|
||||
|
@ -295,7 +312,8 @@
|
|||
<return type="float" />
|
||||
<param index="0" name="index" type="int" />
|
||||
<description>
|
||||
Access quaternion components using their index. [code]q[0][/code] is equivalent to [code]q.x[/code], [code]q[1][/code] is equivalent to [code]q.y[/code], [code]q[2][/code] is equivalent to [code]q.z[/code], and [code]q[3][/code] is equivalent to [code]q.w[/code].
|
||||
Accesses each component of this quaternion by their index.
|
||||
Index [code]0[/code] is the same as [member x], index [code]1[/code] is the same as [member y], index [code]2[/code] is the same as [member z], and index [code]3[/code] is the same as [member w].
|
||||
</description>
|
||||
</operator>
|
||||
<operator name="operator unary+">
|
||||
|
@ -307,7 +325,7 @@
|
|||
<operator name="operator unary-">
|
||||
<return type="Quaternion" />
|
||||
<description>
|
||||
Returns the negative value of the [Quaternion]. This is the same as writing [code]Quaternion(-q.x, -q.y, -q.z, -q.w)[/code]. This operation results in a quaternion that represents the same rotation.
|
||||
Returns the negative value of the [Quaternion]. This is the same as multiplying all components by [code]-1[/code]. This operation results in a quaternion that represents the same rotation.
|
||||
</description>
|
||||
</operator>
|
||||
</operators>
|
||||
|
|
|
@ -62,7 +62,7 @@
|
|||
<return type="int" />
|
||||
<param index="0" name="character" type="int" />
|
||||
<description>
|
||||
Returns the line number of the character position provided.
|
||||
Returns the line number of the character position provided. Line and character numbers are both zero-indexed.
|
||||
[b]Note:[/b] If [member threaded] is enabled, this method returns a value for the loaded part of the document. Use [method is_ready] or [signal finished] to determine whether document is fully loaded.
|
||||
</description>
|
||||
</method>
|
||||
|
@ -70,7 +70,7 @@
|
|||
<return type="int" />
|
||||
<param index="0" name="character" type="int" />
|
||||
<description>
|
||||
Returns the paragraph number of the character position provided.
|
||||
Returns the paragraph number of the character position provided. Paragraph and character numbers are both zero-indexed.
|
||||
[b]Note:[/b] If [member threaded] is enabled, this method returns a value for the loaded part of the document. Use [method is_ready] or [signal finished] to determine whether document is fully loaded.
|
||||
</description>
|
||||
</method>
|
||||
|
|
|
@ -62,7 +62,7 @@
|
|||
<return type="PackedInt32Array" />
|
||||
<param index="0" name="bone_idx" type="int" />
|
||||
<description>
|
||||
Returns an array containing the bone indexes of all the children node of the passed in bone, [param bone_idx].
|
||||
Returns an array containing the bone indexes of all the child node of the passed in bone, [param bone_idx].
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_bone_count" qualifiers="const">
|
||||
|
|
|
@ -75,7 +75,8 @@
|
|||
If [code]true[/code], texture is flipped vertically.
|
||||
</member>
|
||||
<member name="modulate" type="Color" setter="set_modulate" getter="get_modulate" default="Color(1, 1, 1, 1)">
|
||||
A color value used to [i]multiply[/i] the texture's colors. Can be used for mood-coloring or to simulate the color of light.
|
||||
A color value used to [i]multiply[/i] the texture's colors. Can be used for mood-coloring or to simulate the color of ambient light.
|
||||
[b]Note:[/b] Unlike [member CanvasItem.modulate] for 2D, colors with values above [code]1.0[/code] (overbright) are not supported.
|
||||
[b]Note:[/b] If a [member GeometryInstance3D.material_override] is defined on the [SpriteBase3D], the material override must be configured to take vertex colors into account for albedo. Otherwise, the color defined in [member modulate] will be ignored. For a [BaseMaterial3D], [member BaseMaterial3D.vertex_color_use_as_albedo] must be [code]true[/code]. For a [ShaderMaterial], [code]ALBEDO *= COLOR.rgb;[/code] must be inserted in the shader's [code]fragment()[/code] function.
|
||||
</member>
|
||||
<member name="no_depth_test" type="bool" setter="set_draw_flag" getter="get_draw_flag" default="false">
|
||||
|
@ -97,6 +98,7 @@
|
|||
</member>
|
||||
<member name="texture_filter" type="int" setter="set_texture_filter" getter="get_texture_filter" enum="BaseMaterial3D.TextureFilter" default="3">
|
||||
Filter flags for the texture. See [enum BaseMaterial3D.TextureFilter] for options.
|
||||
[b]Note:[/b] Linear filtering may cause artifacts around the edges, which are especially noticeable on opaque textures. To prevent this, use textures with transparent or identical colors around the edges.
|
||||
</member>
|
||||
<member name="transparent" type="bool" setter="set_draw_flag" getter="get_draw_flag" default="true">
|
||||
If [code]true[/code], the texture's transparency and the opacity are used to make those parts of the sprite invisible.
|
||||
|
|
|
@ -651,8 +651,8 @@
|
|||
[codeblocks]
|
||||
[gdscript]
|
||||
var n = -5.2e8
|
||||
print(n) # Prints -520000000
|
||||
print(String.NumScientific(n)) # Prints -5.2e+08
|
||||
print(n) # Prints -520000000
|
||||
print(String.num_scientific(n)) # Prints -5.2e+08
|
||||
[/gdscript]
|
||||
[csharp]
|
||||
// This method is not implemented in C#.
|
||||
|
|
|
@ -179,7 +179,7 @@
|
|||
If [code]true[/code], tabs are visible. If [code]false[/code], tabs' content and titles are hidden.
|
||||
</member>
|
||||
<member name="use_hidden_tabs_for_min_size" type="bool" setter="set_use_hidden_tabs_for_min_size" getter="get_use_hidden_tabs_for_min_size" default="false">
|
||||
If [code]true[/code], children [Control] nodes that are hidden have their minimum size take into account in the total, instead of only the currently visible one.
|
||||
If [code]true[/code], child [Control] nodes that are hidden have their minimum size take into account in the total, instead of only the currently visible one.
|
||||
</member>
|
||||
</members>
|
||||
<signals>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="Texture3D" inherits="Texture" version="4.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
|
||||
<brief_description>
|
||||
Base class for 3-dimensionnal textures.
|
||||
Base class for 3-dimensional textures.
|
||||
</brief_description>
|
||||
<description>
|
||||
Base class for [ImageTexture3D] and [CompressedTexture3D]. Cannot be used directly, but contains all the functions necessary for accessing the derived resource types. [Texture3D] is the base class for all 3-dimensional texture types. See also [TextureLayered].
|
||||
|
|
|
@ -4,8 +4,9 @@
|
|||
A 3×4 matrix representing a 3D transformation.
|
||||
</brief_description>
|
||||
<description>
|
||||
A 3×4 matrix (3 rows, 4 columns) used for 3D linear transformations. It can represent transformations such as translation, rotation, and scaling. It consists of a [member basis] (first 3 columns) and a [Vector3] for the [member origin] (last column).
|
||||
For more information, read the "Matrices and transforms" documentation article.
|
||||
The [Transform3D] built-in [Variant] type is a 3×4 matrix representing a transformation in 3D space. It contains a [Basis], which on its own can represent rotation, scale, and shear. Additionally, combined with its own [member origin], the transform can also represent a translation.
|
||||
For a general introduction, see the [url=$DOCS_URL/tutorials/math/matrices_and_transforms.html]Matrices and transforms[/url] tutorial.
|
||||
[b]Note:[/b] Godot uses a [url=https://en.wikipedia.org/wiki/Right-hand_rule]right-handed coordinate system[/url], which is a common standard. For directions, the convention for built-in types like [Camera3D] is for -Z to point forward (+X is right, +Y is up, and +Z is back). Other objects may use different direction conventions. For more information, see the [url=$DOCS_URL/tutorials/assets_pipeline/importing_scenes.html#d-asset-direction-conventions]Importing 3D Scenes[/url] tutorial.
|
||||
</description>
|
||||
<tutorials>
|
||||
<link title="Math documentation index">$DOCS_URL/tutorials/math/index.html</link>
|
||||
|
@ -19,7 +20,7 @@
|
|||
<constructor name="Transform3D">
|
||||
<return type="Transform3D" />
|
||||
<description>
|
||||
Constructs a default-initialized [Transform3D] set to [constant IDENTITY].
|
||||
Constructs a [Transform3D] identical to the [constant IDENTITY].
|
||||
</description>
|
||||
</constructor>
|
||||
<constructor name="Transform3D">
|
||||
|
@ -34,14 +35,14 @@
|
|||
<param index="0" name="basis" type="Basis" />
|
||||
<param index="1" name="origin" type="Vector3" />
|
||||
<description>
|
||||
Constructs a Transform3D from a [Basis] and [Vector3].
|
||||
Constructs a [Transform3D] from a [Basis] and [Vector3].
|
||||
</description>
|
||||
</constructor>
|
||||
<constructor name="Transform3D">
|
||||
<return type="Transform3D" />
|
||||
<param index="0" name="from" type="Projection" />
|
||||
<description>
|
||||
Constructs a Transform3D from a [Projection] by trimming the last row of the projection matrix ([code]from.x.w[/code], [code]from.y.w[/code], [code]from.z.w[/code], and [code]from.w.w[/code] are not copied over).
|
||||
Constructs a [Transform3D] from a [Projection]. Because [Transform3D] is a 3×4 matrix and [Projection] is a 4×4 matrix, this operation trims the last row of the projection matrix ([code]from.x.w[/code], [code]from.y.w[/code], [code]from.z.w[/code], and [code]from.w.w[/code] are not included in the new transform).
|
||||
</description>
|
||||
</constructor>
|
||||
<constructor name="Transform3D">
|
||||
|
@ -51,7 +52,8 @@
|
|||
<param index="2" name="z_axis" type="Vector3" />
|
||||
<param index="3" name="origin" type="Vector3" />
|
||||
<description>
|
||||
Constructs a Transform3D from four [Vector3] values (matrix columns). Each axis corresponds to local basis vectors (some of which may be scaled).
|
||||
Constructs a [Transform3D] from four [Vector3] values (also called matrix columns).
|
||||
The first three arguments are the [member basis]'s axes ([member Basis.x], [member Basis.y], and [member Basis.z]).
|
||||
</description>
|
||||
</constructor>
|
||||
</constructors>
|
||||
|
@ -59,7 +61,8 @@
|
|||
<method name="affine_inverse" qualifiers="const">
|
||||
<return type="Transform3D" />
|
||||
<description>
|
||||
Returns the inverse of the transform, under the assumption that the transformation is composed of rotation, scaling and translation.
|
||||
Returns the inverted version of this transform. Unlike [method inverse], this method works with almost any [member basis], including non-uniform ones, but is slower. See also [method Basis.inverse].
|
||||
[b]Note:[/b] For this method to return correctly, the transform's [member basis] needs to have a determinant that is not exactly [code]0[/code] (see [method Basis.determinant]).
|
||||
</description>
|
||||
</method>
|
||||
<method name="interpolate_with" qualifiers="const">
|
||||
|
@ -67,13 +70,15 @@
|
|||
<param index="0" name="xform" type="Transform3D" />
|
||||
<param index="1" name="weight" type="float" />
|
||||
<description>
|
||||
Returns a transform interpolated between this transform and another by a given [param weight] (on the range of 0.0 to 1.0).
|
||||
Returns the result of the linear interpolation between this transform and [param xform] by the given [param weight].
|
||||
The [param weight] should be between [code]0.0[/code] and [code]1.0[/code] (inclusive). Values outside this range are allowed and can be used to perform [i]extrapolation[/i] instead.
|
||||
</description>
|
||||
</method>
|
||||
<method name="inverse" qualifiers="const">
|
||||
<return type="Transform3D" />
|
||||
<description>
|
||||
Returns the inverse of the transform, under the assumption that the transformation is composed of rotation and translation (no scaling, use [method affine_inverse] for transforms with scaling).
|
||||
Returns the inverted version of this transform. See also [method Basis.inverse].
|
||||
[b]Note:[/b] For this method to return correctly, the transform's [member basis] needs to be [i]orthonormal[/i] (see [method Basis.orthonormalized]). That means, the basis should only represent a rotation. If it does not, use [method affine_inverse] instead.
|
||||
</description>
|
||||
</method>
|
||||
<method name="is_equal_approx" qualifiers="const">
|
||||
|
@ -95,7 +100,7 @@
|
|||
<param index="1" name="up" type="Vector3" default="Vector3(0, 1, 0)" />
|
||||
<param index="2" name="use_model_front" type="bool" default="false" />
|
||||
<description>
|
||||
Returns a copy of the transform rotated such that the forward axis (-Z) points towards the [param target] position.
|
||||
Returns a copy of this transform rotated so that the forward axis (-Z) points towards the [param target] position.
|
||||
The up axis (+Y) points as close to the [param up] vector as possible while staying perpendicular to the forward axis. The resulting transform is orthonormalized. The existing rotation, scale, and skew information from the original transform is discarded. The [param target] and [param up] vectors cannot be zero, cannot be parallel to each other, and are defined in global/parent space.
|
||||
If [param use_model_front] is [code]true[/code], the +Z axis (asset front) is treated as forward (implies +X is left) and points toward the [param target] position. By default, the -Z axis (camera forward) is treated as forward (implies +X is right).
|
||||
</description>
|
||||
|
@ -103,7 +108,7 @@
|
|||
<method name="orthonormalized" qualifiers="const">
|
||||
<return type="Transform3D" />
|
||||
<description>
|
||||
Returns the transform with the basis orthogonal (90 degrees), and normalized axis vectors (scale of 1 or -1).
|
||||
Returns a copy of this transform with its [member basis] orthonormalized. An orthonormal basis is both [i]orthogonal[/i] (the axes are perpendicular to each other) and [i]normalized[/i] (the axes have a length of [code]1[/code]), which also means it can only represent rotation. See also [method Basis.orthonormalized].
|
||||
</description>
|
||||
</method>
|
||||
<method name="rotated" qualifiers="const">
|
||||
|
@ -111,7 +116,7 @@
|
|||
<param index="0" name="axis" type="Vector3" />
|
||||
<param index="1" name="angle" type="float" />
|
||||
<description>
|
||||
Returns a copy of the transform rotated around the given [param axis] by the given [param angle] (in radians).
|
||||
Returns a copy of this transform rotated around the given [param axis] by the given [param angle] (in radians).
|
||||
The [param axis] must be a normalized vector.
|
||||
This method is an optimized version of multiplying the given transform [code]X[/code] with a corresponding rotation transform [code]R[/code] from the left, i.e., [code]R * X[/code].
|
||||
This can be seen as transforming with respect to the global/parent frame.
|
||||
|
@ -122,7 +127,7 @@
|
|||
<param index="0" name="axis" type="Vector3" />
|
||||
<param index="1" name="angle" type="float" />
|
||||
<description>
|
||||
Returns a copy of the transform rotated around the given [param axis] by the given [param angle] (in radians).
|
||||
Returns a copy of this transform rotated around the given [param axis] by the given [param angle] (in radians).
|
||||
The [param axis] must be a normalized vector.
|
||||
This method is an optimized version of multiplying the given transform [code]X[/code] with a corresponding rotation transform [code]R[/code] from the right, i.e., [code]X * R[/code].
|
||||
This can be seen as transforming with respect to the local frame.
|
||||
|
@ -132,7 +137,7 @@
|
|||
<return type="Transform3D" />
|
||||
<param index="0" name="scale" type="Vector3" />
|
||||
<description>
|
||||
Returns a copy of the transform scaled by the given [param scale] factor.
|
||||
Returns a copy of this transform scaled by the given [param scale] factor.
|
||||
This method is an optimized version of multiplying the given transform [code]X[/code] with a corresponding scaling transform [code]S[/code] from the left, i.e., [code]S * X[/code].
|
||||
This can be seen as transforming with respect to the global/parent frame.
|
||||
</description>
|
||||
|
@ -141,7 +146,7 @@
|
|||
<return type="Transform3D" />
|
||||
<param index="0" name="scale" type="Vector3" />
|
||||
<description>
|
||||
Returns a copy of the transform scaled by the given [param scale] factor.
|
||||
Returns a copy of this transform scaled by the given [param scale] factor.
|
||||
This method is an optimized version of multiplying the given transform [code]X[/code] with a corresponding scaling transform [code]S[/code] from the right, i.e., [code]X * S[/code].
|
||||
This can be seen as transforming with respect to the local frame.
|
||||
</description>
|
||||
|
@ -150,7 +155,7 @@
|
|||
<return type="Transform3D" />
|
||||
<param index="0" name="offset" type="Vector3" />
|
||||
<description>
|
||||
Returns a copy of the transform translated by the given [param offset].
|
||||
Returns a copy of this transform translated by the given [param offset].
|
||||
This method is an optimized version of multiplying the given transform [code]X[/code] with a corresponding translation transform [code]T[/code] from the left, i.e., [code]T * X[/code].
|
||||
This can be seen as transforming with respect to the global/parent frame.
|
||||
</description>
|
||||
|
@ -159,7 +164,7 @@
|
|||
<return type="Transform3D" />
|
||||
<param index="0" name="offset" type="Vector3" />
|
||||
<description>
|
||||
Returns a copy of the transform translated by the given [param offset].
|
||||
Returns a copy of this transform translated by the given [param offset].
|
||||
This method is an optimized version of multiplying the given transform [code]X[/code] with a corresponding translation transform [code]T[/code] from the right, i.e., [code]X * T[/code].
|
||||
This can be seen as transforming with respect to the local frame.
|
||||
</description>
|
||||
|
@ -167,24 +172,25 @@
|
|||
</methods>
|
||||
<members>
|
||||
<member name="basis" type="Basis" setter="" getter="" default="Basis(1, 0, 0, 0, 1, 0, 0, 0, 1)">
|
||||
The basis is a matrix containing 3 [Vector3] as its columns: X axis, Y axis, and Z axis. These vectors can be interpreted as the basis vectors of local coordinate system traveling with the object.
|
||||
The [Basis] of this transform. It is composed by 3 axes ([member Basis.x], [member Basis.y], and [member Basis.z]). Together, these represent the transform's rotation, scale, and shear.
|
||||
</member>
|
||||
<member name="origin" type="Vector3" setter="" getter="" default="Vector3(0, 0, 0)">
|
||||
The translation offset of the transform (column 3, the fourth column). Equivalent to array index [code]3[/code].
|
||||
The translation offset of this transform. In 3D space, this can be seen as the position.
|
||||
</member>
|
||||
</members>
|
||||
<constants>
|
||||
<constant name="IDENTITY" value="Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)">
|
||||
[Transform3D] with no translation, rotation or scaling applied. When applied to other data structures, [constant IDENTITY] performs no transformation.
|
||||
A transform with no translation, no rotation, and its scale being [code]1[/code]. Its [member basis] is equal to [constant Basis.IDENTITY].
|
||||
When multiplied by another [Variant] such as [AABB] or another [Transform3D], no transformation occurs.
|
||||
</constant>
|
||||
<constant name="FLIP_X" value="Transform3D(-1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)">
|
||||
[Transform3D] with mirroring applied perpendicular to the YZ plane.
|
||||
[Transform3D] with mirroring applied perpendicular to the YZ plane. Its [member basis] is equal to [constant Basis.FLIP_X].
|
||||
</constant>
|
||||
<constant name="FLIP_Y" value="Transform3D(1, 0, 0, 0, -1, 0, 0, 0, 1, 0, 0, 0)">
|
||||
[Transform3D] with mirroring applied perpendicular to the XZ plane.
|
||||
[Transform3D] with mirroring applied perpendicular to the XZ plane. Its [member basis] is equal to [constant Basis.FLIP_Y].
|
||||
</constant>
|
||||
<constant name="FLIP_Z" value="Transform3D(1, 0, 0, 0, 1, 0, 0, 0, -1, 0, 0, 0)">
|
||||
[Transform3D] with mirroring applied perpendicular to the XY plane.
|
||||
[Transform3D] with mirroring applied perpendicular to the XY plane. Its [member basis] is equal to [constant Basis.FLIP_Z].
|
||||
</constant>
|
||||
</constants>
|
||||
<operators>
|
||||
|
@ -192,7 +198,7 @@
|
|||
<return type="bool" />
|
||||
<param index="0" name="right" type="Transform3D" />
|
||||
<description>
|
||||
Returns [code]true[/code] if the transforms are not equal.
|
||||
Returns [code]true[/code] if the components of both transforms are not equal.
|
||||
[b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable.
|
||||
</description>
|
||||
</operator>
|
||||
|
@ -200,56 +206,62 @@
|
|||
<return type="AABB" />
|
||||
<param index="0" name="right" type="AABB" />
|
||||
<description>
|
||||
Transforms (multiplies) the [AABB] by the given [Transform3D] matrix.
|
||||
Transforms (multiplies) the [AABB] by this transformation matrix.
|
||||
</description>
|
||||
</operator>
|
||||
<operator name="operator *">
|
||||
<return type="PackedVector3Array" />
|
||||
<param index="0" name="right" type="PackedVector3Array" />
|
||||
<description>
|
||||
Transforms (multiplies) each element of the [Vector3] array by the given [Transform3D] matrix.
|
||||
Transforms (multiplies) every [Vector3] element of the given [PackedVector3Array] by this transformation matrix.
|
||||
On larger arrays, this operation is much faster than transforming each [Vector3] individually.
|
||||
</description>
|
||||
</operator>
|
||||
<operator name="operator *">
|
||||
<return type="Plane" />
|
||||
<param index="0" name="right" type="Plane" />
|
||||
<description>
|
||||
Transforms (multiplies) the [Plane] by the given [Transform3D] transformation matrix.
|
||||
Transforms (multiplies) the [Plane] by this transformation matrix.
|
||||
</description>
|
||||
</operator>
|
||||
<operator name="operator *">
|
||||
<return type="Transform3D" />
|
||||
<param index="0" name="right" type="Transform3D" />
|
||||
<description>
|
||||
Composes these two transformation matrices by multiplying them together. This has the effect of transforming the second transform (the child) by the first transform (the parent).
|
||||
Transforms (multiplies) this transform by the [param right] transform.
|
||||
This is the operation performed between parent and child [Node3D]s.
|
||||
[b]Note:[/b] If you need to only modify one attribute of this transform, consider using one of the following methods, instead:
|
||||
- For translation, see [method translated] or [method translated_local].
|
||||
- For rotation, see [method rotated] or [method rotated_local].
|
||||
- For scale, see [method scaled] or [method scaled_local].
|
||||
</description>
|
||||
</operator>
|
||||
<operator name="operator *">
|
||||
<return type="Vector3" />
|
||||
<param index="0" name="right" type="Vector3" />
|
||||
<description>
|
||||
Transforms (multiplies) the [Vector3] by the given [Transform3D] matrix.
|
||||
Transforms (multiplies) the [Vector3] by this transformation matrix.
|
||||
</description>
|
||||
</operator>
|
||||
<operator name="operator *">
|
||||
<return type="Transform3D" />
|
||||
<param index="0" name="right" type="float" />
|
||||
<description>
|
||||
This operator multiplies all components of the [Transform3D], including the origin vector, which scales it uniformly.
|
||||
Multiplies all components of the [Transform3D] by the given [float], including the [member origin]. This affects the transform's scale uniformly, scaling the [member basis].
|
||||
</description>
|
||||
</operator>
|
||||
<operator name="operator *">
|
||||
<return type="Transform3D" />
|
||||
<param index="0" name="right" type="int" />
|
||||
<description>
|
||||
This operator multiplies all components of the [Transform3D], including the origin vector, which scales it uniformly.
|
||||
Multiplies all components of the [Transform3D] by the given [int], including the [member origin]. This affects the transform's scale uniformly, scaling the [member basis].
|
||||
</description>
|
||||
</operator>
|
||||
<operator name="operator ==">
|
||||
<return type="bool" />
|
||||
<param index="0" name="right" type="Transform3D" />
|
||||
<description>
|
||||
Returns [code]true[/code] if the transforms are exactly equal.
|
||||
Returns [code]true[/code] if the components of both transforms are exactly equal.
|
||||
[b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable.
|
||||
</description>
|
||||
</operator>
|
||||
|
|
|
@ -237,6 +237,12 @@
|
|||
<param index="0" name="parallel" type="bool" default="true" />
|
||||
<description>
|
||||
If [param parallel] is [code]true[/code], the [Tweener]s appended after this method will by default run simultaneously, as opposed to sequentially.
|
||||
[b]Note:[/b] Just like with [method parallel], the tweener added right before this method will also be part of the parallel step.
|
||||
[codeblock]
|
||||
tween.tween_property(self, "position", Vector2(300, 0), 0.5)
|
||||
tween.set_parallel()
|
||||
tween.tween_property(self, "modulate", Color.GREEN, 0.5) # Runs together with the position tweener.
|
||||
[/codeblock]
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_pause_mode">
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
Abstract base class for viewports. Encapsulates drawing and interaction with a game world.
|
||||
</brief_description>
|
||||
<description>
|
||||
A Viewport creates a different view into the screen, or a sub-view inside another viewport. Children 2D Nodes will display on it, and children Camera3D 3D nodes will render on it too.
|
||||
A [Viewport] creates a different view into the screen, or a sub-view inside another viewport. Child 2D nodes will display on it, and child Camera3D 3D nodes will render on it too.
|
||||
Optionally, a viewport can have its own 2D or 3D world, so it doesn't share what it draws with other viewports.
|
||||
Viewports can also choose to be audio listeners, so they generate positional audio depending on a 2D or 3D camera child of it.
|
||||
Also, viewports can be assigned to different screens in case the devices have multiple screens.
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
No hints are added to the uniform declaration.
|
||||
</constant>
|
||||
<constant name="TYPE_COLOR" value="1" enum="TextureType">
|
||||
Adds [code]hint_albedo[/code] as hint to the uniform declaration for proper sRGB to linear conversion.
|
||||
Adds [code]source_color[/code] as hint to the uniform declaration for proper sRGB to linear conversion.
|
||||
</constant>
|
||||
<constant name="TYPE_NORMAL_MAP" value="2" enum="TextureType">
|
||||
Adds [code]hint_normal[/code] as hint to the uniform declaration, which internally converts the texture for proper usage as normal map.
|
||||
|
|
|
@ -51,7 +51,7 @@
|
|||
No hints are added to the uniform declaration.
|
||||
</constant>
|
||||
<constant name="TYPE_COLOR" value="1" enum="TextureType">
|
||||
Adds [code]hint_albedo[/code] as hint to the uniform declaration for proper sRGB to linear conversion.
|
||||
Adds [code]source_color[/code] as hint to the uniform declaration for proper sRGB to linear conversion.
|
||||
</constant>
|
||||
<constant name="TYPE_NORMAL_MAP" value="2" enum="TextureType">
|
||||
Adds [code]hint_normal[/code] as hint to the uniform declaration, which internally converts the texture for proper usage as normal map.
|
||||
|
|
|
@ -91,7 +91,7 @@
|
|||
<method name="get_contents_minimum_size" qualifiers="const">
|
||||
<return type="Vector2" />
|
||||
<description>
|
||||
Returns the combined minimum size from the child [Control] nodes of the window. Use [method child_controls_changed] to update it when children nodes have changed.
|
||||
Returns the combined minimum size from the child [Control] nodes of the window. Use [method child_controls_changed] to update it when child nodes have changed.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_flag" qualifiers="const">
|
||||
|
|
|
@ -5,20 +5,19 @@
|
|||
</brief_description>
|
||||
<description>
|
||||
This is a special node within the AR/VR system that maps the physical location of the center of our tracking space to the virtual location within our game world.
|
||||
There should be only one of these nodes in your scene and you must have one. All the XRCamera3D, XRController3D and XRAnchor3D nodes should be direct children of this node for spatial tracking to work correctly.
|
||||
Multiple origin points can be added to the scene tree, but only one can used at a time. All the [XRCamera3D], [XRController3D], and [XRAnchor3D] nodes should be direct children of this node for spatial tracking to work correctly.
|
||||
It is the position of this node that you update when your character needs to move through your game world while we're not moving in the real world. Movement in the real world is always in relation to this origin point.
|
||||
For example, if your character is driving a car, the XROrigin3D node should be a child node of this car. Or, if you're implementing a teleport system to move your character, you should change the position of this node.
|
||||
For example, if your character is driving a car, the [XROrigin3D] node should be a child node of this car. Or, if you're implementing a teleport system to move your character, you should change the position of this node.
|
||||
</description>
|
||||
<tutorials>
|
||||
<link title="XR documentation index">$DOCS_URL/tutorials/xr/index.html</link>
|
||||
</tutorials>
|
||||
<members>
|
||||
<member name="current" type="bool" setter="set_current" getter="is_current" default="false">
|
||||
Is this XROrigin3D node the current origin used by the [XRServer]?
|
||||
If [code]true[/code], this origin node is currently being used by the [XRServer]. Only one origin point can be used at a time.
|
||||
</member>
|
||||
<member name="world_scale" type="float" setter="set_world_scale" getter="get_world_scale" default="1.0">
|
||||
Allows you to adjust the scale to your game's units. Most AR/VR platforms assume a scale of 1 game world unit = 1 real world meter.
|
||||
[b]Note:[/b] This method is a passthrough to the [XRServer] itself.
|
||||
The scale of the game world compared to the real world. This is the same as [member XRServer.world_scale]. By default, most AR/VR platforms assume that 1 game unit corresponds to 1 real world meter.
|
||||
</member>
|
||||
</members>
|
||||
</class>
|
||||
|
|
|
@ -113,7 +113,7 @@
|
|||
[b]Note:[/b] This property is managed by the current [XROrigin3D] node. It is exposed for access from GDExtensions.
|
||||
</member>
|
||||
<member name="world_scale" type="float" setter="set_world_scale" getter="get_world_scale" default="1.0">
|
||||
Allows you to adjust the scale to your game's units. Most AR/VR platforms assume a scale of 1 game world unit = 1 real world meter.
|
||||
The scale of the game world compared to the real world. By default, most AR/VR platforms assume that 1 game unit corresponds to 1 real world meter.
|
||||
</member>
|
||||
</members>
|
||||
<signals>
|
||||
|
|
|
@ -9,7 +9,7 @@ mode_instanced = #define USE_ATTRIBUTES \n#define USE_INSTANCING
|
|||
|
||||
#[specializations]
|
||||
|
||||
DISABLE_LIGHTING = false
|
||||
DISABLE_LIGHTING = true
|
||||
USE_RGBA_SHADOWS = false
|
||||
SINGLE_INSTANCE = false
|
||||
|
||||
|
|
|
@ -737,12 +737,17 @@ void AudioDriverWASAPI::thread_func(void *p_udata) {
|
|||
ad->start_counting_ticks();
|
||||
|
||||
if (avail_frames > 0 && ad->audio_output.audio_client) {
|
||||
UINT32 buffer_size;
|
||||
UINT32 cur_frames;
|
||||
bool invalidated = false;
|
||||
HRESULT hr = ad->audio_output.audio_client->GetCurrentPadding(&cur_frames);
|
||||
HRESULT hr = ad->audio_output.audio_client->GetBufferSize(&buffer_size);
|
||||
if (hr != S_OK) {
|
||||
ERR_PRINT("WASAPI: GetBufferSize error");
|
||||
}
|
||||
hr = ad->audio_output.audio_client->GetCurrentPadding(&cur_frames);
|
||||
if (hr == S_OK) {
|
||||
// Check how much frames are available on the WASAPI buffer
|
||||
UINT32 write_frames = MIN(ad->buffer_frames - cur_frames, avail_frames);
|
||||
UINT32 write_frames = MIN(buffer_size - cur_frames, avail_frames);
|
||||
if (write_frames > 0) {
|
||||
BYTE *buffer = nullptr;
|
||||
hr = ad->audio_output.render_client->GetBuffer(write_frames, &buffer);
|
||||
|
|
|
@ -1003,7 +1003,9 @@ void EditorNode::_fs_changed() {
|
|||
if (err != OK) {
|
||||
ERR_PRINT(export_error);
|
||||
_exit_editor(EXIT_FAILURE);
|
||||
} else if (!export_error.is_empty()) {
|
||||
return;
|
||||
}
|
||||
if (!export_error.is_empty()) {
|
||||
WARN_PRINT(export_error);
|
||||
}
|
||||
_exit_editor(EXIT_SUCCESS);
|
||||
|
|
|
@ -644,6 +644,7 @@ void GenericTilePolygonEditor::_base_control_gui_input(Ref<InputEvent> p_event)
|
|||
undo_redo->add_undo_method(base_control, "queue_redraw");
|
||||
undo_redo->commit_action(false);
|
||||
emit_signal(SNAME("polygons_changed"));
|
||||
drag_type = DRAG_TYPE_NONE;
|
||||
} else {
|
||||
drag_type = DRAG_TYPE_PAN;
|
||||
drag_last_pos = mb->get_position();
|
||||
|
|
|
@ -255,13 +255,10 @@
|
|||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
|
||||
"LD_CLASSIC_1000" = "";
|
||||
"LD_CLASSIC_1100" = "";
|
||||
"LD_CLASSIC_1200" = "";
|
||||
"LD_CLASSIC_1300" = "";
|
||||
"LD_CLASSIC_1400" = "";
|
||||
"LD_CLASSIC_1500" = "-ld_classic";
|
||||
OTHER_LDFLAGS = "$(LD_CLASSIC_$(XCODE_VERSION_MAJOR)) $linker_flags";
|
||||
"LD_CLASSIC_1501" = "-ld_classic";
|
||||
"LD_CLASSIC_1510" = "-ld_classic";
|
||||
OTHER_LDFLAGS = "$(LD_CLASSIC_$(XCODE_VERSION_ACTUAL)) $linker_flags";
|
||||
SDKROOT = iphoneos;
|
||||
TARGETED_DEVICE_FAMILY = "$targeted_device_family";
|
||||
};
|
||||
|
@ -300,13 +297,10 @@
|
|||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
|
||||
"LD_CLASSIC_1000" = "";
|
||||
"LD_CLASSIC_1100" = "";
|
||||
"LD_CLASSIC_1200" = "";
|
||||
"LD_CLASSIC_1300" = "";
|
||||
"LD_CLASSIC_1400" = "";
|
||||
"LD_CLASSIC_1500" = "-ld_classic";
|
||||
OTHER_LDFLAGS = "$(LD_CLASSIC_$(XCODE_VERSION_MAJOR)) $linker_flags";
|
||||
"LD_CLASSIC_1501" = "-ld_classic";
|
||||
"LD_CLASSIC_1510" = "-ld_classic";
|
||||
OTHER_LDFLAGS = "$(LD_CLASSIC_$(XCODE_VERSION_ACTUAL)) $linker_flags";
|
||||
SDKROOT = iphoneos;
|
||||
TARGETED_DEVICE_FAMILY = "$targeted_device_family";
|
||||
VALIDATE_PRODUCT = YES;
|
||||
|
|
|
@ -20,7 +20,7 @@ fi
|
|||
# A diff has been created, notify the user, clean up, and exit.
|
||||
printf "\n\e[1;33m*** The following changes must be made to comply with the formatting rules:\e[0m\n\n"
|
||||
# Perl commands replace trailing spaces with `·` and tabs with `<TAB>`.
|
||||
printf "$diff\n" | perl -pe 's/(.*[^ ])( +)(\e\[m)$/my $spaces="·" x length($2); sprintf("$1$spaces$3")/ge' | perl -pe 's/(.*[^\t])(\t+)(\e\[m)$/my $tabs="<TAB>" x length($2); sprintf("$1$tabs$3")/ge'
|
||||
printf "%s\n" "$diff" | perl -pe 's/(.*[^ ])( +)(\e\[m)$/my $spaces="·" x length($2); sprintf("$1$spaces$3")/ge' | perl -pe 's/(.*[^\t])(\t+)(\e\[m)$/my $tabs="<TAB>" x length($2); sprintf("$1$tabs$3")/ge'
|
||||
|
||||
printf "\n\e[1;91m*** Please fix your commit(s) with 'git commit --amend' or 'git rebase -i <hash>'\e[0m\n"
|
||||
exit 1
|
||||
|
|
|
@ -47,7 +47,7 @@ fi
|
|||
# A diff has been created, notify the user, clean up, and exit.
|
||||
printf "\n\e[1;33m*** The following changes must be made to comply with the formatting rules:\e[0m\n\n"
|
||||
# Perl commands replace trailing spaces with `·` and tabs with `<TAB>`.
|
||||
printf "$diff\n" | perl -pe 's/(.*[^ ])( +)(\e\[m)$/my $spaces="·" x length($2); sprintf("$1$spaces$3")/ge' | perl -pe 's/(.*[^\t])(\t+)(\e\[m)$/my $tabs="<TAB>" x length($2); sprintf("$1$tabs$3")/ge'
|
||||
printf "%s\n" "$diff" | perl -pe 's/(.*[^ ])( +)(\e\[m)$/my $spaces="·" x length($2); sprintf("$1$spaces$3")/ge' | perl -pe 's/(.*[^\t])(\t+)(\e\[m)$/my $tabs="<TAB>" x length($2); sprintf("$1$tabs$3")/ge'
|
||||
|
||||
printf "\n\e[1;91m*** Please fix your commit(s) with 'git commit --amend' or 'git rebase -i <hash>'\e[0m\n"
|
||||
exit 1
|
||||
|
|
|
@ -27,7 +27,7 @@ fi
|
|||
# A diff has been created, notify the user, clean up, and exit.
|
||||
printf "\n\e[1;33m*** The following changes must be made to comply with the formatting rules:\e[0m\n\n"
|
||||
# Perl commands replace trailing spaces with `·` and tabs with `<TAB>`.
|
||||
printf "$diff\n" | perl -pe 's/(.*[^ ])( +)(\e\[m)$/my $spaces="·" x length($2); sprintf("$1$spaces$3")/ge' | perl -pe 's/(.*[^\t])(\t+)(\e\[m)$/my $tabs="<TAB>" x length($2); sprintf("$1$tabs$3")/ge'
|
||||
printf "%s\n" "$diff" | perl -pe 's/(.*[^ ])( +)(\e\[m)$/my $spaces="·" x length($2); sprintf("$1$spaces$3")/ge' | perl -pe 's/(.*[^\t])(\t+)(\e\[m)$/my $tabs="<TAB>" x length($2); sprintf("$1$tabs$3")/ge'
|
||||
|
||||
printf "\n\e[1;91m*** Please fix your commit(s) with 'git commit --amend' or 'git rebase -i <hash>'\e[0m\n"
|
||||
exit 1
|
||||
|
|
|
@ -31,7 +31,7 @@ fi
|
|||
# A diff has been created, notify the user, clean up, and exit.
|
||||
printf "\n\e[1;33m*** The following changes must be made to comply with the formatting rules:\e[0m\n\n"
|
||||
# Perl commands replace trailing spaces with `·` and tabs with `<TAB>`.
|
||||
printf "$diff\n" | perl -pe 's/(.*[^ ])( +)(\e\[m)$/my $spaces="·" x length($2); sprintf("$1$spaces$3")/ge' | perl -pe 's/(.*[^\t])(\t+)(\e\[m)$/my $tabs="<TAB>" x length($2); sprintf("$1$tabs$3")/ge'
|
||||
printf "%s\n" "$diff" | perl -pe 's/(.*[^ ])( +)(\e\[m)$/my $spaces="·" x length($2); sprintf("$1$spaces$3")/ge' | perl -pe 's/(.*[^\t])(\t+)(\e\[m)$/my $tabs="<TAB>" x length($2); sprintf("$1$tabs$3")/ge'
|
||||
|
||||
printf "\n\e[1;91m*** Please fix your commit(s) with 'git commit --amend' or 'git rebase -i <hash>'\e[0m\n"
|
||||
exit 1
|
||||
|
|
|
@ -82,7 +82,7 @@ then
|
|||
# A diff has been created, notify the user, clean up, and exit.
|
||||
printf "\n\e[1;33m*** The following changes must be made to comply with the formatting rules:\e[0m\n\n"
|
||||
# Perl commands replace trailing spaces with `·` and tabs with `<TAB>`.
|
||||
printf "$diff\n" | perl -pe 's/(.*[^ ])( +)(\e\[m)$/my $spaces="·" x length($2); sprintf("$1$spaces$3")/ge' | perl -pe 's/(.*[^\t])(\t+)(\e\[m)$/my $tabs="<TAB>" x length($2); sprintf("$1$tabs$3")/ge'
|
||||
printf "%s\n" "$diff" | perl -pe 's/(.*[^ ])( +)(\e\[m)$/my $spaces="·" x length($2); sprintf("$1$spaces$3")/ge' | perl -pe 's/(.*[^\t])(\t+)(\e\[m)$/my $tabs="<TAB>" x length($2); sprintf("$1$tabs$3")/ge'
|
||||
fi
|
||||
|
||||
printf "\n\e[1;91m*** Please fix your commit(s) with 'git commit --amend' or 'git rebase -i <hash>'\e[0m\n"
|
||||
|
|
|
@ -81,7 +81,7 @@ fi
|
|||
# A diff has been created, notify the user, clean up, and exit.
|
||||
printf "\n\e[1;33m*** The following changes must be made to comply with the formatting rules:\e[0m\n\n"
|
||||
# Perl commands replace trailing spaces with `·` and tabs with `<TAB>`.
|
||||
printf "$diff\n" | perl -pe 's/(.*[^ ])( +)(\e\[m)$/my $spaces="·" x length($2); sprintf("$1$spaces$3")/ge' | perl -pe 's/(.*[^\t])(\t+)(\e\[m)$/my $tabs="<TAB>" x length($2); sprintf("$1$tabs$3")/ge'
|
||||
printf "%s\n" "$diff" | perl -pe 's/(.*[^ ])( +)(\e\[m)$/my $spaces="·" x length($2); sprintf("$1$spaces$3")/ge' | perl -pe 's/(.*[^\t])(\t+)(\e\[m)$/my $tabs="<TAB>" x length($2); sprintf("$1$tabs$3")/ge'
|
||||
|
||||
printf "\n\e[1;91m*** Please fix your commit(s) with 'git commit --amend' or 'git rebase -i <hash>'\e[0m\n"
|
||||
exit 1
|
||||
|
|
|
@ -105,7 +105,7 @@ Error GDScriptLanguageProtocol::LSPeer::handle_data() {
|
|||
|
||||
Error GDScriptLanguageProtocol::LSPeer::send_data() {
|
||||
int sent = 0;
|
||||
if (!res_queue.is_empty()) {
|
||||
while (!res_queue.is_empty()) {
|
||||
CharString c_res = res_queue[0];
|
||||
if (res_sent < c_res.size()) {
|
||||
Error err = connection->put_partial_data((const uint8_t *)c_res.get_data() + res_sent, c_res.size() - res_sent - 1, sent);
|
||||
|
@ -229,7 +229,9 @@ void GDScriptLanguageProtocol::initialized(const Variant &p_params) {
|
|||
notify_client("gdscript/capabilities", capabilities.to_json());
|
||||
}
|
||||
|
||||
void GDScriptLanguageProtocol::poll() {
|
||||
void GDScriptLanguageProtocol::poll(int p_limit_usec) {
|
||||
uint64_t target_ticks = OS::get_singleton()->get_ticks_usec() + p_limit_usec;
|
||||
|
||||
if (server->is_connection_available()) {
|
||||
on_client_connected();
|
||||
}
|
||||
|
@ -244,16 +246,22 @@ void GDScriptLanguageProtocol::poll() {
|
|||
E = clients.begin();
|
||||
continue;
|
||||
} else {
|
||||
if (peer->connection->get_available_bytes() > 0) {
|
||||
Error err = OK;
|
||||
while (peer->connection->get_available_bytes() > 0) {
|
||||
latest_client_id = E->key;
|
||||
Error err = peer->handle_data();
|
||||
if (err != OK && err != ERR_BUSY) {
|
||||
on_client_disconnected(E->key);
|
||||
E = clients.begin();
|
||||
continue;
|
||||
err = peer->handle_data();
|
||||
if (err != OK || OS::get_singleton()->get_ticks_usec() >= target_ticks) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
Error err = peer->send_data();
|
||||
|
||||
if (err != OK && err != ERR_BUSY) {
|
||||
on_client_disconnected(E->key);
|
||||
E = clients.begin();
|
||||
continue;
|
||||
}
|
||||
|
||||
err = peer->send_data();
|
||||
if (err != OK && err != ERR_BUSY) {
|
||||
on_client_disconnected(E->key);
|
||||
E = clients.begin();
|
||||
|
|
|
@ -105,7 +105,7 @@ public:
|
|||
_FORCE_INLINE_ Ref<GDScriptTextDocument> get_text_document() { return text_document; }
|
||||
_FORCE_INLINE_ bool is_initialized() const { return _initialized; }
|
||||
|
||||
void poll();
|
||||
void poll(int p_limit_usec);
|
||||
Error start(int p_port, const IPAddress &p_bind_ip);
|
||||
void stop();
|
||||
|
||||
|
|
|
@ -42,6 +42,7 @@ GDScriptLanguageServer::GDScriptLanguageServer() {
|
|||
_EDITOR_DEF("network/language_server/enable_smart_resolve", true);
|
||||
_EDITOR_DEF("network/language_server/show_native_symbols_in_editor", false);
|
||||
_EDITOR_DEF("network/language_server/use_thread", use_thread);
|
||||
_EDITOR_DEF("network/language_server/poll_limit_usec", poll_limit_usec);
|
||||
}
|
||||
|
||||
void GDScriptLanguageServer::_notification(int p_what) {
|
||||
|
@ -56,7 +57,7 @@ void GDScriptLanguageServer::_notification(int p_what) {
|
|||
|
||||
case NOTIFICATION_INTERNAL_PROCESS: {
|
||||
if (started && !use_thread) {
|
||||
protocol.poll();
|
||||
protocol.poll(poll_limit_usec);
|
||||
}
|
||||
} break;
|
||||
|
||||
|
@ -64,7 +65,8 @@ void GDScriptLanguageServer::_notification(int p_what) {
|
|||
String remote_host = String(_EDITOR_GET("network/language_server/remote_host"));
|
||||
int remote_port = (int)_EDITOR_GET("network/language_server/remote_port");
|
||||
bool remote_use_thread = (bool)_EDITOR_GET("network/language_server/use_thread");
|
||||
if (remote_host != host || remote_port != port || remote_use_thread != use_thread) {
|
||||
int remote_poll_limit = (int)_EDITOR_GET("network/language_server/poll_limit_usec");
|
||||
if (remote_host != host || remote_port != port || remote_use_thread != use_thread || remote_poll_limit != poll_limit_usec) {
|
||||
stop();
|
||||
start();
|
||||
}
|
||||
|
@ -77,7 +79,7 @@ void GDScriptLanguageServer::thread_main(void *p_userdata) {
|
|||
GDScriptLanguageServer *self = static_cast<GDScriptLanguageServer *>(p_userdata);
|
||||
while (self->thread_running) {
|
||||
// Poll 20 times per second
|
||||
self->protocol.poll();
|
||||
self->protocol.poll(self->poll_limit_usec);
|
||||
OS::get_singleton()->delay_usec(50000);
|
||||
}
|
||||
}
|
||||
|
@ -86,6 +88,7 @@ void GDScriptLanguageServer::start() {
|
|||
host = String(_EDITOR_GET("network/language_server/remote_host"));
|
||||
port = (int)_EDITOR_GET("network/language_server/remote_port");
|
||||
use_thread = (bool)_EDITOR_GET("network/language_server/use_thread");
|
||||
poll_limit_usec = (int)_EDITOR_GET("network/language_server/poll_limit_usec");
|
||||
if (protocol.start(port, IPAddress(host)) == OK) {
|
||||
EditorNode::get_log()->add_message("--- GDScript language server started ---", EditorLog::MSG_TYPE_EDITOR);
|
||||
if (use_thread) {
|
||||
|
|
|
@ -47,6 +47,7 @@ class GDScriptLanguageServer : public EditorPlugin {
|
|||
bool use_thread = false;
|
||||
String host = "127.0.0.1";
|
||||
int port = 6005;
|
||||
int poll_limit_usec = 100000;
|
||||
static void thread_main(void *p_userdata);
|
||||
|
||||
private:
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
If this GLTF node is a camera, the index of the [GLTFCamera] in the [GLTFState] that describes the camera's properties. If -1, this node is not a camera.
|
||||
</member>
|
||||
<member name="children" type="PackedInt32Array" setter="set_children" getter="get_children" default="PackedInt32Array()">
|
||||
The indices of the children nodes in the [GLTFState]. If this GLTF node has no children, this will be an empty array.
|
||||
The indices of the child nodes in the [GLTFState]. If this GLTF node has no children, this will be an empty array.
|
||||
</member>
|
||||
<member name="height" type="int" setter="set_height" getter="get_height" default="-1">
|
||||
How deep into the node hierarchy this node is. A root node will have a height of 0, its children will have a height of 1, and so on. If -1, the height has not been calculated.
|
||||
|
|
|
@ -5280,14 +5280,13 @@ BoneAttachment3D *GLTFDocument::_generate_bone_attachment(Ref<GLTFState> p_state
|
|||
|
||||
GLTFMeshIndex GLTFDocument::_convert_mesh_to_gltf(Ref<GLTFState> p_state, MeshInstance3D *p_mesh_instance) {
|
||||
ERR_FAIL_NULL_V(p_mesh_instance, -1);
|
||||
if (p_mesh_instance->get_mesh().is_null()) {
|
||||
return -1;
|
||||
}
|
||||
ERR_FAIL_COND_V_MSG(p_mesh_instance->get_mesh().is_null(), -1, "glTF: Tried to export a MeshInstance3D node named " + p_mesh_instance->get_name() + ", but it has no mesh. This node will be exported without a mesh.");
|
||||
Ref<Mesh> mesh_resource = p_mesh_instance->get_mesh();
|
||||
ERR_FAIL_COND_V_MSG(mesh_resource->get_surface_count() == 0, -1, "glTF: Tried to export a MeshInstance3D node named " + p_mesh_instance->get_name() + ", but its mesh has no surfaces. This node will be exported without a mesh.");
|
||||
|
||||
Ref<Mesh> import_mesh = p_mesh_instance->get_mesh();
|
||||
Ref<ImporterMesh> current_mesh = _mesh_to_importer_mesh(import_mesh);
|
||||
Ref<ImporterMesh> current_mesh = _mesh_to_importer_mesh(mesh_resource);
|
||||
Vector<float> blend_weights;
|
||||
int32_t blend_count = import_mesh->get_blend_shape_count();
|
||||
int32_t blend_count = mesh_resource->get_blend_shape_count();
|
||||
blend_weights.resize(blend_count);
|
||||
for (int32_t blend_i = 0; blend_i < blend_count; blend_i++) {
|
||||
blend_weights.write[blend_i] = 0.0f;
|
||||
|
@ -5398,6 +5397,12 @@ void GLTFDocument::_convert_scene_node(Ref<GLTFState> p_state, Node *p_current,
|
|||
if (retflag) {
|
||||
return;
|
||||
}
|
||||
#ifdef TOOLS_ENABLED
|
||||
if (Engine::get_singleton()->is_editor_hint() && p_gltf_root != -1 && p_current->get_owner() == nullptr) {
|
||||
WARN_VERBOSE("glTF export warning: Node '" + p_current->get_name() + "' has no owner. This is likely a temporary node generated by a @tool script. This would not be saved when saving the Godot scene, therefore it will not be exported to glTF.");
|
||||
return;
|
||||
}
|
||||
#endif // TOOLS_ENABLED
|
||||
Ref<GLTFNode> gltf_node;
|
||||
gltf_node.instantiate();
|
||||
gltf_node->set_name(_gen_unique_name(p_state, p_current->get_name()));
|
||||
|
|
|
@ -298,13 +298,6 @@ namespace Godot.Bridge
|
|||
|
||||
_pathTypeBiMap.Add(scriptPathAttr.Path, type);
|
||||
|
||||
// This method may be called before initialization.
|
||||
if (NativeFuncs.godotsharp_dotnet_module_is_initialized().ToBool() && Engine.IsEditorHint())
|
||||
{
|
||||
using godot_string scriptPath = Marshaling.ConvertStringToNative(scriptPathAttr.Path);
|
||||
NativeFuncs.godotsharp_internal_editor_file_system_update_file(scriptPath);
|
||||
}
|
||||
|
||||
if (AlcReloadCfg.IsAlcReloadingEnabled)
|
||||
{
|
||||
AddTypeForAlcReloading(type);
|
||||
|
@ -354,6 +347,16 @@ namespace Godot.Bridge
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
// This method may be called before initialization.
|
||||
if (NativeFuncs.godotsharp_dotnet_module_is_initialized().ToBool() && Engine.IsEditorHint())
|
||||
{
|
||||
foreach (var scriptPath in _pathTypeBiMap.Paths)
|
||||
{
|
||||
using godot_string nativeScriptPath = Marshaling.ConvertStringToNative(scriptPath);
|
||||
NativeFuncs.godotsharp_internal_editor_file_system_update_file(nativeScriptPath);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[UnmanagedCallersOnly]
|
||||
|
|
|
@ -61,6 +61,8 @@ public static partial class ScriptManagerBridge
|
|||
private System.Collections.Generic.Dictionary<string, Type> _pathTypeMap = new();
|
||||
private System.Collections.Generic.Dictionary<Type, string> _typePathMap = new();
|
||||
|
||||
public System.Collections.Generic.IEnumerable<string> Paths => _pathTypeMap.Keys;
|
||||
|
||||
public void Add(string scriptPath, Type scriptType)
|
||||
{
|
||||
_pathTypeMap.Add(scriptPath, scriptType);
|
||||
|
|
|
@ -330,7 +330,7 @@ namespace Godot
|
|||
/// by the specified ratio (on the range of 0 to 1).
|
||||
/// </summary>
|
||||
/// <param name="amount">The ratio to lighten by.</param>
|
||||
/// <returns>The darkened color.</returns>
|
||||
/// <returns>The lightened color.</returns>
|
||||
public readonly Color Lightened(float amount)
|
||||
{
|
||||
Color res = this;
|
||||
|
|
|
@ -107,7 +107,7 @@ namespace Godot
|
|||
instance = instance.Substring(1);
|
||||
}
|
||||
|
||||
if (instance.StartsWith("0b"))
|
||||
if (instance.StartsWith("0b", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
instance = instance.Substring(2);
|
||||
}
|
||||
|
@ -817,7 +817,7 @@ namespace Godot
|
|||
instance = instance.Substring(1);
|
||||
}
|
||||
|
||||
if (instance.StartsWith("0x"))
|
||||
if (instance.StartsWith("0x", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
instance = instance.Substring(2);
|
||||
}
|
||||
|
|
|
@ -96,35 +96,29 @@ Error SceneMultiplayer::poll() {
|
|||
#endif
|
||||
|
||||
if (pending_peers.has(sender)) {
|
||||
if (pending_peers[sender].local) {
|
||||
// If the auth is over, admit the peer at the first packet.
|
||||
pending_peers.erase(sender);
|
||||
_admit_peer(sender);
|
||||
ERR_CONTINUE(len < 2 || (packet[0] & CMD_MASK) != NETWORK_COMMAND_SYS || packet[1] != SYS_COMMAND_AUTH);
|
||||
// Auth message.
|
||||
PackedByteArray pba;
|
||||
pba.resize(len - 2);
|
||||
if (pba.size()) {
|
||||
memcpy(pba.ptrw(), &packet[2], len - 2);
|
||||
// User callback
|
||||
const Variant sv = sender;
|
||||
const Variant pbav = pba;
|
||||
const Variant *argv[2] = { &sv, &pbav };
|
||||
Variant ret;
|
||||
Callable::CallError ce;
|
||||
auth_callback.callp(argv, 2, ret, ce);
|
||||
ERR_CONTINUE_MSG(ce.error != Callable::CallError::CALL_OK, "Failed to call authentication callback");
|
||||
} else {
|
||||
ERR_CONTINUE(len < 2 || (packet[0] & CMD_MASK) != NETWORK_COMMAND_SYS || packet[1] != SYS_COMMAND_AUTH);
|
||||
// Auth message.
|
||||
PackedByteArray pba;
|
||||
pba.resize(len - 2);
|
||||
if (pba.size()) {
|
||||
memcpy(pba.ptrw(), &packet[2], len - 2);
|
||||
// User callback
|
||||
const Variant sv = sender;
|
||||
const Variant pbav = pba;
|
||||
const Variant *argv[2] = { &sv, &pbav };
|
||||
Variant ret;
|
||||
Callable::CallError ce;
|
||||
auth_callback.callp(argv, 2, ret, ce);
|
||||
ERR_CONTINUE_MSG(ce.error != Callable::CallError::CALL_OK, "Failed to call authentication callback");
|
||||
} else {
|
||||
// Remote complete notification.
|
||||
pending_peers[sender].remote = true;
|
||||
if (pending_peers[sender].local) {
|
||||
pending_peers.erase(sender);
|
||||
_admit_peer(sender);
|
||||
}
|
||||
// Remote complete notification.
|
||||
pending_peers[sender].remote = true;
|
||||
if (pending_peers[sender].local) {
|
||||
pending_peers.erase(sender);
|
||||
_admit_peer(sender);
|
||||
}
|
||||
continue; // Auth in progress.
|
||||
}
|
||||
continue; // Auth in progress.
|
||||
}
|
||||
|
||||
ERR_CONTINUE(!connected_peers.has(sender));
|
||||
|
@ -434,7 +428,7 @@ void SceneMultiplayer::disconnect_peer(int p_id) {
|
|||
if (pending_peers.has(p_id)) {
|
||||
pending_peers.erase(p_id);
|
||||
} else if (connected_peers.has(p_id)) {
|
||||
connected_peers.has(p_id);
|
||||
connected_peers.erase(p_id);
|
||||
}
|
||||
multiplayer_peer->disconnect_peer(p_id);
|
||||
}
|
||||
|
|
|
@ -109,7 +109,10 @@
|
|||
If [code]true[/code], package signing is enabled.
|
||||
</member>
|
||||
<member name="package/unique_name" type="String" setter="" getter="">
|
||||
Unique application identifier in a reverse-DNS format, can only contain alphanumeric characters ([code]A-Z[/code], [code]a-z[/code], and [code]0-9[/code]), hyphens ([code]-[/code]), and periods ([code].[/code]).
|
||||
Unique application identifier in a reverse-DNS format. The reverse DNS format should preferably match a domain name you control, but this is not strictly required. For instance, if you own [code]example.com[/code], your package unique name should preferably be of the form [code]com.example.mygame[/code]. This identifier can only contain lowercase alphanumeric characters ([code]a-z[/code], and [code]0-9[/code]), underscores ([code]_[/code]), and periods ([code].[/code]). Each component of the reverse DNS format must start with a letter: for instance, [code]com.example.8game[/code] is not valid.
|
||||
If [code]$genname[/code] is present in the value, it will be replaced by the project name converted to lowercase. If there are invalid characters in the project name, they will be stripped. If all characters in the project name are stripped, [code]$genname[/code] is replaced by [code]noname[/code].
|
||||
[b]Note:[/b] Changing the package name will cause the package to be considered as a new package, with its own installation and data paths. The new package won't be usable to update existing installations.
|
||||
[b]Note:[/b] When publishing to Google Play, the package name must be [i]globally[/i] unique. This means no other apps published on Google Play must be using the same package name as yours. Otherwise, you'll be prevented from publishing your app on Google Play.
|
||||
</member>
|
||||
<member name="permissions/access_checkin_properties" type="bool" setter="" getter="">
|
||||
Allows read/write access to the "properties" table in the checkin database. See [url=https://developer.android.com/reference/android/Manifest.permission#ACCESS_CHECKIN_PROPERTIES]ACCESS_CHECKIN_PROPERTIES[/url].
|
||||
|
|
|
@ -23,3 +23,6 @@ org.gradle.warning.mode=all
|
|||
# Enable resource optimizations for release build.
|
||||
# NOTE: This is turned off for template release build in order to support the build legacy process.
|
||||
android.enableResourceOptimizations=true
|
||||
|
||||
# Fix gradle build errors when the build path contains non-ASCII characters
|
||||
android.overridePathCheck=true
|
||||
|
|
|
@ -26,3 +26,6 @@ org.gradle.warning.mode=all
|
|||
# Disable resource optimizations for template release build.
|
||||
# NOTE: This is turned on for Godot Editor's gradle builds in order to improve the release build.
|
||||
android.enableResourceOptimizations=false
|
||||
|
||||
# Fix gradle build errors when the build path contains non-ASCII characters
|
||||
android.overridePathCheck=true
|
||||
|
|
|
@ -34,10 +34,13 @@ import org.godotengine.godot.*;
|
|||
|
||||
import android.content.Context;
|
||||
import android.content.res.Configuration;
|
||||
import android.os.Build;
|
||||
import android.os.Handler;
|
||||
import android.os.Message;
|
||||
import android.text.InputFilter;
|
||||
import android.text.InputType;
|
||||
import android.text.TextUtils;
|
||||
import android.text.method.DigitsKeyListener;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.KeyEvent;
|
||||
import android.view.inputmethod.EditorInfo;
|
||||
|
@ -45,6 +48,7 @@ import android.view.inputmethod.InputMethodManager;
|
|||
import android.widget.EditText;
|
||||
|
||||
import java.lang.ref.WeakReference;
|
||||
import java.util.Locale;
|
||||
|
||||
public class GodotEditText extends EditText {
|
||||
// ===========================================================
|
||||
|
@ -137,6 +141,7 @@ public class GodotEditText extends EditText {
|
|||
}
|
||||
|
||||
int inputType = InputType.TYPE_CLASS_TEXT;
|
||||
String acceptCharacters = null;
|
||||
switch (edit.getKeyboardType()) {
|
||||
case KEYBOARD_TYPE_DEFAULT:
|
||||
inputType = InputType.TYPE_CLASS_TEXT;
|
||||
|
@ -148,7 +153,8 @@ public class GodotEditText extends EditText {
|
|||
inputType = InputType.TYPE_CLASS_NUMBER;
|
||||
break;
|
||||
case KEYBOARD_TYPE_NUMBER_DECIMAL:
|
||||
inputType = InputType.TYPE_CLASS_NUMBER | InputType.TYPE_NUMBER_FLAG_SIGNED;
|
||||
inputType = InputType.TYPE_CLASS_NUMBER | InputType.TYPE_NUMBER_FLAG_SIGNED | InputType.TYPE_NUMBER_FLAG_DECIMAL;
|
||||
acceptCharacters = "0123456789,.- ";
|
||||
break;
|
||||
case KEYBOARD_TYPE_PHONE:
|
||||
inputType = InputType.TYPE_CLASS_PHONE;
|
||||
|
@ -165,6 +171,14 @@ public class GodotEditText extends EditText {
|
|||
}
|
||||
edit.setInputType(inputType);
|
||||
|
||||
if (!TextUtils.isEmpty(acceptCharacters)) {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
edit.setKeyListener(DigitsKeyListener.getInstance(Locale.getDefault()));
|
||||
} else {
|
||||
edit.setKeyListener(DigitsKeyListener.getInstance(acceptCharacters));
|
||||
}
|
||||
}
|
||||
|
||||
edit.mInputWrapper.setOriginText(text);
|
||||
edit.addTextChangedListener(edit.mInputWrapper);
|
||||
final InputMethodManager imm = (InputMethodManager)mRenderView.getView().getContext().getSystemService(Context.INPUT_METHOD_SERVICE);
|
||||
|
|
|
@ -227,7 +227,7 @@ void EditorExportPlatformIOS::get_export_options(List<ExportOption> *r_options)
|
|||
r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, icon_infos[i].preset_key, PROPERTY_HINT_FILE, "*.png,*.jpg,*.jpeg"), ""));
|
||||
}
|
||||
}
|
||||
r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "storyboard/use_launch_screen_storyboard"), false, true));
|
||||
r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "storyboard/use_launch_screen_storyboard"), true, true));
|
||||
r_options->push_back(ExportOption(PropertyInfo(Variant::INT, "storyboard/image_scale_mode", PROPERTY_HINT_ENUM, "Same as Logo,Center,Scale to Fit,Scale to Fill,Scale"), 0));
|
||||
r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "storyboard/custom_image@2x", PROPERTY_HINT_FILE, "*.png,*.jpg,*.jpeg"), ""));
|
||||
r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "storyboard/custom_image@3x", PROPERTY_HINT_FILE, "*.png,*.jpg,*.jpeg"), ""));
|
||||
|
|
|
@ -34,6 +34,7 @@
|
|||
#include "core/io/dir_access.h"
|
||||
#include "main/main.h"
|
||||
#include "servers/display_server.h"
|
||||
#include "servers/rendering_server.h"
|
||||
|
||||
#ifdef X11_ENABLED
|
||||
#include "x11/display_server_x11.h"
|
||||
|
|
|
@ -66,13 +66,14 @@ def get_mvk_sdk_path():
|
|||
if not os.path.exists(dirname):
|
||||
return ""
|
||||
|
||||
ver_min = ver_parse("1.3.231.0")
|
||||
ver_num = ver_parse("0.0.0.0")
|
||||
files = os.listdir(dirname)
|
||||
lib_name_out = dirname
|
||||
for file in files:
|
||||
if os.path.isdir(os.path.join(dirname, file)):
|
||||
ver_comp = ver_parse(file)
|
||||
if ver_comp > ver_num:
|
||||
if ver_comp > ver_num and ver_comp >= ver_min:
|
||||
# Try new SDK location.
|
||||
lib_name = os.path.join(
|
||||
os.path.join(dirname, file), "macOS/lib/MoltenVK.xcframework/macos-arm64_x86_64/"
|
||||
|
|
|
@ -35,6 +35,10 @@
|
|||
|
||||
@implementation GodotApplicationDelegate
|
||||
|
||||
- (BOOL)applicationSupportsSecureRestorableState:(NSApplication *)app {
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (void)forceUnbundledWindowActivationHackStep1 {
|
||||
// Step 1: Switch focus to macOS SystemUIServer process.
|
||||
// Required to perform step 2, TransformProcessType will fail if app is already the in focus.
|
||||
|
|
|
@ -158,7 +158,7 @@ def configure(env: "Environment"):
|
|||
env.AddMethod(create_template_zip, "CreateTemplateZip")
|
||||
|
||||
# Closure compiler extern and support for ecmascript specs (const, let, etc).
|
||||
env["ENV"]["EMCC_CLOSURE_ARGS"] = "--language_in ECMASCRIPT6"
|
||||
env["ENV"]["EMCC_CLOSURE_ARGS"] = "--language_in ECMASCRIPT_2021"
|
||||
|
||||
env["CC"] = "emcc"
|
||||
env["CXX"] = "em++"
|
||||
|
@ -185,12 +185,21 @@ def configure(env: "Environment"):
|
|||
env.Prepend(CPPPATH=["#platform/web"])
|
||||
env.Append(CPPDEFINES=["WEB_ENABLED", "UNIX_ENABLED"])
|
||||
|
||||
# Get version info for checks below.
|
||||
cc_version = get_compiler_version(env)
|
||||
cc_semver = (cc_version["major"], cc_version["minor"], cc_version["patch"])
|
||||
|
||||
if env["opengl3"]:
|
||||
env.AppendUnique(CPPDEFINES=["GLES3_ENABLED"])
|
||||
# This setting just makes WebGL 2 APIs available, it does NOT disable WebGL 1.
|
||||
env.Append(LINKFLAGS=["-s", "USE_WEBGL2=1"])
|
||||
# Allow use to take control of swapping WebGL buffers.
|
||||
env.Append(LINKFLAGS=["-s", "OFFSCREEN_FRAMEBUFFER=1"])
|
||||
# Breaking change since emscripten 3.1.51
|
||||
# https://github.com/emscripten-core/emscripten/blob/main/ChangeLog.md#3151---121323
|
||||
if cc_semver >= (3, 1, 51):
|
||||
# Enables the use of *glGetProcAddress()
|
||||
env.Append(LINKFLAGS=["-s", "GL_ENABLE_GET_PROC_ADDRESS=1"])
|
||||
|
||||
if env["javascript_eval"]:
|
||||
env.Append(CPPDEFINES=["JAVASCRIPT_EVAL_ENABLED"])
|
||||
|
@ -202,14 +211,13 @@ def configure(env: "Environment"):
|
|||
env.Append(LINKFLAGS=["-s", "PTHREAD_POOL_SIZE=8"])
|
||||
env.Append(LINKFLAGS=["-s", "WASM_MEM_MAX=2048MB"])
|
||||
|
||||
# Get version info for checks below.
|
||||
cc_version = get_compiler_version(env)
|
||||
cc_semver = (cc_version["major"], cc_version["minor"], cc_version["patch"])
|
||||
|
||||
if env["lto"] != "none":
|
||||
# Workaround https://github.com/emscripten-core/emscripten/issues/19781.
|
||||
if cc_semver >= (3, 1, 42) and cc_semver < (3, 1, 46):
|
||||
env.Append(LINKFLAGS=["-Wl,-u,scalbnf"])
|
||||
# Workaround https://github.com/emscripten-core/emscripten/issues/16836.
|
||||
if cc_semver >= (3, 1, 47):
|
||||
env.Append(LINKFLAGS=["-Wl,-u,_emscripten_run_callback_on_thread"])
|
||||
|
||||
if env["dlink_enabled"]:
|
||||
if cc_semver < (3, 1, 14):
|
||||
|
@ -220,6 +228,10 @@ def configure(env: "Environment"):
|
|||
env.Append(LINKFLAGS=["-s", "SIDE_MODULE=2"])
|
||||
env.extra_suffix = ".dlink" + env.extra_suffix
|
||||
|
||||
# WASM_BIGINT is needed since emscripten ≥ 3.1.41
|
||||
if cc_semver >= (3, 1, 41):
|
||||
env.Append(LINKFLAGS=["-s", "WASM_BIGINT"])
|
||||
|
||||
# Reduce code size by generating less support code (e.g. skip NodeJS support).
|
||||
env.Append(LINKFLAGS=["-s", "ENVIRONMENT=web,worker"])
|
||||
|
||||
|
|
|
@ -4,6 +4,8 @@
|
|||
Exporter for the Web.
|
||||
</brief_description>
|
||||
<description>
|
||||
The Web exporter customizes how a web build is handled. In the editor's "Export" window, it is created when adding a new "Web" preset.
|
||||
[b]Note:[/b] Godot on Web is rendered inside a [code]<canvas>[/code] tag. Normally, the canvas cannot be positioned or resized manually, but otherwise acts as the main [Window] of the application.
|
||||
</description>
|
||||
<tutorials>
|
||||
<link title="Exporting for the Web">$DOCS_URL/tutorials/export/exporting_for_web.html</link>
|
||||
|
@ -11,45 +13,77 @@
|
|||
</tutorials>
|
||||
<members>
|
||||
<member name="custom_template/debug" type="String" setter="" getter="">
|
||||
Path to the custom export template. If left empty, default template is used.
|
||||
File path to the custom export template used for debug builds. If left empty, the default template is used.
|
||||
</member>
|
||||
<member name="custom_template/release" type="String" setter="" getter="">
|
||||
Path to the custom export template. If left empty, default template is used.
|
||||
File path to the custom export template used for release builds. If left empty, the default template is used.
|
||||
</member>
|
||||
<member name="html/canvas_resize_policy" type="int" setter="" getter="">
|
||||
The canvas resize policy determines how the canvas should be resized by Godot.
|
||||
Determines how the canvas should be resized by Godot.
|
||||
- [b]None:[/b] The canvas is not automatically resized.
|
||||
- [b]Project:[/b] The size of the canvas is dependent on the [ProjectSettings].
|
||||
- [b]Adaptive:[/b] The canvas is automatically resized to fit as much of the web page as possible.
|
||||
</member>
|
||||
<member name="html/custom_html_shell" type="String" setter="" getter="">
|
||||
The custom HTML page that wraps the exported web build. If left empty, the default HTML shell is used.
|
||||
For more information, see the [url=$DOCS_URL/tutorials/platform/web/customizing_html5_shell.html]Customizing HTML5 Shell[/url] tutorial.
|
||||
</member>
|
||||
<member name="html/experimental_virtual_keyboard" type="bool" setter="" getter="">
|
||||
If [code]true[/code], embeds support for a virtual keyboard into the web page, which is shown when necessary on touchscreen devices.
|
||||
[b]Warning:[/b] This feature is experimental and may be changed in a future release.
|
||||
</member>
|
||||
<member name="html/export_icon" type="bool" setter="" getter="">
|
||||
If [code]true[/code], the project icon will be used as the favicon for this application's web page.
|
||||
</member>
|
||||
<member name="html/focus_canvas_on_start" type="bool" setter="" getter="">
|
||||
If [code]true[/code], the canvas will be focused as soon as the application is loaded, if the browser window is already in focus.
|
||||
</member>
|
||||
<member name="html/head_include" type="String" setter="" getter="">
|
||||
Additional HTML tags to include inside the [code]<head>[/code], such as [code]<meta>[/code] tags.
|
||||
[b]Note:[/b] You do not need to add a [code]<title>[/code] tag, as it is automatically included based on the project's name.
|
||||
</member>
|
||||
<member name="progressive_web_app/background_color" type="Color" setter="" getter="">
|
||||
The background color used behind the web application.
|
||||
</member>
|
||||
<member name="progressive_web_app/display" type="int" setter="" getter="">
|
||||
The [url=https://developer.mozilla.org/en-US/docs/Web/Manifest/display/]display mode[/url] to use for this progressive web application. Different browsers and platforms may not behave the same.
|
||||
- [b]Fullscreen:[/b] Displays the app in fullscreen and hides all of the browser's UI elements.
|
||||
- [b]Standalone:[/b] Displays the app in a separate window and hides all of the browser's UI elements.
|
||||
- [b]Minimal UI:[/b] Displays the app in a separate window and only shows the browser's UI elements for navigation.
|
||||
- [b]Browser:[/b] Displays the app as a normal web page.
|
||||
</member>
|
||||
<member name="progressive_web_app/enabled" type="bool" setter="" getter="">
|
||||
If [code]true[/code], turns this web build into a [url=https://en.wikipedia.org/wiki/Progressive_web_app]progressive web application[/url] (PWA).
|
||||
</member>
|
||||
<member name="progressive_web_app/icon_144x144" type="String" setter="" getter="">
|
||||
File path to the smallest icon for this web application. If not defined, defaults to the project icon.
|
||||
[b]Note:[/b] If the icon is not 144x144, it will be automatically resized for the final build.
|
||||
</member>
|
||||
<member name="progressive_web_app/icon_180x180" type="String" setter="" getter="">
|
||||
File path to the small icon for this web application. If not defined, defaults to the project icon.
|
||||
[b]Note:[/b] If the icon is not 180x180, it will be automatically resized for the final build.
|
||||
</member>
|
||||
<member name="progressive_web_app/icon_512x512" type="String" setter="" getter="">
|
||||
File path to the smallest icon for this web application. If not defined, defaults to the project icon.
|
||||
[b]Note:[/b] If the icon is not 512x512, it will be automatically resized for the final build.
|
||||
</member>
|
||||
<member name="progressive_web_app/offline_page" type="String" setter="" getter="">
|
||||
The page to display, should the server hosting the page not be available. This page is saved in the client's machine.
|
||||
</member>
|
||||
<member name="progressive_web_app/orientation" type="int" setter="" getter="">
|
||||
The orientation to use when the web application is run through a mobile device.
|
||||
- [b]Any:[/b] No orientation is forced.
|
||||
- [b]Landscape:[/b] Forces a horizontal layout (wider than it is taller).
|
||||
- [b]Portrait:[/b] Forces a vertical layout (taller than it is wider).
|
||||
</member>
|
||||
<member name="variant/extensions_support" type="bool" setter="" getter="">
|
||||
If [code]true[/code] enables [GDExtension] support for this web build.
|
||||
</member>
|
||||
<member name="vram_texture_compression/for_desktop" type="bool" setter="" getter="">
|
||||
If [code]true[/code], allows textures to be optimized for desktop through the S3TC algorithm.
|
||||
</member>
|
||||
<member name="vram_texture_compression/for_mobile" type="bool" setter="" getter="">
|
||||
If [code]true[/code] allows textures to be optimized for mobile through the ETC2 algorithm.
|
||||
</member>
|
||||
</members>
|
||||
</class>
|
||||
|
|
|
@ -1344,6 +1344,13 @@ Ref<InputEvent> Viewport::_make_input_local(const Ref<InputEvent> &ev) {
|
|||
}
|
||||
|
||||
Transform2D ai = get_final_transform().affine_inverse();
|
||||
Ref<InputEventMouse> me = ev;
|
||||
if (me.is_valid()) {
|
||||
me = me->xformed_by(ai);
|
||||
// For InputEventMouse, the global position is not adjusted by ev->xformed_by() and needs to be set separately.
|
||||
me->set_global_position(me->get_position());
|
||||
return me;
|
||||
}
|
||||
return ev->xformed_by(ai);
|
||||
}
|
||||
|
||||
|
|
|
@ -315,13 +315,13 @@ Files extracted from upstream source:
|
|||
## libpng
|
||||
|
||||
- Upstream: http://libpng.org/pub/png/libpng.html
|
||||
- Version: 1.6.40 (f135775ad4e5d4408d2e12ffcc71bb36e6b48551, 2023)
|
||||
- Version: 1.6.43 (ed217e3e601d8e462f7fd1e04bed43ac42212429, 2024)
|
||||
- License: libpng/zlib
|
||||
|
||||
Files extracted from upstream source:
|
||||
|
||||
- all .c and .h files of the main directory, except from
|
||||
`example.c` and `pngtest.c`
|
||||
- All `.c` and `.h` files of the main directory, apart from `example.c` and
|
||||
`pngtest.c`
|
||||
- `arm/`, `intel/` and `powerpc/` folders
|
||||
- `scripts/pnglibconf.h.prebuilt` as `pnglibconf.h`
|
||||
- `LICENSE`
|
||||
|
@ -370,18 +370,18 @@ Patch `godot-node-debug-fix.patch` workarounds shadowing of godot's Node class i
|
|||
## mbedtls
|
||||
|
||||
- Upstream: https://github.com/Mbed-TLS/mbedtls
|
||||
- Version: 2.28.4 (aeb97a18913a86f051afab11b2c92c6be0c2eb83, 2023)
|
||||
- Version: 2.28.7 (555f84735aecdbd76a566cf087ec8425dfb0c8ab, 2024)
|
||||
- License: Apache 2.0
|
||||
|
||||
File extracted from upstream release tarball:
|
||||
|
||||
- All `*.h` from `include/mbedtls/` to `thirdparty/mbedtls/include/mbedtls/` except `config_psa.h` and `psa_util.h`.
|
||||
- All `*.c` and `*.h` from `library/` to `thirdparty/mbedtls/library/` except those starting with `psa_*`.
|
||||
- The `LICENSE` file.
|
||||
- Applied the patch in `patches/1453.diff` to fix UWP build (upstream PR:
|
||||
https://github.com/ARMmbed/mbedtls/pull/1453).
|
||||
Applied the patch in `patches/windows-arm64-hardclock.diff`.
|
||||
Applied the patch in `aesni-no-arm-intrinsics.patch` to fix MSVC ARM build.
|
||||
- All `.h` from `include/mbedtls/` to `thirdparty/mbedtls/include/mbedtls/`
|
||||
except `config_psa.h` and `psa_util.h`
|
||||
- All `.c` and `.h` from `library/` to `thirdparty/mbedtls/library/` except
|
||||
those starting with `psa_*`
|
||||
- The `LICENSE` file (edited to keep only the Apache 2.0 variant)
|
||||
- Applied the patch `windows-arm64-hardclock.diff` to fix Windows ARM64 build
|
||||
Applied the patch `windows-entropy-bcrypt.diff` to fix Windows Store support
|
||||
- Added 2 files `godot_core_mbedtls_platform.c` and `godot_core_mbedtls_config.h`
|
||||
providing configuration for light bundling with core.
|
||||
- Added the file `godot_module_mbedtls_config.h` to customize the build configuration when bundling the full library.
|
||||
|
@ -700,7 +700,7 @@ comments and a patch is provided in the squish/ folder.
|
|||
## tinyexr
|
||||
|
||||
- Upstream: https://github.com/syoyo/tinyexr
|
||||
- Version: 1.0.5 (3627ab3060592468d49547b4cdf5353e9e2b50dc, 2023)
|
||||
- Version: 1.0.8 (6c8742cc8145c8f629698cd8248900990946d6b1, 2024)
|
||||
- License: BSD-3-Clause
|
||||
|
||||
Files extracted from upstream source:
|
||||
|
|
|
@ -4,8 +4,8 @@ COPYRIGHT NOTICE, DISCLAIMER, and LICENSE
|
|||
PNG Reference Library License version 2
|
||||
---------------------------------------
|
||||
|
||||
* Copyright (c) 1995-2023 The PNG Reference Library Authors.
|
||||
* Copyright (c) 2018-2023 Cosmin Truta.
|
||||
* Copyright (c) 1995-2024 The PNG Reference Library Authors.
|
||||
* Copyright (c) 2018-2024 Cosmin Truta.
|
||||
* Copyright (c) 2000-2002, 2004, 2006-2018 Glenn Randers-Pehrson.
|
||||
* Copyright (c) 1996-1997 Andreas Dilger.
|
||||
* Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
|
||||
/* png.c - location for general purpose libpng functions
|
||||
*
|
||||
* Copyright (c) 2018-2023 Cosmin Truta
|
||||
* Copyright (c) 2018-2024 Cosmin Truta
|
||||
* Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson
|
||||
* Copyright (c) 1996-1997 Andreas Dilger
|
||||
* Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
|
||||
|
@ -14,27 +14,7 @@
|
|||
#include "pngpriv.h"
|
||||
|
||||
/* Generate a compiler error if there is an old png.h in the search path. */
|
||||
typedef png_libpng_version_1_6_40 Your_png_h_is_not_version_1_6_40;
|
||||
|
||||
#ifdef __GNUC__
|
||||
/* The version tests may need to be added to, but the problem warning has
|
||||
* consistently been fixed in GCC versions which obtain wide-spread release.
|
||||
* The problem is that many versions of GCC rearrange comparison expressions in
|
||||
* the optimizer in such a way that the results of the comparison will change
|
||||
* if signed integer overflow occurs. Such comparisons are not permitted in
|
||||
* ANSI C90, however GCC isn't clever enough to work out that that do not occur
|
||||
* below in png_ascii_from_fp and png_muldiv, so it produces a warning with
|
||||
* -Wextra. Unfortunately this is highly dependent on the optimizer and the
|
||||
* machine architecture so the warning comes and goes unpredictably and is
|
||||
* impossible to "fix", even were that a good idea.
|
||||
*/
|
||||
#if __GNUC__ == 7 && __GNUC_MINOR__ == 1
|
||||
#define GCC_STRICT_OVERFLOW 1
|
||||
#endif /* GNU 7.1.x */
|
||||
#endif /* GNU */
|
||||
#ifndef GCC_STRICT_OVERFLOW
|
||||
#define GCC_STRICT_OVERFLOW 0
|
||||
#endif
|
||||
typedef png_libpng_version_1_6_43 Your_png_h_is_not_version_1_6_43;
|
||||
|
||||
/* Tells libpng that we have already handled the first "num_bytes" bytes
|
||||
* of the PNG file signature. If the PNG data is embedded into another
|
||||
|
@ -73,21 +53,21 @@ png_set_sig_bytes(png_structrp png_ptr, int num_bytes)
|
|||
int PNGAPI
|
||||
png_sig_cmp(png_const_bytep sig, size_t start, size_t num_to_check)
|
||||
{
|
||||
png_byte png_signature[8] = {137, 80, 78, 71, 13, 10, 26, 10};
|
||||
static const png_byte png_signature[8] = {137, 80, 78, 71, 13, 10, 26, 10};
|
||||
|
||||
if (num_to_check > 8)
|
||||
num_to_check = 8;
|
||||
|
||||
else if (num_to_check < 1)
|
||||
return (-1);
|
||||
return -1;
|
||||
|
||||
if (start > 7)
|
||||
return (-1);
|
||||
return -1;
|
||||
|
||||
if (start + num_to_check > 8)
|
||||
num_to_check = 8 - start;
|
||||
|
||||
return ((int)(memcmp(&sig[start], &png_signature[start], num_to_check)));
|
||||
return memcmp(&sig[start], &png_signature[start], num_to_check);
|
||||
}
|
||||
|
||||
#endif /* READ */
|
||||
|
@ -447,7 +427,6 @@ png_info_init_3,(png_infopp ptr_ptr, size_t png_info_struct_size),
|
|||
memset(info_ptr, 0, (sizeof *info_ptr));
|
||||
}
|
||||
|
||||
/* The following API is not called internally */
|
||||
void PNGAPI
|
||||
png_data_freer(png_const_structrp png_ptr, png_inforp info_ptr,
|
||||
int freer, png_uint_32 mask)
|
||||
|
@ -686,9 +665,9 @@ png_voidp PNGAPI
|
|||
png_get_io_ptr(png_const_structrp png_ptr)
|
||||
{
|
||||
if (png_ptr == NULL)
|
||||
return (NULL);
|
||||
return NULL;
|
||||
|
||||
return (png_ptr->io_ptr);
|
||||
return png_ptr->io_ptr;
|
||||
}
|
||||
|
||||
#if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED)
|
||||
|
@ -752,7 +731,7 @@ png_convert_to_rfc1123_buffer(char out[29], png_const_timep ptime)
|
|||
|
||||
{
|
||||
size_t pos = 0;
|
||||
char number_buf[5]; /* enough for a four-digit year */
|
||||
char number_buf[5] = {0, 0, 0, 0, 0}; /* enough for a four-digit year */
|
||||
|
||||
# define APPEND_STRING(string) pos = png_safecat(out, 29, pos, (string))
|
||||
# define APPEND_NUMBER(format, value)\
|
||||
|
@ -815,8 +794,8 @@ png_get_copyright(png_const_structrp png_ptr)
|
|||
return PNG_STRING_COPYRIGHT
|
||||
#else
|
||||
return PNG_STRING_NEWLINE \
|
||||
"libpng version 1.6.40" PNG_STRING_NEWLINE \
|
||||
"Copyright (c) 2018-2023 Cosmin Truta" PNG_STRING_NEWLINE \
|
||||
"libpng version 1.6.43" PNG_STRING_NEWLINE \
|
||||
"Copyright (c) 2018-2024 Cosmin Truta" PNG_STRING_NEWLINE \
|
||||
"Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson" \
|
||||
PNG_STRING_NEWLINE \
|
||||
"Copyright (c) 1996-1997 Andreas Dilger" PNG_STRING_NEWLINE \
|
||||
|
@ -977,7 +956,7 @@ png_reset_zstream(png_structrp png_ptr)
|
|||
return Z_STREAM_ERROR;
|
||||
|
||||
/* WARNING: this resets the window bits to the maximum! */
|
||||
return (inflateReset(&png_ptr->zstream));
|
||||
return inflateReset(&png_ptr->zstream);
|
||||
}
|
||||
#endif /* READ */
|
||||
|
||||
|
@ -986,7 +965,7 @@ png_uint_32 PNGAPI
|
|||
png_access_version_number(void)
|
||||
{
|
||||
/* Version of *.c files used when building libpng */
|
||||
return((png_uint_32)PNG_LIBPNG_VER);
|
||||
return (png_uint_32)PNG_LIBPNG_VER;
|
||||
}
|
||||
|
||||
#if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED)
|
||||
|
@ -1842,14 +1821,14 @@ png_icc_profile_error(png_const_structrp png_ptr, png_colorspacerp colorspace,
|
|||
}
|
||||
# ifdef PNG_WARNINGS_SUPPORTED
|
||||
else
|
||||
{
|
||||
char number[PNG_NUMBER_BUFFER_SIZE]; /* +24 = 114 */
|
||||
{
|
||||
char number[PNG_NUMBER_BUFFER_SIZE]; /* +24 = 114 */
|
||||
|
||||
pos = png_safecat(message, (sizeof message), pos,
|
||||
png_format_number(number, number+(sizeof number),
|
||||
PNG_NUMBER_FORMAT_x, value));
|
||||
pos = png_safecat(message, (sizeof message), pos, "h: "); /* +2 = 116 */
|
||||
}
|
||||
pos = png_safecat(message, (sizeof message), pos,
|
||||
png_format_number(number, number+(sizeof number),
|
||||
PNG_NUMBER_FORMAT_x, value));
|
||||
pos = png_safecat(message, (sizeof message), pos, "h: "); /* +2 = 116 */
|
||||
}
|
||||
# endif
|
||||
/* The 'reason' is an arbitrary message, allow +79 maximum 195 */
|
||||
pos = png_safecat(message, (sizeof message), pos, reason);
|
||||
|
@ -2532,17 +2511,6 @@ png_colorspace_set_rgb_coefficients(png_structrp png_ptr)
|
|||
|
||||
#endif /* COLORSPACE */
|
||||
|
||||
#ifdef __GNUC__
|
||||
/* This exists solely to work round a warning from GNU C. */
|
||||
static int /* PRIVATE */
|
||||
png_gt(size_t a, size_t b)
|
||||
{
|
||||
return a > b;
|
||||
}
|
||||
#else
|
||||
# define png_gt(a,b) ((a) > (b))
|
||||
#endif
|
||||
|
||||
void /* PRIVATE */
|
||||
png_check_IHDR(png_const_structrp png_ptr,
|
||||
png_uint_32 width, png_uint_32 height, int bit_depth,
|
||||
|
@ -2564,8 +2532,16 @@ png_check_IHDR(png_const_structrp png_ptr,
|
|||
error = 1;
|
||||
}
|
||||
|
||||
if (png_gt(((width + 7) & (~7U)),
|
||||
((PNG_SIZE_MAX
|
||||
/* The bit mask on the first line below must be at least as big as a
|
||||
* png_uint_32. "~7U" is not adequate on 16-bit systems because it will
|
||||
* be an unsigned 16-bit value. Casting to (png_alloc_size_t) makes the
|
||||
* type of the result at least as bit (in bits) as the RHS of the > operator
|
||||
* which also avoids a common warning on 64-bit systems that the comparison
|
||||
* of (png_uint_32) against the constant value on the RHS will always be
|
||||
* false.
|
||||
*/
|
||||
if (((width + 7) & ~(png_alloc_size_t)7) >
|
||||
(((PNG_SIZE_MAX
|
||||
- 48 /* big_row_buf hack */
|
||||
- 1) /* filter byte */
|
||||
/ 8) /* 8-byte RGBA pixels */
|
||||
|
@ -2891,14 +2867,6 @@ png_pow10(int power)
|
|||
/* Function to format a floating point value in ASCII with a given
|
||||
* precision.
|
||||
*/
|
||||
#if GCC_STRICT_OVERFLOW
|
||||
#pragma GCC diagnostic push
|
||||
/* The problem arises below with exp_b10, which can never overflow because it
|
||||
* comes, originally, from frexp and is therefore limited to a range which is
|
||||
* typically +/-710 (log2(DBL_MAX)/log2(DBL_MIN)).
|
||||
*/
|
||||
#pragma GCC diagnostic warning "-Wstrict-overflow=2"
|
||||
#endif /* GCC_STRICT_OVERFLOW */
|
||||
void /* PRIVATE */
|
||||
png_ascii_from_fp(png_const_structrp png_ptr, png_charp ascii, size_t size,
|
||||
double fp, unsigned int precision)
|
||||
|
@ -3220,10 +3188,6 @@ png_ascii_from_fp(png_const_structrp png_ptr, png_charp ascii, size_t size,
|
|||
/* Here on buffer too small. */
|
||||
png_error(png_ptr, "ASCII conversion buffer too small");
|
||||
}
|
||||
#if GCC_STRICT_OVERFLOW
|
||||
#pragma GCC diagnostic pop
|
||||
#endif /* GCC_STRICT_OVERFLOW */
|
||||
|
||||
# endif /* FLOATING_POINT */
|
||||
|
||||
# ifdef PNG_FIXED_POINT_SUPPORTED
|
||||
|
@ -3251,7 +3215,7 @@ png_ascii_from_fixed(png_const_structrp png_ptr, png_charp ascii,
|
|||
if (num <= 0x80000000) /* else overflowed */
|
||||
{
|
||||
unsigned int ndigits = 0, first = 16 /* flag value */;
|
||||
char digits[10];
|
||||
char digits[10] = {0};
|
||||
|
||||
while (num)
|
||||
{
|
||||
|
@ -3336,15 +3300,6 @@ png_fixed(png_const_structrp png_ptr, double fp, png_const_charp text)
|
|||
* the nearest .00001). Overflow and divide by zero are signalled in
|
||||
* the result, a boolean - true on success, false on overflow.
|
||||
*/
|
||||
#if GCC_STRICT_OVERFLOW /* from above */
|
||||
/* It is not obvious which comparison below gets optimized in such a way that
|
||||
* signed overflow would change the result; looking through the code does not
|
||||
* reveal any tests which have the form GCC complains about, so presumably the
|
||||
* optimizer is moving an add or subtract into the 'if' somewhere.
|
||||
*/
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic warning "-Wstrict-overflow=2"
|
||||
#endif /* GCC_STRICT_OVERFLOW */
|
||||
int
|
||||
png_muldiv(png_fixed_point_p res, png_fixed_point a, png_int_32 times,
|
||||
png_int_32 divisor)
|
||||
|
@ -3459,9 +3414,6 @@ png_muldiv(png_fixed_point_p res, png_fixed_point a, png_int_32 times,
|
|||
|
||||
return 0;
|
||||
}
|
||||
#if GCC_STRICT_OVERFLOW
|
||||
#pragma GCC diagnostic pop
|
||||
#endif /* GCC_STRICT_OVERFLOW */
|
||||
#endif /* READ_GAMMA || INCH_CONVERSIONS */
|
||||
|
||||
#if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_INCH_CONVERSIONS_SUPPORTED)
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
|
||||
/* png.h - header file for PNG reference library
|
||||
*
|
||||
* libpng version 1.6.40
|
||||
* libpng version 1.6.43
|
||||
*
|
||||
* Copyright (c) 2018-2023 Cosmin Truta
|
||||
* Copyright (c) 2018-2024 Cosmin Truta
|
||||
* Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson
|
||||
* Copyright (c) 1996-1997 Andreas Dilger
|
||||
* Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
|
||||
|
@ -15,7 +15,7 @@
|
|||
* libpng versions 0.89, June 1996, through 0.96, May 1997: Andreas Dilger
|
||||
* libpng versions 0.97, January 1998, through 1.6.35, July 2018:
|
||||
* Glenn Randers-Pehrson
|
||||
* libpng versions 1.6.36, December 2018, through 1.6.40, June 2023:
|
||||
* libpng versions 1.6.36, December 2018, through 1.6.43, February 2024:
|
||||
* Cosmin Truta
|
||||
* See also "Contributing Authors", below.
|
||||
*/
|
||||
|
@ -27,8 +27,8 @@
|
|||
* PNG Reference Library License version 2
|
||||
* ---------------------------------------
|
||||
*
|
||||
* * Copyright (c) 1995-2023 The PNG Reference Library Authors.
|
||||
* * Copyright (c) 2018-2023 Cosmin Truta.
|
||||
* * Copyright (c) 1995-2024 The PNG Reference Library Authors.
|
||||
* * Copyright (c) 2018-2024 Cosmin Truta.
|
||||
* * Copyright (c) 2000-2002, 2004, 2006-2018 Glenn Randers-Pehrson.
|
||||
* * Copyright (c) 1996-1997 Andreas Dilger.
|
||||
* * Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
|
||||
|
@ -239,7 +239,7 @@
|
|||
* ...
|
||||
* 1.5.30 15 10530 15.so.15.30[.0]
|
||||
* ...
|
||||
* 1.6.40 16 10640 16.so.16.40[.0]
|
||||
* 1.6.43 16 10643 16.so.16.43[.0]
|
||||
*
|
||||
* Henceforth the source version will match the shared-library major and
|
||||
* minor numbers; the shared-library major version number will be used for
|
||||
|
@ -255,9 +255,6 @@
|
|||
* to the info_ptr or png_ptr members through png.h, and the compiled
|
||||
* application is loaded with a different version of the library.
|
||||
*
|
||||
* DLLNUM will change each time there are forward or backward changes
|
||||
* in binary compatibility (e.g., when a new feature is added).
|
||||
*
|
||||
* See libpng.txt or libpng.3 for more information. The PNG specification
|
||||
* is available as a W3C Recommendation and as an ISO/IEC Standard; see
|
||||
* <https://www.w3.org/TR/2003/REC-PNG-20031110/>
|
||||
|
@ -278,19 +275,21 @@
|
|||
*/
|
||||
|
||||
/* Version information for png.h - this should match the version in png.c */
|
||||
#define PNG_LIBPNG_VER_STRING "1.6.40"
|
||||
#define PNG_HEADER_VERSION_STRING " libpng version 1.6.40 - June 21, 2023\n"
|
||||
#define PNG_LIBPNG_VER_STRING "1.6.43"
|
||||
#define PNG_HEADER_VERSION_STRING " libpng version " PNG_LIBPNG_VER_STRING "\n"
|
||||
|
||||
#define PNG_LIBPNG_VER_SONUM 16
|
||||
#define PNG_LIBPNG_VER_DLLNUM 16
|
||||
/* The versions of shared library builds should stay in sync, going forward */
|
||||
#define PNG_LIBPNG_VER_SHAREDLIB 16
|
||||
#define PNG_LIBPNG_VER_SONUM PNG_LIBPNG_VER_SHAREDLIB /* [Deprecated] */
|
||||
#define PNG_LIBPNG_VER_DLLNUM PNG_LIBPNG_VER_SHAREDLIB /* [Deprecated] */
|
||||
|
||||
/* These should match the first 3 components of PNG_LIBPNG_VER_STRING: */
|
||||
#define PNG_LIBPNG_VER_MAJOR 1
|
||||
#define PNG_LIBPNG_VER_MINOR 6
|
||||
#define PNG_LIBPNG_VER_RELEASE 40
|
||||
#define PNG_LIBPNG_VER_RELEASE 43
|
||||
|
||||
/* This should be zero for a public release, or non-zero for a
|
||||
* development version. [Deprecated]
|
||||
* development version.
|
||||
*/
|
||||
#define PNG_LIBPNG_VER_BUILD 0
|
||||
|
||||
|
@ -318,7 +317,7 @@
|
|||
* From version 1.0.1 it is:
|
||||
* XXYYZZ, where XX=major, YY=minor, ZZ=release
|
||||
*/
|
||||
#define PNG_LIBPNG_VER 10640 /* 1.6.40 */
|
||||
#define PNG_LIBPNG_VER 10643 /* 1.6.43 */
|
||||
|
||||
/* Library configuration: these options cannot be changed after
|
||||
* the library has been built.
|
||||
|
@ -428,7 +427,7 @@ extern "C" {
|
|||
/* This triggers a compiler error in png.c, if png.c and png.h
|
||||
* do not agree upon the version number.
|
||||
*/
|
||||
typedef char* png_libpng_version_1_6_40;
|
||||
typedef char* png_libpng_version_1_6_43;
|
||||
|
||||
/* Basic control structions. Read libpng-manual.txt or libpng.3 for more info.
|
||||
*
|
||||
|
@ -849,7 +848,7 @@ PNG_FUNCTION(void, (PNGCAPI *png_longjmp_ptr), PNGARG((jmp_buf, int)), typedef);
|
|||
#define PNG_TRANSFORM_GRAY_TO_RGB 0x2000 /* read only */
|
||||
/* Added to libpng-1.5.4 */
|
||||
#define PNG_TRANSFORM_EXPAND_16 0x4000 /* read only */
|
||||
#if INT_MAX >= 0x8000 /* else this might break */
|
||||
#if ~0U > 0xffffU /* or else this might break on a 16-bit machine */
|
||||
#define PNG_TRANSFORM_SCALE_16 0x8000 /* read only */
|
||||
#endif
|
||||
|
||||
|
@ -908,15 +907,15 @@ PNG_EXPORT(2, void, png_set_sig_bytes, (png_structrp png_ptr, int num_bytes));
|
|||
/* Check sig[start] through sig[start + num_to_check - 1] to see if it's a
|
||||
* PNG file. Returns zero if the supplied bytes match the 8-byte PNG
|
||||
* signature, and non-zero otherwise. Having num_to_check == 0 or
|
||||
* start > 7 will always fail (ie return non-zero).
|
||||
* start > 7 will always fail (i.e. return non-zero).
|
||||
*/
|
||||
PNG_EXPORT(3, int, png_sig_cmp, (png_const_bytep sig, size_t start,
|
||||
size_t num_to_check));
|
||||
|
||||
/* Simple signature checking function. This is the same as calling
|
||||
* png_check_sig(sig, n) := !png_sig_cmp(sig, 0, n).
|
||||
* png_check_sig(sig, n) := (png_sig_cmp(sig, 0, n) == 0).
|
||||
*/
|
||||
#define png_check_sig(sig, n) !png_sig_cmp((sig), 0, (n))
|
||||
#define png_check_sig(sig, n) (png_sig_cmp((sig), 0, (n)) == 0) /* DEPRECATED */
|
||||
|
||||
/* Allocate and initialize png_ptr struct for reading, and any other memory. */
|
||||
PNG_EXPORTA(4, png_structp, png_create_read_struct,
|
||||
|
@ -1730,12 +1729,9 @@ PNG_EXPORT(97, void, png_free, (png_const_structrp png_ptr, png_voidp ptr));
|
|||
PNG_EXPORT(98, void, png_free_data, (png_const_structrp png_ptr,
|
||||
png_inforp info_ptr, png_uint_32 free_me, int num));
|
||||
|
||||
/* Reassign responsibility for freeing existing data, whether allocated
|
||||
/* Reassign the responsibility for freeing existing data, whether allocated
|
||||
* by libpng or by the application; this works on the png_info structure passed
|
||||
* in, it does not change the state for other png_info structures.
|
||||
*
|
||||
* It is unlikely that this function works correctly as of 1.6.0 and using it
|
||||
* may result either in memory leaks or double free of allocated data.
|
||||
* in, without changing the state for other png_info structures.
|
||||
*/
|
||||
PNG_EXPORT(99, void, png_data_freer, (png_const_structrp png_ptr,
|
||||
png_inforp info_ptr, int freer, png_uint_32 mask));
|
||||
|
@ -3207,11 +3203,18 @@ PNG_EXPORT(245, int, png_image_write_to_memory, (png_imagep image, void *memory,
|
|||
#ifdef PNG_MIPS_MSA_API_SUPPORTED
|
||||
# define PNG_MIPS_MSA 6 /* HARDWARE: MIPS Msa SIMD instructions supported */
|
||||
#endif
|
||||
#define PNG_IGNORE_ADLER32 8
|
||||
#ifdef PNG_POWERPC_VSX_API_SUPPORTED
|
||||
# define PNG_POWERPC_VSX 10 /* HARDWARE: PowerPC VSX SIMD instructions supported */
|
||||
#ifdef PNG_DISABLE_ADLER32_CHECK_SUPPORTED
|
||||
# define PNG_IGNORE_ADLER32 8 /* SOFTWARE: disable Adler32 check on IDAT */
|
||||
#endif
|
||||
#define PNG_OPTION_NEXT 12 /* Next option - numbers must be even */
|
||||
#ifdef PNG_POWERPC_VSX_API_SUPPORTED
|
||||
# define PNG_POWERPC_VSX 10 /* HARDWARE: PowerPC VSX SIMD instructions
|
||||
* supported */
|
||||
#endif
|
||||
#ifdef PNG_MIPS_MMI_API_SUPPORTED
|
||||
# define PNG_MIPS_MMI 12 /* HARDWARE: MIPS MMI SIMD instructions supported */
|
||||
#endif
|
||||
|
||||
#define PNG_OPTION_NEXT 14 /* Next option - numbers must be even */
|
||||
|
||||
/* Return values: NOTE: there are four values and 'off' is *not* zero */
|
||||
#define PNG_OPTION_UNSET 0 /* Unset - defaults to off */
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
|
||||
/* pngconf.h - machine-configurable file for libpng
|
||||
*
|
||||
* libpng version 1.6.40
|
||||
* libpng version 1.6.43
|
||||
*
|
||||
* Copyright (c) 2018-2022 Cosmin Truta
|
||||
* Copyright (c) 2018-2024 Cosmin Truta
|
||||
* Copyright (c) 1998-2002,2004,2006-2016,2018 Glenn Randers-Pehrson
|
||||
* Copyright (c) 1996-1997 Andreas Dilger
|
||||
* Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
|
||||
/* pngerror.c - stub functions for i/o and memory allocation
|
||||
*
|
||||
* Copyright (c) 2018 Cosmin Truta
|
||||
* Copyright (c) 2018-2024 Cosmin Truta
|
||||
* Copyright (c) 1998-2002,2004,2006-2017 Glenn Randers-Pehrson
|
||||
* Copyright (c) 1996-1997 Andreas Dilger
|
||||
* Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
|
||||
|
@ -255,7 +255,7 @@ void
|
|||
png_warning_parameter_unsigned(png_warning_parameters p, int number, int format,
|
||||
png_alloc_size_t value)
|
||||
{
|
||||
char buffer[PNG_NUMBER_BUFFER_SIZE];
|
||||
char buffer[PNG_NUMBER_BUFFER_SIZE] = {0};
|
||||
png_warning_parameter(p, number, PNG_FORMAT_NUMBER(buffer, format, value));
|
||||
}
|
||||
|
||||
|
@ -265,7 +265,7 @@ png_warning_parameter_signed(png_warning_parameters p, int number, int format,
|
|||
{
|
||||
png_alloc_size_t u;
|
||||
png_charp str;
|
||||
char buffer[PNG_NUMBER_BUFFER_SIZE];
|
||||
char buffer[PNG_NUMBER_BUFFER_SIZE] = {0};
|
||||
|
||||
/* Avoid overflow by doing the negate in a png_alloc_size_t: */
|
||||
u = (png_alloc_size_t)value;
|
||||
|
@ -858,7 +858,7 @@ png_get_error_ptr(png_const_structrp png_ptr)
|
|||
if (png_ptr == NULL)
|
||||
return NULL;
|
||||
|
||||
return ((png_voidp)png_ptr->error_ptr);
|
||||
return (png_voidp)png_ptr->error_ptr;
|
||||
}
|
||||
|
||||
|
||||
|
@ -933,31 +933,25 @@ png_safe_warning(png_structp png_nonconst_ptr, png_const_charp warning_message)
|
|||
#endif
|
||||
|
||||
int /* PRIVATE */
|
||||
png_safe_execute(png_imagep image_in, int (*function)(png_voidp), png_voidp arg)
|
||||
png_safe_execute(png_imagep image, int (*function)(png_voidp), png_voidp arg)
|
||||
{
|
||||
volatile png_imagep image = image_in;
|
||||
volatile int result;
|
||||
volatile png_voidp saved_error_buf;
|
||||
png_voidp saved_error_buf = image->opaque->error_buf;
|
||||
jmp_buf safe_jmpbuf;
|
||||
int result;
|
||||
|
||||
/* Safely execute function(arg) with png_error returning to this function. */
|
||||
saved_error_buf = image->opaque->error_buf;
|
||||
result = setjmp(safe_jmpbuf) == 0;
|
||||
|
||||
if (result != 0)
|
||||
/* Safely execute function(arg), with png_error returning back here. */
|
||||
if (setjmp(safe_jmpbuf) == 0)
|
||||
{
|
||||
|
||||
image->opaque->error_buf = safe_jmpbuf;
|
||||
result = function(arg);
|
||||
image->opaque->error_buf = saved_error_buf;
|
||||
return result;
|
||||
}
|
||||
|
||||
/* On png_error, return via longjmp, pop the jmpbuf, and free the image. */
|
||||
image->opaque->error_buf = saved_error_buf;
|
||||
|
||||
/* And do the cleanup prior to any failure return. */
|
||||
if (result == 0)
|
||||
png_image_free(image);
|
||||
|
||||
return result;
|
||||
png_image_free(image);
|
||||
return 0;
|
||||
}
|
||||
#endif /* SIMPLIFIED READ || SIMPLIFIED_WRITE */
|
||||
#endif /* READ || WRITE */
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
|
||||
/* pngget.c - retrieval of values from info struct
|
||||
*
|
||||
* Copyright (c) 2018-2023 Cosmin Truta
|
||||
* Copyright (c) 2018-2024 Cosmin Truta
|
||||
* Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson
|
||||
* Copyright (c) 1996-1997 Andreas Dilger
|
||||
* Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
|
||||
|
@ -28,22 +28,22 @@ png_get_valid(png_const_structrp png_ptr, png_const_inforp info_ptr,
|
|||
* valid tRNS chunk in this case.
|
||||
*/
|
||||
if (flag == PNG_INFO_tRNS && png_ptr->num_trans == 0)
|
||||
return(0);
|
||||
return 0;
|
||||
#endif
|
||||
|
||||
return(info_ptr->valid & flag);
|
||||
return info_ptr->valid & flag;
|
||||
}
|
||||
|
||||
return(0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
size_t PNGAPI
|
||||
png_get_rowbytes(png_const_structrp png_ptr, png_const_inforp info_ptr)
|
||||
{
|
||||
if (png_ptr != NULL && info_ptr != NULL)
|
||||
return(info_ptr->rowbytes);
|
||||
return info_ptr->rowbytes;
|
||||
|
||||
return(0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef PNG_INFO_IMAGE_SUPPORTED
|
||||
|
@ -51,9 +51,9 @@ png_bytepp PNGAPI
|
|||
png_get_rows(png_const_structrp png_ptr, png_const_inforp info_ptr)
|
||||
{
|
||||
if (png_ptr != NULL && info_ptr != NULL)
|
||||
return(info_ptr->row_pointers);
|
||||
return info_ptr->row_pointers;
|
||||
|
||||
return(0);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -65,7 +65,7 @@ png_get_image_width(png_const_structrp png_ptr, png_const_inforp info_ptr)
|
|||
if (png_ptr != NULL && info_ptr != NULL)
|
||||
return info_ptr->width;
|
||||
|
||||
return (0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
png_uint_32 PNGAPI
|
||||
|
@ -74,7 +74,7 @@ png_get_image_height(png_const_structrp png_ptr, png_const_inforp info_ptr)
|
|||
if (png_ptr != NULL && info_ptr != NULL)
|
||||
return info_ptr->height;
|
||||
|
||||
return (0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
png_byte PNGAPI
|
||||
|
@ -83,7 +83,7 @@ png_get_bit_depth(png_const_structrp png_ptr, png_const_inforp info_ptr)
|
|||
if (png_ptr != NULL && info_ptr != NULL)
|
||||
return info_ptr->bit_depth;
|
||||
|
||||
return (0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
png_byte PNGAPI
|
||||
|
@ -92,7 +92,7 @@ png_get_color_type(png_const_structrp png_ptr, png_const_inforp info_ptr)
|
|||
if (png_ptr != NULL && info_ptr != NULL)
|
||||
return info_ptr->color_type;
|
||||
|
||||
return (0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
png_byte PNGAPI
|
||||
|
@ -101,7 +101,7 @@ png_get_filter_type(png_const_structrp png_ptr, png_const_inforp info_ptr)
|
|||
if (png_ptr != NULL && info_ptr != NULL)
|
||||
return info_ptr->filter_type;
|
||||
|
||||
return (0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
png_byte PNGAPI
|
||||
|
@ -110,7 +110,7 @@ png_get_interlace_type(png_const_structrp png_ptr, png_const_inforp info_ptr)
|
|||
if (png_ptr != NULL && info_ptr != NULL)
|
||||
return info_ptr->interlace_type;
|
||||
|
||||
return (0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
png_byte PNGAPI
|
||||
|
@ -119,7 +119,7 @@ png_get_compression_type(png_const_structrp png_ptr, png_const_inforp info_ptr)
|
|||
if (png_ptr != NULL && info_ptr != NULL)
|
||||
return info_ptr->compression_type;
|
||||
|
||||
return (0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
png_uint_32 PNGAPI
|
||||
|
@ -127,21 +127,20 @@ png_get_x_pixels_per_meter(png_const_structrp png_ptr, png_const_inforp
|
|||
info_ptr)
|
||||
{
|
||||
#ifdef PNG_pHYs_SUPPORTED
|
||||
png_debug(1, "in png_get_x_pixels_per_meter");
|
||||
|
||||
if (png_ptr != NULL && info_ptr != NULL &&
|
||||
(info_ptr->valid & PNG_INFO_pHYs) != 0)
|
||||
{
|
||||
png_debug1(1, "in %s retrieval function",
|
||||
"png_get_x_pixels_per_meter");
|
||||
|
||||
if (info_ptr->phys_unit_type == PNG_RESOLUTION_METER)
|
||||
return (info_ptr->x_pixels_per_unit);
|
||||
}
|
||||
{
|
||||
if (info_ptr->phys_unit_type == PNG_RESOLUTION_METER)
|
||||
return info_ptr->x_pixels_per_unit;
|
||||
}
|
||||
#else
|
||||
PNG_UNUSED(png_ptr)
|
||||
PNG_UNUSED(info_ptr)
|
||||
#endif
|
||||
|
||||
return (0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
png_uint_32 PNGAPI
|
||||
|
@ -149,42 +148,41 @@ png_get_y_pixels_per_meter(png_const_structrp png_ptr, png_const_inforp
|
|||
info_ptr)
|
||||
{
|
||||
#ifdef PNG_pHYs_SUPPORTED
|
||||
png_debug(1, "in png_get_y_pixels_per_meter");
|
||||
|
||||
if (png_ptr != NULL && info_ptr != NULL &&
|
||||
(info_ptr->valid & PNG_INFO_pHYs) != 0)
|
||||
{
|
||||
png_debug1(1, "in %s retrieval function",
|
||||
"png_get_y_pixels_per_meter");
|
||||
|
||||
if (info_ptr->phys_unit_type == PNG_RESOLUTION_METER)
|
||||
return (info_ptr->y_pixels_per_unit);
|
||||
return info_ptr->y_pixels_per_unit;
|
||||
}
|
||||
#else
|
||||
PNG_UNUSED(png_ptr)
|
||||
PNG_UNUSED(info_ptr)
|
||||
#endif
|
||||
|
||||
return (0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
png_uint_32 PNGAPI
|
||||
png_get_pixels_per_meter(png_const_structrp png_ptr, png_const_inforp info_ptr)
|
||||
{
|
||||
#ifdef PNG_pHYs_SUPPORTED
|
||||
png_debug(1, "in png_get_pixels_per_meter");
|
||||
|
||||
if (png_ptr != NULL && info_ptr != NULL &&
|
||||
(info_ptr->valid & PNG_INFO_pHYs) != 0)
|
||||
{
|
||||
png_debug1(1, "in %s retrieval function", "png_get_pixels_per_meter");
|
||||
|
||||
if (info_ptr->phys_unit_type == PNG_RESOLUTION_METER &&
|
||||
info_ptr->x_pixels_per_unit == info_ptr->y_pixels_per_unit)
|
||||
return (info_ptr->x_pixels_per_unit);
|
||||
return info_ptr->x_pixels_per_unit;
|
||||
}
|
||||
#else
|
||||
PNG_UNUSED(png_ptr)
|
||||
PNG_UNUSED(info_ptr)
|
||||
#endif
|
||||
|
||||
return (0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef PNG_FLOATING_POINT_SUPPORTED
|
||||
|
@ -193,21 +191,21 @@ png_get_pixel_aspect_ratio(png_const_structrp png_ptr, png_const_inforp
|
|||
info_ptr)
|
||||
{
|
||||
#ifdef PNG_READ_pHYs_SUPPORTED
|
||||
png_debug(1, "in png_get_pixel_aspect_ratio");
|
||||
|
||||
if (png_ptr != NULL && info_ptr != NULL &&
|
||||
(info_ptr->valid & PNG_INFO_pHYs) != 0)
|
||||
{
|
||||
png_debug1(1, "in %s retrieval function", "png_get_aspect_ratio");
|
||||
|
||||
if (info_ptr->x_pixels_per_unit != 0)
|
||||
return ((float)((float)info_ptr->y_pixels_per_unit
|
||||
/(float)info_ptr->x_pixels_per_unit));
|
||||
return (float)info_ptr->y_pixels_per_unit
|
||||
/ (float)info_ptr->x_pixels_per_unit;
|
||||
}
|
||||
#else
|
||||
PNG_UNUSED(png_ptr)
|
||||
PNG_UNUSED(info_ptr)
|
||||
#endif
|
||||
|
||||
return ((float)0.0);
|
||||
return (float)0.0;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -217,6 +215,8 @@ png_get_pixel_aspect_ratio_fixed(png_const_structrp png_ptr,
|
|||
png_const_inforp info_ptr)
|
||||
{
|
||||
#ifdef PNG_READ_pHYs_SUPPORTED
|
||||
png_debug(1, "in png_get_pixel_aspect_ratio_fixed");
|
||||
|
||||
if (png_ptr != NULL && info_ptr != NULL &&
|
||||
(info_ptr->valid & PNG_INFO_pHYs) != 0 &&
|
||||
info_ptr->x_pixels_per_unit > 0 && info_ptr->y_pixels_per_unit > 0 &&
|
||||
|
@ -225,8 +225,6 @@ png_get_pixel_aspect_ratio_fixed(png_const_structrp png_ptr,
|
|||
{
|
||||
png_fixed_point res;
|
||||
|
||||
png_debug1(1, "in %s retrieval function", "png_get_aspect_ratio_fixed");
|
||||
|
||||
/* The following casts work because a PNG 4 byte integer only has a valid
|
||||
* range of 0..2^31-1; otherwise the cast might overflow.
|
||||
*/
|
||||
|
@ -247,80 +245,80 @@ png_int_32 PNGAPI
|
|||
png_get_x_offset_microns(png_const_structrp png_ptr, png_const_inforp info_ptr)
|
||||
{
|
||||
#ifdef PNG_oFFs_SUPPORTED
|
||||
png_debug(1, "in png_get_x_offset_microns");
|
||||
|
||||
if (png_ptr != NULL && info_ptr != NULL &&
|
||||
(info_ptr->valid & PNG_INFO_oFFs) != 0)
|
||||
{
|
||||
png_debug1(1, "in %s retrieval function", "png_get_x_offset_microns");
|
||||
|
||||
if (info_ptr->offset_unit_type == PNG_OFFSET_MICROMETER)
|
||||
return (info_ptr->x_offset);
|
||||
return info_ptr->x_offset;
|
||||
}
|
||||
#else
|
||||
PNG_UNUSED(png_ptr)
|
||||
PNG_UNUSED(info_ptr)
|
||||
#endif
|
||||
|
||||
return (0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
png_int_32 PNGAPI
|
||||
png_get_y_offset_microns(png_const_structrp png_ptr, png_const_inforp info_ptr)
|
||||
{
|
||||
#ifdef PNG_oFFs_SUPPORTED
|
||||
png_debug(1, "in png_get_y_offset_microns");
|
||||
|
||||
if (png_ptr != NULL && info_ptr != NULL &&
|
||||
(info_ptr->valid & PNG_INFO_oFFs) != 0)
|
||||
{
|
||||
png_debug1(1, "in %s retrieval function", "png_get_y_offset_microns");
|
||||
|
||||
if (info_ptr->offset_unit_type == PNG_OFFSET_MICROMETER)
|
||||
return (info_ptr->y_offset);
|
||||
return info_ptr->y_offset;
|
||||
}
|
||||
#else
|
||||
PNG_UNUSED(png_ptr)
|
||||
PNG_UNUSED(info_ptr)
|
||||
#endif
|
||||
|
||||
return (0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
png_int_32 PNGAPI
|
||||
png_get_x_offset_pixels(png_const_structrp png_ptr, png_const_inforp info_ptr)
|
||||
{
|
||||
#ifdef PNG_oFFs_SUPPORTED
|
||||
png_debug(1, "in png_get_x_offset_pixels");
|
||||
|
||||
if (png_ptr != NULL && info_ptr != NULL &&
|
||||
(info_ptr->valid & PNG_INFO_oFFs) != 0)
|
||||
{
|
||||
png_debug1(1, "in %s retrieval function", "png_get_x_offset_pixels");
|
||||
|
||||
if (info_ptr->offset_unit_type == PNG_OFFSET_PIXEL)
|
||||
return (info_ptr->x_offset);
|
||||
return info_ptr->x_offset;
|
||||
}
|
||||
#else
|
||||
PNG_UNUSED(png_ptr)
|
||||
PNG_UNUSED(info_ptr)
|
||||
#endif
|
||||
|
||||
return (0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
png_int_32 PNGAPI
|
||||
png_get_y_offset_pixels(png_const_structrp png_ptr, png_const_inforp info_ptr)
|
||||
{
|
||||
#ifdef PNG_oFFs_SUPPORTED
|
||||
png_debug(1, "in png_get_y_offset_pixels");
|
||||
|
||||
if (png_ptr != NULL && info_ptr != NULL &&
|
||||
(info_ptr->valid & PNG_INFO_oFFs) != 0)
|
||||
{
|
||||
png_debug1(1, "in %s retrieval function", "png_get_y_offset_pixels");
|
||||
|
||||
if (info_ptr->offset_unit_type == PNG_OFFSET_PIXEL)
|
||||
return (info_ptr->y_offset);
|
||||
return info_ptr->y_offset;
|
||||
}
|
||||
#else
|
||||
PNG_UNUSED(png_ptr)
|
||||
PNG_UNUSED(info_ptr)
|
||||
#endif
|
||||
|
||||
return (0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef PNG_INCH_CONVERSIONS_SUPPORTED
|
||||
|
@ -434,11 +432,11 @@ png_get_pHYs_dpi(png_const_structrp png_ptr, png_const_inforp info_ptr,
|
|||
{
|
||||
png_uint_32 retval = 0;
|
||||
|
||||
png_debug1(1, "in %s retrieval function", "pHYs");
|
||||
|
||||
if (png_ptr != NULL && info_ptr != NULL &&
|
||||
(info_ptr->valid & PNG_INFO_pHYs) != 0)
|
||||
{
|
||||
png_debug1(1, "in %s retrieval function", "pHYs");
|
||||
|
||||
if (res_x != NULL)
|
||||
{
|
||||
*res_x = info_ptr->x_pixels_per_unit;
|
||||
|
@ -464,7 +462,7 @@ png_get_pHYs_dpi(png_const_structrp png_ptr, png_const_inforp info_ptr,
|
|||
}
|
||||
}
|
||||
|
||||
return (retval);
|
||||
return retval;
|
||||
}
|
||||
#endif /* pHYs */
|
||||
#endif /* INCH_CONVERSIONS */
|
||||
|
@ -478,9 +476,9 @@ png_byte PNGAPI
|
|||
png_get_channels(png_const_structrp png_ptr, png_const_inforp info_ptr)
|
||||
{
|
||||
if (png_ptr != NULL && info_ptr != NULL)
|
||||
return(info_ptr->channels);
|
||||
return info_ptr->channels;
|
||||
|
||||
return (0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef PNG_READ_SUPPORTED
|
||||
|
@ -488,9 +486,9 @@ png_const_bytep PNGAPI
|
|||
png_get_signature(png_const_structrp png_ptr, png_const_inforp info_ptr)
|
||||
{
|
||||
if (png_ptr != NULL && info_ptr != NULL)
|
||||
return(info_ptr->signature);
|
||||
return info_ptr->signature;
|
||||
|
||||
return (NULL);
|
||||
return NULL;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -499,17 +497,17 @@ png_uint_32 PNGAPI
|
|||
png_get_bKGD(png_const_structrp png_ptr, png_inforp info_ptr,
|
||||
png_color_16p *background)
|
||||
{
|
||||
png_debug1(1, "in %s retrieval function", "bKGD");
|
||||
|
||||
if (png_ptr != NULL && info_ptr != NULL &&
|
||||
(info_ptr->valid & PNG_INFO_bKGD) != 0 &&
|
||||
background != NULL)
|
||||
{
|
||||
png_debug1(1, "in %s retrieval function", "bKGD");
|
||||
|
||||
*background = &(info_ptr->background);
|
||||
return (PNG_INFO_bKGD);
|
||||
return PNG_INFO_bKGD;
|
||||
}
|
||||
|
||||
return (0);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -524,6 +522,8 @@ png_get_cHRM(png_const_structrp png_ptr, png_const_inforp info_ptr,
|
|||
double *white_x, double *white_y, double *red_x, double *red_y,
|
||||
double *green_x, double *green_y, double *blue_x, double *blue_y)
|
||||
{
|
||||
png_debug1(1, "in %s retrieval function", "cHRM");
|
||||
|
||||
/* Quiet API change: this code used to only return the end points if a cHRM
|
||||
* chunk was present, but the end points can also come from iCCP or sRGB
|
||||
* chunks, so in 1.6.0 the png_get_ APIs return the end points regardless and
|
||||
|
@ -533,8 +533,6 @@ png_get_cHRM(png_const_structrp png_ptr, png_const_inforp info_ptr,
|
|||
if (png_ptr != NULL && info_ptr != NULL &&
|
||||
(info_ptr->colorspace.flags & PNG_COLORSPACE_HAVE_ENDPOINTS) != 0)
|
||||
{
|
||||
png_debug1(1, "in %s retrieval function", "cHRM");
|
||||
|
||||
if (white_x != NULL)
|
||||
*white_x = png_float(png_ptr,
|
||||
info_ptr->colorspace.end_points_xy.whitex, "cHRM white X");
|
||||
|
@ -559,10 +557,10 @@ png_get_cHRM(png_const_structrp png_ptr, png_const_inforp info_ptr,
|
|||
if (blue_y != NULL)
|
||||
*blue_y = png_float(png_ptr, info_ptr->colorspace.end_points_xy.bluey,
|
||||
"cHRM blue Y");
|
||||
return (PNG_INFO_cHRM);
|
||||
return PNG_INFO_cHRM;
|
||||
}
|
||||
|
||||
return (0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
png_uint_32 PNGAPI
|
||||
|
@ -571,11 +569,11 @@ png_get_cHRM_XYZ(png_const_structrp png_ptr, png_const_inforp info_ptr,
|
|||
double *green_Y, double *green_Z, double *blue_X, double *blue_Y,
|
||||
double *blue_Z)
|
||||
{
|
||||
png_debug1(1, "in %s retrieval function", "cHRM_XYZ(float)");
|
||||
|
||||
if (png_ptr != NULL && info_ptr != NULL &&
|
||||
(info_ptr->colorspace.flags & PNG_COLORSPACE_HAVE_ENDPOINTS) != 0)
|
||||
{
|
||||
png_debug1(1, "in %s retrieval function", "cHRM_XYZ(float)");
|
||||
|
||||
if (red_X != NULL)
|
||||
*red_X = png_float(png_ptr, info_ptr->colorspace.end_points_XYZ.red_X,
|
||||
"cHRM red X");
|
||||
|
@ -603,10 +601,10 @@ png_get_cHRM_XYZ(png_const_structrp png_ptr, png_const_inforp info_ptr,
|
|||
if (blue_Z != NULL)
|
||||
*blue_Z = png_float(png_ptr,
|
||||
info_ptr->colorspace.end_points_XYZ.blue_Z, "cHRM blue Z");
|
||||
return (PNG_INFO_cHRM);
|
||||
return PNG_INFO_cHRM;
|
||||
}
|
||||
|
||||
return (0);
|
||||
return 0;
|
||||
}
|
||||
# endif
|
||||
|
||||
|
@ -619,11 +617,11 @@ png_get_cHRM_XYZ_fixed(png_const_structrp png_ptr, png_const_inforp info_ptr,
|
|||
png_fixed_point *int_blue_X, png_fixed_point *int_blue_Y,
|
||||
png_fixed_point *int_blue_Z)
|
||||
{
|
||||
png_debug1(1, "in %s retrieval function", "cHRM_XYZ");
|
||||
|
||||
if (png_ptr != NULL && info_ptr != NULL &&
|
||||
(info_ptr->colorspace.flags & PNG_COLORSPACE_HAVE_ENDPOINTS) != 0)
|
||||
{
|
||||
png_debug1(1, "in %s retrieval function", "cHRM_XYZ");
|
||||
|
||||
if (int_red_X != NULL)
|
||||
*int_red_X = info_ptr->colorspace.end_points_XYZ.red_X;
|
||||
if (int_red_Y != NULL)
|
||||
|
@ -642,10 +640,10 @@ png_get_cHRM_XYZ_fixed(png_const_structrp png_ptr, png_const_inforp info_ptr,
|
|||
*int_blue_Y = info_ptr->colorspace.end_points_XYZ.blue_Y;
|
||||
if (int_blue_Z != NULL)
|
||||
*int_blue_Z = info_ptr->colorspace.end_points_XYZ.blue_Z;
|
||||
return (PNG_INFO_cHRM);
|
||||
return PNG_INFO_cHRM;
|
||||
}
|
||||
|
||||
return (0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
png_uint_32 PNGAPI
|
||||
|
@ -675,10 +673,10 @@ png_get_cHRM_fixed(png_const_structrp png_ptr, png_const_inforp info_ptr,
|
|||
*blue_x = info_ptr->colorspace.end_points_xy.bluex;
|
||||
if (blue_y != NULL)
|
||||
*blue_y = info_ptr->colorspace.end_points_xy.bluey;
|
||||
return (PNG_INFO_cHRM);
|
||||
return PNG_INFO_cHRM;
|
||||
}
|
||||
|
||||
return (0);
|
||||
return 0;
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
|
@ -696,10 +694,10 @@ png_get_gAMA_fixed(png_const_structrp png_ptr, png_const_inforp info_ptr,
|
|||
file_gamma != NULL)
|
||||
{
|
||||
*file_gamma = info_ptr->colorspace.gamma;
|
||||
return (PNG_INFO_gAMA);
|
||||
return PNG_INFO_gAMA;
|
||||
}
|
||||
|
||||
return (0);
|
||||
return 0;
|
||||
}
|
||||
# endif
|
||||
|
||||
|
@ -716,10 +714,10 @@ png_get_gAMA(png_const_structrp png_ptr, png_const_inforp info_ptr,
|
|||
{
|
||||
*file_gamma = png_float(png_ptr, info_ptr->colorspace.gamma,
|
||||
"png_get_gAMA");
|
||||
return (PNG_INFO_gAMA);
|
||||
return PNG_INFO_gAMA;
|
||||
}
|
||||
|
||||
return (0);
|
||||
return 0;
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
|
@ -735,10 +733,10 @@ png_get_sRGB(png_const_structrp png_ptr, png_const_inforp info_ptr,
|
|||
(info_ptr->valid & PNG_INFO_sRGB) != 0 && file_srgb_intent != NULL)
|
||||
{
|
||||
*file_srgb_intent = info_ptr->colorspace.rendering_intent;
|
||||
return (PNG_INFO_sRGB);
|
||||
return PNG_INFO_sRGB;
|
||||
}
|
||||
|
||||
return (0);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -762,10 +760,10 @@ png_get_iCCP(png_const_structrp png_ptr, png_inforp info_ptr,
|
|||
*/
|
||||
if (compression_type != NULL)
|
||||
*compression_type = PNG_COMPRESSION_TYPE_BASE;
|
||||
return (PNG_INFO_iCCP);
|
||||
return PNG_INFO_iCCP;
|
||||
}
|
||||
|
||||
return (0);
|
||||
return 0;
|
||||
|
||||
}
|
||||
#endif
|
||||
|
@ -775,13 +773,15 @@ int PNGAPI
|
|||
png_get_sPLT(png_const_structrp png_ptr, png_inforp info_ptr,
|
||||
png_sPLT_tpp spalettes)
|
||||
{
|
||||
png_debug1(1, "in %s retrieval function", "sPLT");
|
||||
|
||||
if (png_ptr != NULL && info_ptr != NULL && spalettes != NULL)
|
||||
{
|
||||
*spalettes = info_ptr->splt_palettes;
|
||||
return info_ptr->splt_palettes_num;
|
||||
}
|
||||
|
||||
return (0);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -807,10 +807,10 @@ png_get_eXIf_1(png_const_structrp png_ptr, png_const_inforp info_ptr,
|
|||
{
|
||||
*num_exif = info_ptr->num_exif;
|
||||
*exif = info_ptr->exif;
|
||||
return (PNG_INFO_eXIf);
|
||||
return PNG_INFO_eXIf;
|
||||
}
|
||||
|
||||
return (0);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -825,10 +825,10 @@ png_get_hIST(png_const_structrp png_ptr, png_inforp info_ptr,
|
|||
(info_ptr->valid & PNG_INFO_hIST) != 0 && hist != NULL)
|
||||
{
|
||||
*hist = info_ptr->hist;
|
||||
return (PNG_INFO_hIST);
|
||||
return PNG_INFO_hIST;
|
||||
}
|
||||
|
||||
return (0);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -841,7 +841,7 @@ png_get_IHDR(png_const_structrp png_ptr, png_const_inforp info_ptr,
|
|||
png_debug1(1, "in %s retrieval function", "IHDR");
|
||||
|
||||
if (png_ptr == NULL || info_ptr == NULL)
|
||||
return (0);
|
||||
return 0;
|
||||
|
||||
if (width != NULL)
|
||||
*width = info_ptr->width;
|
||||
|
@ -873,7 +873,7 @@ png_get_IHDR(png_const_structrp png_ptr, png_const_inforp info_ptr,
|
|||
info_ptr->bit_depth, info_ptr->color_type, info_ptr->interlace_type,
|
||||
info_ptr->compression_type, info_ptr->filter_type);
|
||||
|
||||
return (1);
|
||||
return 1;
|
||||
}
|
||||
|
||||
#ifdef PNG_oFFs_SUPPORTED
|
||||
|
@ -890,10 +890,10 @@ png_get_oFFs(png_const_structrp png_ptr, png_const_inforp info_ptr,
|
|||
*offset_x = info_ptr->x_offset;
|
||||
*offset_y = info_ptr->y_offset;
|
||||
*unit_type = (int)info_ptr->offset_unit_type;
|
||||
return (PNG_INFO_oFFs);
|
||||
return PNG_INFO_oFFs;
|
||||
}
|
||||
|
||||
return (0);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -917,10 +917,10 @@ png_get_pCAL(png_const_structrp png_ptr, png_inforp info_ptr,
|
|||
*nparams = (int)info_ptr->pcal_nparams;
|
||||
*units = info_ptr->pcal_units;
|
||||
*params = info_ptr->pcal_params;
|
||||
return (PNG_INFO_pCAL);
|
||||
return PNG_INFO_pCAL;
|
||||
}
|
||||
|
||||
return (0);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -932,6 +932,8 @@ png_uint_32 PNGAPI
|
|||
png_get_sCAL_fixed(png_const_structrp png_ptr, png_const_inforp info_ptr,
|
||||
int *unit, png_fixed_point *width, png_fixed_point *height)
|
||||
{
|
||||
png_debug1(1, "in %s retrieval function", "sCAL");
|
||||
|
||||
if (png_ptr != NULL && info_ptr != NULL &&
|
||||
(info_ptr->valid & PNG_INFO_sCAL) != 0)
|
||||
{
|
||||
|
@ -943,10 +945,10 @@ png_get_sCAL_fixed(png_const_structrp png_ptr, png_const_inforp info_ptr,
|
|||
*width = png_fixed(png_ptr, atof(info_ptr->scal_s_width), "sCAL width");
|
||||
*height = png_fixed(png_ptr, atof(info_ptr->scal_s_height),
|
||||
"sCAL height");
|
||||
return (PNG_INFO_sCAL);
|
||||
return PNG_INFO_sCAL;
|
||||
}
|
||||
|
||||
return(0);
|
||||
return 0;
|
||||
}
|
||||
# endif /* FLOATING_ARITHMETIC */
|
||||
# endif /* FIXED_POINT */
|
||||
|
@ -955,32 +957,36 @@ png_uint_32 PNGAPI
|
|||
png_get_sCAL(png_const_structrp png_ptr, png_const_inforp info_ptr,
|
||||
int *unit, double *width, double *height)
|
||||
{
|
||||
png_debug1(1, "in %s retrieval function", "sCAL(float)");
|
||||
|
||||
if (png_ptr != NULL && info_ptr != NULL &&
|
||||
(info_ptr->valid & PNG_INFO_sCAL) != 0)
|
||||
{
|
||||
*unit = info_ptr->scal_unit;
|
||||
*width = atof(info_ptr->scal_s_width);
|
||||
*height = atof(info_ptr->scal_s_height);
|
||||
return (PNG_INFO_sCAL);
|
||||
return PNG_INFO_sCAL;
|
||||
}
|
||||
|
||||
return(0);
|
||||
return 0;
|
||||
}
|
||||
# endif /* FLOATING POINT */
|
||||
png_uint_32 PNGAPI
|
||||
png_get_sCAL_s(png_const_structrp png_ptr, png_const_inforp info_ptr,
|
||||
int *unit, png_charpp width, png_charpp height)
|
||||
{
|
||||
png_debug1(1, "in %s retrieval function", "sCAL(str)");
|
||||
|
||||
if (png_ptr != NULL && info_ptr != NULL &&
|
||||
(info_ptr->valid & PNG_INFO_sCAL) != 0)
|
||||
{
|
||||
*unit = info_ptr->scal_unit;
|
||||
*width = info_ptr->scal_s_width;
|
||||
*height = info_ptr->scal_s_height;
|
||||
return (PNG_INFO_sCAL);
|
||||
return PNG_INFO_sCAL;
|
||||
}
|
||||
|
||||
return(0);
|
||||
return 0;
|
||||
}
|
||||
#endif /* sCAL */
|
||||
|
||||
|
@ -1015,7 +1021,7 @@ png_get_pHYs(png_const_structrp png_ptr, png_const_inforp info_ptr,
|
|||
}
|
||||
}
|
||||
|
||||
return (retval);
|
||||
return retval;
|
||||
}
|
||||
#endif /* pHYs */
|
||||
|
||||
|
@ -1031,10 +1037,10 @@ png_get_PLTE(png_const_structrp png_ptr, png_inforp info_ptr,
|
|||
*palette = info_ptr->palette;
|
||||
*num_palette = info_ptr->num_palette;
|
||||
png_debug1(3, "num_palette = %d", *num_palette);
|
||||
return (PNG_INFO_PLTE);
|
||||
return PNG_INFO_PLTE;
|
||||
}
|
||||
|
||||
return (0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef PNG_sBIT_SUPPORTED
|
||||
|
@ -1048,10 +1054,10 @@ png_get_sBIT(png_const_structrp png_ptr, png_inforp info_ptr,
|
|||
(info_ptr->valid & PNG_INFO_sBIT) != 0 && sig_bit != NULL)
|
||||
{
|
||||
*sig_bit = &(info_ptr->sig_bit);
|
||||
return (PNG_INFO_sBIT);
|
||||
return PNG_INFO_sBIT;
|
||||
}
|
||||
|
||||
return (0);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -1062,7 +1068,7 @@ png_get_text(png_const_structrp png_ptr, png_inforp info_ptr,
|
|||
{
|
||||
if (png_ptr != NULL && info_ptr != NULL && info_ptr->num_text > 0)
|
||||
{
|
||||
png_debug1(1, "in 0x%lx retrieval function",
|
||||
png_debug1(1, "in text retrieval function, chunk typeid = 0x%lx",
|
||||
(unsigned long)png_ptr->chunk_name);
|
||||
|
||||
if (text_ptr != NULL)
|
||||
|
@ -1077,7 +1083,7 @@ png_get_text(png_const_structrp png_ptr, png_inforp info_ptr,
|
|||
if (num_text != NULL)
|
||||
*num_text = 0;
|
||||
|
||||
return(0);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -1092,10 +1098,10 @@ png_get_tIME(png_const_structrp png_ptr, png_inforp info_ptr,
|
|||
(info_ptr->valid & PNG_INFO_tIME) != 0 && mod_time != NULL)
|
||||
{
|
||||
*mod_time = &(info_ptr->mod_time);
|
||||
return (PNG_INFO_tIME);
|
||||
return PNG_INFO_tIME;
|
||||
}
|
||||
|
||||
return (0);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -1105,11 +1111,12 @@ png_get_tRNS(png_const_structrp png_ptr, png_inforp info_ptr,
|
|||
png_bytep *trans_alpha, int *num_trans, png_color_16p *trans_color)
|
||||
{
|
||||
png_uint_32 retval = 0;
|
||||
|
||||
png_debug1(1, "in %s retrieval function", "tRNS");
|
||||
|
||||
if (png_ptr != NULL && info_ptr != NULL &&
|
||||
(info_ptr->valid & PNG_INFO_tRNS) != 0)
|
||||
{
|
||||
png_debug1(1, "in %s retrieval function", "tRNS");
|
||||
|
||||
if (info_ptr->color_type == PNG_COLOR_TYPE_PALETTE)
|
||||
{
|
||||
if (trans_alpha != NULL)
|
||||
|
@ -1141,7 +1148,7 @@ png_get_tRNS(png_const_structrp png_ptr, png_inforp info_ptr,
|
|||
}
|
||||
}
|
||||
|
||||
return (retval);
|
||||
return retval;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -1156,7 +1163,7 @@ png_get_unknown_chunks(png_const_structrp png_ptr, png_inforp info_ptr,
|
|||
return info_ptr->unknown_chunks_num;
|
||||
}
|
||||
|
||||
return (0);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -1252,7 +1259,7 @@ png_get_palette_max(png_const_structp png_ptr, png_const_infop info_ptr)
|
|||
if (png_ptr != NULL && info_ptr != NULL)
|
||||
return png_ptr->num_palette_max;
|
||||
|
||||
return (-1);
|
||||
return -1;
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue