Skip to content
This repository has been archived by the owner on Nov 14, 2024. It is now read-only.

git subrepo pull (merge) --force godot #201

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion godot/.github/workflows/linux_builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ jobs:
# TODO: Figure out somehow how to embed this one.
- name: wayland-scanner dependency
run: |
sudo apt-get install libwayland-bin
sudo apt-get install libwayland-bin libegl-dev

- name: Free disk space on runner
run: |
Expand Down
4 changes: 2 additions & 2 deletions godot/.gitrepo
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
[subrepo]
remote = https://github.com/V-Sekai/godot.git
branch = groups-staging-4.4
commit = 72728eab208b88681e4fe134e6803fd0c221338a
parent = 36f0f607371ee76888b532cf09ab705cfeca3267
commit = 718319725c5006aa8ff459139cf800411a7df2fa
parent = 750c80d93ae2ce070eb5695ecc8cf5d9d1edecaf
method = merge
cmdver = 0.4.6
2 changes: 1 addition & 1 deletion godot/COPYRIGHT.txt
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ License: Apache-2.0

Files: ./thirdparty/meshoptimizer/
Comment: meshoptimizer
Copyright: 2016-2023, Arseny Kapoulkine
Copyright: 2016-2024, Arseny Kapoulkine
License: Expat

Files: ./thirdparty/mingw-std-threads/
Expand Down
6 changes: 6 additions & 0 deletions godot/core/config/engine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,12 @@ bool Engine::is_extra_gpu_memory_tracking_enabled() const {
return extra_gpu_memory_tracking;
}

#if defined(DEBUG_ENABLED) || defined(DEV_ENABLED)
bool Engine::is_accurate_breadcrumbs_enabled() const {
return accurate_breadcrumbs;
}
#endif

void Engine::set_print_to_stdout(bool p_enabled) {
CoreGlobals::print_line_enabled = p_enabled;
}
Expand Down
6 changes: 6 additions & 0 deletions godot/core/config/engine.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ class Engine {
bool use_validation_layers = false;
bool generate_spirv_debug_info = false;
bool extra_gpu_memory_tracking = false;
#if defined(DEBUG_ENABLED) || defined(DEV_ENABLED)
bool accurate_breadcrumbs = false;
#endif
int32_t gpu_idx = -1;

uint64_t _process_frames = 0;
Expand Down Expand Up @@ -186,6 +189,9 @@ class Engine {
bool is_validation_layers_enabled() const;
bool is_generate_spirv_debug_info_enabled() const;
bool is_extra_gpu_memory_tracking_enabled() const;
#if defined(DEBUG_ENABLED) || defined(DEV_ENABLED)
bool is_accurate_breadcrumbs_enabled() const;
#endif
int32_t get_gpu_index() const;

void increment_frames_drawn();
Expand Down
15 changes: 15 additions & 0 deletions godot/core/core_bind.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -934,6 +934,19 @@ Dictionary Geometry2D::make_atlas(const Vector<Size2> &p_rects) {
return ret;
}

TypedArray<Point2i> Geometry2D::bresenham_line(const Point2i &p_from, const Point2i &p_to) {
Vector<Point2i> points = ::Geometry2D::bresenham_line(p_from, p_to);

TypedArray<Point2i> result;
result.resize(points.size());

for (int i = 0; i < points.size(); i++) {
result[i] = points[i];
}

return result;
}

void Geometry2D::_bind_methods() {
ClassDB::bind_method(D_METHOD("is_point_in_circle", "point", "circle_position", "circle_radius"), &Geometry2D::is_point_in_circle);
ClassDB::bind_method(D_METHOD("segment_intersects_circle", "segment_from", "segment_to", "circle_position", "circle_radius"), &Geometry2D::segment_intersects_circle);
Expand Down Expand Up @@ -968,6 +981,8 @@ void Geometry2D::_bind_methods() {

ClassDB::bind_method(D_METHOD("make_atlas", "sizes"), &Geometry2D::make_atlas);

ClassDB::bind_method(D_METHOD("bresenham_line", "from", "to"), &Geometry2D::bresenham_line);

BIND_ENUM_CONSTANT(OPERATION_UNION);
BIND_ENUM_CONSTANT(OPERATION_DIFFERENCE);
BIND_ENUM_CONSTANT(OPERATION_INTERSECTION);
Expand Down
2 changes: 2 additions & 0 deletions godot/core/core_bind.h
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,8 @@ class Geometry2D : public Object {

Dictionary make_atlas(const Vector<Size2> &p_rects);

TypedArray<Point2i> bresenham_line(const Point2i &p_from, const Point2i &p_to);

Geometry2D() { singleton = this; }
};

Expand Down
22 changes: 22 additions & 0 deletions godot/core/error/error_macros.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,28 @@ void _err_print_error(const char *p_function, const char *p_file, int p_line, co
_global_unlock();
}

// For printing errors when we may crash at any point, so we must flush ASAP a lot of lines
// but we don't want to make it noisy by printing lots of file & line info (because it's already
// been printing by a preceding _err_print_error).
void _err_print_error_asap(const String &p_error, ErrorHandlerType p_type) {
if (OS::get_singleton()) {
OS::get_singleton()->printerr("ERROR: %s\n", p_error.utf8().get_data());
} else {
// Fallback if errors happen before OS init or after it's destroyed.
const char *err_details = p_error.utf8().get_data();
fprintf(stderr, "ERROR: %s\n", err_details);
}

_global_lock();
ErrorHandlerList *l = error_handler_list;
while (l) {
l->errfunc(l->userdata, "", "", 0, p_error.utf8().get_data(), "", false, p_type);
l = l->next;
}

_global_unlock();
}

// Errors with message. (All combinations of p_error and p_message as String or char*.)
void _err_print_error(const char *p_function, const char *p_file, int p_line, const String &p_error, const char *p_message, bool p_editor_notify, ErrorHandlerType p_type) {
_err_print_error(p_function, p_file, p_line, p_error.utf8().get_data(), p_message, p_editor_notify, p_type);
Expand Down
1 change: 1 addition & 0 deletions godot/core/error/error_macros.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ void _err_print_error(const char *p_function, const char *p_file, int p_line, co
void _err_print_error(const char *p_function, const char *p_file, int p_line, const String &p_error, const char *p_message, bool p_editor_notify = false, ErrorHandlerType p_type = ERR_HANDLER_ERROR);
void _err_print_error(const char *p_function, const char *p_file, int p_line, const char *p_error, const String &p_message, bool p_editor_notify = false, ErrorHandlerType p_type = ERR_HANDLER_ERROR);
void _err_print_error(const char *p_function, const char *p_file, int p_line, const String &p_error, const String &p_message, bool p_editor_notify = false, ErrorHandlerType p_type = ERR_HANDLER_ERROR);
void _err_print_error_asap(const String &p_error, ErrorHandlerType p_type = ERR_HANDLER_ERROR);
void _err_print_index_error(const char *p_function, const char *p_file, int p_line, int64_t p_index, int64_t p_size, const char *p_index_str, const char *p_size_str, const char *p_message = "", bool p_editor_notify = false, bool fatal = false);
void _err_print_index_error(const char *p_function, const char *p_file, int p_line, int64_t p_index, int64_t p_size, const char *p_index_str, const char *p_size_str, const String &p_message, bool p_editor_notify = false, bool fatal = false);
void _err_flush_stdout();
Expand Down
12 changes: 6 additions & 6 deletions godot/core/math/geometry_2d.h
Original file line number Diff line number Diff line change
Expand Up @@ -451,17 +451,17 @@ class Geometry2D {
return H;
}

static Vector<Point2i> bresenham_line(const Point2i &p_start, const Point2i &p_end) {
static Vector<Point2i> bresenham_line(const Point2i &p_from, const Point2i &p_to) {
Vector<Point2i> points;

Vector2i delta = (p_end - p_start).abs() * 2;
Vector2i step = (p_end - p_start).sign();
Vector2i current = p_start;
Vector2i delta = (p_to - p_from).abs() * 2;
Vector2i step = (p_to - p_from).sign();
Vector2i current = p_from;

if (delta.x > delta.y) {
int err = delta.x / 2;

for (; current.x != p_end.x; current.x += step.x) {
for (; current.x != p_to.x; current.x += step.x) {
points.push_back(current);

err -= delta.y;
Expand All @@ -473,7 +473,7 @@ class Geometry2D {
} else {
int err = delta.y / 2;

for (; current.y != p_end.y; current.y += step.y) {
for (; current.y != p_to.y; current.y += step.y) {
points.push_back(current);

err -= delta.x;
Expand Down
Loading
Loading