Skip to content

Commit 1b1153a

Browse files
committed
resync with master @ 599320b
PROPERTY_HINT enum chaned, remove usage
1 parent b72985c commit 1b1153a

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

.github/workflows/all_builds.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ on:
2424
env:
2525
GODOT_BASE_BRANCH: master
2626
# Change the README too
27-
GODOT_MAIN_SYNC_REF: dc4b6165962536b53c4c1471fcf0be43c70e2335
27+
GODOT_MAIN_SYNC_REF: 5993209b2649c93b56789bfc243c5a6046ee77ce
2828
SCONSFLAGS: verbose=yes warnings=all werror=no module_text_server_fb_enabled=yes minizip=yes debug_symbols=no
2929
SCONSFLAGS_TEMPLATE: no_editor_splash=yes module_bmp_enabled=no module_camera_enabled=no module_cvtt_enabled=no module_mbedtls_enabled=no module_tga_enabled=no module_enet_enabled=no module_mobile_vr_enabled=no module_upnp_enabled=no module_noise_enabled=no module_websocket_enabled=no module_xatlas_unwrap_enabled=no module_squish_enabled=no use_static_cpp=yes builtin_freetype=yes builtin_libpng=yes builtin_zlib=yes builtin_libwebp=yes builtin_libogg=yes module_csg_enabled=yes module_gridmap_enabled=yes disable_3d=no
3030
SCONS_CACHE_MSVC_CONFIG: true

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ Rebuild Godot engine as described in https://docs.godotengine.org/en/latest/deve
7070

7171
### Requirements
7272

73-
Godot 4.0 (master branch) @ commit https://github.com/godotengine/godot/commit/dc4b6165962536b53c4c1471fcf0be43c70e2335
73+
Godot 4.0 (master branch) @ commit https://github.com/godotengine/godot/commit/5993209b2649c93b56789bfc243c5a6046ee77ce
7474
- Support for building on 3.x has been dropped and no new features are being pushed
7575
- Godot RE Tools still retains the ability to decompile 3.x and 2.x projects, however.
7676

compat/image_parser_v2.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ String ImageParserV2::image_v2_to_string(const Variant &r_v, bool is_pcfg) {
9191
return imgstr;
9292
}
9393

94-
Error ImageParserV2::write_image_v2_to_bin(Ref<FileAccess> f, const Variant &r_v, const PropertyHint p_hint) {
94+
Error ImageParserV2::write_image_v2_to_bin(Ref<FileAccess> f, const Variant &r_v, bool compress_lossless) {
9595
Ref<Image> val = r_v;
9696
if (val.is_null() || val->is_empty()) {
9797
f->store_32(V2Image::IMAGE_ENCODING_EMPTY);
@@ -103,13 +103,13 @@ Error ImageParserV2::write_image_v2_to_bin(Ref<FileAccess> f, const Variant &r_v
103103

104104
if (val->get_format() <= Image::FORMAT_RGB565) {
105105
// can only compress uncompressed stuff
106-
if (p_hint == PROPERTY_HINT_IMAGE_COMPRESS_LOSSLESS && Image::png_packer) {
106+
if (compress_lossless && Image::png_packer) {
107107
encoding = V2Image::IMAGE_ENCODING_LOSSLESS;
108108
}
109109
// We do not want to resave the image as lossy because of:
110110
// 1) We lose fidelity from the original asset if we do
111111
// 2) V4 encoding is incompatible with V2 and V3
112-
else if (p_hint == PROPERTY_HINT_IMAGE_COMPRESS_LOSSY && Image::png_packer) {
112+
else if (compress_lossless && Image::png_packer) {
113113
encoding = V2Image::IMAGE_ENCODING_LOSSLESS;
114114
}
115115
}

compat/image_parser_v2.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class ImageParserV2 {
1515
static Error parse_image_construct_v2(VariantParser::Stream *f, Variant &r_v, bool convert_indexed, int &line, String &p_err_str);
1616

1717
static Error decode_image_v2(Ref<FileAccess> f, Variant &r_v, bool convert_indexed = false);
18-
static Error write_image_v2_to_bin(Ref<FileAccess> f, const Variant &r_v, const PropertyHint p_hint);
18+
static Error write_image_v2_to_bin(Ref<FileAccess> f, const Variant &r_v, bool compress_lossless = true);
1919
};
2020

2121
#endif // IMAGE_PARSER_V2_H

compat/resource_loader_compat.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2046,7 +2046,7 @@ Error ResourceLoaderCompat::write_variant_bin(Ref<FileAccess> fa, const Variant
20462046
if (ver_format_bin == 1 && res->is_class("Image")) {
20472047
fa->store_32(VariantBin::VARIANT_IMAGE);
20482048
// storing lossless compressed by default
2049-
ImageParserV2::write_image_v2_to_bin(fa, p_property, PROPERTY_HINT_IMAGE_COMPRESS_LOSSLESS);
2049+
ImageParserV2::write_image_v2_to_bin(fa, p_property, true);
20502050
} else {
20512051
fa->store_32(VariantBin::VARIANT_OBJECT);
20522052
if (res.is_null()) {

0 commit comments

Comments
 (0)