You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-22 15:06:45 +00:00
PoolVector is gone, replaced by Vector
Typed `PoolTypeArray` types are now renamed `PackedTypeArray` and are sugar for `Vector<Type>`.
This commit is contained in:
committed by
Juan Linietsky
parent
fb8c93c10b
commit
3205a92ad8
@@ -37,13 +37,13 @@ void image_decompress_squish(Image *p_image) {
|
||||
int h = p_image->get_height();
|
||||
|
||||
Image::Format target_format = Image::FORMAT_RGBA8;
|
||||
PoolVector<uint8_t> data;
|
||||
Vector<uint8_t> data;
|
||||
int target_size = Image::get_image_data_size(w, h, target_format, p_image->has_mipmaps());
|
||||
int mm_count = p_image->get_mipmap_count();
|
||||
data.resize(target_size);
|
||||
|
||||
PoolVector<uint8_t>::Read rb = p_image->get_data().read();
|
||||
PoolVector<uint8_t>::Write wb = data.write();
|
||||
const uint8_t *rb = p_image->get_data().ptr();
|
||||
uint8_t *wb = data.ptrw();
|
||||
|
||||
int squish_flags = Image::FORMAT_MAX;
|
||||
if (p_image->get_format() == Image::FORMAT_DXT1) {
|
||||
@@ -137,14 +137,14 @@ void image_compress_squish(Image *p_image, float p_lossy_quality, Image::UsedCha
|
||||
}
|
||||
}
|
||||
|
||||
PoolVector<uint8_t> data;
|
||||
Vector<uint8_t> data;
|
||||
int target_size = Image::get_image_data_size(w, h, target_format, p_image->has_mipmaps());
|
||||
int mm_count = p_image->has_mipmaps() ? Image::get_image_required_mipmaps(w, h, target_format) : 0;
|
||||
data.resize(target_size);
|
||||
int shift = Image::get_format_pixel_rshift(target_format);
|
||||
|
||||
PoolVector<uint8_t>::Read rb = p_image->get_data().read();
|
||||
PoolVector<uint8_t>::Write wb = data.write();
|
||||
const uint8_t *rb = p_image->get_data().ptr();
|
||||
uint8_t *wb = data.ptrw();
|
||||
|
||||
int dst_ofs = 0;
|
||||
|
||||
@@ -160,9 +160,6 @@ void image_compress_squish(Image *p_image, float p_lossy_quality, Image::UsedCha
|
||||
h = MAX(h / 2, 1);
|
||||
}
|
||||
|
||||
rb.release();
|
||||
wb.release();
|
||||
|
||||
p_image->create(p_image->get_width(), p_image->get_height(), p_image->has_mipmaps(), target_format, data);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user