1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-18 14:21:41 +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:
Juan Linietsky
2020-02-17 18:06:54 -03:00
committed by Juan Linietsky
parent fb8c93c10b
commit 3205a92ad8
406 changed files with 5314 additions and 8271 deletions

View File

@@ -191,8 +191,8 @@ void Particles2DEditorPlugin::_generate_emission_mask() {
int vpc = 0;
{
PoolVector<uint8_t> data = img->get_data();
PoolVector<uint8_t>::Read r = data.read();
Vector<uint8_t> data = img->get_data();
const uint8_t *r = data.ptr();
for (int i = 0; i < s.width; i++) {
for (int j = 0; j < s.height; j++) {
@@ -270,7 +270,7 @@ void Particles2DEditorPlugin::_generate_emission_mask() {
ERR_FAIL_COND_MSG(valid_positions.size() == 0, "No pixels with transparency > 128 in image...");
PoolVector<uint8_t> texdata;
Vector<uint8_t> texdata;
int w = 2048;
int h = (vpc / 2048) + 1;
@@ -278,8 +278,8 @@ void Particles2DEditorPlugin::_generate_emission_mask() {
texdata.resize(w * h * 2 * sizeof(float));
{
PoolVector<uint8_t>::Write tw = texdata.write();
float *twf = (float *)tw.ptr();
uint8_t *tw = texdata.ptrw();
float *twf = (float *)tw;
for (int i = 0; i < vpc; i++) {
twf[i * 2 + 0] = valid_positions[i].x;
@@ -299,11 +299,11 @@ void Particles2DEditorPlugin::_generate_emission_mask() {
if (capture_colors) {
PoolVector<uint8_t> colordata;
Vector<uint8_t> colordata;
colordata.resize(w * h * 4); //use RG texture
{
PoolVector<uint8_t>::Write tw = colordata.write();
uint8_t *tw = colordata.ptrw();
for (int i = 0; i < vpc * 4; i++) {
tw[i] = valid_colors[i];
@@ -321,12 +321,12 @@ void Particles2DEditorPlugin::_generate_emission_mask() {
if (valid_normals.size()) {
pm->set_emission_shape(ParticlesMaterial::EMISSION_SHAPE_DIRECTED_POINTS);
PoolVector<uint8_t> normdata;
Vector<uint8_t> normdata;
normdata.resize(w * h * 2 * sizeof(float)); //use RG texture
{
PoolVector<uint8_t>::Write tw = normdata.write();
float *twf = (float *)tw.ptr();
uint8_t *tw = normdata.ptrw();
float *twf = (float *)tw;
for (int i = 0; i < vpc; i++) {
twf[i * 2 + 0] = valid_normals[i].x;
twf[i * 2 + 1] = valid_normals[i].y;