2023-05-23 19:01:39 +02:00
|
|
|
/*************************************************************************/
|
|
|
|
/* PoolArrays.cpp */
|
|
|
|
/*************************************************************************/
|
|
|
|
/* This file is part of: */
|
2023-10-23 14:07:57 +02:00
|
|
|
/* PANDEMONIUM ENGINE */
|
|
|
|
/* https://pandemoniumengine.org */
|
2023-05-23 19:01:39 +02:00
|
|
|
/*************************************************************************/
|
|
|
|
/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
|
2023-10-23 14:07:57 +02:00
|
|
|
/* Copyright (c) 2014-2022 Pandemonium Engine contributors (cf. AUTHORS.md). */
|
2023-05-23 19:01:39 +02:00
|
|
|
/* */
|
|
|
|
/* Permission is hereby granted, free of charge, to any person obtaining */
|
|
|
|
/* a copy of this software and associated documentation files (the */
|
|
|
|
/* "Software"), to deal in the Software without restriction, including */
|
|
|
|
/* without limitation the rights to use, copy, modify, merge, publish, */
|
|
|
|
/* distribute, sublicense, and/or sell copies of the Software, and to */
|
|
|
|
/* permit persons to whom the Software is furnished to do so, subject to */
|
|
|
|
/* the following conditions: */
|
|
|
|
/* */
|
|
|
|
/* The above copyright notice and this permission notice shall be */
|
|
|
|
/* included in all copies or substantial portions of the Software. */
|
|
|
|
/* */
|
|
|
|
/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
|
|
|
|
/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
|
|
|
|
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
|
|
|
|
/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
|
|
|
|
/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
|
|
|
|
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
|
|
|
|
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
|
|
|
/*************************************************************************/
|
|
|
|
|
2023-10-23 14:41:55 +02:00
|
|
|
#include "pool_arrays.h"
|
|
|
|
#include "color.h"
|
|
|
|
#include "defs.h"
|
|
|
|
#include "pandemonium_global.h"
|
|
|
|
#include "ustring.h"
|
|
|
|
#include "vector2.h"
|
|
|
|
#include "vector2i.h"
|
|
|
|
#include "vector3.h"
|
2023-05-23 19:01:39 +02:00
|
|
|
|
2023-05-31 13:28:14 +02:00
|
|
|
#include <gdn/pool_arrays.h>
|
2023-05-23 19:01:39 +02:00
|
|
|
|
2023-10-23 17:11:10 +02:00
|
|
|
|
2023-05-23 19:01:39 +02:00
|
|
|
|
|
|
|
PoolByteArray::PoolByteArray() {
|
2023-10-23 17:11:10 +02:00
|
|
|
Pandemonium::api->pandemonium_pool_byte_array_new(&_pandemonium_array);
|
2023-05-23 19:01:39 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
PoolByteArray::PoolByteArray(const PoolByteArray &p_other) {
|
2023-10-23 17:11:10 +02:00
|
|
|
Pandemonium::api->pandemonium_pool_byte_array_new_copy(&_pandemonium_array, &p_other._pandemonium_array);
|
2023-05-23 19:01:39 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
PoolByteArray &PoolByteArray::operator=(const PoolByteArray &p_other) {
|
2023-10-23 17:11:10 +02:00
|
|
|
Pandemonium::api->pandemonium_pool_byte_array_destroy(&_pandemonium_array);
|
|
|
|
Pandemonium::api->pandemonium_pool_byte_array_new_copy(&_pandemonium_array, &p_other._pandemonium_array);
|
2023-05-23 19:01:39 +02:00
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
|
|
|
|
PoolByteArray::PoolByteArray(const Array &array) {
|
2023-10-23 17:11:10 +02:00
|
|
|
Pandemonium::api->pandemonium_pool_byte_array_new_with_array(&_pandemonium_array, (pandemonium_array *)&array);
|
2023-05-23 19:01:39 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
PoolByteArray::Read PoolByteArray::read() const {
|
|
|
|
Read read;
|
2023-10-23 17:11:10 +02:00
|
|
|
read._read_access = Pandemonium::api->pandemonium_pool_byte_array_read(&_pandemonium_array);
|
2023-05-23 19:01:39 +02:00
|
|
|
return read;
|
|
|
|
}
|
|
|
|
|
|
|
|
PoolByteArray::Write PoolByteArray::write() {
|
|
|
|
Write write;
|
2023-10-23 17:11:10 +02:00
|
|
|
write._write_access = Pandemonium::api->pandemonium_pool_byte_array_write(&_pandemonium_array);
|
2023-05-23 19:01:39 +02:00
|
|
|
return write;
|
|
|
|
}
|
|
|
|
|
|
|
|
void PoolByteArray::append(const uint8_t data) {
|
2023-10-23 17:11:10 +02:00
|
|
|
Pandemonium::api->pandemonium_pool_byte_array_append(&_pandemonium_array, data);
|
2023-05-23 19:01:39 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void PoolByteArray::append_array(const PoolByteArray &array) {
|
2023-10-23 17:11:10 +02:00
|
|
|
Pandemonium::api->pandemonium_pool_byte_array_append_array(&_pandemonium_array, &array._pandemonium_array);
|
2023-05-23 19:01:39 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
int PoolByteArray::insert(const int idx, const uint8_t data) {
|
2023-10-23 17:11:10 +02:00
|
|
|
return Pandemonium::api->pandemonium_pool_byte_array_insert(&_pandemonium_array, idx, data);
|
2023-05-23 19:01:39 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void PoolByteArray::invert() {
|
2023-10-23 17:11:10 +02:00
|
|
|
Pandemonium::api->pandemonium_pool_byte_array_invert(&_pandemonium_array);
|
2023-05-23 19:01:39 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void PoolByteArray::push_back(const uint8_t data) {
|
2023-10-23 17:11:10 +02:00
|
|
|
Pandemonium::api->pandemonium_pool_byte_array_push_back(&_pandemonium_array, data);
|
2023-05-23 19:01:39 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void PoolByteArray::remove(const int idx) {
|
2023-10-23 17:11:10 +02:00
|
|
|
Pandemonium::api->pandemonium_pool_byte_array_remove(&_pandemonium_array, idx);
|
2023-05-23 19:01:39 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void PoolByteArray::resize(const int size) {
|
2023-10-23 17:11:10 +02:00
|
|
|
Pandemonium::api->pandemonium_pool_byte_array_resize(&_pandemonium_array, size);
|
2023-05-23 19:01:39 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void PoolByteArray::set(const int idx, const uint8_t data) {
|
2023-10-23 17:11:10 +02:00
|
|
|
Pandemonium::api->pandemonium_pool_byte_array_set(&_pandemonium_array, idx, data);
|
2023-05-23 19:01:39 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
uint8_t PoolByteArray::operator[](const int idx) {
|
2023-10-23 17:11:10 +02:00
|
|
|
return Pandemonium::api->pandemonium_pool_byte_array_get(&_pandemonium_array, idx);
|
2023-05-23 19:01:39 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
int PoolByteArray::size() const {
|
2023-10-23 17:11:10 +02:00
|
|
|
return Pandemonium::api->pandemonium_pool_byte_array_size(&_pandemonium_array);
|
2023-05-23 19:01:39 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
PoolByteArray::~PoolByteArray() {
|
2023-10-23 17:11:10 +02:00
|
|
|
Pandemonium::api->pandemonium_pool_byte_array_destroy(&_pandemonium_array);
|
2023-05-23 19:01:39 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
PoolIntArray::PoolIntArray() {
|
2023-10-23 17:11:10 +02:00
|
|
|
Pandemonium::api->pandemonium_pool_int_array_new(&_pandemonium_array);
|
2023-05-23 19:01:39 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
PoolIntArray::PoolIntArray(const PoolIntArray &p_other) {
|
2023-10-23 17:11:10 +02:00
|
|
|
Pandemonium::api->pandemonium_pool_int_array_new_copy(&_pandemonium_array, &p_other._pandemonium_array);
|
2023-05-23 19:01:39 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
PoolIntArray &PoolIntArray::operator=(const PoolIntArray &p_other) {
|
2023-10-23 17:11:10 +02:00
|
|
|
Pandemonium::api->pandemonium_pool_int_array_destroy(&_pandemonium_array);
|
|
|
|
Pandemonium::api->pandemonium_pool_int_array_new_copy(&_pandemonium_array, &p_other._pandemonium_array);
|
2023-05-23 19:01:39 +02:00
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
|
|
|
|
PoolIntArray::PoolIntArray(const Array &array) {
|
2023-10-23 17:11:10 +02:00
|
|
|
Pandemonium::api->pandemonium_pool_int_array_new_with_array(&_pandemonium_array, (pandemonium_array *)&array);
|
2023-05-23 19:01:39 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
PoolIntArray::Read PoolIntArray::read() const {
|
|
|
|
Read read;
|
2023-10-23 17:11:10 +02:00
|
|
|
read._read_access = Pandemonium::api->pandemonium_pool_int_array_read(&_pandemonium_array);
|
2023-05-23 19:01:39 +02:00
|
|
|
return read;
|
|
|
|
}
|
|
|
|
|
|
|
|
PoolIntArray::Write PoolIntArray::write() {
|
|
|
|
Write write;
|
2023-10-23 17:11:10 +02:00
|
|
|
write._write_access = Pandemonium::api->pandemonium_pool_int_array_write(&_pandemonium_array);
|
2023-05-23 19:01:39 +02:00
|
|
|
return write;
|
|
|
|
}
|
|
|
|
|
|
|
|
void PoolIntArray::append(const int data) {
|
2023-10-23 17:11:10 +02:00
|
|
|
Pandemonium::api->pandemonium_pool_int_array_append(&_pandemonium_array, data);
|
2023-05-23 19:01:39 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void PoolIntArray::append_array(const PoolIntArray &array) {
|
2023-10-23 17:11:10 +02:00
|
|
|
Pandemonium::api->pandemonium_pool_int_array_append_array(&_pandemonium_array, &array._pandemonium_array);
|
2023-05-23 19:01:39 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
int PoolIntArray::insert(const int idx, const int data) {
|
2023-10-23 17:11:10 +02:00
|
|
|
return Pandemonium::api->pandemonium_pool_int_array_insert(&_pandemonium_array, idx, data);
|
2023-05-23 19:01:39 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void PoolIntArray::invert() {
|
2023-10-23 17:11:10 +02:00
|
|
|
Pandemonium::api->pandemonium_pool_int_array_invert(&_pandemonium_array);
|
2023-05-23 19:01:39 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void PoolIntArray::push_back(const int data) {
|
2023-10-23 17:11:10 +02:00
|
|
|
Pandemonium::api->pandemonium_pool_int_array_push_back(&_pandemonium_array, data);
|
2023-05-23 19:01:39 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void PoolIntArray::remove(const int idx) {
|
2023-10-23 17:11:10 +02:00
|
|
|
Pandemonium::api->pandemonium_pool_int_array_remove(&_pandemonium_array, idx);
|
2023-05-23 19:01:39 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void PoolIntArray::resize(const int size) {
|
2023-10-23 17:11:10 +02:00
|
|
|
Pandemonium::api->pandemonium_pool_int_array_resize(&_pandemonium_array, size);
|
2023-05-23 19:01:39 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void PoolIntArray::set(const int idx, const int data) {
|
2023-10-23 17:11:10 +02:00
|
|
|
Pandemonium::api->pandemonium_pool_int_array_set(&_pandemonium_array, idx, data);
|
2023-05-23 19:01:39 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
int PoolIntArray::operator[](const int idx) {
|
2023-10-23 17:11:10 +02:00
|
|
|
return Pandemonium::api->pandemonium_pool_int_array_get(&_pandemonium_array, idx);
|
2023-05-23 19:01:39 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
int PoolIntArray::size() const {
|
2023-10-23 17:11:10 +02:00
|
|
|
return Pandemonium::api->pandemonium_pool_int_array_size(&_pandemonium_array);
|
2023-05-23 19:01:39 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
PoolIntArray::~PoolIntArray() {
|
2023-10-23 17:11:10 +02:00
|
|
|
Pandemonium::api->pandemonium_pool_int_array_destroy(&_pandemonium_array);
|
2023-05-23 19:01:39 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
PoolRealArray::PoolRealArray() {
|
2023-10-23 17:11:10 +02:00
|
|
|
Pandemonium::api->pandemonium_pool_real_array_new(&_pandemonium_array);
|
2023-05-23 19:01:39 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
PoolRealArray::PoolRealArray(const PoolRealArray &p_other) {
|
2023-10-23 17:11:10 +02:00
|
|
|
Pandemonium::api->pandemonium_pool_real_array_new_copy(&_pandemonium_array, &p_other._pandemonium_array);
|
2023-05-23 19:01:39 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
PoolRealArray &PoolRealArray::operator=(const PoolRealArray &p_other) {
|
2023-10-23 17:11:10 +02:00
|
|
|
Pandemonium::api->pandemonium_pool_real_array_destroy(&_pandemonium_array);
|
|
|
|
Pandemonium::api->pandemonium_pool_real_array_new_copy(&_pandemonium_array, &p_other._pandemonium_array);
|
2023-05-23 19:01:39 +02:00
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
|
|
|
|
PoolRealArray::Read PoolRealArray::read() const {
|
|
|
|
Read read;
|
2023-10-23 17:11:10 +02:00
|
|
|
read._read_access = Pandemonium::api->pandemonium_pool_real_array_read(&_pandemonium_array);
|
2023-05-23 19:01:39 +02:00
|
|
|
return read;
|
|
|
|
}
|
|
|
|
|
|
|
|
PoolRealArray::Write PoolRealArray::write() {
|
|
|
|
Write write;
|
2023-10-23 17:11:10 +02:00
|
|
|
write._write_access = Pandemonium::api->pandemonium_pool_real_array_write(&_pandemonium_array);
|
2023-05-23 19:01:39 +02:00
|
|
|
return write;
|
|
|
|
}
|
|
|
|
|
|
|
|
PoolRealArray::PoolRealArray(const Array &array) {
|
2023-10-23 17:11:10 +02:00
|
|
|
Pandemonium::api->pandemonium_pool_real_array_new_with_array(&_pandemonium_array, (pandemonium_array *)&array);
|
2023-05-23 19:01:39 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void PoolRealArray::append(const real_t data) {
|
2023-10-23 17:11:10 +02:00
|
|
|
Pandemonium::api->pandemonium_pool_real_array_append(&_pandemonium_array, data);
|
2023-05-23 19:01:39 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void PoolRealArray::append_array(const PoolRealArray &array) {
|
2023-10-23 17:11:10 +02:00
|
|
|
Pandemonium::api->pandemonium_pool_real_array_append_array(&_pandemonium_array, &array._pandemonium_array);
|
2023-05-23 19:01:39 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
int PoolRealArray::insert(const int idx, const real_t data) {
|
2023-10-23 17:11:10 +02:00
|
|
|
return Pandemonium::api->pandemonium_pool_real_array_insert(&_pandemonium_array, idx, data);
|
2023-05-23 19:01:39 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void PoolRealArray::invert() {
|
2023-10-23 17:11:10 +02:00
|
|
|
Pandemonium::api->pandemonium_pool_real_array_invert(&_pandemonium_array);
|
2023-05-23 19:01:39 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void PoolRealArray::push_back(const real_t data) {
|
2023-10-23 17:11:10 +02:00
|
|
|
Pandemonium::api->pandemonium_pool_real_array_push_back(&_pandemonium_array, data);
|
2023-05-23 19:01:39 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void PoolRealArray::remove(const int idx) {
|
2023-10-23 17:11:10 +02:00
|
|
|
Pandemonium::api->pandemonium_pool_real_array_remove(&_pandemonium_array, idx);
|
2023-05-23 19:01:39 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void PoolRealArray::resize(const int size) {
|
2023-10-23 17:11:10 +02:00
|
|
|
Pandemonium::api->pandemonium_pool_real_array_resize(&_pandemonium_array, size);
|
2023-05-23 19:01:39 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void PoolRealArray::set(const int idx, const real_t data) {
|
2023-10-23 17:11:10 +02:00
|
|
|
Pandemonium::api->pandemonium_pool_real_array_set(&_pandemonium_array, idx, data);
|
2023-05-23 19:01:39 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
real_t PoolRealArray::operator[](const int idx) {
|
2023-10-23 17:11:10 +02:00
|
|
|
return Pandemonium::api->pandemonium_pool_real_array_get(&_pandemonium_array, idx);
|
2023-05-23 19:01:39 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
int PoolRealArray::size() const {
|
2023-10-23 17:11:10 +02:00
|
|
|
return Pandemonium::api->pandemonium_pool_real_array_size(&_pandemonium_array);
|
2023-05-23 19:01:39 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
PoolRealArray::~PoolRealArray() {
|
2023-10-23 17:11:10 +02:00
|
|
|
Pandemonium::api->pandemonium_pool_real_array_destroy(&_pandemonium_array);
|
2023-05-23 19:01:39 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
PoolStringArray::PoolStringArray() {
|
2023-10-23 17:11:10 +02:00
|
|
|
Pandemonium::api->pandemonium_pool_string_array_new(&_pandemonium_array);
|
2023-05-23 19:01:39 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
PoolStringArray::PoolStringArray(const PoolStringArray &p_other) {
|
2023-10-23 17:11:10 +02:00
|
|
|
Pandemonium::api->pandemonium_pool_string_array_new_copy(&_pandemonium_array, &p_other._pandemonium_array);
|
2023-05-23 19:01:39 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
PoolStringArray &PoolStringArray::operator=(const PoolStringArray &p_other) {
|
2023-10-23 17:11:10 +02:00
|
|
|
Pandemonium::api->pandemonium_pool_string_array_destroy(&_pandemonium_array);
|
|
|
|
Pandemonium::api->pandemonium_pool_string_array_new_copy(&_pandemonium_array, &p_other._pandemonium_array);
|
2023-05-23 19:01:39 +02:00
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
|
|
|
|
PoolStringArray::PoolStringArray(const Array &array) {
|
2023-10-23 17:11:10 +02:00
|
|
|
Pandemonium::api->pandemonium_pool_string_array_new_with_array(&_pandemonium_array, (pandemonium_array *)&array);
|
2023-05-23 19:01:39 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
PoolStringArray::Read PoolStringArray::read() const {
|
|
|
|
Read read;
|
2023-10-23 17:11:10 +02:00
|
|
|
read._read_access = Pandemonium::api->pandemonium_pool_string_array_read(&_pandemonium_array);
|
2023-05-23 19:01:39 +02:00
|
|
|
return read;
|
|
|
|
}
|
|
|
|
|
|
|
|
PoolStringArray::Write PoolStringArray::write() {
|
|
|
|
Write write;
|
2023-10-23 17:11:10 +02:00
|
|
|
write._write_access = Pandemonium::api->pandemonium_pool_string_array_write(&_pandemonium_array);
|
2023-05-23 19:01:39 +02:00
|
|
|
return write;
|
|
|
|
}
|
|
|
|
|
|
|
|
void PoolStringArray::append(const String &data) {
|
2023-10-23 17:11:10 +02:00
|
|
|
Pandemonium::api->pandemonium_pool_string_array_append(&_pandemonium_array, (pandemonium_string *)&data);
|
2023-05-23 19:01:39 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void PoolStringArray::append_array(const PoolStringArray &array) {
|
2023-10-23 17:11:10 +02:00
|
|
|
Pandemonium::api->pandemonium_pool_string_array_append_array(&_pandemonium_array, &array._pandemonium_array);
|
2023-05-23 19:01:39 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
int PoolStringArray::insert(const int idx, const String &data) {
|
2023-10-23 17:11:10 +02:00
|
|
|
return Pandemonium::api->pandemonium_pool_string_array_insert(&_pandemonium_array, idx, (pandemonium_string *)&data);
|
2023-05-23 19:01:39 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void PoolStringArray::invert() {
|
2023-10-23 17:11:10 +02:00
|
|
|
Pandemonium::api->pandemonium_pool_string_array_invert(&_pandemonium_array);
|
2023-05-23 19:01:39 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void PoolStringArray::push_back(const String &data) {
|
2023-10-23 17:11:10 +02:00
|
|
|
Pandemonium::api->pandemonium_pool_string_array_push_back(&_pandemonium_array, (pandemonium_string *)&data);
|
2023-05-23 19:01:39 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void PoolStringArray::remove(const int idx) {
|
2023-10-23 17:11:10 +02:00
|
|
|
Pandemonium::api->pandemonium_pool_string_array_remove(&_pandemonium_array, idx);
|
2023-05-23 19:01:39 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void PoolStringArray::resize(const int size) {
|
2023-10-23 17:11:10 +02:00
|
|
|
Pandemonium::api->pandemonium_pool_string_array_resize(&_pandemonium_array, size);
|
2023-05-23 19:01:39 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void PoolStringArray::set(const int idx, const String &data) {
|
2023-10-23 17:11:10 +02:00
|
|
|
Pandemonium::api->pandemonium_pool_string_array_set(&_pandemonium_array, idx, (pandemonium_string *)&data);
|
2023-05-23 19:01:39 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
const String PoolStringArray::operator[](const int idx) {
|
|
|
|
String s;
|
2023-10-23 17:11:10 +02:00
|
|
|
pandemonium_string str = Pandemonium::api->pandemonium_pool_string_array_get(&_pandemonium_array, idx);
|
|
|
|
Pandemonium::api->pandemonium_string_new_copy((pandemonium_string *)&s, &str);
|
|
|
|
Pandemonium::api->pandemonium_string_destroy(&str);
|
2023-05-23 19:01:39 +02:00
|
|
|
return s;
|
|
|
|
}
|
|
|
|
|
|
|
|
int PoolStringArray::size() const {
|
2023-10-23 17:11:10 +02:00
|
|
|
return Pandemonium::api->pandemonium_pool_string_array_size(&_pandemonium_array);
|
2023-05-23 19:01:39 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
PoolStringArray::~PoolStringArray() {
|
2023-10-23 17:11:10 +02:00
|
|
|
Pandemonium::api->pandemonium_pool_string_array_destroy(&_pandemonium_array);
|
2023-05-23 19:01:39 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
PoolVector2Array::PoolVector2Array() {
|
2023-10-23 17:11:10 +02:00
|
|
|
Pandemonium::api->pandemonium_pool_vector2_array_new(&_pandemonium_array);
|
2023-05-23 19:01:39 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
PoolVector2Array::PoolVector2Array(const PoolVector2Array &p_other) {
|
2023-10-23 17:11:10 +02:00
|
|
|
Pandemonium::api->pandemonium_pool_vector2_array_new_copy(&_pandemonium_array, &p_other._pandemonium_array);
|
2023-05-23 19:01:39 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
PoolVector2Array &PoolVector2Array::operator=(const PoolVector2Array &p_other) {
|
2023-10-23 17:11:10 +02:00
|
|
|
Pandemonium::api->pandemonium_pool_vector2_array_destroy(&_pandemonium_array);
|
|
|
|
Pandemonium::api->pandemonium_pool_vector2_array_new_copy(&_pandemonium_array, &p_other._pandemonium_array);
|
2023-05-23 19:01:39 +02:00
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
|
|
|
|
PoolVector2Array::PoolVector2Array(const Array &array) {
|
2023-10-23 17:11:10 +02:00
|
|
|
Pandemonium::api->pandemonium_pool_vector2_array_new_with_array(&_pandemonium_array, (pandemonium_array *)&array);
|
2023-05-23 19:01:39 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
PoolVector2Array::Read PoolVector2Array::read() const {
|
|
|
|
Read read;
|
2023-10-23 17:11:10 +02:00
|
|
|
read._read_access = Pandemonium::api->pandemonium_pool_vector2_array_read(&_pandemonium_array);
|
2023-05-23 19:01:39 +02:00
|
|
|
return read;
|
|
|
|
}
|
|
|
|
|
|
|
|
PoolVector2Array::Write PoolVector2Array::write() {
|
|
|
|
Write write;
|
2023-10-23 17:11:10 +02:00
|
|
|
write._write_access = Pandemonium::api->pandemonium_pool_vector2_array_write(&_pandemonium_array);
|
2023-05-23 19:01:39 +02:00
|
|
|
return write;
|
|
|
|
}
|
|
|
|
|
|
|
|
void PoolVector2Array::append(const Vector2 &data) {
|
2023-10-23 17:11:10 +02:00
|
|
|
Pandemonium::api->pandemonium_pool_vector2_array_append(&_pandemonium_array, (pandemonium_vector2 *)&data);
|
2023-05-23 19:01:39 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void PoolVector2Array::append_array(const PoolVector2Array &array) {
|
2023-10-23 17:11:10 +02:00
|
|
|
Pandemonium::api->pandemonium_pool_vector2_array_append_array(&_pandemonium_array, &array._pandemonium_array);
|
2023-05-23 19:01:39 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
int PoolVector2Array::insert(const int idx, const Vector2 &data) {
|
2023-10-23 17:11:10 +02:00
|
|
|
return Pandemonium::api->pandemonium_pool_vector2_array_insert(&_pandemonium_array, idx, (pandemonium_vector2 *)&data);
|
2023-05-23 19:01:39 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void PoolVector2Array::invert() {
|
2023-10-23 17:11:10 +02:00
|
|
|
Pandemonium::api->pandemonium_pool_vector2_array_invert(&_pandemonium_array);
|
2023-05-23 19:01:39 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void PoolVector2Array::push_back(const Vector2 &data) {
|
2023-10-23 17:11:10 +02:00
|
|
|
Pandemonium::api->pandemonium_pool_vector2_array_push_back(&_pandemonium_array, (pandemonium_vector2 *)&data);
|
2023-05-23 19:01:39 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void PoolVector2Array::remove(const int idx) {
|
2023-10-23 17:11:10 +02:00
|
|
|
Pandemonium::api->pandemonium_pool_vector2_array_remove(&_pandemonium_array, idx);
|
2023-05-23 19:01:39 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void PoolVector2Array::resize(const int size) {
|
2023-10-23 17:11:10 +02:00
|
|
|
Pandemonium::api->pandemonium_pool_vector2_array_resize(&_pandemonium_array, size);
|
2023-05-23 19:01:39 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void PoolVector2Array::set(const int idx, const Vector2 &data) {
|
2023-10-23 17:11:10 +02:00
|
|
|
Pandemonium::api->pandemonium_pool_vector2_array_set(&_pandemonium_array, idx, (pandemonium_vector2 *)&data);
|
2023-05-23 19:01:39 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
const Vector2 PoolVector2Array::operator[](const int idx) {
|
|
|
|
Vector2 v;
|
2023-10-23 17:11:10 +02:00
|
|
|
*(pandemonium_vector2 *)&v = Pandemonium::api->pandemonium_pool_vector2_array_get(&_pandemonium_array, idx);
|
2023-05-23 19:01:39 +02:00
|
|
|
return v;
|
|
|
|
}
|
|
|
|
|
|
|
|
int PoolVector2Array::size() const {
|
2023-10-23 17:11:10 +02:00
|
|
|
return Pandemonium::api->pandemonium_pool_vector2_array_size(&_pandemonium_array);
|
2023-05-23 19:01:39 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
PoolVector2Array::~PoolVector2Array() {
|
2023-10-23 17:11:10 +02:00
|
|
|
Pandemonium::api->pandemonium_pool_vector2_array_destroy(&_pandemonium_array);
|
2023-05-23 19:01:39 +02:00
|
|
|
}
|
|
|
|
|
2023-05-31 17:25:57 +02:00
|
|
|
PoolVector2iArray::PoolVector2iArray() {
|
2023-10-23 17:11:10 +02:00
|
|
|
Pandemonium::api->pandemonium_pool_vector2i_array_new(&_pandemonium_array);
|
2023-05-31 17:25:57 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
PoolVector2iArray::PoolVector2iArray(const PoolVector2iArray &p_other) {
|
2023-10-23 17:11:10 +02:00
|
|
|
Pandemonium::api->pandemonium_pool_vector2i_array_new_copy(&_pandemonium_array, &p_other._pandemonium_array);
|
2023-05-31 17:25:57 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
PoolVector2iArray &PoolVector2iArray::operator=(const PoolVector2iArray &p_other) {
|
2023-10-23 17:11:10 +02:00
|
|
|
Pandemonium::api->pandemonium_pool_vector2i_array_destroy(&_pandemonium_array);
|
|
|
|
Pandemonium::api->pandemonium_pool_vector2i_array_new_copy(&_pandemonium_array, &p_other._pandemonium_array);
|
2023-05-31 17:25:57 +02:00
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
|
|
|
|
PoolVector2iArray::PoolVector2iArray(const Array &array) {
|
2023-10-23 17:11:10 +02:00
|
|
|
Pandemonium::api->pandemonium_pool_vector2i_array_new_with_array(&_pandemonium_array, (pandemonium_array *)&array);
|
2023-05-31 17:25:57 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
PoolVector2iArray::Read PoolVector2iArray::read() const {
|
|
|
|
Read read;
|
2023-10-23 17:11:10 +02:00
|
|
|
read._read_access = Pandemonium::api->pandemonium_pool_vector2i_array_read(&_pandemonium_array);
|
2023-05-31 17:25:57 +02:00
|
|
|
return read;
|
|
|
|
}
|
|
|
|
|
|
|
|
PoolVector2iArray::Write PoolVector2iArray::write() {
|
|
|
|
Write write;
|
2023-10-23 17:11:10 +02:00
|
|
|
write._write_access = Pandemonium::api->pandemonium_pool_vector2i_array_write(&_pandemonium_array);
|
2023-05-31 17:25:57 +02:00
|
|
|
return write;
|
|
|
|
}
|
|
|
|
|
|
|
|
void PoolVector2iArray::append(const Vector2i &data) {
|
2023-10-23 17:11:10 +02:00
|
|
|
Pandemonium::api->pandemonium_pool_vector2i_array_append(&_pandemonium_array, (pandemonium_vector2i *)&data);
|
2023-05-31 17:25:57 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void PoolVector2iArray::append_array(const PoolVector2iArray &array) {
|
2023-10-23 17:11:10 +02:00
|
|
|
Pandemonium::api->pandemonium_pool_vector2i_array_append_array(&_pandemonium_array, &array._pandemonium_array);
|
2023-05-31 17:25:57 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
int PoolVector2iArray::insert(const int idx, const Vector2i &data) {
|
2023-10-23 17:11:10 +02:00
|
|
|
return Pandemonium::api->pandemonium_pool_vector2i_array_insert(&_pandemonium_array, idx, (pandemonium_vector2i *)&data);
|
2023-05-31 17:25:57 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void PoolVector2iArray::invert() {
|
2023-10-23 17:11:10 +02:00
|
|
|
Pandemonium::api->pandemonium_pool_vector2i_array_invert(&_pandemonium_array);
|
2023-05-31 17:25:57 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void PoolVector2iArray::push_back(const Vector2i &data) {
|
2023-10-23 17:11:10 +02:00
|
|
|
Pandemonium::api->pandemonium_pool_vector2i_array_push_back(&_pandemonium_array, (pandemonium_vector2i *)&data);
|
2023-05-31 17:25:57 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void PoolVector2iArray::remove(const int idx) {
|
2023-10-23 17:11:10 +02:00
|
|
|
Pandemonium::api->pandemonium_pool_vector2i_array_remove(&_pandemonium_array, idx);
|
2023-05-31 17:25:57 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void PoolVector2iArray::resize(const int size) {
|
2023-10-23 17:11:10 +02:00
|
|
|
Pandemonium::api->pandemonium_pool_vector2i_array_resize(&_pandemonium_array, size);
|
2023-05-31 17:25:57 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void PoolVector2iArray::set(const int idx, const Vector2i &data) {
|
2023-10-23 17:11:10 +02:00
|
|
|
Pandemonium::api->pandemonium_pool_vector2i_array_set(&_pandemonium_array, idx, (pandemonium_vector2i *)&data);
|
2023-05-31 17:25:57 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
const Vector2i PoolVector2iArray::operator[](const int idx) {
|
|
|
|
Vector2i v;
|
2023-10-23 17:11:10 +02:00
|
|
|
*(pandemonium_vector2i *)&v = Pandemonium::api->pandemonium_pool_vector2i_array_get(&_pandemonium_array, idx);
|
2023-05-31 17:25:57 +02:00
|
|
|
return v;
|
|
|
|
}
|
|
|
|
|
|
|
|
int PoolVector2iArray::size() const {
|
2023-10-23 17:11:10 +02:00
|
|
|
return Pandemonium::api->pandemonium_pool_vector2i_array_size(&_pandemonium_array);
|
2023-05-31 17:25:57 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
PoolVector2iArray::~PoolVector2iArray() {
|
2023-10-23 17:11:10 +02:00
|
|
|
Pandemonium::api->pandemonium_pool_vector2i_array_destroy(&_pandemonium_array);
|
2023-05-31 17:25:57 +02:00
|
|
|
}
|
|
|
|
|
2023-05-23 19:01:39 +02:00
|
|
|
PoolVector3Array::PoolVector3Array() {
|
2023-10-23 17:11:10 +02:00
|
|
|
Pandemonium::api->pandemonium_pool_vector3_array_new(&_pandemonium_array);
|
2023-05-23 19:01:39 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
PoolVector3Array::PoolVector3Array(const PoolVector3Array &p_other) {
|
2023-10-23 17:11:10 +02:00
|
|
|
Pandemonium::api->pandemonium_pool_vector3_array_new_copy(&_pandemonium_array, &p_other._pandemonium_array);
|
2023-05-23 19:01:39 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
PoolVector3Array &PoolVector3Array::operator=(const PoolVector3Array &p_other) {
|
2023-10-23 17:11:10 +02:00
|
|
|
Pandemonium::api->pandemonium_pool_vector3_array_destroy(&_pandemonium_array);
|
|
|
|
Pandemonium::api->pandemonium_pool_vector3_array_new_copy(&_pandemonium_array, &p_other._pandemonium_array);
|
2023-05-23 19:01:39 +02:00
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
|
|
|
|
PoolVector3Array::PoolVector3Array(const Array &array) {
|
2023-10-23 17:11:10 +02:00
|
|
|
Pandemonium::api->pandemonium_pool_vector3_array_new_with_array(&_pandemonium_array, (pandemonium_array *)&array);
|
2023-05-23 19:01:39 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
PoolVector3Array::Read PoolVector3Array::read() const {
|
|
|
|
Read read;
|
2023-10-23 17:11:10 +02:00
|
|
|
read._read_access = Pandemonium::api->pandemonium_pool_vector3_array_read(&_pandemonium_array);
|
2023-05-23 19:01:39 +02:00
|
|
|
return read;
|
|
|
|
}
|
|
|
|
|
|
|
|
PoolVector3Array::Write PoolVector3Array::write() {
|
|
|
|
Write write;
|
2023-10-23 17:11:10 +02:00
|
|
|
write._write_access = Pandemonium::api->pandemonium_pool_vector3_array_write(&_pandemonium_array);
|
2023-05-23 19:01:39 +02:00
|
|
|
return write;
|
|
|
|
}
|
|
|
|
|
|
|
|
void PoolVector3Array::append(const Vector3 &data) {
|
2023-10-23 17:11:10 +02:00
|
|
|
Pandemonium::api->pandemonium_pool_vector3_array_append(&_pandemonium_array, (pandemonium_vector3 *)&data);
|
2023-05-23 19:01:39 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void PoolVector3Array::append_array(const PoolVector3Array &array) {
|
2023-10-23 17:11:10 +02:00
|
|
|
Pandemonium::api->pandemonium_pool_vector3_array_append_array(&_pandemonium_array, &array._pandemonium_array);
|
2023-05-23 19:01:39 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
int PoolVector3Array::insert(const int idx, const Vector3 &data) {
|
2023-10-23 17:11:10 +02:00
|
|
|
return Pandemonium::api->pandemonium_pool_vector3_array_insert(&_pandemonium_array, idx, (pandemonium_vector3 *)&data);
|
2023-05-23 19:01:39 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void PoolVector3Array::invert() {
|
2023-10-23 17:11:10 +02:00
|
|
|
Pandemonium::api->pandemonium_pool_vector3_array_invert(&_pandemonium_array);
|
2023-05-23 19:01:39 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void PoolVector3Array::push_back(const Vector3 &data) {
|
2023-10-23 17:11:10 +02:00
|
|
|
Pandemonium::api->pandemonium_pool_vector3_array_push_back(&_pandemonium_array, (pandemonium_vector3 *)&data);
|
2023-05-23 19:01:39 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void PoolVector3Array::remove(const int idx) {
|
2023-10-23 17:11:10 +02:00
|
|
|
Pandemonium::api->pandemonium_pool_vector3_array_remove(&_pandemonium_array, idx);
|
2023-05-23 19:01:39 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void PoolVector3Array::resize(const int size) {
|
2023-10-23 17:11:10 +02:00
|
|
|
Pandemonium::api->pandemonium_pool_vector3_array_resize(&_pandemonium_array, size);
|
2023-05-23 19:01:39 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void PoolVector3Array::set(const int idx, const Vector3 &data) {
|
2023-10-23 17:11:10 +02:00
|
|
|
Pandemonium::api->pandemonium_pool_vector3_array_set(&_pandemonium_array, idx, (pandemonium_vector3 *)&data);
|
2023-05-23 19:01:39 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
const Vector3 PoolVector3Array::operator[](const int idx) {
|
|
|
|
Vector3 v;
|
2023-10-23 17:11:10 +02:00
|
|
|
*(pandemonium_vector3 *)&v = Pandemonium::api->pandemonium_pool_vector3_array_get(&_pandemonium_array, idx);
|
2023-05-23 19:01:39 +02:00
|
|
|
return v;
|
|
|
|
}
|
|
|
|
|
|
|
|
int PoolVector3Array::size() const {
|
2023-10-23 17:11:10 +02:00
|
|
|
return Pandemonium::api->pandemonium_pool_vector3_array_size(&_pandemonium_array);
|
2023-05-23 19:01:39 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
PoolVector3Array::~PoolVector3Array() {
|
2023-10-23 17:11:10 +02:00
|
|
|
Pandemonium::api->pandemonium_pool_vector3_array_destroy(&_pandemonium_array);
|
2023-05-23 19:01:39 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
PoolColorArray::PoolColorArray() {
|
2023-10-23 17:11:10 +02:00
|
|
|
Pandemonium::api->pandemonium_pool_color_array_new(&_pandemonium_array);
|
2023-05-23 19:01:39 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
PoolColorArray::PoolColorArray(const PoolColorArray &p_other) {
|
2023-10-23 17:11:10 +02:00
|
|
|
Pandemonium::api->pandemonium_pool_color_array_new_copy(&_pandemonium_array, &p_other._pandemonium_array);
|
2023-05-23 19:01:39 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
PoolColorArray &PoolColorArray::operator=(const PoolColorArray &p_other) {
|
2023-10-23 17:11:10 +02:00
|
|
|
Pandemonium::api->pandemonium_pool_color_array_destroy(&_pandemonium_array);
|
|
|
|
Pandemonium::api->pandemonium_pool_color_array_new_copy(&_pandemonium_array, &p_other._pandemonium_array);
|
2023-05-23 19:01:39 +02:00
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
|
|
|
|
PoolColorArray::PoolColorArray(const Array &array) {
|
2023-10-23 17:11:10 +02:00
|
|
|
Pandemonium::api->pandemonium_pool_color_array_new_with_array(&_pandemonium_array, (pandemonium_array *)&array);
|
2023-05-23 19:01:39 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
PoolColorArray::Read PoolColorArray::read() const {
|
|
|
|
Read read;
|
2023-10-23 17:11:10 +02:00
|
|
|
read._read_access = Pandemonium::api->pandemonium_pool_color_array_read(&_pandemonium_array);
|
2023-05-23 19:01:39 +02:00
|
|
|
return read;
|
|
|
|
}
|
|
|
|
|
|
|
|
PoolColorArray::Write PoolColorArray::write() {
|
|
|
|
Write write;
|
2023-10-23 17:11:10 +02:00
|
|
|
write._write_access = Pandemonium::api->pandemonium_pool_color_array_write(&_pandemonium_array);
|
2023-05-23 19:01:39 +02:00
|
|
|
return write;
|
|
|
|
}
|
|
|
|
|
|
|
|
void PoolColorArray::append(const Color &data) {
|
2023-10-23 17:11:10 +02:00
|
|
|
Pandemonium::api->pandemonium_pool_color_array_append(&_pandemonium_array, (pandemonium_color *)&data);
|
2023-05-23 19:01:39 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void PoolColorArray::append_array(const PoolColorArray &array) {
|
2023-10-23 17:11:10 +02:00
|
|
|
Pandemonium::api->pandemonium_pool_color_array_append_array(&_pandemonium_array, &array._pandemonium_array);
|
2023-05-23 19:01:39 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
int PoolColorArray::insert(const int idx, const Color &data) {
|
2023-10-23 17:11:10 +02:00
|
|
|
return Pandemonium::api->pandemonium_pool_color_array_insert(&_pandemonium_array, idx, (pandemonium_color *)&data);
|
2023-05-23 19:01:39 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void PoolColorArray::invert() {
|
2023-10-23 17:11:10 +02:00
|
|
|
Pandemonium::api->pandemonium_pool_color_array_invert(&_pandemonium_array);
|
2023-05-23 19:01:39 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void PoolColorArray::push_back(const Color &data) {
|
2023-10-23 17:11:10 +02:00
|
|
|
Pandemonium::api->pandemonium_pool_color_array_push_back(&_pandemonium_array, (pandemonium_color *)&data);
|
2023-05-23 19:01:39 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void PoolColorArray::remove(const int idx) {
|
2023-10-23 17:11:10 +02:00
|
|
|
Pandemonium::api->pandemonium_pool_color_array_remove(&_pandemonium_array, idx);
|
2023-05-23 19:01:39 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void PoolColorArray::resize(const int size) {
|
2023-10-23 17:11:10 +02:00
|
|
|
Pandemonium::api->pandemonium_pool_color_array_resize(&_pandemonium_array, size);
|
2023-05-23 19:01:39 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void PoolColorArray::set(const int idx, const Color &data) {
|
2023-10-23 17:11:10 +02:00
|
|
|
Pandemonium::api->pandemonium_pool_color_array_set(&_pandemonium_array, idx, (pandemonium_color *)&data);
|
2023-05-23 19:01:39 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
const Color PoolColorArray::operator[](const int idx) {
|
|
|
|
Color v;
|
2023-10-23 17:11:10 +02:00
|
|
|
*(pandemonium_color *)&v = Pandemonium::api->pandemonium_pool_color_array_get(&_pandemonium_array, idx);
|
2023-05-23 19:01:39 +02:00
|
|
|
return v;
|
|
|
|
}
|
|
|
|
|
|
|
|
int PoolColorArray::size() const {
|
2023-10-23 17:11:10 +02:00
|
|
|
return Pandemonium::api->pandemonium_pool_color_array_size(&_pandemonium_array);
|
2023-05-23 19:01:39 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
PoolColorArray::~PoolColorArray() {
|
2023-10-23 17:11:10 +02:00
|
|
|
Pandemonium::api->pandemonium_pool_color_array_destroy(&_pandemonium_array);
|
2023-05-23 19:01:39 +02:00
|
|
|
}
|
|
|
|
|
2023-10-23 17:11:10 +02:00
|
|
|
|