diff options
Diffstat (limited to 'scene/resources')
-rw-r--r-- | scene/resources/bit_mask.cpp | 6 | ||||
-rw-r--r-- | scene/resources/default_theme/default_theme.cpp | 6 | ||||
-rw-r--r-- | scene/resources/dynamic_font.cpp | 2 | ||||
-rw-r--r-- | scene/resources/tile_set.cpp | 2 | ||||
-rw-r--r-- | scene/resources/world.cpp | 4 |
5 files changed, 10 insertions, 10 deletions
diff --git a/scene/resources/bit_mask.cpp b/scene/resources/bit_mask.cpp index 029a9ef0e8..eebc872dfb 100644 --- a/scene/resources/bit_mask.cpp +++ b/scene/resources/bit_mask.cpp @@ -38,7 +38,7 @@ void BitMap::create(const Size2 &p_size) { width = p_size.width; height = p_size.height; bitmask.resize(((width * height) / 8) + 1); - zeromem(bitmask.ptr(), bitmask.size()); + zeromem(bitmask.ptrw(), bitmask.size()); } void BitMap::create_from_image_alpha(const Ref<Image> &p_image) { @@ -51,7 +51,7 @@ void BitMap::create_from_image_alpha(const Ref<Image> &p_image) { create(Size2(img->get_width(), img->get_height())); PoolVector<uint8_t>::Read r = img->get_data().read(); - uint8_t *w = bitmask.ptr(); + uint8_t *w = bitmask.ptrw(); for (int i = 0; i < width * height; i++) { @@ -65,7 +65,7 @@ void BitMap::create_from_image_alpha(const Ref<Image> &p_image) { void BitMap::set_bit_rect(const Rect2 &p_rect, bool p_value) { Rect2i current = Rect2i(0, 0, width, height).clip(p_rect); - uint8_t *data = bitmask.ptr(); + uint8_t *data = bitmask.ptrw(); for (int i = current.position.x; i < current.position.x + current.size.x; i++) { diff --git a/scene/resources/default_theme/default_theme.cpp b/scene/resources/default_theme/default_theme.cpp index cd28c9d203..36988e0c4c 100644 --- a/scene/resources/default_theme/default_theme.cpp +++ b/scene/resources/default_theme/default_theme.cpp @@ -310,7 +310,7 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const theme->set_stylebox("pressed", "OptionButton", sb_optbutton_pressed); theme->set_stylebox("hover", "OptionButton", sb_optbutton_hover); theme->set_stylebox("disabled", "OptionButton", sb_optbutton_disabled); - theme->set_stylebox("focus", "OptionButton", sb_button_focus); + theme->set_stylebox("focus", "OptionButton", sb_optbutton_focus); theme->set_icon("arrow", "OptionButton", make_icon(option_arrow_png)); @@ -328,8 +328,8 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const theme->set_stylebox("normal", "MenuButton", sb_button_normal); theme->set_stylebox("pressed", "MenuButton", sb_button_pressed); - theme->set_stylebox("hover", "MenuButton", sb_button_pressed); - theme->set_stylebox("disabled", "MenuButton", make_empty_stylebox(0, 0, 0, 0)); + theme->set_stylebox("hover", "MenuButton", sb_button_hover); + theme->set_stylebox("disabled", "MenuButton", sb_button_disabled); theme->set_stylebox("focus", "MenuButton", sb_button_focus); theme->set_font("font", "MenuButton", default_font); diff --git a/scene/resources/dynamic_font.cpp b/scene/resources/dynamic_font.cpp index 48c6add586..a40417f24d 100644 --- a/scene/resources/dynamic_font.cpp +++ b/scene/resources/dynamic_font.cpp @@ -125,7 +125,7 @@ Error DynamicFontAtSize::_load() { _fontdata[font->font_path] = Vector<uint8_t>(); Vector<uint8_t> &fontdata = _fontdata[font->font_path]; fontdata.resize(len); - f->get_buffer(fontdata.ptr(), len); + f->get_buffer(fontdata.ptrw(), len); font->set_font_ptr(fontdata.ptr(), len); f->close(); } diff --git a/scene/resources/tile_set.cpp b/scene/resources/tile_set.cpp index 657d5f6c80..6fab597d2b 100644 --- a/scene/resources/tile_set.cpp +++ b/scene/resources/tile_set.cpp @@ -913,7 +913,7 @@ void TileSet::_bind_methods() { ClassDB::bind_method(D_METHOD("tile_get_shape_transform", "id", "shape_id"), &TileSet::tile_get_shape_transform); ClassDB::bind_method(D_METHOD("tile_set_shape_one_way", "id", "shape_id", "one_way"), &TileSet::tile_set_shape_one_way); ClassDB::bind_method(D_METHOD("tile_get_shape_one_way", "id", "shape_id"), &TileSet::tile_get_shape_one_way); - ClassDB::bind_method(D_METHOD("tile_add_shape", "id", "shape", "shape_transform", "one_way"), &TileSet::tile_add_shape, DEFVAL(false)); + ClassDB::bind_method(D_METHOD("tile_add_shape", "id", "shape", "shape_transform", "one_way", "autotile_coord"), &TileSet::tile_add_shape, DEFVAL(false), DEFVAL(Vector2())); ClassDB::bind_method(D_METHOD("tile_get_shape_count", "id"), &TileSet::tile_get_shape_count); ClassDB::bind_method(D_METHOD("tile_set_shapes", "id", "shapes"), &TileSet::_tile_set_shapes); ClassDB::bind_method(D_METHOD("tile_get_shapes", "id"), &TileSet::_tile_get_shapes); diff --git a/scene/resources/world.cpp b/scene/resources/world.cpp index 86b32a5cdd..c63ba24cbd 100644 --- a/scene/resources/world.cpp +++ b/scene/resources/world.cpp @@ -159,9 +159,9 @@ struct SpatialIndexer { Vector<Plane> planes = c->get_frustum(); - int culled = octree.cull_convex(planes, cull.ptr(), cull.size()); + int culled = octree.cull_convex(planes, cull.ptrw(), cull.size()); - VisibilityNotifier **ptr = cull.ptr(); + VisibilityNotifier **ptr = cull.ptrw(); List<VisibilityNotifier *> added; List<VisibilityNotifier *> removed; |