Compare commits

...

14 Commits

Author SHA1 Message Date
Rémi Verschelde
6c99b77a81 Fix GCC 14 -Wtemplate-id-cdtor warnings
Fixes #91206.

(cherry picked from commit a8ff47b6d6)
2024-04-26 12:07:19 +02:00
Rémi Verschelde
a0bf366068 SCons: Fix Python 3.12 SyntaxError with regex escape sequences
(cherry picked from commit b362976504)
(cherry picked from commit df0ebc6dfc)
2024-04-26 12:07:19 +02:00
Gilles Roudière
3196113206 Fix compilation on gcc13
(cherry picked from commit 41890ff9c3)
2024-04-26 12:07:19 +02:00
Rémi Verschelde
3d94d7436a CI: Pin Xcode version to 15.3, as default 15.0.1 is broken
Not needed in later Godot branches as we merged workarounds for the 15.0/15.0.1
broken linker, but there's too many commits to track down and backport with
care to avoid breaking Xcode 14 support too.
2024-04-25 16:40:38 +02:00
A Thousand Ships
1d979a9e95 [CI] [macOS] Build for both arm64 and x86_64
Creates a universal build, to catch discrepancies on different
architectures

(cherry picked from commit 24ad73b13f)
2024-04-25 14:43:28 +02:00
Pedro J. Estébanez
7d966c9f5e Fix warning in MSVC
(cherry picked from commit fe8c217b7c)
2024-03-10 21:02:10 +01:00
AlexOtsuka
cd118f80c6 Fix audio crackling issues due to incorrect WASAPI buffer size
(cherry picked from commit 179b0786c6)
2024-03-10 00:20:27 +01:00
MrBBBaiXue
60867e63be Delete .lgtm.yml
LGTM has been acquired by Github, and all its features is replaced by Github Code Scanning.
So seems .lgtm.yml is no longer used.

(cherry picked from commit ee6cec1649)
2024-01-23 12:43:31 +01:00
bruvzg
7b55630c90 [macOS] Fix MoltenVK SDK detection after file location changes in 1.3.275.0.
(cherry picked from commit a2c1c01941)
2024-01-18 10:48:27 +01:00
Rémi Verschelde
1088dd5c33 Bump version to 4.0.5-rc
We don't necessarily plan a 4.0.5 release at this stage, but might still do
some cherrypicks for critical issues.
2023-10-25 14:27:02 +02:00
Rémi Verschelde
dc0e9a7779 Merge pull request #81246 from AThousandShips/future_proof_4_0
[4.0] Future proof links in docs
2023-09-06 18:44:46 +02:00
A Thousand Ships
6a7e8fe367 Future proof links in docs 2023-09-02 10:53:16 +02:00
Rémi Verschelde
455aa77d6e Merge pull request #80496 from sk757a/4.0
[4.0] Fix tween_cheatsheet 404 in Tween.xml
2023-08-18 09:27:02 +02:00
sk757a
59bd0ea48e Fix tween_cheatsheet 404 in Tween.xml
Co-Authored-By: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com>
2023-08-14 23:41:45 +05:00
23 changed files with 84 additions and 55 deletions

View File

@@ -24,7 +24,7 @@ jobs:
cache-name: macos-editor
target: editor
tests: true
bin: "./bin/godot.macos.editor.x86_64"
bin: "./bin/godot.macos.editor.universal"
- name: Template (target=template_release)
cache-name: macos-template
@@ -35,6 +35,11 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Setup Xcode
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: '15.3'
- name: Setup Godot build cache
uses: ./.github/actions/godot-cache
with:
@@ -48,16 +53,26 @@ jobs:
run: |
sh misc/scripts/install_vulkan_sdk_macos.sh
- name: Compilation
- name: Compilation (x86_64)
uses: ./.github/actions/godot-build
with:
sconsflags: ${{ env.SCONSFLAGS }}
sconsflags: ${{ env.SCONSFLAGS }} arch=x86_64
platform: macos
target: ${{ matrix.target }}
tests: ${{ matrix.tests }}
- name: Compilation (arm64)
uses: ./.github/actions/godot-build
with:
sconsflags: ${{ env.SCONSFLAGS }} arch=arm64
platform: macos
target: ${{ matrix.target }}
tests: ${{ matrix.tests }}
- name: Prepare artifact
run: |
lipo -create ./bin/godot.macos.${{ matrix.target }}.x86_64 ./bin/godot.macos.${{ matrix.target }}.arm64 -output ./bin/godot.macos.${{ matrix.target }}.universal
rm ./bin/godot.macos.${{ matrix.target }}.x86_64 ./bin/godot.macos.${{ matrix.target }}.arm64
strip bin/godot.*
chmod +x bin/godot.*

View File

@@ -1,7 +0,0 @@
extraction:
cpp:
after_prepare:
- pip3 install scons
- PATH="/opt/work/.local/bin:$PATH"
index:
build_command: scons -j2

View File

@@ -211,10 +211,10 @@ public:
size_mask = mask;
}
RingBuffer<T>(int p_power = 0) {
RingBuffer(int p_power = 0) {
resize(p_power);
}
~RingBuffer<T>() {}
~RingBuffer() {}
};
#endif // RING_BUFFER_H

View File

@@ -132,7 +132,7 @@ public:
}
}
_ALWAYS_INLINE_ explicit SafeNumeric<T>(T p_value = static_cast<T>(0)) {
_ALWAYS_INLINE_ explicit SafeNumeric(T p_value = static_cast<T>(0)) {
set(p_value);
}
};

View File

@@ -341,7 +341,7 @@
- 1.0: Linear
- Greater than 1.0 (exclusive): Ease in
[/codeblock]
[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/ease_cheatsheet.png]ease() curve values cheatsheet[/url]
[url=https://raw.githubusercontent.com/godotengine/godot-docs/4.0/img/ease_cheatsheet.png]ease() curve values cheatsheet[/url]
See also [method smoothstep]. If you need to perform more advanced transitions, use [method Tween.interpolate_value].
</description>
</method>
@@ -1202,7 +1202,7 @@
smoothstep(0, 2, 2.0) # Returns 1.0
[/codeblock]
Compared to [method ease] with a curve value of [code]-1.6521[/code], [method smoothstep] returns the smoothest possible curve with no sudden changes in the derivative. If you need to perform more advanced transitions, use [Tween] or [AnimationPlayer].
[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/smoothstep_ease_comparison.png]Comparison between smoothstep() and ease(x, -1.6521) return values[/url]
[url=https://raw.githubusercontent.com/godotengine/godot-docs/4.0/img/smoothstep_ease_comparison.png]Comparison between smoothstep() and ease(x, -1.6521) return values[/url]
</description>
</method>
<method name="snapped">

View File

@@ -52,7 +52,7 @@
<return type="bool" />
<param index="0" name="world_point" type="Vector3" />
<description>
Returns [code]true[/code] if the given position is behind the camera (the blue part of the linked diagram). [url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/camera3d_position_frustum.png]See this diagram[/url] for an overview of position query methods.
Returns [code]true[/code] if the given position is behind the camera (the blue part of the linked diagram). [url=https://raw.githubusercontent.com/godotengine/godot-docs/4.0/img/camera3d_position_frustum.png]See this diagram[/url] for an overview of position query methods.
[b]Note:[/b] A position which returns [code]false[/code] may still be outside the camera's field of view.
</description>
</method>
@@ -60,7 +60,7 @@
<return type="bool" />
<param index="0" name="world_point" type="Vector3" />
<description>
Returns [code]true[/code] if the given position is inside the camera's frustum (the green part of the linked diagram). [url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/camera3d_position_frustum.png]See this diagram[/url] for an overview of position query methods.
Returns [code]true[/code] if the given position is inside the camera's frustum (the green part of the linked diagram). [url=https://raw.githubusercontent.com/godotengine/godot-docs/4.0/img/camera3d_position_frustum.png]See this diagram[/url] for an overview of position query methods.
</description>
</method>
<method name="make_current">

View File

@@ -7,7 +7,7 @@
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.
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/master/img/color_constants.png]Color constants cheatsheet[/url]
[url=https://raw.githubusercontent.com/godotengine/godot-docs/4.0/img/color_constants.png]Color constants cheatsheet[/url]
</description>
<tutorials>
<link title="2D GD Paint Demo">https://godotengine.org/asset-library/asset/517</link>

View File

@@ -23,7 +23,7 @@
<param index="0" name="point" type="Vector2" />
<description>
Returns the angle between the node and the [param point] in radians.
[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/node2d_get_angle_to.png]Illustration of the returned angle.[/url]
[url=https://raw.githubusercontent.com/godotengine/godot-docs/4.0/img/node2d_get_angle_to.png]Illustration of the returned angle.[/url]
</description>
</method>
<method name="get_relative_transform_to_parent" qualifiers="const">

View File

@@ -88,7 +88,7 @@
[/csharp]
[/codeblocks]
Some [Tweener]s use transitions and eases. The first accepts a [enum TransitionType] constant, and refers to the way the timing of the animation is handled (see [url=https://easings.net/]easings.net[/url] for some examples). The second accepts an [enum EaseType] constant, and controls where the [code]trans_type[/code] is applied to the interpolation (in the beginning, the end, or both). If you don't know which transition and easing to pick, you can try different [enum TransitionType] constants with [constant EASE_IN_OUT], and use the one that looks best.
[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/tween_cheatsheet.png]Tween easing and transition types cheatsheet[/url]
[url=https://raw.githubusercontent.com/godotengine/godot-docs/4.0/img/tween_cheatsheet.png]Tween easing and transition types cheatsheet[/url]
[b]Note:[/b] Tweens are not designed to be re-used and trying to do so results in an undefined behavior. Create a new Tween for each animation and every time you replay an animation from start. Keep in mind that Tweens start immediately, so only create a Tween when you want to start animating.
[b]Note:[/b] Tweens are processing after all of nodes in the current frame, i.e. after [method Node._process] or [method Node._physics_process] (depending on [enum TweenProcessMode]).
</description>

View File

@@ -59,7 +59,7 @@
<description>
Returns this vector's angle with respect to the positive X axis, or [code](1, 0)[/code] vector, in radians.
For example, [code]Vector2.RIGHT.angle()[/code] will return zero, [code]Vector2.DOWN.angle()[/code] will return [code]PI / 2[/code] (a quarter turn, or 90 degrees), and [code]Vector2(1, -1).angle()[/code] will return [code]-PI / 4[/code] (a negative eighth turn, or -45 degrees).
[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/vector2_angle.png]Illustration of the returned angle.[/url]
[url=https://raw.githubusercontent.com/godotengine/godot-docs/4.0/img/vector2_angle.png]Illustration of the returned angle.[/url]
Equivalent to the result of [method @GlobalScope.atan2] when called with the vector's [member y] and [member x] as parameters: [code]atan2(y, x)[/code].
</description>
</method>
@@ -68,7 +68,7 @@
<param index="0" name="to" type="Vector2" />
<description>
Returns the angle to the given vector, in radians.
[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/vector2_angle_to.png]Illustration of the returned angle.[/url]
[url=https://raw.githubusercontent.com/godotengine/godot-docs/4.0/img/vector2_angle_to.png]Illustration of the returned angle.[/url]
</description>
</method>
<method name="angle_to_point" qualifiers="const">
@@ -77,7 +77,7 @@
<description>
Returns the angle between the line connecting the two points and the X axis, in radians.
[code]a.angle_to_point(b)[/code] is equivalent of doing [code](b - a).angle()[/code].
[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/vector2_angle_to_point.png]Illustration of the returned angle.[/url]
[url=https://raw.githubusercontent.com/godotengine/godot-docs/4.0/img/vector2_angle_to_point.png]Illustration of the returned angle.[/url]
</description>
</method>
<method name="aspect" qualifiers="const">

View File

@@ -739,12 +739,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);

View File

@@ -3645,8 +3645,9 @@ void EditorInspector::_edit_set(const String &p_name, const Variant &p_value, bo
Variant v_undo_redo = undo_redo;
Variant v_object = object;
Variant v_name = p_name;
for (int i = 0; i < EditorNode::get_singleton()->get_editor_data().get_undo_redo_inspector_hook_callback().size(); i++) {
const Callable &callback = EditorNode::get_singleton()->get_editor_data().get_undo_redo_inspector_hook_callback()[i];
const Vector<Callable> &callbacks = EditorNode::get_singleton()->get_editor_data().get_undo_redo_inspector_hook_callback();
for (int i = 0; i < callbacks.size(); i++) {
const Callable &callback = callbacks[i];
const Variant *p_arguments[] = { &v_undo_redo, &v_object, &v_name, &p_value };
Variant return_value;

View File

@@ -975,13 +975,13 @@ def get_compiler_version(env):
else: # TODO: Implement for MSVC
return None
match = re.search(
"(?:(?<=version )|(?<=\) )|(?<=^))"
"(?P<major>\d+)"
"(?:\.(?P<minor>\d*))?"
"(?:\.(?P<patch>\d*))?"
"(?:-(?P<metadata1>[0-9a-zA-Z-]*))?"
"(?:\+(?P<metadata2>[0-9a-zA-Z-]*))?"
"(?: (?P<date>[0-9]{8}|[0-9]{6})(?![0-9a-zA-Z]))?",
r"(?:(?<=version )|(?<=\) )|(?<=^))"
r"(?P<major>\d+)"
r"(?:\.(?P<minor>\d*))?"
r"(?:\.(?P<patch>\d*))?"
r"(?:-(?P<metadata1>[0-9a-zA-Z-]*))?"
r"(?:\+(?P<metadata2>[0-9a-zA-Z-]*))?"
r"(?: (?P<date>[0-9]{8}|[0-9]{6})(?![0-9a-zA-Z]))?",
version,
)
if match is not None:

View File

@@ -17,11 +17,11 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>4.0.4</string>
<string>4.0.5</string>
<key>CFBundleSignature</key>
<string>godot</string>
<key>CFBundleVersion</key>
<string>4.0.4</string>
<string>4.0.5</string>
<key>NSMicrophoneUsageDescription</key>
<string>Microphone access is required to capture audio.</string>
<key>NSCameraUsageDescription</key>

View File

@@ -1,5 +1,5 @@
#define MyAppName "Godot Engine"
#define MyAppVersion "4.0.4"
#define MyAppVersion "4.0.5"
#define MyAppPublisher "Godot Engine contributors"
#define MyAppURL "https://godotengine.org/"
#define MyAppExeName "godot.exe"

View File

@@ -294,7 +294,7 @@ void LightmapperRD::_create_acceleration_structures(RenderingDevice *rd, Size2i
for (int m_i = 0; m_i < mesh_instances.size(); m_i++) {
if (p_step_function) {
float p = float(m_i + 1) / mesh_instances.size() * 0.1;
float p = float(m_i + 1) / MAX(1, mesh_instances.size()) * 0.1;
p_step_function(0.3 + p, vformat(RTR("Plotting mesh into acceleration structure %d/%d"), m_i + 1, mesh_instances.size()), p_bake_userdata, false);
}

View File

@@ -7,7 +7,7 @@
<Authors>Godot Engine contributors</Authors>
<PackageId>Godot.NET.Sdk</PackageId>
<Version>4.0.4</Version>
<Version>4.0.5</Version>
<PackageVersion>$(PackageVersion_Godot_NET_Sdk)</PackageVersion>
<RepositoryUrl>https://github.com/godotengine/godot/tree/master/modules/mono/editor/Godot.NET.Sdk</RepositoryUrl>
<PackageProjectUrl>$(RepositoryUrl)</PackageProjectUrl>

View File

@@ -9,7 +9,7 @@
<Authors>Godot Engine contributors</Authors>
<PackageId>Godot.SourceGenerators</PackageId>
<Version>4.0.4</Version>
<Version>4.0.5</Version>
<PackageVersion>$(PackageVersion_Godot_SourceGenerators)</PackageVersion>
<RepositoryUrl>https://github.com/godotengine/godot/tree/master/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators</RepositoryUrl>
<PackageProjectUrl>$(RepositoryUrl)</PackageProjectUrl>

View File

@@ -20,7 +20,7 @@
<Authors>Godot Engine contributors</Authors>
<PackageId>GodotSharp</PackageId>
<Version>4.0.4</Version>
<Version>4.0.5</Version>
<PackageVersion>$(PackageVersion_GodotSharp)</PackageVersion>
<RepositoryUrl>https://github.com/godotengine/godot/tree/master/modules/mono/glue/GodotSharp/GodotSharp</RepositoryUrl>
<PackageProjectUrl>$(RepositoryUrl)</PackageProjectUrl>

View File

@@ -15,7 +15,7 @@
<Authors>Godot Engine contributors</Authors>
<PackageId>GodotSharpEditor</PackageId>
<Version>4.0.4</Version>
<Version>4.0.5</Version>
<PackageVersion>$(PackageVersion_GodotSharp)</PackageVersion>
<RepositoryUrl>https://github.com/godotengine/godot/tree/master/modules/mono/glue/GodotSharp/GodotSharpEditor</RepositoryUrl>
<PackageProjectUrl>$(RepositoryUrl)</PackageProjectUrl>

View File

@@ -442,7 +442,7 @@ def configure(env: "Environment"):
linker_version_str = subprocess.check_output(
[env.subst(env["LINK"]), "-Wl,--version"] + env.subst(env["LINKFLAGS"])
).decode("utf-8")
gnu_ld_version = re.search("^GNU ld [^$]*(\d+\.\d+)$", linker_version_str, re.MULTILINE)
gnu_ld_version = re.search(r"^GNU ld [^$]*(\d+\.\d+)$", linker_version_str, re.MULTILINE)
if not gnu_ld_version:
print(
"Warning: Creating export template binaries enabled for PCK embedding is currently only supported with GNU ld, not gold, LLD or mold."

View File

@@ -60,21 +60,30 @@ def get_mvk_sdk_path():
if not os.path.exists(dirname):
return ""
ver_file = "0.0.0.0"
ver_num = ver_parse(ver_file)
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)
lib_name = os.path.join(
os.path.join(dirname, file), "MoltenVK/MoltenVK.xcframework/macos-arm64_x86_64/libMoltenVK.a"
)
if os.path.isfile(lib_name) and ver_comp > ver_num:
ver_num = ver_comp
ver_file = file
if ver_comp > ver_num:
# Try new SDK location.
lib_name = os.path.join(
os.path.join(dirname, file), "macOS/lib/MoltenVK.xcframework/macos-arm64_x86_64/"
)
if os.path.isfile(os.path.join(lib_name, "libMoltenVK.a")):
ver_num = ver_comp
lib_name_out = lib_name
else:
# Try old SDK location.
lib_name = os.path.join(
os.path.join(dirname, file), "MoltenVK/MoltenVK.xcframework/macos-arm64_x86_64/"
)
if os.path.isfile(os.path.join(lib_name, "libMoltenVK.a")):
ver_num = ver_comp
lib_name_out = lib_name
return os.path.join(os.path.join(dirname, ver_file), "MoltenVK/MoltenVK.xcframework/macos-arm64_x86_64/")
return lib_name_out
def configure(env: "Environment"):
@@ -245,6 +254,12 @@ def configure(env: "Environment"):
mvk_list = [get_mvk_sdk_path(), "/opt/homebrew/lib", "/usr/local/homebrew/lib", "/opt/local/lib"]
if env["vulkan_sdk_path"] != "":
mvk_list.insert(0, os.path.expanduser(env["vulkan_sdk_path"]))
mvk_list.insert(
0,
os.path.join(
os.path.expanduser(env["vulkan_sdk_path"]), "macOS/lib/MoltenVK.xcframework/macos-arm64_x86_64/"
),
)
mvk_list.insert(
0,
os.path.join(

View File

@@ -2,8 +2,8 @@ short_name = "godot"
name = "Godot Engine"
major = 4
minor = 0
patch = 4
status = "stable"
patch = 5
status = "rc"
module_config = ""
year = 2023
website = "https://godotengine.org"